pages/manager/RegistrationHandler.inc.php

Go to the documentation of this file.
00001 <?php
00002 
00016 // $Id$
00017 
00018 import('pages.manager.ManagerHandler');
00019 
00020 class RegistrationHandler extends ManagerHandler {
00024    function RegistrationHandler() {
00025       parent::ManagerHandler();
00026    }
00027 
00031    function registration() {
00032       $this->validate();
00033       $this->setupTemplate();
00034 
00035       $schedConf =& Request::getSchedConf();
00036       $rangeInfo =& Handler::getRangeInfo('registrations', array());
00037       $registrationDao =& DAORegistry::getDAO('RegistrationDAO');
00038 
00039       // Get the user's search conditions, if any
00040       $searchField = Request::getUserVar('searchField');
00041       $dateSearchField = Request::getUserVar('dateSearchField');
00042       $searchMatch = Request::getUserVar('searchMatch');
00043       $search = Request::getUserVar('search');
00044       
00045       $sort = Request::getUserVar('sort');
00046       $sort = isset($sort) ? $sort : 'user';
00047       $sortDirection = Request::getUserVar('sortDirection');
00048 
00049       $fromDate = Request::getUserDateVar('dateFrom', 1, 1);
00050       if ($fromDate !== null) $fromDate = date('Y-m-d H:i:s', $fromDate);
00051       $toDate = Request::getUserDateVar('dateTo', 32, 12, null, 23, 59, 59);
00052       if ($toDate !== null) $toDate = date('Y-m-d H:i:s', $toDate);
00053 
00054       while (true) {
00055          $registrations =& $registrationDao->getRegistrationsBySchedConfId($schedConf->getId(), $searchField, $searchMatch, $search, $dateSearchField, $fromDate, $toDate, $rangeInfo, $sort, $sortDirection);
00056          if ($registrations->isInBounds()) break;
00057          unset($rangeInfo);
00058          $rangeInfo =& $registrations->getLastPageRangeInfo();
00059          unset($registrations);
00060       }
00061 
00062       $templateMgr =& TemplateManager::getManager();
00063       $templateMgr->assign_by_ref('registrations', $registrations);
00064       $templateMgr->assign('helpTopicId', 'conference.currentConferences.registration');
00065 
00066       // Set search parameters
00067       foreach ($this->getSearchFormDuplicateParameters() as $param)
00068          $templateMgr->assign($param, Request::getUserVar($param));
00069 
00070       $templateMgr->assign('dateFrom', $fromDate);
00071       $templateMgr->assign('dateTo', $toDate);
00072       $templateMgr->assign('fieldOptions', $this->getSearchFieldOptions());
00073       $templateMgr->assign('dateFieldOptions', $this->getDateFieldOptions());
00074       $templateMgr->assign('sort', $sort);
00075       $templateMgr->assign('sortDirection', $sortDirection);
00076 
00077       $templateMgr->display('registration/registrations.tpl');
00078    }
00079 
00086    function getSearchFormDuplicateParameters() {
00087       return array(
00088          'searchField', 'searchMatch', 'search',
00089          'dateFromMonth', 'dateFromDay', 'dateFromYear',
00090          'dateToMonth', 'dateToDay', 'dateToYear',
00091          'dateSearchField'
00092       );
00093    }
00094 
00099    function getSearchFieldOptions() {
00100       return array(
00101          REGISTRATION_USER => 'manager.registration.user',
00102          REGISTRATION_MEMBERSHIP => 'manager.registration.membership',
00103          REGISTRATION_DOMAIN => 'manager.registration.domain',
00104          REGISTRATION_IP_RANGE => 'manager.registration.ipRange'
00105       );
00106    }
00107 
00112    function getDateFieldOptions() {
00113       return array(
00114          REGISTRATION_DATE_REGISTERED => 'manager.registration.dateRegistered',
00115          REGISTRATION_DATE_PAID => 'manager.registration.datePaid'
00116       );
00117    }
00118 
00123    function deleteRegistration($args) {
00124       $this->validate();
00125 
00126       if (isset($args) && !empty($args)) {
00127          $schedConf =& Request::getSchedConf();
00128          $registrationId = (int) $args[0];
00129 
00130          $registrationDao =& DAORegistry::getDAO('RegistrationDAO');
00131 
00132          // Ensure registration is for this scheduled conference
00133          if ($registrationDao->getRegistrationSchedConfId($registrationId) == $schedConf->getId()) {
00134             $registrationDao->deleteRegistrationById($registrationId);
00135          }
00136       }
00137 
00138       Request::redirect(null, null, null, 'registration');
00139    }
00140 
00145    function editRegistration($args = array()) {
00146       $this->validate();
00147       $this->setupTemplate();
00148 
00149       $schedConf =& Request::getSchedConf();
00150       $registrationId = !isset($args) || empty($args) ? null : (int) $args[0];
00151       $userId = Request::getUserVar('userId');
00152       $registrationDao =& DAORegistry::getDAO('RegistrationDAO');
00153 
00154       // Ensure registration is valid and for this scheduled conference
00155       if (($registrationId != null && $registrationDao->getRegistrationSchedConfId($registrationId) == $schedConf->getId()) || ($registrationId == null && $userId)) {
00156          import('registration.form.RegistrationForm');
00157 
00158          $templateMgr =& TemplateManager::getManager();
00159          $templateMgr->append('pageHierarchy', array(Request::url(null, null, 'manager', 'registration'), 'manager.registration'));
00160 
00161          if ($registrationId == null) {
00162             $templateMgr->assign('registrationTitle', 'manager.registration.createTitle');
00163          } else {
00164             $templateMgr->assign('registrationTitle', 'manager.registration.editTitle');  
00165          }
00166 
00167          if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor
00168             $registrationForm = new RegistrationForm($registrationId, $userId);
00169          } else {
00170             $registrationForm =& new RegistrationForm($registrationId, $userId);
00171          }
00172          if ($registrationForm->isLocaleResubmit()) {
00173             $registrationForm->readInputData();
00174          } else {
00175             $registrationForm->initData();
00176          }
00177          $registrationForm->display();
00178 
00179       } else {
00180             Request::redirect(null, null, null, 'registration');
00181       }
00182    }
00183 
00187    function createRegistration() {
00188       $this->editRegistration();
00189    }
00190 
00194    function selectRegistrant() {
00195       $this->validate();
00196       $templateMgr =& TemplateManager::getManager();
00197       $this->setupTemplate();
00198       $templateMgr->append('pageHierarchy', array(Request::url(null, null, 'manager', 'registration'), 'manager.registration'));
00199 
00200       $userDao =& DAORegistry::getDAO('UserDAO');
00201       $roleDao =& DAORegistry::getDAO('RoleDAO');
00202       
00203       $searchType = null;
00204       $searchMatch = null;
00205       $search = $searchQuery = Request::getUserVar('search');
00206       $searchInitial = Request::getUserVar('searchInitial');
00207       if (!empty($search)) {
00208          $searchType = Request::getUserVar('searchField');
00209          $searchMatch = Request::getUserVar('searchMatch');
00210 
00211       } elseif (!empty($searchInitial)) {
00212          $searchInitial = String::strtoupper($searchInitial);
00213          $searchType = USER_FIELD_INITIAL;
00214          $search = $searchInitial;
00215       }
00216 
00217       $sort = Request::getUserVar('sort');
00218       $sort = isset($sort) ? $sort : 'name';
00219       $sortDirection = Request::getUserVar('sortDirection');
00220       
00221       $rangeInfo =& Handler::getRangeInfo('users', array((string) $search, (string) $searchMatch, (string) $searchType));
00222 
00223       while (true) {
00224          $users =& $userDao->getUsersByField($searchType, $searchMatch, $search, true, $rangeInfo, $sort, $sortDirection);
00225          if ($users->isInBounds()) break;
00226          unset($rangeInfo);
00227          $rangeInfo =& $users->getLastPageRangeInfo();
00228          unset($users);
00229       }
00230 
00231       $templateMgr->assign('searchField', $searchType);
00232       $templateMgr->assign('searchMatch', $searchMatch);
00233       $templateMgr->assign('search', $searchQuery);
00234       $templateMgr->assign('searchInitial', Request::getUserVar('searchInitial'));
00235 
00236       $templateMgr->assign('isSchedConfManager', true);
00237 
00238       $templateMgr->assign('fieldOptions', Array(
00239          USER_FIELD_FIRSTNAME => 'user.firstName',
00240          USER_FIELD_LASTNAME => 'user.lastName',
00241          USER_FIELD_USERNAME => 'user.username',
00242          USER_FIELD_EMAIL => 'user.email'
00243       ));
00244       $templateMgr->assign_by_ref('users', $users);
00245       $templateMgr->assign('helpTopicId', 'conference.currentConferences.registration');
00246       $templateMgr->assign('registrationId', Request::getUserVar('registrationId'));
00247       $templateMgr->assign('alphaList', explode(' ', __('common.alphaList')));
00248       $templateMgr->assign('sort', $sort);
00249       $templateMgr->assign('sortDirection', $sortDirection);
00250       $templateMgr->display('registration/users.tpl');
00251    }
00252 
00256    function updateRegistration() {
00257       $this->validate();
00258       $this->setupTemplate();
00259 
00260       import('registration.form.RegistrationForm');
00261 
00262       $schedConf =& Request::getSchedConf();
00263       $registrationId = Request::getUserVar('registrationId') == null ? null : (int) Request::getUserVar('registrationId');
00264       $registrationDao =& DAORegistry::getDAO('RegistrationDAO');
00265 
00266       if (($registrationId != null && $registrationDao->getRegistrationSchedConfId($registrationId) == $schedConf->getId()) || $registrationId == null) {
00267 
00268          if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor
00269             $registrationForm = new RegistrationForm($registrationId);
00270          } else {
00271             $registrationForm =& new RegistrationForm($registrationId);
00272          }
00273          $registrationForm->readInputData();
00274 
00275          if ($registrationForm->validate()) {
00276             $registrationForm->execute();
00277 
00278             if (Request::getUserVar('createAnother')) {
00279                Request::redirect(null, null, null, 'selectRegistrant', null, array('registrationCreated', 1));
00280             } else {
00281                Request::redirect(null, null, null, 'registration');
00282             }
00283 
00284          } else {
00285             $templateMgr =& TemplateManager::getManager();
00286             $templateMgr->append('pageHierarchy', array(Request::url(null, null, 'manager', 'registration'), 'manager.registration'));
00287 
00288             if ($registrationId == null) {
00289                $templateMgr->assign('registrationTitle', 'manager.registration.createTitle');
00290             } else {
00291                $templateMgr->assign('registrationTitle', 'manager.registration.editTitle');  
00292             }
00293 
00294             $registrationForm->display();
00295          }
00296 
00297       } else {
00298             Request::redirect(null, null, null, 'registration');
00299       }
00300    }
00301 
00305    function registrationTypes() {
00306       $this->validate();
00307       $this->setupTemplate(true);
00308 
00309       $schedConf =& Request::getSchedConf();
00310       $rangeInfo =& Handler::getRangeInfo('registrationTypes', array());
00311       $registrationTypeDao =& DAORegistry::getDAO('RegistrationTypeDAO');
00312       while (true) {
00313          $registrationTypes =& $registrationTypeDao->getRegistrationTypesBySchedConfId($schedConf->getId(), $rangeInfo);
00314          if ($registrationTypes->isInBounds()) break;
00315          unset($rangeInfo);
00316          $rangeInfo =& $registrationTypes->getLastPageRangeInfo();
00317          unset($registrationTypes);
00318       }
00319 
00320       $templateMgr =& TemplateManager::getManager();
00321       $templateMgr->assign('registrationTypes', $registrationTypes);
00322       $templateMgr->assign('helpTopicId', 'conference.currentConferences.registration');
00323 
00324       $templateMgr->display('registration/registrationTypes.tpl');
00325    }
00326 
00330    function moveRegistrationType($args) {
00331       $this->validate();
00332 
00333       $registrationTypeId = isset($args[0])?$args[0]:0;
00334       $schedConf =& Request::getSchedConf();
00335 
00336       $registrationTypeDao =& DAORegistry::getDAO('RegistrationTypeDAO');
00337       $registrationType =& $registrationTypeDao->getRegistrationType($registrationTypeId);
00338 
00339       if ($registrationType && $registrationType->getSchedConfId() == $schedConf->getId()) {
00340          $isDown = Request::getUserVar('dir')=='d';
00341          $registrationType->setSequence($registrationType->getSequence()+($isDown?1.5:-1.5));
00342          $registrationTypeDao->updateRegistrationType($registrationType);
00343          $registrationTypeDao->resequenceRegistrationTypes($registrationType->getSchedConfId());
00344       }
00345 
00346       Request::redirect(null, null, null, 'registrationTypes');
00347    }
00348 
00353    function deleteRegistrationType($args) {
00354       $this->validate();
00355 
00356       if (isset($args) && !empty($args)) {
00357          $schedConf =& Request::getSchedConf();
00358          $registrationTypeId = (int) $args[0];
00359 
00360          $registrationTypeDao =& DAORegistry::getDAO('RegistrationTypeDAO');
00361 
00362          // Ensure registration type is for this scheduled conference.
00363          if ($registrationTypeDao->getRegistrationTypeSchedConfId($registrationTypeId) == $schedConf->getId()) {
00364             $registrationTypeDao->deleteRegistrationTypeById($registrationTypeId);
00365          }
00366       }
00367 
00368       Request::redirect(null, null, null, 'registrationTypes');
00369    }
00370 
00375    function editRegistrationType($args = array()) {
00376       $this->validate();
00377       $this->setupTemplate(true);
00378 
00379       $schedConf =& Request::getSchedConf();
00380       $registrationTypeId = !isset($args) || empty($args) ? null : (int) $args[0];
00381       $registrationTypeDao =& DAORegistry::getDAO('RegistrationTypeDAO');
00382 
00383       // Ensure registration type is valid and for this scheduled conference.
00384       if (($registrationTypeId != null && $registrationTypeDao->getRegistrationTypeSchedConfId($registrationTypeId) == $schedConf->getId()) || $registrationTypeId == null) {
00385 
00386          import('registration.form.RegistrationTypeForm');
00387 
00388          $templateMgr =& TemplateManager::getManager();
00389          $templateMgr->append('pageHierarchy', array(Request::url(null, null, 'manager', 'registrationTypes'), 'manager.registrationTypes'));
00390 
00391          if ($registrationTypeId == null) {
00392             $templateMgr->assign('registrationTypeTitle', 'manager.registrationTypes.createTitle');
00393          } else {
00394             $templateMgr->assign('registrationTypeTitle', 'manager.registrationTypes.editTitle');  
00395          }
00396 
00397          if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor
00398             $registrationTypeForm = new RegistrationTypeForm($registrationTypeId);
00399          } else {
00400             $registrationTypeForm =& new RegistrationTypeForm($registrationTypeId);
00401          }
00402 
00403          if ($registrationTypeForm->isLocaleResubmit()) {
00404             $registrationTypeForm->readInputData();
00405          } else {
00406             $registrationTypeForm->initData();
00407          }
00408          $registrationTypeForm->display();
00409 
00410       } else {
00411             Request::redirect(null, null, null, 'registrationTypes');
00412       }
00413    }
00414 
00418    function createRegistrationType() {
00419       $this->editRegistrationType();
00420    }
00421 
00425    function updateRegistrationType() {
00426       $this->validate();
00427       $this->setupTemplate(true);
00428 
00429       import('registration.form.RegistrationTypeForm');
00430 
00431       $schedConf =& Request::getSchedConf();
00432       $registrationTypeId = Request::getUserVar('typeId') == null ? null : (int) Request::getUserVar('typeId');
00433       $registrationTypeDao =& DAORegistry::getDAO('RegistrationTypeDAO');
00434 
00435       if (($registrationTypeId != null && $registrationTypeDao->getRegistrationTypeSchedConfId($registrationTypeId) == $schedConf->getId()) || $registrationTypeId == null) {
00436 
00437          if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor
00438             $registrationTypeForm = new RegistrationTypeForm($registrationTypeId);
00439          } else {
00440             $registrationTypeForm =& new RegistrationTypeForm($registrationTypeId);
00441          }
00442          $registrationTypeForm->readInputData();
00443 
00444          if ($registrationTypeForm->validate()) {
00445             $registrationTypeForm->execute();
00446 
00447             if (Request::getUserVar('createAnother')) {
00448                $templateMgr =& TemplateManager::getManager();
00449                $templateMgr->append('pageHierarchy', array(Request::url(null, null, 'manager', 'registrationTypes'), 'manager.registrationTypes'));
00450                $templateMgr->assign('registrationTypeTitle', 'manager.registrationTypes.createTitle');
00451                $templateMgr->assign('registrationTypeCreated', '1');
00452                unset($registrationTypeForm);
00453                if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor
00454                   $registrationTypeForm = new RegistrationTypeForm($registrationTypeId);
00455                } else {
00456                   $registrationTypeForm =& new RegistrationTypeForm($registrationTypeId);
00457                }
00458                $registrationTypeForm->initData();
00459                $registrationTypeForm->display();
00460 
00461             } else {
00462                Request::redirect(null, null, null, 'registrationTypes');
00463             }
00464          } else {
00465             $templateMgr =& TemplateManager::getManager();
00466             $templateMgr->append('pageHierarchy', array(Request::url(null, null, 'manager', 'registrationTypes'), 'manager.registrationTypes'));
00467 
00468             if ($registrationTypeId == null) {
00469                $templateMgr->assign('registrationTypeTitle', 'manager.registrationTypes.createTitle');
00470             } else {
00471                $templateMgr->assign('registrationTypeTitle', 'manager.registrationTypes.editTitle');  
00472             }
00473             $registrationTypeForm->display();
00474          }
00475       } else {
00476             Request::redirect(null, null, null, 'registrationTypes');
00477       }
00478    }
00479 
00483    function registrationOptions() {
00484       $this->validate();
00485       $this->setupTemplate(true);
00486 
00487       $schedConf =& Request::getSchedConf();
00488       $rangeInfo =& Handler::getRangeInfo('registrationOptions', array());
00489       $registrationOptionDao =& DAORegistry::getDAO('RegistrationOptionDAO');
00490       while (true) {
00491          $registrationOptions =& $registrationOptionDao->getRegistrationOptionsBySchedConfId($schedConf->getId(), $rangeInfo);
00492          if ($registrationOptions->isInBounds()) break;
00493          unset($rangeInfo);
00494          $rangeInfo =& $registrationOptions->getLastPageRangeInfo();
00495          unset($registrationOptions);
00496       }
00497 
00498       $templateMgr =& TemplateManager::getManager();
00499       $templateMgr->assign('registrationOptions', $registrationOptions);
00500       $templateMgr->assign('helpTopicId', 'conference.currentConferences.registration');
00501 
00502       $templateMgr->display('registration/registrationOptions.tpl');
00503    }
00504 
00508    function moveRegistrationOption($args) {
00509       $this->validate();
00510 
00511       $registrationOptionId = isset($args[0])?$args[0]:0;
00512       $schedConf =& Request::getSchedConf();
00513 
00514       $registrationOptionDao =& DAORegistry::getDAO('RegistrationOptionDAO');
00515       $registrationOption =& $registrationOptionDao->getRegistrationOption($registrationOptionId);
00516 
00517       if ($registrationOption && $registrationOption->getSchedConfId() == $schedConf->getId()) {
00518          $isDown = Request::getUserVar('dir')=='d';
00519          $registrationOption->setSequence($registrationOption->getSequence()+($isDown?1.5:-1.5));
00520          $registrationOptionDao->updateRegistrationOption($registrationOption);
00521          $registrationOptionDao->resequenceRegistrationOptions($registrationOption->getSchedConfId());
00522       }
00523 
00524       Request::redirect(null, null, null, 'registrationOptions');
00525    }
00526 
00531    function deleteRegistrationOption($args) {
00532       $this->validate();
00533 
00534       if (isset($args) && !empty($args)) {
00535          $schedConf =& Request::getSchedConf();
00536          $registrationOptionId = (int) $args[0];
00537 
00538          $registrationOptionDao =& DAORegistry::getDAO('RegistrationOptionDAO');
00539 
00540          // Ensure registration option is for this scheduled conference.
00541          if ($registrationOptionDao->getRegistrationOptionSchedConfId($registrationOptionId) == $schedConf->getId()) {
00542             $registrationOptionDao->deleteRegistrationOptionById($registrationOptionId);
00543          }
00544       }
00545 
00546       Request::redirect(null, null, null, 'registrationOptions');
00547    }
00548 
00553    function editRegistrationOption($args = array()) {
00554       $this->validate();
00555       $this->setupTemplate(true);
00556 
00557       $schedConf =& Request::getSchedConf();
00558       $registrationOptionId = !isset($args) || empty($args) ? null : (int) $args[0];
00559       $registrationOptionDao =& DAORegistry::getDAO('RegistrationOptionDAO');
00560 
00561       // Ensure registration option is valid and for this scheduled conference.
00562       if (($registrationOptionId != null && $registrationOptionDao->getRegistrationOptionSchedConfId($registrationOptionId) == $schedConf->getId()) || $registrationOptionId == null) {
00563 
00564          import('registration.form.RegistrationOptionForm');
00565 
00566          $templateMgr =& TemplateManager::getManager();
00567          $templateMgr->append('pageHierarchy', array(Request::url(null, null, 'manager', 'registrationOptions'), 'manager.registrationOptions'));
00568 
00569          if ($registrationOptionId == null) {
00570             $templateMgr->assign('registrationOptionTitle', 'manager.registrationOptions.createTitle');
00571          } else {
00572             $templateMgr->assign('registrationOptionTitle', 'manager.registrationOptions.editTitle'); 
00573          }
00574 
00575          if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor
00576             $registrationOptionForm = new RegistrationOptionForm($registrationOptionId);
00577          } else {
00578             $registrationOptionForm =& new RegistrationOptionForm($registrationOptionId);
00579          }
00580          if ($registrationOptionForm->isLocaleResubmit()) {
00581             $registrationOptionForm->readInputData();
00582          } else {
00583             $registrationOptionForm->initData();
00584          }
00585          $registrationOptionForm->display();
00586 
00587       } else {
00588             Request::redirect(null, null, null, 'registrationOptions');
00589       }
00590    }
00591 
00595    function createRegistrationOption() {
00596       $this->editRegistrationOption();
00597    }
00598 
00602    function updateRegistrationOption() {
00603       $this->validate();
00604       $this->setupTemplate(true);
00605 
00606       import('registration.form.RegistrationOptionForm');
00607 
00608       $schedConf =& Request::getSchedConf();
00609       $registrationOptionId = Request::getUserVar('optionId') == null ? null : (int) Request::getUserVar('optionId');
00610       $registrationOptionDao =& DAORegistry::getDAO('RegistrationOptionDAO');
00611 
00612       if (($registrationOptionId != null && $registrationOptionDao->getRegistrationOptionSchedConfId($registrationOptionId) == $schedConf->getId()) || $registrationOptionId == null) {
00613 
00614          if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor
00615             $registrationOptionForm = new RegistrationOptionForm($registrationOptionId);
00616          } else {
00617             $registrationOptionForm =& new RegistrationOptionForm($registrationOptionId);
00618          }
00619          $registrationOptionForm->readInputData();
00620 
00621          if ($registrationOptionForm->validate()) {
00622             $registrationOptionForm->execute();
00623 
00624             if (Request::getUserVar('createAnother')) {
00625                $this->setupTemplate(true);
00626 
00627                $templateMgr =& TemplateManager::getManager();
00628                $templateMgr->append('pageHierarchy', array(Request::url(null, null, 'manager', 'registrationOptions'), 'manager.registrationOptions'));
00629                $templateMgr->assign('registrationOptionTitle', 'manager.registrationOptions.createTitle');
00630                $templateMgr->assign('registrationOptionCreated', '1');
00631                unset($registrationOptionForm);
00632                if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor
00633                   $registrationOptionForm = new RegistrationOptionForm($registrationOptionId);
00634                } else {
00635                   $registrationOptionForm =& new RegistrationOptionForm($registrationOptionId);
00636                }
00637                $registrationOptionForm->initData();
00638                $registrationOptionForm->display();
00639 
00640             } else {
00641                Request::redirect(null, null, null, 'registrationOptions');
00642             }
00643 
00644          } else {
00645             $templateMgr =& TemplateManager::getManager();
00646             $templateMgr->append('pageHierarchy', array(Request::url(null, null, 'manager', 'registrationOptions'), 'manager.registrationOptions'));
00647 
00648             if ($registrationOptionId == null) {
00649                $templateMgr->assign('registrationOptionTitle', 'manager.registrationOptions.createTitle');
00650             } else {
00651                $templateMgr->assign('registrationOptionTitle', 'manager.registrationOptions.editTitle'); 
00652             }
00653 
00654             $registrationOptionForm->display();
00655          }
00656 
00657       } else {
00658             Request::redirect(null, null, null, 'registrationOptions');
00659       }
00660    }
00661 
00665    function registrationPolicies() {
00666       $this->validate();
00667       $this->setupTemplate(true);
00668 
00669       import('registration.form.RegistrationPolicyForm');
00670 
00671       $templateMgr =& TemplateManager::getManager();
00672       $templateMgr->assign('helpTopicId', 'conference.currentConferences.registration');
00673 
00674       if (Config::getVar('general', 'scheduled_tasks')) {
00675          $templateMgr->assign('scheduledTasksEnabled', true);
00676       }
00677 
00678       $registrationPolicyForm = new RegistrationPolicyForm();
00679       if ($registrationPolicyForm->isLocaleResubmit()) {
00680          $registrationPolicyForm->readInputData();
00681       } else {
00682          $registrationPolicyForm->initData();
00683       }
00684       $registrationPolicyForm->display();
00685    }
00686 
00690    function saveRegistrationPolicies($args = array()) {
00691       $this->validate();
00692 
00693       import('registration.form.RegistrationPolicyForm');
00694 
00695       $registrationPolicyForm = new RegistrationPolicyForm();
00696       $registrationPolicyForm->readInputData();
00697 
00698       if ($registrationPolicyForm->validate()) {
00699          $registrationPolicyForm->execute();
00700          Request::redirect(null, null, 'manager', 'registration');
00701       }
00702    }
00703 
00704    function setupTemplate($subclass = false) {
00705       parent::setupTemplate(true);
00706       if ($subclass) {
00707          $templateMgr =& TemplateManager::getManager();
00708          $templateMgr->append('pageHierarchy', array(Request::url(null, null, 'manager', 'registration'), 'manager.registration'));
00709       }
00710    }
00711 }
00712 
00713 ?>

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