<?php header('Content-Type: application/json'); $conferences = Conferences::getActiveConferences(); $struct = array(); if (isset($GLOBALS['CONFIG'])) { $saved_config = $GLOBALS['CONFIG']; } foreach ($conferences as $conference) { /* ok. das ist so hacky. EIGENTLICH müsste man aus ModelBase das $GLOBALS tilgen und von der api ne v2 releasen, welche conferences als eigenes Objekt betrachtet */ $GLOBALS['CONFIG'] = $conference['CONFIG']; $GLOBALS['MANDATOR'] = $conference['slug']; $overview = new Overview(); foreach ($overview->getGroups() as $group => $rooms) { $roomstruct = array(); foreach ($rooms as $room) { $streams = array(); foreach ($room->getStreams() as $stream) { $key = $stream->getSelection() . '-' . $stream->getLanguage(); $urls = array(); switch ($stream->getPlayerType()) { case 'video': foreach ($stream->getVideoProtos() as $proto => $display) { $urls[$proto] = array('display' => $display, 'tech' => $stream->getVideoTech($proto), 'url' => $stream->getVideoUrl($proto)); } break; case 'slides':
} } } @(list($mandator, $route) = explode('/', $route, 2)); if (!$mandator) { // root requested if (Conferences::getActiveConferencesCount() == 0) { // no clients // error require 'view/allclosed.php'; exit; } else { if (Conferences::getActiveConferencesCount() == 1) { // one client // redirect $clients = Conferences::getActiveConferences(); header('Location: ' . forceslash(baseurl() . $clients[0]['link'])); exit; } else { // multiple clients // show overview require 'view/allconferences.php'; exit; } } } else { if (!Conferences::exists($mandator)) { // old url OR wrong client OR // -> error require 'view/404.php'; exit;
<?php echo $tpl->render(array('page' => 'allconferences', 'title' => 'Multiple Conferences', 'conferences' => Conferences::getActiveConferences()));
public static function getActiveConferencesCount() { return count(Conferences::getActiveConferences()); }