Просмотр файла temp/functions.php

Размер файла: 3.76Kb
<?
function latrus($string)
{
$string = ereg_replace("j","ж",$string);
$string = ereg_replace("J","Ж",$string);
$string = ereg_replace("yo","ё",$string);
$string = ereg_replace("Yu","Ю",$string);
$string = ereg_replace("Shc","Щ",$string);
$string = ereg_replace("shc","щ",$string);
$string = ereg_replace("yu","ю",$string);
$string = ereg_replace("sh","ш",$string);
$string = ereg_replace("ye","э",$string);
$string = ereg_replace("ya","я",$string);
$string = ereg_replace("Sh","Ш",$string);
$string = ereg_replace("Ch","Ч",$string);
$string = ereg_replace("ch","ч",$string);
$string = ereg_replace("Yo","Ё",$string);
$string = ereg_replace("Ya","Я",$string);
$string = ereg_replace("Ye","Э",$string);
$string = ereg_replace("i","и",$string);
$string = ereg_replace("'","ь",$string);
$string = ereg_replace("c","ц",$string);
$string = ereg_replace("u","у",$string);
$string = ereg_replace("k","к",$string);
$string = ereg_replace("e","е",$string);
$string = ereg_replace("n","н",$string);
$string = ereg_replace("g","г",$string);
$string = ereg_replace("z","з",$string);
$string = ereg_replace("h","х",$string);
$string = ereg_replace("''","ъ",$string);
$string = ereg_replace("f","ф",$string);
$string = ereg_replace("x","ы",$string);
$string = ereg_replace("v","в",$string);
$string = ereg_replace("a","а",$string);
$string = ereg_replace("p","п",$string);
$string = ereg_replace("r","р",$string);
$string = ereg_replace("o","о",$string);
$string = ereg_replace("l","л",$string);
$string = ereg_replace("d","д",$string);
$string = ereg_replace("s","с",$string);
$string = ereg_replace("m","м",$string);
$string = ereg_replace("t","т",$string);
$string = ereg_replace("b","б",$string);
$string = ereg_replace("Y","Й",$string);
$string = ereg_replace("C","Ц",$string);
$string = ereg_replace("U","У",$string);
$string = ereg_replace("K","К",$string);
$string = ereg_replace("E","Е",$string);
$string = ereg_replace("N","Н",$string);
$string = ereg_replace("G","Г",$string);
$string = ereg_replace("Z","З",$string);
$string = ereg_replace("H","Х",$string);
$string = ereg_replace("F","Ф",$string);
$string = ereg_replace("X","Ы",$string);
$string = ereg_replace("V","В",$string);
$string = ereg_replace("A","А",$string);
$string = ereg_replace("P","П",$string);
$string = ereg_replace("R","Р",$string);
$string = ereg_replace("O","О",$string);
$string = ereg_replace("L","Л",$string);
$string = ereg_replace("D","Д",$string);
$string = ereg_replace("y","й",$string);
$string = ereg_replace("S","С",$string);
$string = ereg_replace("M","М",$string);
$string = ereg_replace("I","И",$string);
$string = ereg_replace("T","Т",$string);
$string = ereg_replace("B","Б",$string);
return $string;
}

function rus_utf_tolower($str){
$str=strtr($str,array("А"=>"а","Б"=>"б","В"=>"в","Г"=>"г","Д"=>"д","Е"=>"е","Ё"=>"ё","Ж"=>"ж","З"=>"з","И"=>"и","Й"=>"й","К"=>"к","Л"=>"л","М"=>"м","Н"=>"н","О"=>"о","П"=>"п","Р"=>"р","С"=>"с","Т"=>"т","У"=>"у","Ф"=>"ф","Х"=>"х","Ц"=>"ц","Ч"=>"ч","Ш"=>"ш","Щ"=>"щ","Ъ"=>"ъ","Ы"=>"ы","Ь"=>"ь","Э"=>"э","Ю"=>"ю","Я"=>"я"));
 return $str;
}

function ngl_utf_tolower($str){
$str=strtr($str,array("Q"=>"q","W"=>"w","E"=>"e","R"=>"r","T"=>"t","Y"=>"y","U"=>"u","I"=>"i","O"=>"o","P"=>"p","A"=>"a","S"=>"s","D"=>"d","F"=>"f","G"=>"g","H"=>"h","J"=>"j","K"=>"k","L"=>"l","Z"=>"z","X"=>"x","C"=>"c","V"=>"v","B"=>"b","N"=>"n","M"=>"m"));
 return $str;
}

function bug($msg){
$msg=stripslashes($msg);
$msg=htmlspecialchars(trim($msg));
$msg=mysql_real_escape_string($msg);
$msg=str_replace("`","", $msg);
$msg=str_replace("%","", $msg);
$msg=str_replace("../","", $msg);
$msg=str_replace("\0","", $msg);
return $msg;
};
?>