Просмотр файла wapp_antifront.com/forum/add.php

Размер файла: 4.47Kb
<?
include '../config.php';
Error_Reporting(E_ALL & ~E_NOTICE);
$brayz = "$REMOTE_ADDR ";
$u1=getenv('HTTP_USER_AGENT');
$ipad=strtok($u1,'/');
//////////////////////////////////////////////////////////////////////////
$gl="$homepage";                                               /////////// ссылка на главную
$zag="&#x0424;&#x043E;&#x0440;&#x0443;&#x043C;";               /////////// Загаловок
//////////////////////////////////////////////////////////////////////////


$currHour=date("H",time());
        $currDate=date("dS F, Y", time());
        $currTime=date("$currHour:i", 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("&#x0415;","&#x0424;","&#x0427;","&#x0428;","&#x042E;","&#x042F;","&#x0410;","&#x0411;","&#x0412;","&#x0413;","&#x0414;","&#x0416;","&#x0417;","&#x0418;","&#x041A;","&#x041B;","M","&#x041D;","&#x041E;","&#x0420;","&#x0421;","&#x0422;","&#x0423;","&#x0425;","&#x0426;","&#x042B;","&#x0447;","&#x0448;","&#x044E;","&#x044F;","&#x0430;","&#x0431;","&#x0432;","&#x0433;","&#x0434;","&#x0435;","&#x0436;","&#x0437;","&#x0438;","&#x043A;","&#x043B;","&#x043C;","&#x043D;","&#x043E;","&#x043F;","&#x0440;","&#x0441;","&#x0442;","&#x0443;","&#x0444;","&#x0445;","&#x0446;","&#x044C;","&#x044B;","&#x0419;","&#x0439;","&#x041F;");
        $mess=str_replace($trans1,$trans2,$mess);        };

if($log!="") {$text="$log::$mess::$currDate"; $im=$log;}
else {$text="-$name-::$mess::$currDate"; $im="-$name-";}


$klmes = @implode("",@file("rek/$razd=$prazd=$tem.mes"));     ///// открываем счетчик с количеством сообщений

$faf = @file("rek/$razd=$prazd=$tem=$klmes.TEXT");
$udata = explode("::",$faf[0]);
$af = $udata[1];

if ($af == $mess) {$mess="";}

if ($mess!=""){
$counter_array = file("rek/$razd=$prazd=$tem.mes");
$id = $counter_array[0]+1;
$fp = @fopen("rek/$razd=$prazd=$tem.mes","wb");
@fputs($fp,$id);
@fclose($fp);                                             ///////////// увеличиваем счеичик сообщений в теме на 1.
$sob=$id-2;
$fp=fopen("rek/$razd=$prazd=$tem=$id.TEXT","w");                       ///////// записываем сообщение
fputs($fp,"$text \r\n");
fclose($fp);
chmod ("rek/$razd=$prazd=$tem=$id.TEXT", 0777);

$counter_array = file("rek/$razd=$prazd.tem");
$id = $counter_array[0]+1;
$fp = @fopen("rek/$razd=$prazd.tem","wb");
@fputs($fp,$id);
@fclose($fp);

$text = @file("rek/$razd=$prazd=$tem.kt");
$udata = explode(":||:",$text[0]);
$del=trim($udata[5]);
unlink ("rek/$razd=$prazd=$del.sort");

$fp=fopen("rek/$razd=$prazd=$id.sort","w");                       ///////// записываем сообщение
fputs($fp,"$tem \r\n");
fclose($fp);
chmod ("rek/$razd=$prazd=$id.sort", 0777);

$ntext=":||:$udata[1]:||:$udata[2]:||:$currDate / $currTime:||:$im:||:$id";
$fp=fopen("rek/$razd=$prazd=$tem.kt","w");                       ///////// записываем сообщение
fputs($fp,"$ntext \r\n");
fclose($fp);
chmod ("rek/$razd=$prazd=$tem.kt", 0777);



if($log!="") {$counter_array = file("profil/$log.st");
$id = $counter_array[0]+1;
$fp = @fopen("profil/$log.st","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=\"mes.php?razd=$razd&amp;prazd=$prazd&amp;tem=$tem&amp;nmes=$sob&amp;log=$log&amp;par=$par\" >
<timer value=\"10\"/>

<p>
&#x0421;&#x043E;&#x043E;&#x0431;&#x0449;&#x0435;&#x043D;&#x0438;&#x0435; &#x0443;&#x0441;&#x043F;&#x0435;&#x0448;&#x043D;&#x043E; &#x0434;&#x043E;&#x0431;&#x0430;&#x0432;&#x043B;&#x0435;&#x043D;&#x043D;&#x043E;!
<br/>
<a href=\"mes.php?razd=$razd&amp;prazd=$prazd&amp;tem=$tem&amp;nmes=$id&amp;log=$log&amp;par=$par\">&#x0424;&#x043E;&#x0440;&#x0443;&#x043C;</a><br/>
<a href=\"$gl\">&#x041D;&#x0430; &#x0433;&#x043B;&#x0430;&#x0432;&#x043D;&#x0443;&#x044E;</a><br/>


</p>

</card>
</wml>";                          ///////////////// последняя ссылка - на главную

?>