aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rw-r--r--pages/relive-player.php17
-rw-r--r--pages/relive.php11
-rw-r--r--pages/room.php6
3 files changed, 9 insertions, 25 deletions
diff --git a/pages/relive-player.php b/pages/relive-player.php
index 64d1578..84fc866 100644
--- a/pages/relive-player.php
+++ b/pages/relive-player.php
@@ -2,24 +2,17 @@
require_once('lib/bootstrap.php');
-$talks = file_get_contents('http://vod.c3voc.de/relive/index.json');
-$talks = utf8_decode($talks);
-$talks = json_decode($talks, true);
+$talks_by_id = relive_talks();
+$talk = @$talks_by_id[intval($_GET['id'])];
-$talkhit = null;
-foreach($talks as $talk) {
- if($talk['id'] == $_GET['id'])
- $talkhit = $talk;
-}
-
-if(!$talkhit) return;
+if(!$talk)
+ return include('page/404.php');
echo $tpl->render(array(
'page' => 'relive-player',
'title' => 'Relive!',
- 'talk' => $talkhit,
+ 'talk' => $talk,
'width' => 1024,
'height' => 576,
- 'relive' => true,
));
diff --git a/pages/relive.php b/pages/relive.php
index 362af34..33e0d5a 100644
--- a/pages/relive.php
+++ b/pages/relive.php
@@ -2,17 +2,8 @@
require_once('lib/bootstrap.php');
-$talks = file_get_contents(get('OVERVIEW.RELIVE_JSON'));
-$talks = utf8_decode($talks);
-$talks = json_decode($talks, true);
-
-usort($talks, function($a, $b) {
- $sort = array('live', 'recorded', 'released');
- return array_search($a['status'], $sort) > array_search($b['status'], $sort);
-});
-
echo $tpl->render(array(
'page' => 'relive',
'title' => 'Relive!',
- 'talks' => $talks,
+ 'talks' => relive_talks(),
));
diff --git a/pages/room.php b/pages/room.php
index abd764d..77f4fdf 100644
--- a/pages/room.php
+++ b/pages/room.php
@@ -8,7 +8,7 @@ $language = $_GET['language'];
$selection = $_GET['selection'];
if(!has("ROOMS.$room"))
- return include('404.php');
+ return include('pages/404.php');
$formats = get("ROOMS.$room.FORMATS");
$has_translation = get("ROOMS.$room.TRANSLATION");
@@ -54,7 +54,7 @@ if(!$selection)
$selection = $selections[0];
if(!in_array($selection, $selections))
- return include('404.php');
+ return include('pages/404.php');
@@ -94,7 +94,7 @@ switch($selection) {
if($language == 'translated')
{
if(!$has_translation)
- return include('404.php');
+ return include('pages/404.php');
$title = 'Translated '.$title;
}