Проверки с перенаправлениями переехали в functions.php. Глобальный выход если нет сессии в config.php.
This commit is contained in:
+1
-15
@@ -1,11 +1,5 @@
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
include "functions.php";
|
||||
require_once "functions.php";
|
||||
$in_haos = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_status` WHERE `id` = '{$user['id']}' LIMIT 1;"));
|
||||
$wait_msg = "Ждем готовности всей группы...";
|
||||
//rooms
|
||||
@@ -108,14 +102,6 @@ $ch_bots[2]=array
|
||||
"1"=>"Босс глубин"
|
||||
);*/
|
||||
|
||||
if ($user->room != 601) {
|
||||
header("Location: main.php");
|
||||
exit;
|
||||
}
|
||||
if ($user->battle) {
|
||||
header('location: fbattle.php');
|
||||
exit;
|
||||
}
|
||||
if ($in_haos['status'] == 4) {
|
||||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '600',`online`.`room` = '600' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||||
mysql_query("UPDATE `cit_haos_status` SET room='0',bot='0',group='0' WHERE id = '{$user['id']}'; ");
|
||||
|
||||
Reference in New Issue
Block a user