Проверки с перенаправлениями переехали в functions.php. Глобальный выход если нет сессии в config.php.
This commit is contained in:
@@ -1,15 +1,7 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!$_SESSION['uid']) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
require_once "functions.php";
|
||||
$user = $user ?? null;
|
||||
if ($user->battle) {
|
||||
header('location: fbattle.php');
|
||||
exit;
|
||||
}
|
||||
$user = $user ?? new \Battles\User($_SESSION['uid']);
|
||||
if ($user->level < 4 && $user->level > 10) {
|
||||
header('location: main.php?act=none');
|
||||
exit;
|
||||
@@ -19,11 +11,6 @@ if ($user->room == 403) {
|
||||
header('Location: canalizaciya.php');
|
||||
exit;
|
||||
}
|
||||
if ($user->room != 402) {
|
||||
header('Location: main.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
\Battles\Template::header('Вход в водосток');
|
||||
?>
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user