summaryrefslogtreecommitdiff
path: root/intern/api/termine.php
diff options
context:
space:
mode:
Diffstat (limited to 'intern/api/termine.php')
-rw-r--r--intern/api/termine.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/intern/api/termine.php b/intern/api/termine.php
new file mode 100644
index 0000000..9c9d454
--- /dev/null
+++ b/intern/api/termine.php
@@ -0,0 +1,12 @@
+<?php
+require_once __DIR__ . '/db.php';
+
+$res = $db->query('select termin, uhrzeit from proben where date(STR_TO_DATE(termin, "%d.%m.%Y")) > (SELECT CURDATE() );');
+$proben = $res->fetchAll(PDO::FETCH_ASSOC);
+$res = $db->query('select termin,uhrzeit,beschreibung,anfahrt from konzert order by id desc limit 1;');
+$konzert = $res->fetchAll(PDO::FETCH_ASSOC);
+
+$output = array("konzert" => $konzert, "proben" => $proben);
+header('Content-Type: application/json');
+echo( json_encode($output, JSON_PRETTY_PRINT) );
+