Файл: odetpet.php
Строк: 42
<?
include 'mysql.php';
Error_Reporting(E_ALL & ~E_NOTICE);
include_once("inclydings/antixak.php");
include 'inclydings/ini.php';
$_title = 'Lineage2';
include 'inclydings/header.php';
$log = htmlspecialchars(stripslashes($log));
$pas = htmlspecialchars(stripslashes($pas));
/////////////////////////////////////////////////////
$text = @file("L2dbnam/esql2db/reg/$log.dat");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$login=trim($udata[0]);
$password=trim($udata[1]);}
////////////////////////////////////////////////////////
include_once("inclydings/sesi.php");
if (isset($user)) {
$id = htmlspecialchars(stripslashes($id));
$name = htmlspecialchars(stripslashes($name));
$file=@file("L2dbnam/esql2db/item/$log.dat");
$file = array_reverse($file);
$data=explode(":||:",$file[$id]);
if(!$file){echo"У вас нет питомца!"; include_once"inclydings/down.php"; exit; }
if($data[4]=="$name" && $data[2]=="petweapon"){
$file2=@file("L2dbnam/esql2db/wolf/$log.dat");
$data2=explode("||",$file2[0]);
$sila=1000+$data[0];
$text="$sila||$data2[1]||$data2[2]||";
$fp=fopen("L2dbnam/esql2db/wolf/$log.dat","w");
flock ($fp,LOCK_EX);
fputs($fp,"$textrn");
flock ($fp,LOCK_UN);
fclose($fp);
chmod ("L2dbnam/esql2db/wolf/$log.dat", 0666);
echo"Питомец стал сильней. Теперь его сила $sila.";
}
}else{echo"Пароль или ник неверен.Возможно сессия устарела.Попробуйте авторизироваться заново...";}
include_once"inclydings/down.php";
?>