Отказ от алиаса die в пользу exit, более явная проверка на наличие сессии. Некоторые проверки входа теперь проверяют объекты, а не массив.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?
|
||||
session_start();
|
||||
if(!isset($_SESSION['uid'])) { header('Location: index.php'); die(); }
|
||||
if(!isset($_SESSION['uid'])) { header('Location: index.php'); exit; }
|
||||
include('config.php');
|
||||
$user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$_SESSION['uid'].'" LIMIT 1'));
|
||||
$hostel = mysql_fetch_array(mysql_query('SELECT `id`, `uid`, `type`, `time` FROM `hostel` WHERE `uid` = "'.$user['id'].'" LIMIT 1'));
|
||||
|
||||
Reference in New Issue
Block a user