Add .gitignore and project files

This commit is contained in:
kirill.khorkov
2025-12-16 01:28:06 +03:00
parent 0541b0c020
commit 3f257120fa
140 changed files with 13360 additions and 0 deletions

21
check_auth_status.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
// check_auth_status.php
session_start();
$response = [
'loggedIn' => isset($_SESSION['isLoggedIn']) && $_SESSION['isLoggedIn'] === true
];
if ($response['loggedIn']) {
$response['user'] = [
'user_id' => $_SESSION['user_id'] ?? 0,
'email' => $_SESSION['user_email'] ?? '',
'full_name' => $_SESSION['full_name'] ?? '',
'is_admin' => $_SESSION['isAdmin'] ?? false,
'login_time' => $_SESSION['login_time'] ?? time()
];
}
header('Content-Type: application/json');
echo json_encode($response);
?>