Проверки с перенаправлениями переехали в functions.php. Глобальный выход если нет сессии в config.php.
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once 'config.php';
|
||||
$userLoginStatus = db::c()->query('SELECT enter_game FROM users WHERE id = ?i', $_SESSION['uid'])->getNumRows() ?? 0;
|
||||
if (empty($userLoginStatus)) {
|
||||
@@ -15,40 +10,40 @@ if (empty($userLoginStatus)) {
|
||||
|
||||
\Battles\Template::header('Окно игры');
|
||||
?>
|
||||
<script>
|
||||
if (!navigator.cookieEnabled) {
|
||||
document.write('Внимание! В вашем браузере отключена поддержка Cookies. Включите чтобы играть.');
|
||||
try {
|
||||
window.stop();
|
||||
} catch (exception) {
|
||||
document.execCommand('Stop');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
IFRAME.FRAME {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0 solid;
|
||||
<script>
|
||||
if (!navigator.cookieEnabled) {
|
||||
document.write('Внимание! В вашем браузере отключена поддержка Cookies. Включите чтобы играть.');
|
||||
try {
|
||||
window.stop();
|
||||
} catch (exception) {
|
||||
document.execCommand('Stop');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
IFRAME.FRAME {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0 solid;
|
||||
}
|
||||
|
||||
.frametable {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
border: 0 solid;
|
||||
border-spacing: 0;
|
||||
}
|
||||
.frametable {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
border: 0 solid;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
.frametd {
|
||||
height: inherit;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
.frametd {
|
||||
height: inherit;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<table class="frametable">
|
||||
<tr style="height: 25px;">
|
||||
<td class="frametd">
|
||||
|
||||
Reference in New Issue
Block a user