2014-10-01 08:33:00 +00:00
|
|
|
<?php
|
|
|
|
|
2015-03-07 16:58:07 +00:00
|
|
|
require_once('config.php');
|
2015-03-08 12:42:58 +00:00
|
|
|
|
2015-03-07 16:58:07 +00:00
|
|
|
require_once('lib/PhpTemplate.php');
|
2015-03-08 12:42:58 +00:00
|
|
|
require_once('lib/Exceptions.php');
|
2015-03-07 16:58:07 +00:00
|
|
|
require_once('lib/helper.php');
|
|
|
|
|
2015-03-15 18:13:25 +00:00
|
|
|
require_once('model/ModelBase.php');
|
|
|
|
require_once('model/Conference.php');
|
|
|
|
require_once('model/Feedback.php');
|
|
|
|
require_once('model/Schedule.php');
|
2015-03-08 12:42:58 +00:00
|
|
|
require_once('model/Overview.php');
|
|
|
|
require_once('model/Room.php');
|
2015-03-30 14:20:30 +00:00
|
|
|
require_once('model/RoomTab.php');
|
|
|
|
require_once('model/RoomSelection.php');
|
|
|
|
require_once('model/Stream.php');
|
2015-03-31 21:17:01 +00:00
|
|
|
require_once('model/Relive.php');
|
2015-03-08 12:42:58 +00:00
|
|
|
|
2014-11-29 18:31:21 +00:00
|
|
|
$route = @$_GET['route'];
|
|
|
|
$route = rtrim($route, '/');
|
2014-10-01 08:33:00 +00:00
|
|
|
|
2015-03-07 16:58:07 +00:00
|
|
|
|
2015-03-08 12:42:58 +00:00
|
|
|
$tpl = new PhpTemplate('template/page.phtml');
|
|
|
|
$tpl->set(array(
|
2015-03-07 16:58:07 +00:00
|
|
|
'baseurl' => baseurl(),
|
2015-03-30 14:20:30 +00:00
|
|
|
'route' => $route,
|
2015-03-07 16:58:07 +00:00
|
|
|
'assemblies' => './template/assemblies/',
|
2015-03-15 18:13:25 +00:00
|
|
|
|
|
|
|
'conference' => new Conference(),
|
|
|
|
'feedback' => new Feedback(),
|
|
|
|
'schedule' => new Schedule(),
|
2015-03-07 16:58:07 +00:00
|
|
|
));
|
|
|
|
|
2014-11-29 18:31:21 +00:00
|
|
|
|
2015-03-27 13:21:34 +00:00
|
|
|
ob_start();
|
2015-03-08 12:42:58 +00:00
|
|
|
try {
|
|
|
|
if($route == '')
|
|
|
|
{
|
2015-03-31 19:59:22 +00:00
|
|
|
require('view/overview.php');
|
2015-03-08 12:42:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^about$@', $route, $m))
|
|
|
|
{
|
2015-03-31 19:59:22 +00:00
|
|
|
require('view/about.php');
|
2015-03-08 12:42:58 +00:00
|
|
|
}
|
|
|
|
|
2015-03-31 15:20:10 +00:00
|
|
|
else if(preg_match('@^schedule.json$@', $route, $m))
|
2015-03-08 12:42:58 +00:00
|
|
|
{
|
2015-03-31 19:59:22 +00:00
|
|
|
require('view/schedule-json.php');
|
2015-03-08 12:42:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^feedback$@', $route, $m))
|
|
|
|
{
|
2015-03-31 19:59:22 +00:00
|
|
|
require('view/feedback.php');
|
2015-03-08 12:42:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^feedback/read$@', $route, $m))
|
|
|
|
{
|
2015-03-31 19:59:22 +00:00
|
|
|
require('view/feedback-read.php');
|
2015-03-08 12:42:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^relive/([0-9]+)$@', $route, $m))
|
|
|
|
{
|
|
|
|
$_GET = array(
|
|
|
|
'id' => $m[1],
|
|
|
|
);
|
2015-03-31 19:59:22 +00:00
|
|
|
require('view/relive-player.php');
|
2015-03-08 12:42:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^relive$@', $route, $m))
|
|
|
|
{
|
2015-03-31 19:59:22 +00:00
|
|
|
require('view/relive.php');
|
2015-03-08 12:42:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^([^/]+)$@', $route, $m))
|
|
|
|
{
|
|
|
|
$_GET = array(
|
|
|
|
'room' => $m[1],
|
|
|
|
'selection' => '',
|
|
|
|
'language' => 'native',
|
|
|
|
);
|
2015-03-31 19:59:22 +00:00
|
|
|
require('view/room.php');
|
2015-03-08 12:42:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^([^/]+)/translated$@', $route, $m))
|
|
|
|
{
|
|
|
|
$_GET = array(
|
|
|
|
'room' => $m[1],
|
|
|
|
'selection' => '',
|
|
|
|
'language' => 'translated',
|
|
|
|
);
|
2015-03-31 19:59:22 +00:00
|
|
|
require('view/room.php');
|
2015-03-08 12:42:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^([^/]+)/(sd|audio|slides)$@', $route, $m))
|
|
|
|
{
|
|
|
|
$_GET = array(
|
|
|
|
'room' => $m[1],
|
|
|
|
'selection' => $m[2],
|
|
|
|
'language' => 'native',
|
|
|
|
);
|
2015-03-31 19:59:22 +00:00
|
|
|
require('view/room.php');
|
2015-03-08 12:42:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^([^/]+)/(sd|audio|slides)/translated$@', $route, $m))
|
|
|
|
{
|
|
|
|
$_GET = array(
|
|
|
|
'room' => $m[1],
|
|
|
|
'selection' => $m[2],
|
|
|
|
'language' => 'translated',
|
|
|
|
);
|
2015-03-31 19:59:22 +00:00
|
|
|
require('view/room.php');
|
2015-03-08 12:42:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
{
|
|
|
|
throw new NotFoundException();
|
|
|
|
}
|
2015-03-02 06:35:29 +00:00
|
|
|
|
2015-03-01 15:16:18 +00:00
|
|
|
}
|
2015-03-08 12:42:58 +00:00
|
|
|
catch(NotFoundException $e)
|
2014-11-29 18:31:21 +00:00
|
|
|
{
|
2015-03-27 13:21:34 +00:00
|
|
|
ob_clean();
|
2015-03-31 19:59:22 +00:00
|
|
|
require('view/404.php');
|
2014-11-29 18:31:21 +00:00
|
|
|
}
|
2015-03-08 12:42:58 +00:00
|
|
|
catch(Exception $e)
|
2014-11-29 18:31:21 +00:00
|
|
|
{
|
2015-03-27 13:21:34 +00:00
|
|
|
ob_clean();
|
2015-03-31 19:59:22 +00:00
|
|
|
require('view/500.php');
|
2014-11-29 18:31:21 +00:00
|
|
|
}
|