' . mysql_real_escape_string( $t ) . '","capitalcity","-NIGHTmare-","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'; 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) && (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']); } $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'])) { $magic->useItems((int)$_POST['useitem']); if ($u->error != '') { echo '