Просмотр файла darkworld/ataka.php

Размер файла: 4.84Kb
<?
Error_Reporting(E_ALL & ~E_NOTICE);

$log = htmlspecialchars(stripslashes($log));
$pas = htmlspecialchars(stripslashes($pas));
$mob = htmlspecialchars(stripslashes($mob));

list($msec,$sec)=explode(chr(32),microtime()); 
$HeadTime=$sec+$msec; 

/////////////////////////////////////////////////////
$text = @file("data/reg/$log.dat"); 
if ($text!=""){
$udata = explode(":||:",$text[0]);
$login=trim($udata[0]);
$password=trim($udata[1]);
$hp=trim($udata[16]);
$allhp=trim($udata[17]);}
////////////////////////////////////////////////////////
if (md5($pas)==$password && $log==$login && $log!=="" && md5($pas)!=="") {



$text = @file("data/tmp/$log.dat"); 
$udat = explode(":||:",$text[0]);
$allhp2=trim($udat[1]);
$hp2=trim($udat[0]);


if($hp2<="0"){ header ("Location: win.php?log=$log&pas=$pas&gorod=$gorod"); }
if($udata[16]<="0"){ header ("Location: lose.php?log=$log&pas=$pas&gorod=$gorod"); }


header("Content-type:text/vnd.wap.wml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">";
echo "<wml>\n";
echo "<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>";
echo "<card id=\"index\" title=\"&#x411;&#x43E;&#x439;\">";
echo "<p align=\"left\">";

include("files/who.php");
//////////////////////////////////
$fa = @file("data/reg/$log.dat");
$a = explode(":||:",$fa[0]);

if(!empty($a[25])){

$fa = @file("data/paty/$a[25].dat");
$ax = explode(":||:",$fa[0]);

if($ax[2]=="yes"){
echo"<b><small>&#x412;&#x44B; &#x432; &#x43F;&#x430;&#x442;&#x438; &#x441; $a[25].<br/><a href=\"paty.php?go=del&amp;log=$log&amp;pas=$pas\">&#x412;&#x44B;&#x439;&#x442;&#x438; &#x438;&#x437; &#x43F;&#x430;&#x442;&#x438;</a><br/><br/></small></b>";}}

if(@file("data/paty/$log.dat")){
$fa = @file("data/paty/$log.dat");
$ua = explode(":||:",$fa[0]);

if($ua[2]=="time"){

echo"<small><b>$ua[0] - $ua[1] (lvl) &#x43F;&#x440;&#x435;&#x434;&#x43B;&#x430;&#x433;&#x430;&#x435;&#x442; &#x432;&#x430;&#x43C; &#x43F;&#x430;&#x442;&#x438;.<br/><a href=\"paty.php?go=ok&amp;log=$log&amp;pas=$pas\">&#x414;&#x430;</a> | <a href=\"paty.php?go=no&amp;log=$log&amp;pas=$pas\">&#x41D;&#x435;&#x442;</a><br/><br/></b></small>";}



if($ua[2]=="yes"){echo"<b><small>&#x412;&#x44B; &#x432; &#x43F;&#x430;&#x442;&#x438; &#x441; $ua[0]. <br/><a href=\"paty.php?go=del&amp;log=$log&amp;pas=$pas\">&#x412;&#x44B;&#x439;&#x442;&#x438; &#x438;&#x437; &#x43F;&#x430;&#x442;&#x438;</a></small></b><br/><br/>";}



}



//////////////////////////////////


echo"<small>&#x412;&#x430;&#x448;&#x435; HP: [$hp/$allhp]<br/>";
echo"&#x412;&#x430;&#x448;&#x435; MP: [$udata[29]/$udata[30]]<br/>";
echo"HP &#x43C;&#x43E;&#x431;&#x430;: [$hp2/$allhp2]</small><br/><br/>";

if($udata[27]=="wizard"){
echo"<small><b>&#x410;&#x442;&#x430;&#x43A;&#x430; &#x43E;&#x440;&#x443;&#x436;&#x438;&#x435;&#x43C;</b></small><br/>";
echo"<small><a href=\"udar.php?log=$log&amp;pas=$pas\">&#x410;&#x442;&#x430;&#x43A;&#x43E;&#x432;&#x430;&#x442;&#x44C;</a></small><br/>";
echo"<small><b>&#x410;&#x442;&#x430;&#x43A;&#x430; &#x43C;&#x430;&#x433;&#x438;&#x435;&#x439;</b></small><br/>";

$file = @file("data/mag/$log.dat");
$total = count($file);  
if(!@file("data/mag/$log.dat")){echo"<small>&#x423; &#x432;&#x430;&#x441; &#x43D;&#x435;&#x442; &#x43C;&#x430;&#x433;&#x438;&#x438;</small>";}
for ($i = 0; $i < $total; $i++){
$file = @file("data/mag/$log.dat");
$data = explode("||",$file[$i]);

if($data[4]=="combat"){
echo"<b><small><a href=\"udar.php?log=$log&amp;pas=$pas&amp;name=$data[8]&amp;tip=mag&amp;gorod=$gorod&amp;id=$i\">$data[7]</a></small></b> <small>- [+$data[0] &#x443;&#x440;&#x43E;&#x43D;&#x430; / MP - $data[1]]</small><br/>";
}

}


}else{

echo"<small><b>&#x410;&#x442;&#x430;&#x43A;&#x430;</b></small><br/>";
echo"<b><small><a href=\"udar.php?log=$log&amp;pas=$pas\">&#x410;&#x442;&#x430;&#x43A;&#x43E;&#x432;&#x430;&#x442;&#x44C;</a></small></b><br/>";
echo"<small><b>&#x421;&#x443;&#x43F;&#x435;&#x440; &#x443;&#x434;&#x430;&#x440;&#x44B;</b></small><br/>";



$file = @file("data/mag/$log.dat");
$total = count($file);  
if(!@file("data/mag/$log.dat")){echo"<small>&#x423; &#x432;&#x430;&#x441; &#x43D;&#x435;&#x442; &#x43C;&#x430;&#x433;&#x438;&#x438;</small>";}
for ($i = 0; $i < $total; $i++){
$file = @file("data/mag/$log.dat");
$data = explode("||",$file[$i]);

if($data[4]=="combat"){
echo"<b><small><a href=\"udar.php?log=$log&amp;pas=$pas&amp;name=$data[8]&amp;tip=mag&amp;gorod=$gorod&amp;id=$i\">$data[7]</a></small></b> <small>- [+$data[0] &#x443;&#x440;&#x43E;&#x43D;&#x430;]</small><br/>";
}}}


}else{echo"<small>&#x41F;&#x430;&#x440;&#x43E;&#x43B;&#x44C; &#x438;&#x43B;&#x438; &#x43B;&#x43E;&#x433;&#x438;&#x43D; &#x43D;&#x435;&#x432;&#x435;&#x440;&#x435;&#x43D;!</small>";}

include_once"files/down.php";


?>