aboutsummaryrefslogtreecommitdiff
path: root/room.php
diff options
context:
space:
mode:
authorMaZderMind2014-10-19 12:12:20 +0200
committerMaZderMind2014-10-19 12:12:20 +0200
commitf652ae2be38e74796ed63ba72e23fcb632818118 (patch)
treefac87e88a3928b789c0d9b7f4a9a2ac5b6cbb77e /room.php
parentc2f7758004a9016910168ad47c1a4300e107f2c2 (diff)
restructure room site to produce a unique room/player/formats page
Diffstat (limited to 'room.php')
-rw-r--r--room.php57
1 files changed, 57 insertions, 0 deletions
diff --git a/room.php b/room.php
new file mode 100644
index 0000000..0750cdc
--- /dev/null
+++ b/room.php
@@ -0,0 +1,57 @@
+<?php
+
+require_once('lib/PhpTemplate.php');
+require_once('lib/helper.php');
+require_once('config.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 'hq':
+ $type = 'video';
+ $width = 1024;
+ $height = 576;
+ break;
+
+ case 'lq':
+ $type = 'video';
+ $width = 640;
+ $height = 360;
+ break;
+}
+
+$tpl = new PhpTemplate('template/page.phtml');
+echo $tpl->render(array(
+ 'page' => 'room',
+
+ 'baseurl' => baseurl(),
+ 'title' => $GLOBALS['CONFIG']['ROOMS'][$room].' – '.$GLOBALS['CONFIG']['FORMATS'][$format],
+
+ 'rooms' => $GLOBALS['CONFIG']['ROOMS'],
+ 'formats' => $GLOBALS['CONFIG']['FORMATS'],
+
+ 'room' => $room,
+ 'roomname' => $GLOBALS['CONFIG']['ROOMS'][$room],
+
+ 'type' => $type,
+ 'width' => @$width,
+ 'height' => @$height,
+ 'language' => $language,
+ 'format' => $format,
+));