diff options
author | MaZderMind | 2015-04-04 20:11:25 +0200 |
---|---|---|
committer | MaZderMind | 2015-04-04 20:12:49 +0200 |
commit | 0fb8904157ea87997fa662ad2c975d773dd75455 (patch) | |
tree | 9d3f1c505fd499f637bc4926a7feb19fffce4c5e /index.php | |
parent | 69c2ec30e6131a2ad205a4a1b77abcbed40c7670 (diff) |
Implement Close-Down Page with Upcoming Event
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 33 |
1 files changed, 21 insertions, 12 deletions
@@ -16,10 +16,12 @@ require_once('model/RoomTab.php'); require_once('model/RoomSelection.php'); require_once('model/Stream.php'); require_once('model/Relive.php'); +require_once('model/Upcoming.php'); $route = @$_GET['route']; $route = rtrim($route, '/'); +$conference = new Conference(); $tpl = new PhpTemplate('template/page.phtml'); $tpl->set(array( @@ -27,7 +29,7 @@ $tpl->set(array( 'route' => $route, 'assemblies' => './template/assemblies/', - 'conference' => new Conference(), + 'conference' => $conference, 'feedback' => new Feedback(), 'schedule' => new Schedule(), )); @@ -35,36 +37,43 @@ $tpl->set(array( ob_start(); try { - if($route == '') + + + if($route == 'feedback/read') + { + require('view/feedback-read.php'); + } + + else if($conference->isClosed()) + { + require('view/closed.php'); + } + + else if($route == '') { require('view/overview.php'); } - else if(preg_match('@^about$@', $route, $m)) + else if($route == 'about') { require('view/about.php'); } - else if(preg_match('@^schedule.json$@', $route, $m)) + else if($route == 'schedule.json') { require('view/schedule-json.php'); } - else if(preg_match('@^multiview$@', $route, $m)) + else if($route == 'multiview') { require('view/multiview.php'); } - else if(preg_match('@^feedback$@', $route, $m)) + else if($route == 'feedback') { require('view/feedback.php'); } - else if(preg_match('@^feedback/read$@', $route, $m)) - { - require('view/feedback-read.php'); - } - else if(preg_match('@^relive/([0-9]+)$@', $route, $m)) { $_GET = array( @@ -73,7 +82,7 @@ try { require('view/relive-player.php'); } - else if(preg_match('@^relive$@', $route, $m)) + else if($route == 'relive') { require('view/relive.php'); } |