Docs
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
body {
|
||||
background-color: red;
|
||||
}
|
||||
@@ -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
@@ -1,4 +1,3 @@
|
||||
<?php
|
||||
foreach (glob(__DIR__ . '/*/index.php') as $filename) {
|
||||
require_once($filename);
|
||||
}
|
||||
|
||||
Headers::redirect("docs/index.html");
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user