Проверки с перенаправлениями переехали в functions.php. Глобальный выход если нет сессии в config.php.
This commit is contained in:
@@ -1,15 +1,6 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header('Location: /index.php');
|
||||
exit();
|
||||
}
|
||||
require_once 'functions.php';
|
||||
if ($user->battle) {
|
||||
header('Location: /fbattle.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
define('INFO_CHAR_LIMIT', 1500);
|
||||
$name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);
|
||||
$oldpsw = filter_input(INPUT_POST, 'oldpsw', FILTER_SANITIZE_SPECIAL_CHARS);
|
||||
|
||||
Reference in New Issue
Block a user