' . 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'); } if (($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' || isset($CRON_CORE)) && (isset($_POST['atack'], $_POST['block']) || (isset($_POST['id']) && $_POST['id'] == 'reflesh') || isset($_POST['usepriem']) || isset($_POST['useitem']))) { unset($tm); $js = ''; $u = User::start(); $magic = new Magic(); $priem = new Priems(); if ($u->info['battle'] == 0) { $btl_last = mysql_fetch_array( mysql_query( 'SELECT `id`,`battle` FROM `battle_users` WHERE `uid` = "' . $u->info['id'] . '" AND `finish` = "0" LIMIT 1' ) ); if (isset($btl_last['id']) && $u->info['battle'] == 0) { echo ''; $u->info['battle'] = $btl_last['id']; $u->info['battle_lsto'] = true; mysql_query( 'UPDATE `stats` SET `battle_text` = "",`last_b`="0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1' ); mysql_query('UPDATE `battle_users` SET `finish` = 1 WHERE `uid` = "' . $u->info['id'] . '"'); echo ''; } } 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) && $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']) && $btl->testUsersLive()) { $magic->useItems((int)$_POST['useitem']); if ($u->error != '') { echo '