streaming-website/index.php

105 lines
1.7 KiB
PHP
Raw Normal View History

2014-10-01 08:33:00 +00:00
<?php
$route = @$_GET['route'];
$route = rtrim($route, '/');
2014-10-01 08:33:00 +00:00
if($route == '')
{
include('pages/overview.php');
}
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');
}
else if(preg_match('@^([^/]+)$@', $route, $m))
{
$_GET = array(
'room' => $m[1],
2015-02-28 18:12:27 +00:00
'selection' => '',
'language' => 'native',
);
include('pages/room.php');
}
else if(preg_match('@^([^/]+)/translated$@', $route, $m))
{
$_GET = array(
'room' => $m[1],
2015-02-28 18:12:27 +00:00
'selection' => '',
'language' => 'translated',
);
include('pages/room.php');
}
2015-02-27 16:21:51 +00:00
else if(preg_match('@^([^/]+)/(sd|audio|slides)$@', $route, $m))
{
$_GET = array(
'room' => $m[1],
2015-02-27 16:21:51 +00:00
'selection' => $m[2],
'language' => 'native',
);
include('pages/room.php');
}
2015-02-27 16:21:51 +00:00
else if(preg_match('@^([^/]+)/(sd|audio|slides)/translated$@', $route, $m))
{
$_GET = array(
'room' => $m[1],
2015-02-27 16:21:51 +00:00
'selection' => $m[2],
'language' => 'translated',
);
include('pages/room.php');
}
else
{
include('pages/404.php');
}