<?
Error_Reporting(E_ALL & ~E_NOTICE);
$brayz = "$REMOTE_ADDR ";
$u1=getenv('HTTP_USER_AGENT');
$ipad=strtok($u1,'/');
$currHour=date("H",time());
$currDate=date("dS F, Y", time());
$currTime=date("$currHour:i:s", 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);
header("Content-type:text/vnd.wap.wml;charset=utf-8");
include 'config.php';
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=$id&log=$log&par=$par\" >
<timer value=\"190\"/>
<p>";
$log = htmlspecialchars(stripslashes($log));
$par = htmlspecialchars(stripslashes($par));
$otkel = htmlspecialchars(stripslashes($otkel));
$infa = htmlspecialchars(stripslashes($infa));
$meil = htmlspecialchars(stripslashes($meil));
$site = htmlspecialchars(stripslashes($site));
$text="$log:||:$par:||:$otkel:||:$infa:||:$meil:||:$site:||:$currDate";
$mes = @implode("",@file("profil/$log.prof"));
if ($mes!="") {print"пользователь с таким именем уже зарегестрирован...";}
else {
$fp=fopen("profil/$log.prof","w"); ///////// записываем регистрацию
fputs($fp,"$text \r\n");
fclose($fp);
chmod ("profil/$log.prof", 0777);
$text="0";
$fp=fopen("profil/$log.st","w"); ///////// записываем регистрацию
fputs($fp,"$text \r\n");
fclose($fp);
chmod ("profil/$log.st", 0777);
$counter_array=file("counterreg.dat");
$id=$counter_array[0]+1;
$fp=@fopen("counterreg.dat","wb");
@fputs($fp,$id);
@fclose($fp);
print"
<b>вы зарегистрированы.</b>
<br/>
ваш ник:<small>$log</small> <br/>
ваш пароль:<small>$par</small><br/>
<a href=\"$mest.php?razd=$razd&prazd=$prazd&tem=$tem&nmes=$id&log=$log&par=$par\"><font color=\"blue\">форум</font></a>
";}
print"
</p>
</card>
</wml>";
?>