first commit

This commit is contained in:
dev@siliconpin.com
2025-08-07 11:53:41 +05:30
commit a3067c5ad4
4795 changed files with 782758 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
<?php
function require_login() {
if (session_status() === PHP_SESSION_NONE) {
session_start();
}
// Prevent redirect loop for login page
$current_path = $_SERVER['REQUEST_URI'];
if (strpos($current_path, '/Admin/login') !== false) {
return;
}
if (!isset($_SESSION['user_id'])) {
error_log("Redirecting to login.php from: $current_path");
header("Location: /Admin/login");
exit();
}
}