pages/schedConf/SchedConfHandler.inc.php

Go to the documentation of this file.
00001 <?php
00002 
00016 // $Id$
00017 
00018 
00019 import('schedConf.SchedConfAction');
00020 import('payment.ocs.OCSPaymentManager');
00021 import('handler.Handler');
00022 
00023 class SchedConfHandler extends Handler {
00027    function SchedConfHandler() {
00028       parent::Handler();
00029 
00030       $this->addCheck(new HandlerValidatorConference($this));
00031       $this->addCheck(new HandlerValidatorSchedConf($this));
00032    }
00033 
00037    function index($args) {
00038       $this->addCheck(new HandlerValidatorSchedConf($this));
00039       $this->validate();
00040 
00041       $conference =& Request::getConference();
00042       $schedConf =& Request::getSchedConf();
00043 
00044       $templateMgr =& TemplateManager::getManager();
00045       $this->setupTemplate($conference, $schedConf);
00046       $enableAnnouncements = $conference->getSetting('enableAnnouncements');
00047 
00048       if ($enableAnnouncements) {
00049          $enableAnnouncementsHomepage = $conference->getSetting('enableAnnouncementsHomepage');
00050          if ($enableAnnouncementsHomepage) {
00051             $numAnnouncementsHomepage = $conference->getSetting('numAnnouncementsHomepage');
00052             $announcementDao =& DAORegistry::getDAO('AnnouncementDAO');
00053             $announcements =& $announcementDao->getNumAnnouncementsNotExpiredByConferenceId($conference->getId(), $schedConf->getId(), $numAnnouncementsHomepage);
00054             $templateMgr->assign('announcements', $announcements);
00055             $templateMgr->assign('enableAnnouncementsHomepage', $enableAnnouncementsHomepage);
00056          }
00057       }
00058 
00059       $templateMgr->assign('schedConf', $schedConf);
00060 
00061       $templateMgr->assign('pageHierarchy', array(
00062          array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true)));
00063       $templateMgr->assign('homepageImage', $conference->getLocalizedSetting('homepageImage'));
00064       $templateMgr->assign('homepageImageAltText', $conference->getLocalizedSetting('homepageImageAltText'));
00065       $templateMgr->assign('helpTopicId', 'user.currentArchives');
00066       $templateMgr->display('schedConf/index.tpl');
00067 
00068    }
00069 
00073    function trackPolicies() {
00074       $this->addCheck(new HandlerValidatorSchedConf($this));
00075       $this->validate();
00076 
00077       $conference =& Request::getConference();
00078       $schedConf =& Request::getSchedConf();
00079 
00080       $templateMgr =& TemplateManager::getManager();
00081       $templateMgr->assign('pageHierarchy', array(
00082          array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true),
00083          array(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true)));
00084       SchedConfHandler::setupTemplate($conference,$schedConf);
00085 
00086       $trackDao =& DAORegistry::getDAO('TrackDAO');
00087       $trackDirectorsDao =& DAORegistry::getDAO('TrackDirectorsDAO');
00088       $tracks = array();
00089       $tracks =& $trackDao->getSchedConfTracks($schedConf->getId());
00090       $tracks =& $tracks->toArray();
00091       $templateMgr->assign_by_ref('tracks', $tracks);
00092       $trackDirectors = array();
00093       foreach ($tracks as $track) {
00094          $trackDirectors[$track->getId()] =& $trackDirectorsDao->getDirectorsByTrackId($schedConf->getId(), $track->getId());
00095       }
00096       $templateMgr->assign_by_ref('trackDirectors', $trackDirectors);
00097 
00098       $templateMgr->assign('helpTopicId', 'conference.currentConferences.tracks');
00099       $templateMgr->display('schedConf/trackPolicies.tpl');
00100    }
00101 
00105    function overview() {
00106       $this->addCheck(new HandlerValidatorSchedConf($this));
00107       $this->validate();
00108 
00109       $conference =& Request::getConference();
00110       $schedConf =& Request::getSchedConf();
00111 
00112       $templateMgr =& TemplateManager::getManager();
00113       $templateMgr->assign('pageHierarchy', array(
00114          array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true),
00115          array(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true)));
00116       SchedConfHandler::setupTemplate($conference,$schedConf);
00117 
00118       $templateMgr->assign('overview', $schedConf->getLocalizedSetting('overview'));
00119 
00120       $templateMgr->assign('helpTopicId', 'user.home');
00121       $templateMgr->display('schedConf/overview.tpl');
00122    }
00123 
00127    function timeline() {
00128       $this->addCheck(new HandlerValidatorSchedConf($this));
00129       $this->validate();
00130 
00131       $conference =& Request::getConference();
00132       $schedConf =& Request::getSchedConf();
00133 
00134       $templateMgr =& TemplateManager::getManager();
00135       $templateMgr->assign('pageHierarchy', array(
00136          array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true),
00137          array(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true)));
00138       SchedConfHandler::setupTemplate($conference,$schedConf);
00139       AppLocale::requireComponents(array(LOCALE_COMPONENT_OCS_MANAGER)); // FIXME: For timeline constants
00140       import('manager.form.TimelineForm');
00141       if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor
00142          $timelineForm = new TimelineForm(false, true);
00143       } else {
00144          $timelineForm =& new TimelineForm(false, true);
00145       }
00146       $timelineForm->initData();
00147       $timelineForm->display();
00148    }
00149 
00153    function cfp() {
00154       $this->addCheck(new HandlerValidatorSchedConf($this));
00155       $this->validate();
00156 
00157       $conference =& Request::getConference();
00158       $schedConf =& Request::getSchedConf();
00159 
00160       $templateMgr =& TemplateManager::getManager();
00161       $templateMgr->assign('pageHierarchy', array(
00162          array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true),
00163          array(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true)));
00164       SchedConfHandler::setupTemplate($conference,$schedConf);
00165       AppLocale::requireComponents(array(LOCALE_COMPONENT_OCS_AUTHOR));
00166 
00167       $templateMgr->assign('cfpMessage', $schedConf->getLocalizedSetting('cfpMessage'));
00168       $templateMgr->assign('authorGuidelines', $schedConf->getLocalizedSetting('authorGuidelines'));
00169 
00170       $submissionsOpenDate = $schedConf->getSetting('submissionsOpenDate');
00171       $submissionsCloseDate = $schedConf->getSetting('submissionsCloseDate');
00172 
00173       if(!$submissionsOpenDate || !$submissionsCloseDate || time() < $submissionsOpenDate) {
00174          // Too soon
00175          $acceptingSubmissions = false;
00176          $notAcceptingSubmissionsMessage = __('author.submit.notAcceptingYet');
00177       } elseif (time() > $submissionsCloseDate) {
00178          // Too late
00179          $acceptingSubmissions = false;
00180          $notAcceptingSubmissionsMessage = __('author.submit.submissionDeadlinePassed', array('closedDate' => strftime(Config::getVar('general', 'date_format_short'), $submissionsCloseDate)));
00181       } else {
00182          $acceptingSubmissions = true;
00183       }
00184 
00185       $templateMgr->assign('acceptingSubmissions', $acceptingSubmissions);
00186       if (!$acceptingSubmissions) $templateMgr->assign('notAcceptingSubmissionsMessage', $notAcceptingSubmissionsMessage);
00187       $templateMgr->assign('helpTopicId', 'conference.currentConferences.setup.submissions');
00188       $templateMgr->display('schedConf/cfp.tpl');
00189    }
00190 
00194    function registration() {
00195       $this->addCheck(new HandlerValidatorSchedConf($this));
00196       $this->validate();
00197 
00198       $conference =& Request::getConference();
00199       $schedConf =& Request::getSchedConf();
00200 
00201       $paymentManager =& OCSPaymentManager::getManager();
00202       if (!$paymentManager->isConfigured()) Request::redirect(null, null, 'index');
00203 
00204       $templateMgr =& TemplateManager::getManager();
00205       $templateMgr->assign('pageHierarchy', array(
00206          array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true),
00207          array(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true)));
00208       SchedConfHandler::setupTemplate($conference,$schedConf);
00209 
00210       $user =& Request::getUser();
00211       $registrationDao =& DAORegistry::getDAO('RegistrationDAO');
00212       if ($user && ($registrationId = $registrationDao->getRegistrationIdByUser($user->getId(), $schedConf->getId()))) {
00213          // This user has already registered.
00214          $registration =& $registrationDao->getRegistration($registrationId);
00215 
00216          import('payment.ocs.OCSPaymentManager');
00217          $paymentManager =& OCSPaymentManager::getManager();
00218 
00219          if (!$paymentManager->isConfigured() || !$registration || $registration->getDatePaid()) {
00220             // If the system isn't fully configured or the registration is already paid,
00221             // display a message and block the user from going further.
00222             $templateMgr->assign('message', 'schedConf.registration.alreadyRegisteredAndPaid');
00223             $templateMgr->assign('backLinkLabel', 'common.back');
00224             $templateMgr->assign('backLink', Request::url(null, null, 'index'));
00225             return $templateMgr->display('common/message.tpl');
00226          }
00227       }
00228 
00229       $typeId = (int) Request::getUserVar('registrationTypeId');
00230       if ($typeId) {
00231          // A registration type has been chosen
00232          import('registration.form.UserRegistrationForm');
00233 
00234          if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor
00235             $form = new UserRegistrationForm($typeId);
00236          } else {
00237             $form =& new UserRegistrationForm($typeId);
00238          }
00239          if ($form->isLocaleResubmit()) {
00240             $form->readInputData();
00241          } else {
00242             $form->initData();
00243          }
00244          $form->display();
00245       } else {
00246          // A registration type has not been chosen; prompt for one.
00247          $registrationTypeDao =& DAORegistry::getDAO('RegistrationTypeDAO');
00248          $registrationTypes =& $registrationTypeDao->getRegistrationTypesBySchedConfId($schedConf->getId());
00249          $templateMgr->assign_by_ref('registrationTypes', $registrationTypes);
00250          return $templateMgr->display('registration/selectRegistrationType.tpl');
00251       }
00252    }
00253 
00257    function register() {
00258       $this->addCheck(new HandlerValidatorSchedConf($this));
00259       $this->validate();
00260 
00261       $conference =& Request::getConference();
00262       $schedConf =& Request::getSchedConf();
00263 
00264       $paymentManager =& OCSPaymentManager::getManager();
00265       if (!$paymentManager->isConfigured()) Request::redirect(null, null, 'index');
00266 
00267       $user =& Request::getUser();
00268       $registrationDao =& DAORegistry::getDAO('RegistrationDAO');
00269       if ($user && ($registrationId = $registrationDao->getRegistrationIdByUser($user->getId(), $schedConf->getId()))) {
00270          // This user has already registered.
00271          $registration =& $registrationDao->getRegistration($registrationId);
00272          if ( !$registration || $registration->getDatePaid() ) {
00273             // And they have already paid. Redirect to a message explaining.
00274             Request::redirect(null, null, null, 'registration');
00275          } else {
00276             // Allow them to resubmit the form to change type or pay again.
00277             $registrationDao->deleteRegistrationById($registrationId);
00278          }
00279       }
00280 
00281       $templateMgr =& TemplateManager::getManager();
00282       $templateMgr->assign('pageHierarchy', array(
00283          array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true),
00284          array(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true)));
00285       SchedConfHandler::setupTemplate($conference,$schedConf);
00286 
00287       import('registration.form.UserRegistrationForm');
00288       $typeId = (int) Request::getUserVar('registrationTypeId');
00289       if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor
00290          $form = new UserRegistrationForm($typeId);
00291       } else {
00292          $form =& new UserRegistrationForm($typeId);
00293       }
00294       $form->readInputData();
00295       if ($form->validate()) {
00296          if (($registrationError = $form->execute()) != REGISTRATION_SUCCESSFUL) {
00297             $templateMgr->assign('isUserLoggedIn', Validation::isLoggedIn()); // In case a user was just created, make sure they appear logged in
00298             if ($registrationError == REGISTRATION_FAILED) {
00299                // User not created
00300                $templateMgr->assign('message', 'schedConf.registration.failed');
00301                $templateMgr->assign('backLinkLabel', 'common.back');
00302                $templateMgr->assign('backLink', Request::url(null, null, 'index'));
00303                $templateMgr->display('common/message.tpl');
00304             } elseif ($registrationError == REGISTRATION_NO_PAYMENT) {
00305                // Automatic payment failed; display a generic
00306                // "you will be contacted" message.
00307                $templateMgr->assign('message', 'schedConf.registration.noPaymentMethodAvailable');
00308                $templateMgr->assign('backLinkLabel', 'common.back');
00309                $templateMgr->assign('backLink', Request::url(null, null, 'index'));
00310                $templateMgr->display('common/message.tpl');
00311             } elseif ($registrationError == REGISTRATION_FREE) {
00312                // Registration successful; no payment required (free)
00313                $templateMgr->assign('message', 'schedConf.registration.free');
00314                $templateMgr->assign('backLinkLabel', 'common.back');
00315                $templateMgr->assign('backLink', Request::url(null, null, 'index'));
00316                $templateMgr->display('common/message.tpl');
00317             }
00318          }
00319          // Otherwise, payment is handled for us.
00320       } else {
00321          $templateMgr->assign('isUserLoggedIn', Validation::isLoggedIn()); // In case a user was just created, make sure they appear logged in
00322          $form->display();
00323       }
00324    }
00325 
00329    function program() {
00330       $this->addCheck(new HandlerValidatorSchedConf($this));
00331       $this->validate();
00332 
00333       $conference =& Request::getConference();
00334       $schedConf =& Request::getSchedConf();
00335 
00336       $templateMgr =& TemplateManager::getManager();
00337       $templateMgr->assign('pageHierarchy', array(
00338          array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true),
00339          array(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true)));
00340       SchedConfHandler::setupTemplate($conference,$schedConf);
00341 
00342       $templateMgr->assign('program', $schedConf->getSetting('program', AppLocale::getLocale()));
00343       $templateMgr->assign('programFile', $schedConf->getSetting('programFile', AppLocale::getLocale()));
00344       $templateMgr->assign('programFileTitle', $schedConf->getSetting('programFileTitle', AppLocale::getLocale()));
00345       $templateMgr->assign('helpTopicId', 'conference.currentConferences.program');
00346       $templateMgr->display('schedConf/program.tpl');
00347    }
00348 
00352    function schedule() {
00353       $this->addCheck(new HandlerValidatorSchedConf($this));
00354       $this->validate();
00355 
00356       $conference =& Request::getConference();
00357       $schedConf =& Request::getSchedConf();
00358 
00359       $postScheduleDate = $schedConf->getSetting('postScheduleDate');
00360       if (!$postScheduleDate || time() < $postScheduleDate || !$schedConf->getSetting('postSchedule')) Request::redirect(null, null, 'schedConf');
00361       $templateMgr =& TemplateManager::getManager();
00362       $templateMgr->assign('pageHierarchy', array(
00363          array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true),
00364          array(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true)));
00365       SchedConfHandler::setupTemplate($conference, $schedConf);
00366 
00367       $buildingDao =& DAORegistry::getDAO('BuildingDAO');
00368       $roomDao =& DAORegistry::getDAO('RoomDAO');
00369 
00370       $buildingsAndRooms = $allRooms = array();
00371       $buildings =& $buildingDao->getBuildingsBySchedConfId($schedConf->getId());
00372       while ($building =& $buildings->next()) {
00373          $buildingId = $building->getId();
00374          $rooms =& $roomDao->getRoomsByBuildingId($buildingId);
00375          $buildingsAndRooms[$buildingId] = array(
00376             'building' => &$building
00377          );
00378          while ($room =& $rooms->next()) {
00379             $roomId = $room->getId();
00380             $buildingsAndRooms[$buildingId]['rooms'][$roomId] =& $room;
00381             $allRooms[$roomId] =& $room;
00382             unset($room);
00383          }
00384          unset($building);
00385          unset($rooms);
00386       }
00387       $templateMgr->assign_by_ref('buildingsAndRooms', $buildingsAndRooms);
00388       $templateMgr->assign_by_ref('allRooms', $allRooms);
00389 
00390       // Merge special events and papers into an array by time/date
00391       $itemsByTime = array();
00392 
00393       $publishedPaperDao =& DAORegistry::getDAO('PublishedPaperDAO');
00394       $publishedPapers =& $publishedPaperDao->getPublishedPapers($schedConf->getId(), PAPER_SORT_ORDER_TIME);
00395       while ($paper =& $publishedPapers->next()) {
00396          if ($paper->getStartTime()) {
00397             $startTime = strtotime($paper->getStartTime());
00398             $itemsByTime[$startTime][] =& $paper;
00399          }
00400          unset($paper);
00401       }
00402       unset($publishedPapers);
00403 
00404       $specialEventDao =& DAORegistry::getDAO('SpecialEventDAO');
00405       $specialEvents =& $specialEventDao->getSpecialEventsBySchedConfId($schedConf->getId());
00406       while ($specialEvent =& $specialEvents->next()) {
00407          $startTime = strtotime($specialEvent->getStartTime());
00408          if ($startTime) $itemsByTime[$startTime][] =& $specialEvent;
00409          unset($specialEvent);
00410       }
00411       unset($specialEvents);
00412 
00413       // WARNING: $itemsByTime contains both PublishedPapers and
00414       // SpecialEvents; both implement getStartTime() and
00415       // getEndTime.
00416       ksort($itemsByTime);
00417       foreach ($itemsByTime as $startTime => $junk) {
00418          uasort($itemsByTime[$startTime], create_function('$a, $b', 'return strtotime($a->getEndTime()) - strtotime($b->getEndTime());'));
00419       }
00420 
00421       // Read in schedule layout settings
00422       if ($schedConf->getSetting('mergeSchedules')) {
00423          ksort($itemsByTime);
00424       }
00425       $templateMgr->assign('showEndTime', $schedConf->getSetting('showEndTime'));
00426       $templateMgr->assign('showAuthors', $schedConf->getSetting('showAuthors'));
00427       $templateMgr->assign('hideNav', $schedConf->getSetting('hideNav'));
00428       $templateMgr->assign('hideLocations', $schedConf->getSetting('hideLocations'));
00429 
00430       $templateMgr->assign_by_ref('itemsByTime', $itemsByTime);
00431       $templateMgr->assign('conference.currentConferences.scheduler');
00432 
00433       if($schedConf->getSetting('layoutType') == SCHEDULE_LAYOUT_COMPACT) {
00434          $templateMgr->display('schedConf/schedules/compact.tpl');
00435       } else if($schedConf->getSetting('layoutType') == SCHEDULE_LAYOUT_EXPANDED || !$schedConf->getSetting('layoutType')) {
00436          $templateMgr->display('schedConf/schedules/expanded.tpl');
00437       }
00438    }
00439 
00443    function accommodation() {
00444       $this->addCheck(new HandlerValidatorSchedConf($this));
00445       $this->validate();
00446 
00447       $conference =& Request::getConference();
00448       $schedConf =& Request::getSchedConf();
00449 
00450       $templateMgr =& TemplateManager::getManager();
00451       $templateMgr->assign('pageHierarchy', array(
00452          array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true),
00453          array(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true)));
00454       SchedConfHandler::setupTemplate($conference,$schedConf);
00455 
00456       $templateMgr->assign('accommodationDescription', $schedConf->getLocalizedSetting('accommodationDescription'));
00457       $templateMgr->assign('accommodationFiles', $schedConf->getLocalizedSetting('accommodationFiles'));
00458 
00459       $templateMgr->assign('helpTopicId', 'conference.currentConferences.accommodation');
00460       $templateMgr->display('schedConf/accommodation.tpl');
00461    }
00462 
00466    function presentations() {
00467       $this->validate();
00468 
00469       $conference =& Request::getConference();
00470       $schedConf =& Request::getSchedConf();
00471 
00472       import('schedConf.SchedConfAction');
00473 
00474       $mayViewProceedings = SchedConfAction::mayViewProceedings($schedConf);
00475       $mayViewPapers = SchedConfAction::mayViewPapers($schedConf, $conference);
00476 
00477       $templateMgr =& TemplateManager::getManager();
00478       SchedConfHandler::setupTemplate($conference, $schedConf);
00479       AppLocale::requireComponents(array(LOCALE_COMPONENT_OCS_DIRECTOR)); // FIXME: director.allTracks
00480 
00481       $templateMgr->assign('pageHierarchy', array(
00482          array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true),
00483          array(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true)));
00484       $templateMgr->assign('helpTopicId', 'editorial.trackDirectorsRole.presentations');
00485       $templateMgr->assign_by_ref('schedConf', $schedConf);
00486 
00487       $templateMgr->assign('mayViewProceedings', $mayViewProceedings);
00488       $templateMgr->assign('mayViewPapers', $mayViewPapers);
00489 
00490       if($mayViewProceedings) {
00491          $publishedPaperDao =& DAORegistry::getDAO('PublishedPaperDAO');
00492          $trackDao =& DAORegistry::getDAO('TrackDAO');
00493 
00494          $tracks =& $trackDao->getTrackTitles($schedConf->getId());
00495 
00496          // Get the user's search conditions, if any
00497          $searchField = Request::getUserVar('searchField');
00498          $searchMatch = Request::getUserVar('searchMatch');
00499          $search = Request::getUserVar('search');
00500 
00501          $searchInitial = Request::getUserVar('searchInitial');
00502          if (!empty($searchInitial)) {
00503             $searchField = SUBMISSION_FIELD_AUTHOR;
00504             $searchMatch = 'initial';
00505             $search = $searchInitial;
00506          }
00507 
00508          $templateMgr->assign('fieldOptions', Array(
00509             SUBMISSION_FIELD_TITLE => 'paper.title',
00510             SUBMISSION_FIELD_AUTHOR => 'user.role.author'
00511          ));
00512 
00513          $previewAbstracts = (
00514             $schedConf->getSetting('reviewMode') == REVIEW_MODE_BOTH_SEQUENTIAL &&
00515             $schedConf->getSetting('previewAbstracts')
00516          );
00517 
00518          $publishedPapers =& $publishedPaperDao->getPublishedPapersInTracks($schedConf->getId(), Request::getUserVar('track'), $searchField, $searchMatch, $search, $previewAbstracts);
00519 
00520          // Set search parameters
00521          $duplicateParameters = array(
00522             'searchField', 'searchMatch', 'search', 'searchInitial', 'track'
00523          );
00524          foreach ($duplicateParameters as $param)
00525             $templateMgr->assign($param, Request::getUserVar($param));
00526 
00527          $templateMgr->assign('alphaList', explode(' ', __('common.alphaList')));
00528          $templateMgr->assign('trackOptions', array(0 => AppLocale::Translate('director.allTracks')) + $tracks);
00529          $templateMgr->assign_by_ref('publishedPapers', $publishedPapers);
00530       }
00531 
00532       $templateMgr->display('schedConf/papers.tpl');
00533    }
00534 
00542    function setupTemplate(&$conference, &$schedConf) {
00543       parent::setupTemplate();
00544       $templateMgr =& TemplateManager::getManager();
00545       AppLocale::requireComponents(array(LOCALE_COMPONENT_OCS_MANAGER));
00546 
00547       // Ensure the user is entitled to view the scheduled conference...
00548       if (isset($schedConf) && ($conference->getEnabled() || (
00549             Validation::isDirector($conference->getId()) ||
00550             Validation::isConferenceManager($conference->getId())))) {
00551 
00552          // Assign header and content for home page
00553          $templateMgr->assign('displayPageHeaderTitle', $conference->getPageHeaderTitle(true));
00554          $templateMgr->assign('displayPageHeaderLogo', $conference->getPageHeaderLogo(true));
00555          $templateMgr->assign('displayPageHeaderTitleAltText', $conference->getLocalizedSetting('homeHeaderTitleImageAltText'));
00556          $templateMgr->assign('displayPageHeaderLogoAltText', $conference->getLocalizedSetting('homeHeaderLogoImageAltText'));
00557          $templateMgr->assign_by_ref('schedConf', $schedConf);
00558          $templateMgr->assign('additionalHomeContent', $conference->getLocalizedSetting('additionalHomeContent'));
00559       } else {
00560          Request::redirect(null, 'index');
00561       }
00562 
00563       if ($styleFileName = $schedConf->getStyleFileName()) {
00564          import('file.PublicFileManager');
00565          $publicFileManager = new PublicFileManager();
00566          $templateMgr->addStyleSheet(
00567             Request::getBaseUrl() . '/' . $publicFileManager->getConferenceFilesPath($conference->getId()) . '/' . $styleFileName
00568          );
00569       }
00570    }
00571 
00572    function validate() {
00573       parent::validate();
00574 
00575       $schedConf =& Request::getSchedConf();
00576       if(!SchedConfAction::mayViewSchedConf($schedConf)) {
00577          Request::redirect(null, 'index');
00578       }
00579 
00580       return true;
00581    }
00582 }
00583 
00584 ?>

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