update login
This commit is contained in:
parent
027212dca4
commit
2808b801bb
0
.installed
Normal file
0
.installed
Normal file
@ -6,11 +6,11 @@ if (session_status() !== PHP_SESSION_ACTIVE) {
|
||||
}
|
||||
$publicPages = ["login.php", "logout.php", "install.php", "display.php", "ticket.php"];
|
||||
$currentPage = basename((string) ($_SERVER["PHP_SELF"] ?? "index.php"));
|
||||
if (false && !file_exists(__DIR__ . "/.installed") && $currentPage !== "install.php") {
|
||||
if (!file_exists(__DIR__ . "/.installed") && $currentPage !== "install.php") {
|
||||
header("Location: install.php");
|
||||
exit;
|
||||
}
|
||||
if (file_exists(__DIR__ . "/.installed") && !in_array($currentPage, $publicPages, true)) {
|
||||
if (!in_array($currentPage, $publicPages, true)) {
|
||||
if (empty($_SESSION["user_id"])) {
|
||||
header("Location: login.php");
|
||||
exit;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user