<?
Error_Reporting(E_ALL & ~E_NOTICE);
$brayz = "$REMOTE_ADDR ";
$u1=getenv('HTTP_USER_AGENT');
$ipad=strtok($u1,'/');
$glav = @implode("",@file("konfig/$nom.dionisij"));
$glav = trim("$glav");
if ($tr==5) {
$trans1= array("CH","SH","IU","IA","A","B","V","G","D","E","ZH","Z","I","K","L","M","N","O","P","R","S","T","U","F","H","C","Y","ch","sh","iu","ia","a","b","v","g","d","e","zh","z","i","k","l","m","n","o","p","r","s","t","u","f","h","c","'","y","J","j"
);
$trans2= array("Ч","Ш","Ю","Я","А","Б","В","Г","Д","Е","Ж","З","И","К","Л","М","Н","О","П","Р","С","Т","У","Ф","Х","Ц","Ы","ч","ш","ю","я","а","б","в","г","д","е","ж","з","и","к","л","м","н","о","п","р","с","т","у","ф","х","ц","ь","ы","Й","й"
);
$mess=str_replace($trans1,$trans2,$mess);
};
$currHour=date("H",time());
$currDate=date("dS F, Y", time());
$currTime=date("$currHour:i:s", time());
$yv=$obr;
$obr = $login;
$af = @implode("",@file("af/$nom.txt"));
if ($yv!="") {$yv="$yv, ";};
$text = "$currDate<br/>
$currTime<br/>
<b>
<a href=\"obr.php?nom=$nom&obr=$obr\">$login</a>
</b><br/>
$yv $mess<br/>mail:$mail
<br/>
<a href=\"http://$wsite\">$wsite</a>
<br/>
<small>$brayz $ipad</small>
<br/>======<br/>";
$stringaf = strlen($af);
$stringmes = strlen($mess);
$stringaf=$stringaf-3;
if ($stringaf==$stringmes)
{$mess=$pus;};
if ($mess != "") {
$counter_array = file("cont/$nom.dat");
$id = $counter_array[0]+1;
$fp = @fopen("cont/$nom.dat","wb");
@fputs($fp,$id);
@fclose($fp);
$fp=fopen("rek/$id=$nom.txt","w");
fputs($fp,"$text \r\n");
fclose($fp);
chmod ("rek/$id=$nom.txt", 0777);
$fp=fopen("af/$nom.txt","w");
fputs($fp,"$mess \r\n");
fclose($fp);
$delfile = $id - 30;
if ($id>31) { unlink ("rek/$delfile=$nom.txt"); };
};
print "<html>
<head>
<title>Mobilka.Us GB</title>
<meta http-equiv=\"Content-Type\" content=\"text/html\; charset=utf-8\">
</head>
<body bgcolor=\"#000000\">
<p align=\"left\"><font color=\"#FFFF00\">
Ваше сообщение было успешно добавлено!
<br/>
<a href=\"guest2.php?new=new&nom=$nom\"><font color=\"#F206FF\">Почитать гостевую</a><br/>
<a href=\"$glav\"><font color=\"#F206FF\">На главную</a><br/>
</p>
</body>
</html>"; ///////////////// последняя ссылка - на главную
?>