2014-10-01 08:33:00 +00:00
|
|
|
<?php
|
|
|
|
|
2015-03-07 16:58:07 +00:00
|
|
|
require_once('config.php');
|
|
|
|
require_once('lib/PhpTemplate.php');
|
|
|
|
require_once('lib/helper.php');
|
|
|
|
|
2014-11-29 18:31:21 +00:00
|
|
|
$route = @$_GET['route'];
|
|
|
|
$route = rtrim($route, '/');
|
2015-03-03 10:20:45 +00:00
|
|
|
$GLOBALS['ROUTE'] = $route;
|
2014-10-01 08:33:00 +00:00
|
|
|
|
2015-03-07 16:58:07 +00:00
|
|
|
|
|
|
|
$GLOBALS['tpl'] = new PhpTemplate('template/page.phtml');
|
|
|
|
$GLOBALS['tpl']->set(array(
|
|
|
|
'baseurl' => baseurl(),
|
|
|
|
'assemblies' => './template/assemblies/',
|
|
|
|
));
|
|
|
|
|
2014-11-29 18:31:21 +00:00
|
|
|
|
|
|
|
if($route == '')
|
|
|
|
{
|
2015-03-07 16:58:07 +00:00
|
|
|
include('view/overview.php');
|
2014-11-29 18:31:21 +00:00
|
|
|
}
|
|
|
|
|
2015-03-01 15:16:18 +00:00
|
|
|
else if(preg_match('@^about$@', $route, $m))
|
|
|
|
{
|
2015-03-07 16:58:07 +00:00
|
|
|
include('view/about.php');
|
2015-03-01 15:16:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^program.json$@', $route, $m))
|
|
|
|
{
|
2015-03-02 06:35:29 +00:00
|
|
|
if(!has('SCHEDULE'))
|
2015-03-07 16:58:07 +00:00
|
|
|
return include('view/404.php');
|
2015-03-02 06:35:29 +00:00
|
|
|
|
2015-03-07 16:58:07 +00:00
|
|
|
include('view/program-json.php');
|
2015-03-01 15:16:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^feedback$@', $route, $m))
|
|
|
|
{
|
2015-03-02 06:35:29 +00:00
|
|
|
if(!has('FEEDBACK'))
|
2015-03-07 16:58:07 +00:00
|
|
|
return include('view/404.php');
|
2015-03-02 06:35:29 +00:00
|
|
|
|
2015-03-07 16:58:07 +00:00
|
|
|
include('view/feedback.php');
|
2015-03-01 15:16:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^feedback/read$@', $route, $m))
|
|
|
|
{
|
2015-03-02 06:35:29 +00:00
|
|
|
if(!has('FEEDBACK'))
|
2015-03-07 16:58:07 +00:00
|
|
|
return include('view/404.php');
|
2015-03-02 06:35:29 +00:00
|
|
|
|
2015-03-07 16:58:07 +00:00
|
|
|
include('view/feedback-read.php');
|
2015-03-01 15:16:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^relive/([0-9]+)$@', $route, $m))
|
|
|
|
{
|
2015-03-02 06:35:29 +00:00
|
|
|
if(!has('OVERVIEW.RELIVE_JSON'))
|
2015-03-07 16:58:07 +00:00
|
|
|
return include('view/404.php');
|
2015-03-02 06:35:29 +00:00
|
|
|
|
2015-03-01 15:16:18 +00:00
|
|
|
$_GET = array(
|
|
|
|
'id' => $m[1],
|
|
|
|
);
|
2015-03-07 16:58:07 +00:00
|
|
|
include('view/relive-player.php');
|
2015-03-01 15:16:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^relive$@', $route, $m))
|
|
|
|
{
|
2015-03-02 06:35:29 +00:00
|
|
|
if(!has('OVERVIEW.RELIVE_JSON'))
|
2015-03-07 16:58:07 +00:00
|
|
|
return include('view/404.php');
|
2015-03-02 06:35:29 +00:00
|
|
|
|
2015-03-07 16:58:07 +00:00
|
|
|
include('view/relive.php');
|
2015-03-01 15:16:18 +00:00
|
|
|
}
|
|
|
|
|
2015-02-26 16:57:42 +00:00
|
|
|
else if(preg_match('@^([^/]+)$@', $route, $m))
|
2014-11-29 18:31:21 +00:00
|
|
|
{
|
|
|
|
$_GET = array(
|
|
|
|
'room' => $m[1],
|
2015-02-28 18:12:27 +00:00
|
|
|
'selection' => '',
|
2014-11-29 18:31:21 +00:00
|
|
|
'language' => 'native',
|
|
|
|
);
|
2015-03-07 16:58:07 +00:00
|
|
|
include('view/room.php');
|
2014-11-29 18:31:21 +00:00
|
|
|
}
|
|
|
|
|
2015-02-26 16:57:42 +00:00
|
|
|
else if(preg_match('@^([^/]+)/translated$@', $route, $m))
|
2014-11-29 18:31:21 +00:00
|
|
|
{
|
|
|
|
$_GET = array(
|
|
|
|
'room' => $m[1],
|
2015-02-28 18:12:27 +00:00
|
|
|
'selection' => '',
|
2014-11-29 18:31:21 +00:00
|
|
|
'language' => 'translated',
|
|
|
|
);
|
2015-03-07 16:58:07 +00:00
|
|
|
include('view/room.php');
|
2014-11-29 18:31:21 +00:00
|
|
|
}
|
|
|
|
|
2015-02-27 16:21:51 +00:00
|
|
|
else if(preg_match('@^([^/]+)/(sd|audio|slides)$@', $route, $m))
|
2014-11-29 18:31:21 +00:00
|
|
|
{
|
|
|
|
$_GET = array(
|
|
|
|
'room' => $m[1],
|
2015-02-27 16:21:51 +00:00
|
|
|
'selection' => $m[2],
|
2014-11-29 18:31:21 +00:00
|
|
|
'language' => 'native',
|
|
|
|
);
|
2015-03-07 16:58:07 +00:00
|
|
|
include('view/room.php');
|
2014-11-29 18:31:21 +00:00
|
|
|
}
|
|
|
|
|
2015-02-27 16:21:51 +00:00
|
|
|
else if(preg_match('@^([^/]+)/(sd|audio|slides)/translated$@', $route, $m))
|
2014-11-29 18:31:21 +00:00
|
|
|
{
|
|
|
|
$_GET = array(
|
|
|
|
'room' => $m[1],
|
2015-02-27 16:21:51 +00:00
|
|
|
'selection' => $m[2],
|
2014-11-29 18:31:21 +00:00
|
|
|
'language' => 'translated',
|
|
|
|
);
|
2015-03-07 16:58:07 +00:00
|
|
|
include('view/room.php');
|
2014-11-29 18:31:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
{
|
2015-03-07 16:58:07 +00:00
|
|
|
include('view/404.php');
|
2014-11-29 18:31:21 +00:00
|
|
|
}
|