'.$_SERVER['SERVER_ADDR']);
}
*/
define('GAME',true);
require_once('../../_incl_data/class/__db_connect.php');
function e($t) {
mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #'.date('d.m.Y').' %'.date('H:i:s').' (Критическая ошибка): '.mysql_real_escape_string($t).'","capitalcity","-NIGHTmare-","6","1","-1")');
}
if(isset($_GET['cron_core'])) {
$id = array(
'id' => $_GET['uid'],
'pass' => $_GET['pass']
);
if(md5($id['id'].'_brfCOreW@!_'.$id['pass']) == $_GET['cron_core']) {
$uzr = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`pass` FROM `users` WHERE `id` = "'.mysql_real_escape_string($id['id']).'" AND `pass` = "'.mysql_real_escape_string($id['pass']).'" LIMIT 1'));
if(isset($uzr['id'])) {
$CRON_CORE = true;
$_COOKIE['login'] = $uzr['login'];
$_COOKIE['pass'] = $uzr['pass'];
$_POST['id'] = 'reflesh';
if(isset($_GET['atack'])) {
$_POST['atack'] = $_GET['atack'];
}
if(isset($_GET['block'])) {
$_POST['block'] = $_GET['block'];
}
if(isset($_GET['usepriem'])) {
$_POST['usepriem'] = $_GET['usepriem'];
}
if(isset($_GET['useitem'])) {
$_POST['useitem'] = $_GET['useitem'];
}
}
unset($uzr);
}
}
if(isset($CRON_CORE))
{
if(isset($_POST['atack'],$_POST['block']) || (isset($_POST['id']) && $_POST['id']=='reflesh') || isset($_POST['usepriem']) || isset($_POST['useitem']))
{
if(isset($_POST['useitemon'])) {
$_POST['useitemon'] = iconv('UTF-8', 'windows-1251', $_POST['useitemon']);
}
//`session_start();
$tm = microtime();
$tm = explode(' ',$tm);
$tm = $tm[0]+$tm[1];
if(!isset($CRON_CORE)) {
require_once('../../_incl_data/__config.php');
if($_SESSION['tbr']>$tm)
{
die('');
}else{
$_SESSION['tbr'] = $tm+0.350;
}
}
unset($tm);
$js = '';
require_once('../../_incl_data/class/__user.php');
require_once('../../_incl_data/class/__magic.php');
require_once('../../_incl_data/class/_cron_.php');
require_once('../../_incl_data/class/__quest.php');
if(!isset($CRON_CORE)) {
if(!isset($u->info['id']) || ($u->info['joinIP']==1 && $u->info['ip']!=$_SERVER['HTTP_X_REAL_IP']))
{
die($c['exit']);
}
}
$u->stats = $u->getStats($u->info['id'],0);
if(!isset($CRON_CORE)) {
if($u->info['online']