first commit

This commit is contained in:
2026-06-11 21:18:48 +07:00
parent 14ef9997c2
commit 2747d616c7
45 changed files with 7381 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
<?php
// php/check_auth.php
require_once 'koneksi.php';
if (session_status() === PHP_SESSION_NONE) { session_start(); }
header('Content-Type: application/json');
if (empty($_SESSION['user_id'])) {
echo json_encode(['loggedIn' => false]);
} else {
echo json_encode([
'loggedIn' => true,
'nama' => $_SESSION['user_nama'] ?? '',
'role' => $_SESSION['user_role'] ?? ''
]);
}
?>