Проверки с перенаправлениями переехали в functions.php. Глобальный выход если нет сессии в config.php.
This commit is contained in:
+1
-5
@@ -1,10 +1,6 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
include('config.php');
|
||||
require_once 'config.php';
|
||||
$user = new \Battles\User($_SESSION['uid']);
|
||||
$hostel = mysql_fetch_array(mysql_query('SELECT `id`, `uid`, `type`, `time` FROM `hostel` WHERE `uid` = "' . $user['id'] . '" LIMIT 1'));
|
||||
#include('functions.php');
|
||||
|
||||
Reference in New Issue
Block a user