Initial Commit: Tugas Semua Pertemuan
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
header("Access-Control-Allow-Origin: *");
|
||||
header("Content-Type: application/json; charset=UTF-8");
|
||||
|
||||
session_start();
|
||||
|
||||
if (isset($_SESSION['is_admin']) && $_SESSION['is_admin'] === true) {
|
||||
http_response_code(200);
|
||||
echo json_encode(array(
|
||||
"is_admin" => true,
|
||||
"username" => $_SESSION['admin_username']
|
||||
));
|
||||
} else {
|
||||
http_response_code(200);
|
||||
echo json_encode(array(
|
||||
"is_admin" => false
|
||||
));
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user