'.mysql_real_escape_string($t).'","capitalcity","INFINITY","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';
}
unset($uzr);
}
}
if(!isset($CRON_CORE)) {
header( 'Expires: Mon, 26 Jul 1970 05:00:00 GMT' );
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
header( 'Cache-Control: post-check=0, pre-check=0', false );
header( 'Pragma: no-cache' );
header( 'Content-Type: text/html; charset=windows-1251' );
/*$lock_file = 'lock/battle_'.$_SERVER['HTTP_X_REAL_IP'].'.'.$_COOKIE['auth'].'.bk2';
if ( !file_exists($lock_file) ) {
//$fp_lock = fopen($lock_file, 'w');
//flock($fp_lock, LOCK_EX);
} else {
//unlink($lock_file);
//die('
Не удалось отправить запрос, повторите попытку снова...');
}*/
}
if($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' || 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']);
}
}
function json_fix_cyr($json_str) {
/* $cyr_chars = array (
'\u0430' => 'а', '\u0410' => 'А',
'\u0431' => 'б', '\u0411' => 'Б',
'\u0432' => 'в', '\u0412' => 'В',
'\u0433' => 'г', '\u0413' => 'Г',
'\u0434' => 'д', '\u0414' => 'Д',
'\u0435' => 'е', '\u0415' => 'Е',
'\u0451' => 'ё', '\u0401' => 'Ё',
'\u0436' => 'ж', '\u0416' => 'Ж',
'\u0437' => 'з', '\u0417' => 'З',
'\u0438' => 'и', '\u0418' => 'И',
'\u0439' => 'й', '\u0419' => 'Й',
'\u043a' => 'к', '\u041a' => 'К',
'\u043b' => 'л', '\u041b' => 'Л',
'\u043c' => 'м', '\u041c' => 'М',
'\u043d' => 'н', '\u041d' => 'Н',
'\u043e' => 'о', '\u041e' => 'О',
'\u043f' => 'п', '\u041f' => 'П',
'\u0440' => 'р', '\u0420' => 'Р',
'\u0441' => 'с', '\u0421' => 'С',
'\u0442' => 'т', '\u0422' => 'Т',
'\u0443' => 'у', '\u0423' => 'У',
'\u0444' => 'ф', '\u0424' => 'Ф',
'\u0445' => 'х', '\u0425' => 'Х',
'\u0446' => 'ц', '\u0426' => 'Ц',
'\u0447' => 'ч', '\u0427' => 'Ч',
'\u0448' => 'ш', '\u0428' => 'Ш',
'\u0449' => 'щ', '\u0429' => 'Щ',
'\u044a' => 'ъ', '\u042a' => 'Ъ',
'\u044b' => 'ы', '\u042b' => 'Ы',
'\u044c' => 'ь', '\u042c' => 'Ь',
'\u044d' => 'э', '\u042d' => 'Э',
'\u044e' => 'ю', '\u042e' => 'Ю',
'\u044f' => 'я', '\u042f' => 'Я',
'\r' => '',
'\n' => '
',
'\t' => ''
);
foreach ($cyr_chars as $cyr_char_key => $cyr_char) {
$json_str = str_replace($cyr_char_key, $cyr_char, $json_str);
} */
return $json_str;
}
$u->stats = $u->getStats($u->info['id'],0);
if(!isset($CRON_CORE)) {
if($u->info['online']