# Koenig (31.05.2017 / 20:20)А как?
даже чуть не так
там ссылка на регистрацию другая
# Koenig (31.05.2017 / 20:20)А как?
даже чуть не так
там ссылка на регистрацию другая
Shysh, сейчас посмотрю
if (!$systemUser->id) {
$SPF = $_SERVER['PHP_SELF'];
if ($SPF == '/login.php' || $SPF == '/registration') {
} else {
header("Location: http://{$_SERVER['HTTP_HOST']}/login.php");
exit;
}
} if (!$systemUser->id) {
$SPF = $_SERVER['PHP_SELF'];
if ($SPF == '/login.php' || $SPF == '/registration/index.php') {
} else {
header("Location: http://{$_SERVER['HTTP_HOST']}/login.php");
exit;
}
} Koenig, вот так в регистрацию пустило, а как добавить забыли пароль?
if (!$systemUser->id) {
$SPF = $_SERVER['PHP_SELF'];
if ($SPF == '/login.php' || $SPF == '/profile/skl.php?continue' || $SPF == '/registration/index.php') {
} else {
header("Location: http://{$_SERVER['HTTP_HOST']}/login.php");
exit;
}
} # Jesk (31.05.2017 / 20:49)Всеравно нету "Забыли пароль?"
if (!$systemUser->id) {
$SPF = $_SERVER['PHP_SELF'];
if ($SPF == '/login.php' || $SPF == '/profile/skl.php?continue' || $SPF == '/registration/index.php') {
} else {
header("Lo
Shysh,
if (!$systemUser->id) {
$SPF = $_SERVER['PHP_SELF'];
if ($SPF == '/login.php' || $SPF == '/profile/skl.php' || $SPF == '/registration/index.php') {
} else {
header("Location: http://{$_SERVER['HTTP_HOST']}/login.php");
exit;
}
} # Koenig (05.06.2017 / 19:46)Спасибо большое, все окей с забыли пароль
Shysh,
if (!$systemUser->id) {
$SPF = $_SERVER['PHP_SELF'];
if ($SPF == '/login.php' || $SPF == '/profile/skl.php' || $SPF == '/registration/index.php') {
} else {
header("L
Ещё один вариант
if(!$systemUser->id) {
$_open_sections = [
'/login.php',
'/registration/index.php',
'/profile/skl.php',
// можно добавить
];
$_phpself = $_SERVER['PHP_SELF'];
if(!in_array($_phpself, $_open_sections)) {
header('Location: /login.php');
}
}