Проверки с перенаправлениями переехали в functions.php. Глобальный выход если нет сессии в config.php.
This commit is contained in:
+1
-5
@@ -7,12 +7,8 @@
|
||||
*/
|
||||
|
||||
session_start();
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
require_once 'functions.php';
|
||||
$user = $user ?? [];
|
||||
$user = $user ?? new \Battles\User($_SESSION['uid']);
|
||||
if (!empty($_GET['teleport']) && $user->admin == 1) {
|
||||
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = 20,`online`.`room` = 20 WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_SESSION['uid']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user