|
|||||||||
|
Ошибка: $e
Назад
HTML;
exit($err);
}
function gameexit()
{
setcookie('login', '', 0, '', Config::get('host'));
setcookie('login', '', 0);
setcookie('auth', '', 0);
Db::sql('update users set online = unix_timestamp() - 420 where id = ?', [$u->info['id']]);
exit(Config::get('exit'));
}
Database::init();
define('IP', UserIp::get());
$u = User::start();
if (empty($u->info)) {
exit(Config::get('exit'));
}
$filter = new Filter();
$chat = new Chat();
$userclan = new Clan($u->info);
ini_set('max_execution_time', '120');
if (isset($_GET['showcode'])) {
$security = new Captcha();
$security->width(107)->height(26)->newImage();
$_SESSION['code'] = $security->getSum();
exit();
}
if (isset($u->info['joinIP']) && $u->info['joinIP'] == 1 && $u->info['ip'] != IP) {
er('#Пожалуйста авторизируйтесь с главной страницы');
} elseif (isset($_GET['exit'])) {
gameexit();
}
if ($u->info['online'] < time() - 60) {
$filter->setOnline($u->info['online'], $u->info['id']);
Db::sql('update users set online = unix_timestamp(), timeMain = unix_timestamp() where id = ?', [$u->info['id']]);
}
$u->stats = $u->getStats($u->info['id'], 0);
if (!isset($_COOKIE['d1c'])) {
$detect = new MobileDetect;
$deviceType = $detect->isMobile() ? $detect->isTablet() ? 'tablet' : 'phone' : 'computer';
$_COOKIE['d1c'] = $deviceType;
setcookie('d1c', $deviceType, (time() + 86400));
} else {
$deviceType = $_COOKIE['d1c'];
}
?>
|
|||||||||
|
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||