' . mysql_real_escape_string($t) . '","capitalcity","INFINITY","6","1","-1")' ); } if (isset($_GET['cron_core'])) { $id = [ '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'); } 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 = ''; $u = User::start(); $magic = new Magic(); $priem = new Priems(); if (!isset($CRON_CORE) && (!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) { return $json_str; } $u->stats = $u->getStats($u->info['id'], 0); if (!isset($CRON_CORE)) { if ($u->info['online'] < time() - 30) { mysql_query( "UPDATE `users` SET `online`='" . time() . "',`timeMain`='" . time( ) . "' WHERE `id`='" . $u->info['id'] . "' LIMIT 1" ); } } $btl = new Battle(); require_once('log_text.php'); $btl->is = $u->is; $btl->items = $u->items; $btl->info = $btl->battleInfo($u->info['battle']); if (!isset($btl->info['id'])) { if ($u->info['battle'] == -1) { //завершаем поединок $upd = mysql_query( 'UPDATE `users` SET `battle` = "0",`online` = "' . time( ) . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1' ); if (!$upd) { if (!isset($CRON_CORE)) { die('Ошибка завершения поединка.'); } } else { echo ''; } } else { mysql_query( 'UPDATE `users` SET `battle` = "0" WHERE `battle` = "' . $u->info['battle'] . '" LIMIT 100' ); if (!isset($CRON_CORE)) { die(''); } } } else { //получаем массив с игроками в бою $btl->teamsTake(); if (isset($_POST['useitem'])) { $magic->useItems((int)$_POST['useitem']); if ($u->error != '') { echo '