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

Размер файла: 3.73Kb
<?
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: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("&#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";}
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&amp;prazd=$prazd&amp;tem=$tem&amp;nmes=$nmes&amp;log=$log&amp;par=$par&amp;prs=$prs\" >
<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=\"$mest.php?razd=$razd&amp;prazd=$prazd&amp;tem=$tem&amp;nmes=$nmes&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>";                          ///////////////// последняя ссылка - на главную

?>