Просмотр файла addWW.php

Размер файла: 3.14Kb
<?





global $HTTP_POST_VARS;



$text=strip_tags($text);

$nike="0";

$file=file("guestWW.dat");

$id = count($file)+1;

$nikname2=strtolower($nikname);

$text = "$nikname2::$emailt::$year::$city::$oper::$tel::$inter::$oseb::$ona::$menu1::$id";

$counter=count($file);          



if ($counter == "10000") {  $fp = @fopen("guestWW.dat","w+"); @fclose($fp); }



$fp=@fopen("guestWW.dat","a"); 





header("Content-type:text/vnd.wap.wml;charset=utf-8");

print "<?xml version=\"1.0\"?>

<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">

<wml>

<card id=\"tes\" title=\"&#x410;&#x43D;&#x43A;&#x435;&#x442;&#x430;\">";



print $nikname2;



$xfile = @file("guestWW.dat");

for ($i = count($xfile); $i >= 0; $i--) {

$udata = explode("::",$xfile[$i]);

if ($udata[0]==$nikname2) {$nike="1";}} 

//print $nike;











 





 if ((trim($HTTP_POST_VARS['nikname'])== "") OR (trim($HTTP_POST_VARS['emailt'])== "") OR (trim($HTTP_POST_VARS['year'])== "") OR (trim($HTTP_POST_VARS['city'])== "") OR (trim($HTTP_POST_VARS['oper'])== "") OR (trim($HTTP_POST_VARS['tel'])== "") OR (trim($HTTP_POST_VARS['inter'])== "") OR (trim($HTTP_POST_VARS['oseb'])== "") OR (trim($HTTP_POST_VARS['ona'])== ""))

{

//print "$c1";

print"

<p>&#x41E;&#x448;&#x438;&#x431;&#x43A;&#x430;! &#x417;&#x430;&#x43F;&#x43E;&#x43B;&#x43D;&#x435;&#x43D;&#x44B; &#x43D;&#x435; &#x432;&#x441;&#x435; &#x43F;&#x43E;&#x43B;&#x44F;.</p>

<p><a href=\"guestWW.wml\">&#x43D;&#x430;&#x437;&#x430;&#x434;</a></p> "

;}

else { 





if  ($nike=="0") {

//print "----------------$id";

//$text2=strtolower($text);

fputs($fp,"$text \r\n"); @fclose($fp);

print"

&#x412;&#x430;&#x448; id-$id.

&#x412;&#x430;&#x448;&#x430; &#x430;&#x43D;&#x43A;&#x435;&#x442;&#x430; &#x434;&#x43E;&#x431;&#x430;&#x432;&#x43B;&#x435;&#x43D;&#x430;!

&#x412;&#x44B; &#x43C;&#x43E;&#x436;&#x435;&#x442;&#x435; &#x440;&#x430;&#x437;&#x43C;&#x435;&#x441;&#x442;&#x438;&#x442;&#x44C; &#x444;&#x43E;&#x442;&#x43E; &#x432; &#x441;&#x432;&#x43E;&#x435;&#x439; &#x430;&#x43D;&#x43A;&#x435;&#x442;&#x435;. &#x414;&#x43B;&#x44F; &#x44D;&#x442;&#x43E;&#x433;&#x43E; &#x412;&#x430;&#x43C; &#x43D;&#x443;&#x436;&#x43D;&#x43E; &#x432;&#x44B;&#x441;&#x43B;&#x430;&#x442;&#x44C; &#x444;&#x43E;&#x442;&#x43E;&#x433;&#x440;&#x430;&#x444;&#x438;&#x44E; &#x43D;&#x430; &#x430;&#x434;&#x440;&#x435;&#x441; [email protected] &#x441; &#x443;&#x43A;&#x430;&#x437;&#x430;&#x43D;&#x438;&#x435;&#x43C; &#x412;&#x430;&#x448;&#x435;&#x433;&#x43E; id

";}}



if  ($nike=="1") {print "&#x41F;&#x43E;&#x43B;&#x44C;&#x437;&#x43E;&#x432;&#x430;&#x442;&#x435;&#x43B;&#x44C; &#x441;

 &#x43D;&#x438;&#x43A;&#x43E;&#x43C; $nikname &#x443;&#x436;&#x435; &#x437;&#x430;&#x440;&#x435;&#x433;&#x435;&#x441;&#x442;&#x440;&#x438;&#x440;&#x43E;&#x432;&#x430;&#x43D;!

 <p><a href=\"guestWW.wml\">&#x43D;&#x430;&#x437;&#x430;&#x434;</a></p>";} 



print"

<p><a href=\"znakWW.wml\">&#x41A; &#x430;&#x43D;&#x43A;&#x435;&#x442;&#x430;&#x43C;</a></p>

<p><a href=\"http://wap.egor.webhost.ru/index.wml\">&#x41D;&#x430; &#x433;&#x43B;&#x430;&#x432;&#x43D;&#x443;&#x44E;</a></p>



</card>

</wml>"; 



?>