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