<?
##################### Класс борьбы с SQL атаками ################
include_once("inclydings/sql.php");

$stop_injection = new InitVars();
$stop_injection->checkVars();
#########################################################
include_once("inclydings/sesi.php");
include_once("inclydings/bishop.php");
/////////////////////////////////////////////////////
$text = @file("L2dbnam/esql2db/reg/$log.dat");

if ($text!=""){
$udata = explode(":||:",$text[0]);
$login=trim($udata[0]);
$password=trim($udata[1]);}


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

echo '<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta forua="true" http-equiv="Cache-Control" content="no-cache,no-store,must-revalidate"/><title>::LinEagE2::</title></head>
<link rel="stylesheet" href="/images/style.css" type="text/css" /><div class="pages">';}else{
echo '<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta forua="true" http-equiv="Cache-Control" content="no-cache,no-store,must-revalidate"/>
<title>::LinEagE2::</title><link href="images/wml.css" rel="stylesheet"type="text/css" />
</head><body><table>
<tr>
<td class="lt1"></td><td class="t1"></td><td class="rt1"></td>
</tr>
<tr>
<td class="l"></td>
<td class="centertd"><div class="pages">';}
////////////////////////////////////////////////////////
if (isset($user)) {
list($msec,$sec)=explode(chr(32),microtime());
$gtime=$sec+$msec;
////////////////////////////////////////////////////////
$keys=mysql_query("SELECT * FROM `table_key` WHERE `nick`='$log' LIMIT 1");
if(mysql_num_rows($keys)==1){
echo"Ваш акаунт не активирован. Для активации перейдите на эмейл указанный при регистрации"; include 'inclydings/nogi'; exit;}

include("inclydings/opit.php");
include("inclydings/lvl.php");
include("inclydings/regeneration.php");
include_once("inclydings/winolimpiads.php");
include_once("inclydings/winolimpiads2.php");
include_once("inclydings/bishop.php");
$time=date("H:i");
if($time>="23:59"){
$newlog="0:||:";
$fp=fopen("L2dbnam/esql2db/newlog.dat","w");
flock($fp,LOCK_EX);
fputs($fp,"$newlog\r\n");
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);
}
if($udata[34]=="0"){
echo"<a href=\"uslugi.php?$sd\">$udata[9] lvl</a> - <a href=\"search.php?$sd&go=go&nick=$log\">$log</a><br/>";
echo"<img src=\"cp.php?$sd\" alt=\"CP: $udata[42]/$udata[43]\"/><br/>";
echo"<img src=\"hp.php?$sd\" alt=\"HP: $udata[16]/$udata[17]\"/><br/>";
echo"<img src=\"mp.php?$sd\" alt=\"MP: $udata[29]/$udata[30]\"/><br/>";
echo"<img src=\"exp.php?$sd\" alt=\"EXP: $exp %\"/><br/>";
$data=date("d F, Y");
$data = str_replace("January","января",$data);
$data = str_replace("February","февраля",$data);
$data = str_replace("March","марта",$data);
$data = str_replace("April","апреля",$data);
$data = str_replace("May","мая",$data);
$data = str_replace("June","июня",$data);
$data = str_replace("July","июля",$data);
$data = str_replace("August","августа",$data);
$data = str_replace("September","сентября",$data);
$data = str_replace("October","октября",$data);
$data = str_replace("November","ноября",$data);
$data = str_replace("December","декабря",$data);
echo"Время: ".date("H:i:s")."<br/>";
echo"Дата: $data<br/>";
$time=date("H:i");
echo"<hr>";
}else{
$data=date("d F, Y");
$data = str_replace("January","января",$data);
$data = str_replace("February","февраля",$data);
$data = str_replace("March","марта",$data);
$data = str_replace("April","апреля",$data);
$data = str_replace("May","мая",$data);
$data = str_replace("June","июня",$data);
$data = str_replace("July","июля",$data);
$data = str_replace("August","августа",$data);
$data = str_replace("September","сентября",$data);
$data = str_replace("October","октября",$data);
$data = str_replace("November","ноября",$data);
$data = str_replace("December","декабря",$data);
$time=date("H:i:s");
echo'<a href="search.php?'.$sd.'&go=go&nick='.$log.'">'.$log.'</a> ['.$udata[9].']<br/>
<font color="#ADFF2F">CP: '.number_format($udata[42]).'/'.number_format($udata[43]).'</font><br/>
<font color="#FF0000">HP: '.number_format($udata[16]).'/'.number_format($udata[17]).'</font><br/>
<font color="#6495ED">MP: '.number_format($udata[29]).'/'.number_format($udata[30]).'</font><br/>
EXP: '.$exp.' %<br/>
Время: '.$time.'<br/>
Дата: '.$data.'<br/>';
echo"<hr>";}
}
$keys=mysql_query("SELECT * FROM `table_key` WHERE `nick`='$log' LIMIT 1");
if(mysql_num_rows($keys)==1){
echo"Ваш акаунт не активирован. Для активации перейдите на эмейл указанный при регистрации"; include 'inclydings /nogi'; exit;}
$block=mysql_query("SELECT * FROM `table_block` WHERE `nick`='$log' LIMIT 1");
if(mysql_num_rows($block)==1){
$user = mysql_fetch_array($block);
$pr = $user['pricina'];
echo"Вы заблокированы причина: ".$pr.""; include 'inclydings/nogi.php'; exit;}
?>