update login

This commit is contained in:
Flatlogic Bot 2026-04-01 04:41:54 +00:00
parent 027212dca4
commit 2808b801bb
2 changed files with 2 additions and 2 deletions

0
.installed Normal file
View File

View 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;