public/index.php aktualisiert
This commit is contained in:
@@ -22,4 +22,25 @@ switch ($path) {
|
||||
break;
|
||||
}
|
||||
|
||||
function ReturnJsonResponse($data, $status = 200) {
|
||||
http_response_code($status);
|
||||
header('Content-Type: application/json');
|
||||
header('Cache-Control: no-cache, no-store, must-revalidate');
|
||||
echo json_encode($data);
|
||||
exit;
|
||||
}
|
||||
|
||||
function request_access() {
|
||||
$data = ['request access' => 'request not allowed'];
|
||||
ReturnJsonResponse($data, 403);
|
||||
}
|
||||
|
||||
function deny_access() {
|
||||
$data = ['deny access'=>'emergency user request revoked'];
|
||||
ReturnJsonResponse($data);
|
||||
}
|
||||
|
||||
function user_interface() {
|
||||
print('<!DOCTYPE html><html><head><title>DigiErbe Tresor</title></head><body><h1>Willkommen beim DigiErbe Tresor</h1></body></html>');
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user