Проверки с перенаправлениями переехали в functions.php. Глобальный выход если нет сессии в config.php.
This commit is contained in:
+1
-17
@@ -1,24 +1,8 @@
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once "functions.php";
|
||||
$owntravma = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = " . $user['id'] . " AND (type=13 OR type=12 OR type=14) limit 1;"));
|
||||
$klan = mysql_fetch_array(mysql_query("SELECT * FROM `clans` WHERE `id` = '{$user['klan']}' LIMIT 1;"));
|
||||
|
||||
include "functions.php";
|
||||
if ($user->room != 45) {
|
||||
header("Location: main.php");
|
||||
exit;
|
||||
}
|
||||
if ($user->battle) {
|
||||
header('location: fbattle.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$cc_date = mysql_fetch_array(mysql_query("SELECT * FROM `variables` WHERE `var`='cc_time' LIMIT 1;"));
|
||||
$ccd = $cc_date['value'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user