Отказ от алиаса die в пользу exit, более явная проверка на наличие сессии. Некоторые проверки входа теперь проверяют объекты, а не массив.
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
<?php
|
||||
session_start();
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
require_once 'functions.php';
|
||||
|
||||
if ($user['room'] != 50) {
|
||||
if ($user->room != 50) {
|
||||
header("Location: main.php");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($user['battle'] != 0) {
|
||||
if ($user->battle) {
|
||||
header('location: fbattle.php');
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
$bank = db::c()->query('SELECT `ekr` FROM `bank` WHERE `id`=?i', $_SESSION['uid'])->fetch_assoc();
|
||||
|
||||
Reference in New Issue
Block a user