aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pages/relive-player.php24
-rw-r--r--pages/relive.php15
2 files changed, 36 insertions, 3 deletions
diff --git a/pages/relive-player.php b/pages/relive-player.php
new file mode 100644
index 0000000..fe697b3
--- /dev/null
+++ b/pages/relive-player.php
@@ -0,0 +1,24 @@
+<?php
+
+require_once('lib/bootstrap.php');
+
+$talks = file_get_contents('http://vod.c3voc.de/relive/index.json');
+$talks = json_decode($talks, true);
+
+$talkhit = null;
+foreach($talks as $talk) {
+ if($talk['id'] == $_GET['id'])
+ $talkhit = $talk;
+}
+
+if(!$talkhit) return;
+
+echo $tpl->render(array(
+ 'page' => 'relive-player',
+ 'title' => 'Relive!',
+ 'talk' => $talkhit,
+
+ 'width' => 1024,
+ 'height' => 576,
+ 'relive' => true,
+));
diff --git a/pages/relive.php b/pages/relive.php
index 2d7f3d6..dadabf6 100644
--- a/pages/relive.php
+++ b/pages/relive.php
@@ -2,10 +2,19 @@
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);
+
+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!',
- 'extraScripts' => array(
- 'assets/js/lustiges-relive-script.js',
- ),
+ 'talks' => $talks,
+
+ 'relive' => true,
));