pages/manager/ConferenceHistoryHandler.inc.php

Go to the documentation of this file.
00001 <?php
00002 
00015 //$Id$
00016 
00017 import('pages.manager.ManagerHandler');
00018 
00019 class ConferenceHistoryHandler extends ManagerHandler {
00023    function ConferenceHistoryHandler() {
00024       parent::ManagerHandler();
00025    }
00029    function conferenceEventLog($args) {
00030       $logId = isset($args[0]) ? (int) $args[0] : 0;
00031       $this->validate();
00032 
00033       $conference =& Request::getConference();
00034 
00035       $this->setupTemplate(true);
00036 
00037       $templateMgr =& TemplateManager::getManager();
00038 
00039       $templateMgr->assign_by_ref('conference', $conference);
00040 
00041       if ($logId) {
00042          $logDao =& DAORegistry::getDAO('ConferenceEventLogDAO');
00043          $logEntry =& $logDao->getLogEntry($logId);
00044          if ($logEntry && $logEntry->getConferenceId() != $conference->getId()) Request::redirect(null, null, null, 'index');
00045       }
00046 
00047       if (isset($logEntry)) {
00048          $templateMgr->assign('logEntry', $logEntry);
00049          $templateMgr->display('manager/conferenceEventLogEntry.tpl');
00050       } else {
00051          $rangeInfo =& Handler::getRangeInfo('eventLogEntries', array());
00052 
00053          import('conference.log.ConferenceLog');
00054          while (true) {
00055             $eventLogEntries =& ConferenceLog::getEventLogEntries($conference->getId(), null, $rangeInfo);
00056             if ($eventLogEntries->isInBounds()) break;
00057             unset($rangeInfo);
00058             $rangeInfo =& $eventLogEntries->getLastPageRangeInfo();
00059             unset($eventLogEntries);
00060          }
00061          $templateMgr->assign('eventLogEntries', $eventLogEntries);
00062          $templateMgr->display('manager/conferenceEventLog.tpl');
00063       }
00064    }
00065 
00069    function conferenceEventLogType($args) {
00070       $assocType = isset($args[1]) ? (int) $args[0] : null;
00071       $assocId = isset($args[2]) ? (int) $args[1] : null;
00072       $this->validate();
00073       $this->setupTemplate(true);
00074 
00075       $conference =& Request::getConference();
00076 
00077       $rangeInfo =& Handler::getRangeInfo('eventLogEntries', array($assocType, $assocId));
00078       $logDao =& DAORegistry::getDAO('ConferenceEventLogDAO');
00079       while (true) {
00080          $eventLogEntries =& $logDao->getConferenceLogEntriesByAssoc($conference->getId(), null, $assocType, $assocId, $rangeInfo);
00081          if ($eventLogEntries->isInBounds()) break;
00082          unset($rangeInfo);
00083          $rangeInfo =& $eventLogEntries->getLastPageRangeInfo();
00084          unset($eventLogEntries);
00085       }
00086 
00087       $templateMgr =& TemplateManager::getManager();
00088 
00089       $templateMgr->assign('showBackLink', true);
00090       $templateMgr->assign('isDirector', Validation::isDirector());
00091       $templateMgr->assign_by_ref('conference', $conference);
00092       $templateMgr->assign_by_ref('eventLogEntries', $eventLogEntries);
00093       $templateMgr->display('manager/conferenceEventLog.tpl');
00094    }
00095 
00099    function clearConferenceEventLog($args) {
00100       $logId = isset($args[0]) ? (int) $args[0] : 0;
00101       $this->validate();
00102       $conference =& Request::getConference();
00103 
00104       $logDao =& DAORegistry::getDAO('ConferenceEventLogDAO');
00105 
00106       if ($logId) {
00107          $logDao->deleteLogEntry($logId, $conference->getId());
00108       } else {
00109          $logDao->deleteConferenceLogEntries($conference->getId());
00110       }
00111 
00112       Request::redirect(null, null, null, 'conferenceEventLog');
00113    }
00114 }
00115 
00116 ?>

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