add files and folders

This commit is contained in:
2026-06-10 17:28:32 +07:00
parent 52f4cf86ab
commit 61f4fb2e71
80 changed files with 17551 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
session_start();
function is_logged_in() {
return isset($_SESSION['user']) && is_array($_SESSION['user']);
}
function require_login() {
if (!is_logged_in()) {
header('Location: login.php');
exit;
}
}
function current_user() {
return $_SESSION['user'] ?? null;
}