Commit 276a6f90 authored by uoure's avatar uoure
Browse files

Delete getReservationsAdmin.php

parent ee03aa3b
<?PHP
if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] != "z10" || $_SERVER['PHP_AUTH_PW'] != "kruemel") {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo "Passwort oder Benutzername falsch";
exit;
}
$user = 'apache';
$pass = 'e164AzpQx564TpJa';
$db = new PDO('mysql:host=localhost;dbname=reservation', $user, $pass);
if ($_POST["withEnded"] == "true") {
$statement = $db -> prepare("SELECT * FROM reservations WHERE date = ? ORDER BY tisch, start, end ASC");
} else {
$statement = $db -> prepare("SELECT * FROM reservations WHERE date = ? AND ended = 0 ORDER BY tisch, start, end ASC");
}
$statement->execute(array($_POST["date"]));
echo json_encode($statement->fetchAll());
?>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment