Проверки с перенаправлениями переехали в functions.php. Глобальный выход если нет сессии в config.php.

This commit is contained in:
lopar
2020-10-30 01:30:05 +02:00
parent 2024a6fac7
commit 32c72e3413
143 changed files with 6986 additions and 7329 deletions
+2 -14
View File
@@ -1,20 +1,8 @@
<?php /** @noinspection SqlResolve */
/* Разрушенный замок на замковой улице.
* */
<?php
/* Разрушенный замок на замковой улице. */
session_start();
define("CASTLE_MAX_LEVEL", 10);
if (empty($_SESSION['uid'])) {
header("Location: index.php");
exit;
}
require_once 'functions.php';
if (!($user->room >= 37 && $user->room <= 41)) {
header("Location: main.php");
exit;
}
$castleOwners = db::c()->query('SELECT * FROM `clans` WHERE `short` = (SELECT * FROM `variables` WHERE `var` = "?s")', 'gotzamok');
if ($castleOwners['id'] == $user['klan']) {