pages/conference/ConferenceHandler.inc.php

Go to the documentation of this file.
00001 <?php
00002 
00015 //$Id$
00016 
00017 
00018 import('handler.Handler');
00019 
00020 class ConferenceHandler extends Handler {
00024    function ConferenceHandler() {
00025       parent::Handler();
00026 
00027       $this->addCheck(new HandlerValidatorConference($this));     
00028    }
00029 
00033    function index($args) {
00034       $this->validate();
00035       $this->setupTemplate();
00036       
00037       $conference =& Request::getConference();
00038 
00039       $templateMgr =& TemplateManager::getManager();
00040 
00041       $conferenceDao =& DAORegistry::getDAO('ConferenceDAO');
00042 
00043       $templateMgr->assign('helpTopicId', 'user.home');
00044 
00045       // Assign header and content for home page
00046       $templateMgr->assign('displayPageHeaderTitle', $conference->getPageHeaderTitle(true));
00047       $templateMgr->assign('displayPageHeaderLogo', $conference->getPageHeaderLogo(true));
00048       $templateMgr->assign('displayPageHeaderTitleAltText', $conference->getLocalizedSetting('homeHeaderTitleImageAltText'));
00049       $templateMgr->assign('displayPageHeaderLogoAltText', $conference->getLocalizedSetting('homeHeaderLogoImageAltText'));
00050       $templateMgr->assign('additionalHomeContent', $conference->getLocalizedSetting('additionalHomeContent'));
00051       $templateMgr->assign('homepageImage', $conference->getLocalizedSetting('homepageImage'));
00052       $templateMgr->assign('homepageImageAltText', $conference->getLocalizedSetting('homepageImageAltText'));
00053       $templateMgr->assign('description', $conference->getLocalizedSetting('description'));
00054       $templateMgr->assign('conferenceTitle', $conference->getConferenceTitle());
00055 
00056       $schedConfDao =& DAORegistry::getDAO('SchedConfDAO');
00057       $currentSchedConfs =& $schedConfDao->getCurrentSchedConfs($conference->getId());
00058       if ($currentSchedConfs && $currentSchedConfs->getCount() == 1) {
00059          // If only one sched conf exists, redirect to it.
00060          $singleSchedConf =& $currentSchedConfs->next();
00061          Request::redirect(null, $singleSchedConf->getPath());
00062       }
00063       $templateMgr->assign_by_ref('currentSchedConfs', $currentSchedConfs);
00064 
00065       $enableAnnouncements = $conference->getSetting('enableAnnouncements');
00066       if ($enableAnnouncements) {
00067          $enableAnnouncementsHomepage = $conference->getSetting('enableAnnouncementsHomepage');
00068          if ($enableAnnouncementsHomepage) {
00069             $numAnnouncementsHomepage = $conference->getSetting('numAnnouncementsHomepage');
00070             $announcementDao =& DAORegistry::getDAO('AnnouncementDAO');
00071             $announcements =& $announcementDao->getNumAnnouncementsNotExpiredByAssocId(ASSOC_TYPE_CONFERENCE, $conference->getId(), $numAnnouncementsHomepage);
00072             $templateMgr->assign('announcements', $announcements);
00073             $templateMgr->assign('enableAnnouncementsHomepage', $enableAnnouncementsHomepage);
00074          }
00075       } 
00076       $templateMgr->display('conference/index.tpl');
00077    }
00078 }
00079 
00080 ?>

Generated on 25 Jul 2013 for Open Conference Systems by  doxygen 1.4.7