Broke up the check_login.php require into several files seperated by function and then required them in the check_login

This commit is contained in:
johnnyq
2025-08-06 17:16:30 -04:00
parent c8984d1bc9
commit 44fdb6c24f
8 changed files with 108 additions and 115 deletions

11
includes/auth_check.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
// Check user is logged in with a valid session
if (!isset($_SESSION['logged']) || !$_SESSION['logged']) {
if ($_SERVER["REQUEST_URI"] == "/") {
header("Location: ../login.php");
} else {
header("Location: ../login.php?last_visited=" . base64_encode($_SERVER["REQUEST_URI"]) );
}
exit;
}