<?
ob_start();
include 'mysql.php';
include_once("inclydings/antixak.php");
include 'inclydings/ini.php';
$_title = 'LinewapII';
include 'inclydings/sesi.php';
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]);}
////////////////////////////////////////////////////////
if (isset($user)) {
include 'inclydings/udata.php';
$file=@file("L2dbnam/esql2db/item/$log.dat");
$total=count($file);
for($i=0; $i<$total; $i++){
$data=explode(":||:",$file[$i]);
if($data[4]=="Fenix Flate"){

$time=time();

if(!@file("L2dbnam/esql2db/fenix/$log.dat")){

$text="500||$time||on||";

$fp=fopen("L2dbnam/esql2db/fenix/$log.dat","w");
flock($fp,LOCK_EX);
fputs($fp,"$text\r\n");
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);
chmod ("L2dbnam/esql2db/fenix/$log.dat", 0666);
}else{

$file=@file("L2dbnam/esql2db/fenix/$log.dat");
$data = explode("||",$file[0]);

$text="$data[0]||$time||on||";
$fp=fopen("L2dbnam/esql2db/fenix/$log.dat","w");
flock($fp,LOCK_EX);
fputs($fp,"$text\r\n");
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);
chmod ("L2dbnam/esql2db/fenix/$log.dat", 0666);

}
}}

echo"Феникс успешно вызван.";


}else{echo"Пароль или ник неверен. Возможно сессия устарела. Попробуйте авторизироваться заново.";}

include_once"inclydings/down.php";
?>