| Server IP : 162.214.74.102 / Your IP : 216.73.216.192 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/lrsys/www/lrsys_apps/imobles/application/plugins/module_imobles/assets/libs/ |
Upload File : |
<?php
class Helper {
/**
* @param strinh string
* @return string
*/
public function replaceAscii($string) {
$string = preg_replace("/Ç/", "C", $string);
$string = preg_replace("/ç/", "c", $string);
$string = preg_replace("/Á/", "A", $string);
$string = preg_replace("/À/", "A", $string);
$string = preg_replace("/Â/", "A", $string);
$string = preg_replace("/Ã/", "A", $string);
$string = preg_replace("/á/", "a", $string);
$string = preg_replace("/à/", "a", $string);
$string = preg_replace("/â/", "a", $string);
$string = preg_replace("/ã/", "a", $string);
$string = preg_replace("/ª/", "a", $string);
$string = preg_replace("/é/", "e", $string);
$string = preg_replace("/è/", "e", $string);
$string = preg_replace("/ê/", "e", $string);
$string = preg_replace("/É/", "E", $string);
$string = preg_replace("/È/", "E", $string);
$string = preg_replace("/Ê/", "E", $string);
$string = preg_replace("/í/", "i", $string);
$string = preg_replace("/ì/", "i", $string);
$string = preg_replace("/Í/", "I", $string);
$string = preg_replace("/Ì/", "I", $string);
$string = preg_replace("/ó/", "o", $string);
$string = preg_replace("/ò/", "o", $string);
$string = preg_replace("/ô/", "o", $string);
$string = preg_replace("/õ/", "o", $string);
$string = preg_replace("/º/", "o", $string);
$string = preg_replace("/Ó/", "O", $string);
$string = preg_replace("/Ò/", "O", $string);
$string = preg_replace("/Ô/", "O", $string);
$string = preg_replace("/Õ/", "O", $string);
$string = preg_replace("/ú/", "u", $string);
$string = preg_replace("/ù/", "u", $string);
$string = preg_replace("/û/", "u", $string);
$string = preg_replace("/Ú/", "U", $string);
$string = preg_replace("/Ù/", "U", $string);
$string = preg_replace("/Û/", "U", $string);
$string = preg_replace("/ /", "_", $string);
$not = array('!', '@', '#', '$', '%', '&', '(', ')', '-', '~',
'^', ']', '[', '´', '`', '+', '{', '}');
$nova = $string;
for ($i = 0; $i < strlen($string); $i++) {
if (in_array($string[$i], $not))
$nova[$i] = "_";
}
return $nova;
}
public function reorder($i) {
return '
$(function() {
$("#sorder").sortable({ opacity: 0.6, cursor: \'move\', update: function() {
var order = $(this).sortable("serialize") + \'&action=' . $i . '\';
$("#resp").html(\'Saving...\');
$.post("' . U . 'module_imobles/ajax/reorder_post", order, function(theResponse){
$("#resp").html(theResponse);
});
}
});
});
';
}
/**
* cleanString
* Remove todos dos caracteres especiais do texto e os acentos
*
* @param string $texto
* @return string Texto sem caractere especiais
*/
public function cleanString($texto = '')
{
$texto = trim($texto);
$aFind = array('&','á','à','ã','â','é','ê','í','ó','ô','õ','ú','ü',
'ç','Á','À','Ã','Â','É','Ê','Í','Ó','Ô','Õ','Ú','Ü','Ç');
$aSubs = array('e','a','a','a','a','e','e','i','o','o','o','u','u',
'c','A','A','A','A','E','E','I','O','O','O','U','U','C');
$novoTexto = str_replace($aFind, $aSubs, $texto);
$novoTexto = preg_replace("/[^a-zA-Z0-9 @,-.;:\/]/", "", $novoTexto);
return $novoTexto;
}
}