<?


function check1($message){

$message = str_replace('\'', '&quot;', $message);
$message = str_replace('|', '&#0166;', $message);
$message = str_replace('\'', '&#8216;', $message);
$message = str_replace('\\', '', $message);
$message=str_replace('||','I',$message);
$message=htmlspecialchars($message);
$message = str_replace('\'', '&quot;', $message);
$message = str_replace('|', '&#0166;', $message);
$message = str_replace('\'', '&#8216;', $message);
$message = addslashes($message);
$message=str_replace('\$','&#36;',$message);
$message=str_replace('$','&#36;',$message);
$message=str_replace('\\','&#92;', $message);
$message=str_replace('`','', $message);
$message=str_replace('^','&#94;', $message);
$message=str_replace('%','&#37;', $message);
$message=preg_replace('|&#58;|',':',$message,3);
$message=stripslashes(trim($message));
return $message;
}

function trun_to_rus1($message){
$message=str_replace('ch','ч',$message);
$message=str_replace('sc','щ',$message);
$message=str_replace('sh','ш',$message);
$message=str_replace('ye','э',$message);
$message=str_replace('yu','ю',$message);
$message=str_replace('ya','я',$message);
$message=str_replace('CH','Ч',$message);
$message=str_replace('Ch','Ч',$message);
$message=str_replace('SC','Щ',$message);
$message=str_replace('Sc','Щ',$message);
$message=str_replace('SH','Ш',$message);
$message=str_replace('Sh','Ш',$message);
$message=str_replace('&quot;&quot;','Ъ',$message);
$message=str_replace('&quot;','ъ',$message);
$message=str_replace('&#8216;&#8216;','Ь',$message);
$message=str_replace('&#8216;','ь',$message);
$message=str_replace('\\Ь','Ь',$message);
$message=str_replace('\\ь','ь',$message);
$message=str_replace('YE','Э',$message);
$message=str_replace('Ye','Э',$message);
$message=str_replace('YU','Ю',$message);
$message=str_replace('Yu','Ю',$message);
$message=str_replace('YA','Я',$message);
$message=str_replace('Ya','Я',$message);
$message=strtr($message,array('\''=>'','a'=>'а','b'=>'б','v'=>'в','g'=>'г','d'=>'д','e'=>'е','j'=>'ж','z'=>'з','i'=>'и','y'=>'й','k'=>'к','l'=>'л','m'=>'м','n'=>'н','o'=>'о','p'=>'п','r'=>'р','s'=>'с','t'=>'т','u'=>'у','f'=>'ф','h'=>'х','c'=>'ц','w'=>'ш','x'=>'ы','A'=>'А','B'=>'Б','V'=>'В','G'=>'Г','D'=>'Д','E'=>'Е','J'=>'Ж','Z'=>'З','I'=>'И','Y'=>'Й','K'=>'К','L'=>'Л','M'=>'М','N'=>'Н','O'=>'О','P'=>'П','R'=>'Р','S'=>'С','T'=>'Т','U'=>'У','F'=>'Ф','H'=>'Х','C'=>'Ц','W'=>'Ш','X'=>'Ы'));
return $message;
}

function no_br($message,$replace=''){
$message=preg_replace ('|[\r]+|si',$replace,$message);
return $message;
}
function check_full($message){
$message=str_replace('|','I',$message);
$message=str_replace('||','I',$message);
$message=str_replace('&','',$message);
$message=str_replace('\'','',$message);
$message=str_replace('>','',$message);
$message=str_replace('<','',$message);
$message=htmlspecialchars($message);
$message=str_replace('\'','',$message);
$message=str_replace('\'','',$message);
$message=str_replace('\$','',$message);
$message=str_replace('$','',$message);
$message=str_replace('\\','', $message);
$message=str_replace('`','', $message);
$message=str_replace('%','', $message);
$message=stripslashes(trim($message));
return $message;
}


$f = check($f);
$sf = check($sf);
$t = check($t);
$m = check($m);
$s = check($s);
$for = check($for);
$wap = check_full($wap);



?>