Проверки с перенаправлениями переехали в functions.php. Глобальный выход если нет сессии в config.php.
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header('Location: index.php');
|
||||
exit();
|
||||
}
|
||||
require_once 'functions.php';
|
||||
//require_once 'cave/cave_bots.php';
|
||||
|
||||
@@ -447,11 +443,6 @@ function getcavedata($caveleader, $floor)
|
||||
return unserialize(implode("", file("cavedata/$caveleader-$floor.dat")));
|
||||
}
|
||||
|
||||
if (!in_array($user->room, Config::$caverooms)) {
|
||||
header("Location: main.php");
|
||||
exit('Not in this life ...');
|
||||
}
|
||||
|
||||
if (isset($_GET['direction'])) {
|
||||
$dir = (int)$_GET['direction'];
|
||||
if ($dir >= 0 && $dir <= 3) {
|
||||
|
||||
Reference in New Issue
Block a user