diff options
Diffstat (limited to 'pages/relive-player.php')
-rw-r--r-- | pages/relive-player.php | 17 |
1 files changed, 5 insertions, 12 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, )); |