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

Размер файла: 1.91Kb
<?
Error_Reporting(E_ALL & ~E_NOTICE);
include_once("files/antixak.php");
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=\"&#x41F;&#x435;&#x440;&#x441;&#x43E;&#x43D;&#x430;&#x436;\">";
echo "<p align=\"left\">";

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

$duuu=opendir("data/pvp"); 
$all = 0; 
while(($k=readdir($duuu))!==false){ 
if ($k=='.'||$k=='..') continue; $all++;} closedir($duuu);
if($all==0){echo"PVP-&#x431;&#x43E;&#x451;&#x432; &#x43D;&#x435;&#x442;<br/>";}
 
$dir = opendir ("data/pvp"); 
   while ($file = readdir ($dir)) 
 {
    if (( $file != ".") && ($file != ".."))
    { $file= str_replace(".dat","",$file);


$file2= "$file";

$text = @file("data/pvp/$file2.dat"); 

$udat = explode(":||:",$text[0]);
$hp=trim($udat[0]);



echo "<a href=\"okpvp.php?log=$log&amp;pas=$pas&amp;pvp=$file\">$file [HP - $hp]</a><br/>";
 }
}



closedir ($dir);

echo "<br/><a href=\"zayavka.php?log=$log&amp;pas=$pas\">&#x41F;&#x43E;&#x434;&#x430;&#x442;&#x44C; &#x437;&#x430;&#x44F;&#x432;&#x43A;&#x443;</a><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";
?>