This commit is contained in:
2024-07-13 17:59:54 +02:00
parent 4d25387a47
commit 03da043be3
9 changed files with 106 additions and 6 deletions
+3
View File
@@ -0,0 +1,3 @@
body {
background-color: red;
}
+10 -1
View File
@@ -1 +1,10 @@
DOCUMENTATION
<!DOCTYPE html>
<html lang="en">
<head>
<link href="./index.css" rel="stylesheet" />
<title>Calculator</title>
</head>
<body></body>
</html>
+2 -3
View File
@@ -1,4 +1,3 @@
<?php
foreach (glob(__DIR__ . '/*/index.php') as $filename) {
require_once($filename);
}
Headers::redirect("docs/index.html");
+26
View File
@@ -0,0 +1,26 @@
<?php
$method = $_SERVER['REQUEST_METHOD'];
switch ($method) {
case "GET":
return get();
default:
return Response::api("$method not supported", 500);
}
function get()
{
$db = Database::getInstance();
$query =
"SELECT
*
FROM
egb_gaestebuch";
$stmt = $db->prepare($query);
$stmt->execute();
Response::api($stmt->fetchAll());
}
+12 -1
View File
@@ -11,5 +11,16 @@ switch ($method) {
function get()
{
Response::api("GET USERS");
$db = Database::getInstance();
$query =
"SELECT
*
FROM
egb_benutzer";
$stmt = $db->prepare($query);
$stmt->execute();
Response::api($stmt->fetchAll());
}