Проверки с перенаправлениями переехали в functions.php. Глобальный выход если нет сессии в config.php.
This commit is contained in:
@@ -1,23 +1,8 @@
|
||||
<?php
|
||||
ob_start();
|
||||
session_start();
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once 'functions.php';
|
||||
$user = $user ?? null;
|
||||
|
||||
if ($user->room != 22) {
|
||||
header("Location: main.php");
|
||||
exit;
|
||||
}
|
||||
if ($user->battle) {
|
||||
header('location: fbattle.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$user = $user ?? new \Battles\User($_SESSION['uid']);
|
||||
/*
|
||||
* aheroshop.php
|
||||
* $data = db::c()->query('SELECT * FROM `ahero_shop` WHERE `count` > 0 AND `razdel` = ?i ORDER by `point` ASC', $_GET['otdel']);
|
||||
|
||||
Reference in New Issue
Block a user