Проверки с перенаправлениями переехали в functions.php. Глобальный выход если нет сессии в config.php.
This commit is contained in:
-12
@@ -1,19 +1,7 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
require_once("functions.php");
|
||||
$d = db::c()->query('SELECT SUM(`massa`) FROM `inventory` WHERE `dressed` = 0 AND `owner` = ?i', $_SESSION['uid'])->fetch_assoc();
|
||||
if ($user->room != 23) {
|
||||
header("Location: main.php");
|
||||
exit();
|
||||
}
|
||||
if ($user->battle) {
|
||||
header('location: fbattle.php');
|
||||
exit();
|
||||
}
|
||||
define('GRAV_LIMIT', 32);
|
||||
define('GRAV_COST', 30);
|
||||
define('REPAIR_STATUS', [
|
||||
|
||||
Reference in New Issue
Block a user