Отказ от алиаса die в пользу exit, более явная проверка на наличие сессии. Некоторые проверки входа теперь проверяют объекты, а не массив.
This commit is contained in:
+11
-8
@@ -1,15 +1,18 @@
|
||||
<?php
|
||||
session_start();
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
require_once 'functions.php';
|
||||
|
||||
if ($user['room'] != 61) {
|
||||
header("Location: main.php");
|
||||
die();
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
if ($user['battle'] != 0) {
|
||||
require_once 'functions.php';
|
||||
$user = $user ?? null;
|
||||
if ($user->room != 61) {
|
||||
header("Location: main.php");
|
||||
exit;
|
||||
}
|
||||
if ($user->battle) {
|
||||
header('location: fight.php');
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
$status = 'Внимание! Моментальная оплата без подтверждения!';
|
||||
|
||||
Reference in New Issue
Block a user