2014-10-01 08:33:00 +00:00
|
|
|
<?php
|
|
|
|
|
2014-11-29 18:31:21 +00:00
|
|
|
$route = @$_GET['route'];
|
|
|
|
$route = rtrim($route, '/');
|
2014-10-01 08:33:00 +00:00
|
|
|
|
|
|
|
|
2014-11-29 18:31:21 +00:00
|
|
|
|
|
|
|
if($route == '')
|
|
|
|
{
|
2015-02-26 16:57:42 +00:00
|
|
|
include('pages/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))
|
|
|
|
{
|
|
|
|
include('pages/about.php');
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^program.json$@', $route, $m))
|
|
|
|
{
|
2015-03-02 06:35:29 +00:00
|
|
|
if(!has('SCHEDULE'))
|
|
|
|
return include('404.php');
|
|
|
|
|
2015-03-01 15:16:18 +00:00
|
|
|
include('pages/program-json.php');
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^feedback$@', $route, $m))
|
|
|
|
{
|
2015-03-02 06:35:29 +00:00
|
|
|
if(!has('FEEDBACK'))
|
|
|
|
return include('404.php');
|
|
|
|
|
2015-03-01 15:16:18 +00:00
|
|
|
include('pages/feedback.php');
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^feedback/read$@', $route, $m))
|
|
|
|
{
|
2015-03-02 06:35:29 +00:00
|
|
|
if(!has('FEEDBACK'))
|
|
|
|
return include('404.php');
|
|
|
|
|
2015-03-01 15:16:18 +00:00
|
|
|
include('pages/feedback-read.php');
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^relive/([0-9]+)$@', $route, $m))
|
|
|
|
{
|
2015-03-02 06:35:29 +00:00
|
|
|
if(!has('OVERVIEW.RELIVE_JSON'))
|
|
|
|
return include('404.php');
|
|
|
|
|
2015-03-01 15:16:18 +00:00
|
|
|
$_GET = array(
|
|
|
|
'id' => $m[1],
|
|
|
|
);
|
|
|
|
include('pages/relive-player.php');
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(preg_match('@^relive$@', $route, $m))
|
|
|
|
{
|
2015-03-02 06:35:29 +00:00
|
|
|
if(!has('OVERVIEW.RELIVE_JSON'))
|
|
|
|
return include('404.php');
|
|
|
|
|
2015-03-01 15:16:18 +00:00
|
|
|
include('pages/relive.php');
|
|
|
|
}
|
|
|
|
|
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',
|
|
|
|
);
|
|
|
|
include('pages/room.php');
|
|
|
|
}
|
|
|
|
|
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',
|
|
|
|
);
|
|
|
|
include('pages/room.php');
|
|
|
|
}
|
|
|
|
|
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',
|
|
|
|
);
|
|
|
|
include('pages/room.php');
|
|
|
|
}
|
|
|
|
|
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',
|
|
|
|
);
|
|
|
|
include('pages/room.php');
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
{
|
|
|
|
include('pages/404.php');
|
|
|
|
}
|