Файл: DarkAge/odetpet.php
Строк: 21
<?
Error_Reporting(E_ALL & ~E_NOTICE);
include_once("files/antixak.php");
include_once("files/zag.php");
$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)!=="") {
$id = htmlspecialchars(stripslashes($id));
$name = htmlspecialchars(stripslashes($name));
$file=@file("data/item/$log.dat");
$file = array_reverse($file);
$data=explode(":||:",$file[$id]);
if(!$file){echo"У вас нет питомца!"; include_once"files/down.php"; exit; }
if($data[4]=="$name" && $data[2]=="petweapon"){
$file2=@file("data/wolf/$log.dat");
$data2=explode("||",$file2[0]);
$sila=1000+$data[0];
$text="$sila||$data2[1]||$data2[2]||";
$fp=fopen("data/wolf/$log.dat","w");
flock ($fp,LOCK_EX);
fputs($fp,"$textrn");
flock ($fp,LOCK_UN);
fclose($fp);
echo"Питомец стал сильней. Теперь его сила $sila.";
}
}else{echo"Пароль или логин неверен!";}
include_once"files/down.php";
?>