Отказ от алиаса die в пользу exit, более явная проверка на наличие сессии. Некоторые проверки входа теперь проверяют объекты, а не массив.

This commit is contained in:
Igor Barkov (iwork)
2020-09-30 15:01:33 +03:00
parent 02dc4582dc
commit a08ce17a40
179 changed files with 883 additions and 582 deletions
+4 -4
View File
@@ -3,18 +3,18 @@ session_start();
require_once('functions.php');
if (!isset($_SESSION['uid'])) {
header('Location: index.php');
die();
exit;
}
if ($user['room'] == 51) {
if ($user->room == 51) {
header('location: city.php');
die();
exit;
}
$forest = db::c()->query('SELECT `id`, `room`, `room_id`, `time`, `user`, `data` FROM `forest` WHERE `user` = ?i', $user['id'])->fetch_assoc();
$error = '';
$map_page = '';
if (empty($forest['id'])) {
die('Ошибка. Сообщите Администрации. Код ошибки : 00.');
exit('Ошибка. Сообщите Администрации. Код ошибки : 00.');
}
function loadmap_cell()