<?
// ////// // // // //
// // // // ///// /////
///// \\ // // // // // // // // // // // //
// // \\ // // // // // // // // // ////// // //
// // \\ // // // // // // // // // // // //
///// \// ////// // // // // // ///// // //
// /////
//
/////////////////////////// [email protected] ///////////////////////////////
Error_Reporting(E_ALL & ~E_NOTICE);
$brayz = "$REMOTE_ADDR ";
$u1=getenv('HTTP_USER_AGENT');
$ipad=strtok($u1,'/');
//////////////////////////////////////////////////////////////////////////
$gl="index.php"; /////////// ссылка на главную
$zag="Dionisij"; /////////// Загаловок
//////////////////////////////////////////////////////////////////////////
$currHour=date("H",time());
$currDate=date("dS F, Y", time());
$currTime=date("$currHour:i:s", time());
$text = @file("profil/$log.prof");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$provpar=trim($udata[1]);}
if($par!=$provpar) {$log=""; $mess="";}
$name = htmlspecialchars(stripslashes($name));
$mess = htmlspecialchars(stripslashes($mess));
if ($tr==5) {
$trans1= array("E","F","CH","SH","IU","IA","A","B","V","G","D","ZH","Z","I","K","L","M","N","O","R","S","T","U","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","P");
$trans2= array("Е","Ф","Ч","Ш","Ю","Я","А","Б","В","Г","Д","Ж","З","И","К","Л","M","Н","О","Р","С","Т","У","Х","Ц","Ы","ч","ш","ю","я","а","б","в","г","д","е","ж","з","и","к","л","м","н","о","п","р","с","т","у","ф","х","ц","ь","ы","Й","й","П");
$mess=str_replace($trans1,$trans2,$mess); };
if($log!="") {$text="$log::$mess::$currDate";}
else {$text="-$name-::$mess::$currDate";}
$klmes = @implode("",@file("proil/$uz.vps")); ///// открываем счетчик с количеством сообщений
$faf = @file("profil/$uz.vps");
$udata = explode("::",$faf[0]);
$af = $udata[1];
if ($af == $mess) {$mess="";}
if ($mess!=""){
$counter_array = file("profil/$uz.vps");
$id = $counter_array[0]+1;
$fp = @fopen("profil/$uz.vps","wb");
@fputs($fp,$id);
@fclose($fp); ///////////// увеличиваем счеичик сообщений общий
$prs=$id;
$fp=fopen("privat/$uz=$id.prmes","w"); ///////// записываем сообщение
fputs($fp,"$text \r\n");
fclose($fp);
chmod ("privat/$uz=$id.prmes", 0777);
if($id>50) { $delfile = $id - 30;
unlink ("privat/$uz=$delfile.prmes");}
$counter_array = file("profil/$uz.shp");
$id = $counter_array[0]+1;
$fp = @fopen("profil/$uz.shp","wb");
@fputs($fp,$id);
@fclose($fp);
}
header("Content-type:text/vnd.wap.wml;charset=utf-8");
print "<?xml version=\"1.0\"?>
<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">
<wml>
<card id=\"tes\" title=\"$zag\" ontimer=\"$mest.php?razd=$razd&prazd=$prazd&tem=$tem&nmes=$nmes&log=$log&par=$par&prs=$prs\" >
<timer value=\"10\"/>
<p>
Сообщение успешно добавленно!
<br/>
<a href=\"$mest.php?razd=$razd&prazd=$prazd&tem=$tem&nmes=$nmes&log=$log&par=$par\">Форум</a><br/>
<a href=\"$gl\">На главную</a><br/>
</p>
</card>
</wml>"; ///////////////// последняя ссылка - на главную
?>