<?
include 'mysql.php';
Error_Reporting(E_ALL & ~E_NOTICE);
include_once("include/antixak.php");
include 'include/ini.php';
$_title = 'Linewap2';
include 'include/header.php';
$log = htmlspecialchars(stripslashes($log));
$pas = htmlspecialchars(stripslashes($pas));
/////////////////////////////////////////////////////
$text = @file("MySql/base123/reg/$log.dat");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$login=trim($udata[0]);
$password=trim($udata[1]);}
////////////////////////////////////////////////////////
include_once("include/sesi.php");
if (isset($user)) {
$id = htmlspecialchars(stripslashes($id));
$name = htmlspecialchars(stripslashes($name));

$file=@file("MySql/base123/item/$log.dat");
$file = array_reverse($file);
$data=explode(":||:",$file[$id]);
if(!$file){echo"<small>У вас нет питомца!</small>"; include_once"include/down.php"; exit; }

if($data[4]=="$name" && $data[2]=="petweapon"){

$file2=@file("MySql/base123/wolf/$log.dat");
$data2=explode("||",$file2[0]);

$sila=1000+$data[0];

$text="$sila||$data2[1]||$data2[2]||";

$fp=fopen("MySql/base123/wolf/$log.dat","w");
flock ($fp,LOCK_EX);
fputs($fp,"$text\r\n");
flock ($fp,LOCK_UN);
fclose($fp);
chmod ("MySql/base123/wolf/$log.dat", 0666);

echo"<small>Питомец стал сильней. Теперь его сила $sila.</small>";

}

}else{echo"<small>Пароль или логин неверен!</small>";}

include_once"include/down.php";
?>

