Просмотр файла forum/addtem.php

Размер файла: 3.05Kb
<?
Error_Reporting(E_ALL & ~E_NOTICE);
$brayz = "$REMOTE_ADDR ";
$u1=getenv('HTTP_USER_AGENT');
$ipad=strtok($u1,'/');


$zag="[&#x0444;&#x043E;&#x0440;&#x0443;&#x043C;]";                                               



$currHour=date("H",time());
	$currDate=date("dS F, Y", time());
	$currTime=date("$currHour:i", time());

$currDate = str_replace("January","01",$currDate);
$currDate = str_replace("February","02",$currDate);
$currDate = str_replace("March","03",$currDate);
$currDate = str_replace("April","04",$currDate);
$currDate = str_replace("May","05",$currDate);
$currDate = str_replace("June","06",$currDate);
$currDate = str_replace("July","07",$currDate);
$currDate = str_replace("August","08",$currDate);
$currDate = str_replace("September","09",$currDate);
$currDate = str_replace("October","10",$currDate);
$currDate = str_replace("November","11",$currDate);
$currDate = str_replace("December","12",$currDate);


$text = @file("profil/$log.prof"); 
if ($text!=""){

$af = @implode("",@file("rek/$razd=$prazd.af"));
$af=trim($af);
$nt=trim($nt);
if($af==$nt) {$nt="";}
$udata = explode(":||:",$text[0]);
$provpar=trim($udata[1]);}
if($par!=$provpar) {$log=""; $nt="";}
if($log=="") {$nt="";}
$nt = htmlspecialchars(stripslashes($nt));
if($nt!=""){

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

$fp=fopen("rek/$razd=$prazd=$mes.sort","w");                       ///////// cоздаём файлы                                          
fputs($fp,"$mes \r\n");
fclose($fp);  
chmod ("rek/$razd=$prazd=$mes.sort", 0777);

$nol=0;
$fp=fopen("rek/$razd=$prazd=$mes.mes","w");                       ///////// cоздаём файлы                                          
fputs($fp,"$nol \r\n");
fclose($fp);  
chmod ("rek/$razd=$prazd=$mes.mes", 0777);

$fp=fopen("rek/$razd=$prazd.af","w");                       ///////// cоздаём файлы                                          
fputs($fp,"$nt \r\n");
fclose($fp);  
chmod ("rek/$razd=$prazd.af", 0777);

$zap=":||:$mes:||:$nt:||:$currDate :||:$log:||:$mes";
$fp=fopen("rek/$razd=$prazd=$mes.kt","w");                       ///////// cоздаём файлы                                          
fputs($fp,"$zap \r\n");
fclose($fp);  
chmod ("rek/$razd=$prazd=$mes.kt", 0777);

    

}
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=\"otvet.php?razd=$razd&amp;prazd=$prazd&amp;tem=$mes&amp;log=$log&amp;par=$par\" > ";


if($nt!=""){print"<p><timer value=\"5\"/>&#x0442;&#x0435;&#x043C;&#x0430; $nt &#x0441;&#x043E;&#x0437;&#x0434;&#x0430;&#x043D;&#x0430;...<br/>";} else{print"<p><timer value=\"900000\"/>&#x043F;&#x0440;&#x043E;&#x0438;&#x0437;&#x043E;&#x0448;&#x043B;&#x0430; &#x043E;&#x0448;&#x0438;&#x0431;&#x043A;&#x0430;...";}
print"


</p>
</card>
</wml>";                          

?>