Проверки с перенаправлениями переехали в functions.php. Глобальный выход если нет сессии в config.php.
This commit is contained in:
@@ -1,20 +1,7 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!$_SESSION['uid']) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
require_once "functions.php";
|
||||
$user = $user ?? [];
|
||||
if ($user->room != 401) {
|
||||
header("Location: main.php");
|
||||
exit;
|
||||
}
|
||||
if ($user->battle) {
|
||||
header('Location: fbattle.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$user = $user ?? new \Battles\User($_SESSION['uid']);
|
||||
class hellround
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user