View file inc.php

File size: 4.71Kb
<? define("DATA_MAIN", true); ?>
<?
$mysql_host="localhost";
$mysql_user="wapfonn_bazap";
$mysql_pass="000111";
$mysql_name="wapfonn_baza";

$mysql = mysql_connect ($mysql_host, $mysql_user, $mysql_pass) or die ("<b>Нет соединения с MySQL</b>");
mysql_select_db($mysql_name) or die ("<b>Неверно выбрана база данных</b>");

$link_site="http://wapfon.net";
$title_site="WapFon.NeT";
$align_site="left";

$msgs=5;
$pw='000999';

function check($str){
$str = str_replace("\\n", " ", $str);
$str = str_replace("", " ", $str);
$str = str_replace("$", "$$", $str);
$str=strtr($str,array(chr("0")=>"",chr("1")=>"",chr("2")=>"",chr("3")=>"",chr("4")=>"",chr("5")=>"",chr("6")=>"",chr("7")=>"",chr("8")=>"",chr("9")=>"",chr("10")=>"",chr("11")=>"",chr("12")=>"",chr("13")=>"",chr("14")=>"",chr("15")=>"",chr("16")=>"",chr("17")=>"",chr("18")=>"",chr("19")=>"",chr("20")=>"",chr("21")=>"",chr("22")=>"",chr("23")=>"",chr("24")=>"",chr("25")=>"",chr("26")=>"",chr("27")=>"",chr("28")=>"",chr("29")=>"",chr("30")=>"",chr("31")=>""));
$str = htmlspecialchars($str);
$str=addslashes($str);
return $str;};

function trun_to_rus($str)
{$str=str_replace("ch","С‡",$str);
$str=str_replace("sc","С‰",$str);
$str=str_replace("ye","СЌ",$str);
$str=str_replace("yu","СЋ",$str);
$str=str_replace("ya","СЏ",$str);
$str=str_replace("CH","Р§",$str);
$str=str_replace("SC","Р©",$str);
$str=str_replace("\"\"","РЄ",$str);
$str=str_replace("\"","СЉ",$str);
$str=str_replace("''","Р¬",$str);
$str=str_replace("'","СЊ",$str);
$str=str_replace("YE","Р­",$str);
$str=str_replace("YU","Р®",$str);
$str=str_replace("YA","РЇ",$str);
$str=strtr($str,array("a"=>"a","b"=>"Р±","v"=>"РІ","g"=>"Рі","d"=>"Рґ","e"=>"e","j"=>"Р¶","z"=>"Р·","i"=>"Рё","y"=>"Р№","k"=>"Рє","l"=>"Р»","m"=>"Рј","n"=>"РЅ","o"=>"o","p"=>"Рї","r"=>"СЂ","s"=>"c","t"=>"С‚","u"=>"Сѓ","f"=>"С„","h"=>"x","c"=>"С†","w"=>"С€","x"=>"С‹","A"=>"A","B"=>"Р‘","V"=>"B","G"=>"Р“","D"=>"Р”","E"=>"E","J"=>"Р–","Z"=>"Р—","I"=>"Р?","Y"=>"Р™","K"=>"K","L"=>"Р›","M"=>"M","N"=>"H","O"=>"O","P"=>"Рџ","R"=>"P","S"=>"C","T"=>"T","U"=>"РЈ","F"=>"Р¤","H"=>"X","C"=>"Р¦","W"=>"РЁ","X"=>"Р«"));
return $str;}

function rus_to_k($nick){
$nick = str_replace("Р°","a",$nick);
$nick = str_replace("Р±","b",$nick);
$nick = str_replace("РІ","v",$nick);
$nick = str_replace("Рі","g",$nick);
$nick = str_replace("Рґ","d",$nick);
$nick = str_replace("Рµ","e",$nick);
$nick = str_replace("С‘","e",$nick);
$nick = str_replace("Р¶","j",$nick);
$nick = str_replace("Р·","z",$nick);
$nick = str_replace("Рё","i",$nick);
$nick = str_replace("Р№","y",$nick);
$nick = str_replace("Рє","k",$nick);
$nick = str_replace("Р»","l",$nick);
$nick = str_replace("Рј","m",$nick);
$nick = str_replace("РЅ","n",$nick);
$nick = str_replace("Рѕ","o",$nick);
$nick = str_replace("Рї","p",$nick);
$nick = str_replace("СЂ","r",$nick);
$nick = str_replace("СЃ","s",$nick);
$nick = str_replace("С‚","t",$nick);
$nick = str_replace("Сѓ","u",$nick);
$nick = str_replace("С„","f",$nick);
$nick = str_replace("С…","h",$nick);
$nick = str_replace("С‡","ch",$nick);
$nick = str_replace("С†","ts",$nick);
$nick = str_replace("С€","sh",$nick);
$nick = str_replace("С‰","sch",$nick);
$nick = str_replace("СЊ","&#039;",$nick);
$nick = str_replace("С‹","y",$nick);
$nick = str_replace("СЉ","&#039;",$nick);
$nick = str_replace("СЌ","e",$nick);
$nick = str_replace("СЋ","yu",$nick);
$nick = str_replace("СЏ","ya",$nick);
$nick = str_replace("Рђ","A",$nick);
$nick = str_replace("Р‘","B",$nick);
$nick = str_replace("Р’","V",$nick);
$nick = str_replace("Р“","G",$nick);
$nick = str_replace("Р”","D",$nick);
$nick = str_replace("Р•","E",$nick);
$nick = str_replace("РЃ","E",$nick);
$nick = str_replace("Р–","J",$nick);
$nick = str_replace("Р—","Z",$nick);
$nick = str_replace("Р?","I",$nick);
$nick = str_replace("Р™","Y",$nick);
$nick = str_replace("Рљ","K",$nick);
$nick = str_replace("Р›","L",$nick);
$nick = str_replace("Рњ","M",$nick);
$nick = str_replace("Рќ","N",$nick);
$nick = str_replace("Рћ","O",$nick);
$nick = str_replace("Рџ","P",$nick);
$nick = str_replace("Р ","R",$nick);
$nick = str_replace("РЎ","S",$nick);
$nick = str_replace("Рў","T",$nick);
$nick = str_replace("РЈ","U",$nick);
$nick = str_replace("Р¤","F",$nick);
$nick = str_replace("РҐ","H",$nick);
$nick = str_replace("Р§","CH",$nick);
$nick = str_replace("Р¦","TS",$nick);
$nick = str_replace("РЁ","SH",$nick);
$nick = str_replace("Р©","SCH",$nick);
$nick = str_replace("Р¬","&#039;",$nick);
$nick = str_replace("Р«","Y",$nick);
$nick = str_replace("РЄ","&#039;",$nick);
$nick = str_replace("Р­","E",$nick);
$nick = str_replace("Р®","YU",$nick);
$nick = str_replace("РЇ","YA",$nick);
return $nick;};

if ($id and $id!="clear"){$id=preg_replace("/(\D+)/e","", $id);};
?>