aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rw-r--r--pages/404.php8
-rw-r--r--pages/about.php8
-rw-r--r--pages/party.php15
-rw-r--r--pages/program-json.php6
-rw-r--r--pages/room.php54
-rw-r--r--pages/rooms.php10
6 files changed, 101 insertions, 0 deletions
diff --git a/pages/404.php b/pages/404.php
new file mode 100644
index 0000000..4eee2f2
--- /dev/null
+++ b/pages/404.php
@@ -0,0 +1,8 @@
+<?php
+
+require_once('lib/bootstrap.php');
+
+echo $tpl->render(array(
+ 'page' => '404',
+ 'title' => '404 Not Found',
+));
diff --git a/pages/about.php b/pages/about.php
new file mode 100644
index 0000000..9586e73
--- /dev/null
+++ b/pages/about.php
@@ -0,0 +1,8 @@
+<?php
+
+require_once('lib/bootstrap.php');
+
+echo $tpl->render(array(
+ 'page' => 'about',
+ 'title' => 'About the Streams',
+));
diff --git a/pages/party.php b/pages/party.php
new file mode 100644
index 0000000..a095df3
--- /dev/null
+++ b/pages/party.php
@@ -0,0 +1,15 @@
+<?php
+
+require_once('lib/bootstrap.php');
+
+$room = $_GET['room'];
+echo $tpl->render(array(
+ 'page' => 'party',
+
+ 'title' => $GLOBALS['CONFIG']['ROOMS'][$room],
+
+ 'rooms' => $GLOBALS['CONFIG']['ROOMS'],
+
+ 'room' => $room,
+ 'roomname' => $GLOBALS['CONFIG']['ROOMS'][$room],
+));
diff --git a/pages/program-json.php b/pages/program-json.php
new file mode 100644
index 0000000..2b5e38b
--- /dev/null
+++ b/pages/program-json.php
@@ -0,0 +1,6 @@
+<?php
+
+require_once('lib/bootstrap.php');
+
+header('Content-Type: application/json');
+echo json_encode(program());
diff --git a/pages/room.php b/pages/room.php
new file mode 100644
index 0000000..96b8f18
--- /dev/null
+++ b/pages/room.php
@@ -0,0 +1,54 @@
+<?php
+
+require_once('lib/bootstrap.php');
+
+$room = $_GET['room'];
+$language = $_GET['language'];
+$format = $_GET['format'];
+
+switch($format) {
+ case 'audio':
+ $type = 'audio';
+ break;
+
+ case 'slides':
+ $type = 'slides';
+ break;
+
+ case 'hd':
+ $type = 'video';
+ $width = 1920;
+ $height = 1080;
+ break;
+
+ case 'sd':
+ $type = 'video';
+ $width = 1024;
+ $height = 576;
+ break;
+}
+
+echo $tpl->render(array(
+ 'page' => 'room',
+
+ 'title' => $GLOBALS['CONFIG']['ROOMS'][$room].' – '.$GLOBALS['CONFIG']['FORMATS'][$format],
+
+ 'rooms' => $GLOBALS['CONFIG']['ROOMS'],
+ 'formats' => $GLOBALS['CONFIG']['FORMATS'],
+
+ 'room' => $room,
+ 'roomname' => $GLOBALS['CONFIG']['ROOMS'][$room],
+
+ 'program' => program(),
+
+ 'type' => $type,
+ 'width' => @$width,
+ 'height' => @$height,
+ 'language' => $language,
+ 'translated' => ($language == 'translated'),
+ 'format' => $format,
+
+ // miniroom = no translation, no slides, no irc, no program
+ // -> sendezentrum, workshops
+ 'miniroom' => in_array($room, array('sendezentrum')),
+));
diff --git a/pages/rooms.php b/pages/rooms.php
new file mode 100644
index 0000000..4faff27
--- /dev/null
+++ b/pages/rooms.php
@@ -0,0 +1,10 @@
+<?php
+
+require_once('lib/bootstrap.php');
+
+echo $tpl->render(array(
+ 'page' => 'rooms',
+ 'title' => 'Overview',
+
+ 'rooms' => $GLOBALS['CONFIG']['ROOMS'],
+));