diff options
-rw-r--r-- | config.php | 9 | ||||
-rw-r--r-- | formats.php | 2 | ||||
-rw-r--r-- | index.php | 9 | ||||
-rw-r--r-- | player.php | 53 |
4 files changed, 62 insertions, 11 deletions
@@ -3,4 +3,13 @@ // guessed automatically // $GLOBALS['CONFIG']['baseurl'] = 'http://foo.com/bar/'; +$GLOBALS['CONFIG']['ROOMS'] = array( + 'saal1' => 'Saal 1', + 'saal2' => 'Saal 2', + 'saalg' => 'Saal G', + 'saalz' => 'Saal Z', + 'lounge' => 'Lounge', + 'sendezentrum' => 'Sendezentrum', +); + ?> diff --git a/formats.php b/formats.php index 5d66f08..df2a4c8 100644 --- a/formats.php +++ b/formats.php @@ -11,7 +11,7 @@ echo $tpl->render(array( 'page' => 'formats', 'baseurl' => baseurl(), 'title' => 'Stream-Formats', - 'subtitle' => ucfirst($room), + 'subtitle' => $GLOBALS['CONFIG']['ROOMS'][$room], 'room' => $room, 'formats' => array( @@ -10,12 +10,5 @@ echo $tpl->render(array( 'baseurl' => baseurl(), 'title' => 'Rooms', - 'rooms' => array( - 'saal1' => 'Saal 1', - 'saal2' => 'Saal 2', - 'saalg' => 'Saal G', - 'saalz' => 'Saal Z', - 'lounge' => 'Lounge', - 'sendezentrum' => 'Sendezentrum', - ), + 'rooms' => $GLOBALS['CONFIG']['ROOMS'], )); @@ -1,2 +1,51 @@ -player -<? print_r($_GET) ?> +<?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 'hq': + $type = 'video'; + $width = 1920; + $height = 1080; + break; + + case 'hd': + $type = 'video'; + $width = 1024; + $height = 576; + break; + + case 'ld': + $type = 'video'; + $width = 640; + $height = 360; + break; +} + +$tpl = new PhpTemplate('template/page.phtml'); +echo $tpl->render(array( + 'page' => $type, + 'baseurl' => baseurl(), + 'title' => 'Rooms', + + 'room' => $room, + 'roomname' => $GLOBALS['CONFIG']['ROOMS'][$room], + + 'type' => $type, + 'width' => @$width, + 'height' => @$height, +)); |