Exemplo n.º 1
0
 /**
  * function __construct
  * <pre>
  * Initialize the object.
  * </pre>
  * @param $pathModuleRoot [STRING] The path to this module's root directory
  * @param $viewer [OBJECT] The viewer object.
  * @param $formAction [STRING] The action on a form submit
  * @param $sortBy [STRING] Field data to sort listManager by.
  * @param $page_id [STRING] The init data for the dataManager obj
  * @return [void]
  */
 function __construct($pathModuleRoot, $viewer, $formAction, $sortBy, $page_id)
 {
     // NOTE: be sure to call the parent constructor before trying to
     //       use the ->formXXX arrays...
     $fieldList = FormProcessor_EditPages::FORM_FIELDS;
     $fieldTypes = FormProcessor_EditPages::FORM_FIELD_TYPES;
     $displayFields = FormProcessor_EditPages::DISPLAY_FIELDS;
     parent::__construct($viewer, $formAction, $sortBy, $fieldList, $fieldTypes, $displayFields);
     $this->pathModuleRoot = $pathModuleRoot;
     $this->page_id = $page_id;
     // figure out the important fields for the dataManager
     $fieldsOfInterest = implode(',', $this->formFields);
     $this->dataManager = new RowManager_PageManager($page_id);
     $this->dataManager->setFieldsOfInterest($fieldsOfInterest);
     $this->formValues = $this->dataManager->getArrayOfValues();
     // now initialize the labels for this page
     // start by loading the default field labels for this Module
     $languageID = $viewer->getLanguageID();
     $seriesKey = modulecim_c4cwebsite::MULTILINGUAL_SERIES_KEY;
     $pageKey = modulecim_c4cwebsite::MULTILINGUAL_PAGE_FIELDS;
     $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey);
     // then load the page specific labels for this page
     $pageKey = FormProcessor_EditPages::MULTILINGUAL_PAGE_KEY;
     $this->labels->loadPageLabels($pageKey);
     // load the site default form link labels
     $this->labels->setSeriesKey(SITE_LABEL_SERIES_SITE);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORM_LINKS);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORMERRORS);
 }
 /**
  * function __construct
  * <pre>
  * Initialize the object.
  * </pre>
  * @param $pathModuleRoot [STRING] The path to this module's root directory
  * @param $viewer [OBJECT] The viewer object.
  * @param $formAction [STRING] The action on a form submit
  * @param $sortBy [STRING] Field data to sort listManager by.
  * @param $campusaccess_id [STRING] The init data for the dataManager obj
  * @param $eventadmin_id [INTEGER] The foreign key data for the data Manager
  * @param $campus_id [INTEGER] The foreign key data for the data Manager
  * @return [void]
  */
 function __construct($pathModuleRoot, $viewer, $formAction, $sortBy, $campusaccess_id, $eventadmin_id = '', $event_id = '')
 {
     // NOTE: be sure to call the parent constructor before trying to
     //       use the ->formXXX arrays...
     $fieldList = FormProcessor_AddCampusAdmin::FORM_FIELDS;
     $fieldTypes = FormProcessor_AddCampusAdmin::FORM_FIELD_TYPES;
     $displayFields = FormProcessor_AddCampusAdmin::DISPLAY_FIELDS;
     parent::__construct($viewer, $formAction, $sortBy, $fieldList, $fieldTypes, $displayFields);
     $this->pathModuleRoot = $pathModuleRoot;
     $this->campusaccess_id = $campusaccess_id;
     $this->eventadmin_id = $eventadmin_id;
     //$this->campus_id = $campus_id;
     $this->event_id = $event_id;
     // figure out the important fields for the dataManager
     $fieldsOfInterest = implode(',', $this->formFields);
     //*** ADDED JOIN IN ORDER TO FILTER BY EVENT ***/
     /**       $dataAccessManager = new RowManager_EventAdminCampusAssignmentManager($campusaccess_id);
      //       $dataAccessManager->setSortOrder( $this->sortBy );
     //        $dataAccessManager->setEventID( $this->event_id);
             
            
             $eventAdminManager = new RowManager_EventAdminAssignmentManager();
             $eventAdminManager->setEventID($this->event_id);
             
             $multiTableManager = new MultiTableManager();
             $multiTableManager->addRowManager($eventAdminManager);
                 
             $multiTableManager->addRowManager( $dataAccessManager, new JoinPair( $eventAdminManager->getJoinOnEventAdminID(), $dataAccessManager->getJoinOnEventAdminID() ) );
      //       $multiTableManager->constructSearchCondition( 'event_id', '=', $this->event_id, true );
             /*** END JOIN ***/
     $this->dataManager = new RowManager_EventAdminCampusAssignmentManager($campusaccess_id);
     //$multiTableManager;//
     $this->dataManager->setFieldsOfInterest($fieldsOfInterest);
     $this->formValues = $this->dataManager->getArrayOfValues();
     // now initialize the labels for this page
     // start by loading the default field labels for this Module
     $languageID = $viewer->getLanguageID();
     $seriesKey = modulecim_reg::MULTILINGUAL_SERIES_KEY;
     $pageKey = modulecim_reg::MULTILINGUAL_PAGE_FIELDS;
     $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey);
     // then load the page specific labels for this page
     $pageKey = FormProcessor_AddCampusAdmin::MULTILINGUAL_PAGE_KEY;
     $this->labels->loadPageLabels($pageKey);
     // load the site default form link labels
     $this->labels->setSeriesKey(SITE_LABEL_SERIES_SITE);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORM_LINKS);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORMERRORS);
 }
 /**
  * function __construct
  * <pre>
  * Initialize the object.
  * </pre>
  * @param $pathModuleRoot [STRING] The path to this module's root directory
  * @param $viewer [OBJECT] The viewer object.
  * @param $formAction [STRING] The action on a form submit
  * @param $sortBy [STRING] Field data to sort listManager by.
  * @param $cashtransaction_id [STRING] The init data for the dataManager obj
  * @param $reg_id [INTEGER] The foreign key data for the data Manager
  * @return [void]
  */
 function __construct($pathModuleRoot, $viewer, $formAction, $sortBy, $cashtransaction_id = '', $reg_id, $isSignUp = false)
 {
     // NOTE: be sure to call the parent constructor before trying to
     //       use the ->formXXX arrays...
     // use default fields if the page is not in the student sign-up process
     if ($isSignUp == false) {
         $fieldList = FormProcessor_EditRegistrationCashTransactionsList::FORM_FIELDS;
         $fieldTypes = FormProcessor_EditRegistrationCashTransactionsList::FORM_FIELD_TYPES;
         $displayFields = FormProcessor_EditRegistrationCashTransactionsList::DISPLAY_FIELDS;
     } else {
         $fieldList = 'cashtransaction_staffName|T|,cashtransaction_recd|B|<skip>,cashtransaction_amtPaid|N|,reg_id|T|<skip>,form_name|T|<skip>';
         $fieldTypes = 'textbox||64,-,textbox||15,-,hidden';
         $displayFields = 'cashtransaction_staffName,cashtransaction_amtPaid';
     }
     parent::__construct($viewer, $formAction, $sortBy, $fieldList, $fieldTypes, $displayFields);
     $this->pathModuleRoot = $pathModuleRoot;
     if ($cashtransaction_id != '') {
         $this->cashtransaction_id = $cashtransaction_id;
         $this->dataManager = new RowManager_CashTransactionManager($cashtransaction_id);
     } else {
         $this->dataManager = new RowManager_CashTransactionManager();
     }
     $this->reg_id = $reg_id;
     // figure out the important fields for the dataManager
     $fieldsOfInterest = implode(',', $this->formFields);
     $this->dataManager->setFieldsOfInterest($fieldsOfInterest);
     $this->dataManager->setRegID($this->reg_id);
     if ($this->cashtransaction_id != '') {
         $this->dataManager->loadByCashTransactionID($this->cashtransaction_id);
     }
     $this->formValues = $this->dataManager->getArrayOfValues();
     // now initialize the labels for this page
     // start by loading the default field labels for this Module
     $languageID = $viewer->getLanguageID();
     $seriesKey = modulecim_reg::MULTILINGUAL_SERIES_KEY;
     $pageKey = modulecim_reg::MULTILINGUAL_PAGE_FIELDS;
     $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey);
     // then load the page specific labels for this page
     $pageKey = FormProcessor_EditRegistrationCashTransactionsList::MULTILINGUAL_PAGE_KEY;
     $this->labels->loadPageLabels($pageKey);
     // load the site default form link labels
     $this->labels->setSeriesKey(SITE_LABEL_SERIES_SITE);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORM_LINKS);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORMERRORS);
 }
Exemplo n.º 4
0
 /**
  * function __construct
  * <pre>
  * Initialize the object.
  * </pre>
  * @param $pathModuleRoot [STRING] The path to the module's root dir.
  * @param $viewer [OBJECT] The viewer object.
  * @param $formAction [STRING] The action on a form submit
  * @param $sortBy [STRING] Field data to sort listManager by.
  * @return [void]
  */
 function __construct($pathModuleRoot, $viewer, $formAction, $sortBy, $person_id = '')
 {
     // NOTE: be sure to call the parent constructor before trying to
     //       use the ->formXXX arrays...
     $fieldList = page_HrdbHome::FORM_FIELDS;
     $fieldTypes = page_HrdbHome::FORM_FIELD_TYPES;
     $displayFields = page_HrdbHome::DISPLAY_FIELDS;
     parent::__construct($viewer, $formAction, $sortBy, $fieldList, $fieldTypes, $displayFields);
     // initialzie the object values
     $this->pathModuleRoot = $pathModuleRoot;
     $this->viewer = $viewer;
     $this->person_id = $person_id;
     // ?????? $this->registration_id = $registration_id;
     // figure out the important fields for the dataManager
     //         $fieldsOfInterest = implode(',', $this->formFields);
     //         if ($person_id != '')
     //         {
     $this->dataManager = new RowManager_PersonManager($person_id);
     // 	        $this->dataManager->setFieldsOfInterest( $fieldsOfInterest );
     $this->dataManager->setSortOrder('person_lname,person_fname');
     $this->formValues = $this->dataManager->getArrayOfValues();
     //         }
     // now initialize the labels for this page
     // start by loading the default field labels for this Module
     $languageID = $viewer->getLanguageID();
     $seriesKey = modulecim_hrdb::MULTILINGUAL_SERIES_KEY;
     $pageKey = page_HrdbHome::MULTILINGUAL_PAGE_KEY;
     $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey);
     // then load the page specific labels for this page
     $pageKey = page_HrdbHome::MULTILINGUAL_PAGE_KEY;
     $this->labels->loadPageLabels($pageKey);
     // load the site default form link labels
     $this->labels->setSeriesKey(SITE_LABEL_SERIES_SITE);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORM_LINKS);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORMERRORS);
 }
 /**
  * function __construct
  * <pre>
  * Initialize the object.
  * </pre>
  * @param $pathModuleRoot [STRING] The path to this module's root directory
  * @param $viewer [OBJECT] The viewer object.
  * @param $formAction [STRING] The action on a form submit
  * @param $sortBy [STRING] Field data to sort listManager by.
  * @param $statistic_id [STRING] The init data for the dataManager obj
  * @param $freq_id [INTEGER] The foreign key data for the data Manager
  * @param $meas_id [INTEGER] The foreign key data for the data Manager
  * @return [void]
  */
 function __construct($pathModuleRoot, $viewer, $formAction, $sortBy, $statistic_id, $scope_id = '', $scope_ref_id = '', $freq_id = '', $meas_id = '')
 {
     // NOTE: be sure to call the parent constructor before trying to
     //       use the ->formXXX arrays...
     $fieldList = FormProcessor_EditStatistic::FORM_FIELDS;
     $fieldTypes = FormProcessor_EditStatistic::FORM_FIELD_TYPES;
     $displayFields = FormProcessor_EditStatistic::DISPLAY_FIELDS;
     parent::__construct($viewer, $formAction, $sortBy, $fieldList, $fieldTypes, $displayFields);
     $this->pathModuleRoot = $pathModuleRoot;
     $this->statistic_id = $statistic_id;
     $this->scope_id = $scope_id;
     $this->scope_ref_id = $scope_ref_id;
     $this->freq_id = $freq_id;
     $this->meas_id = $meas_id;
     // figure out the important fields for the dataManager
     $fieldsOfInterest = implode(',', $this->formFields);
     $this->dataManager = new RowManager_StatisticManager($statistic_id);
     $this->dataManager->setFieldsOfInterest($fieldsOfInterest);
     $this->formValues = $this->dataManager->getArrayOfValues();
     // check the scope id
     if ($this->scope_id == '') {
         // echo 'scope_id NOT set, giving default value... ';
         $this->scope_id = RowManager_ScopeManager::SCOPE_MINISTRY;
         $this->scope_ref_manager = new RowManager_MinistryManager();
         $fieldName = 'ministry_id';
         $alias = 'scope_ref_id';
         $this->scope_ref_manager->addFieldNameAlias($fieldName, $alias);
     } else {
         switch ($this->scope_id) {
             case RowManager_ScopeManager::SCOPE_LOCATION:
                 $this->scope_ref_manager = new RowManager_LocationManager();
                 $fieldName = 'location_id';
                 break;
             case RowManager_ScopeManager::SCOPE_REGION:
                 $this->scope_ref_manager = new RowManager_RegionManager();
                 $fieldName = 'region_id';
                 break;
             case RowManager_ScopeManager::SCOPE_DIVISION:
                 $this->scope_ref_manager = new RowManager_DivisionManager();
                 $fieldName = 'division_id';
                 break;
             case RowManager_ScopeManager::SCOPE_MINISTRY:
                 $this->scope_ref_manager = new RowManager_MinistryManager();
                 $fieldName = 'ministry_id';
                 break;
             default:
                 break;
         }
         $alias = 'scope_ref_id';
         $this->scope_ref_manager->addFieldNameAlias($fieldName, $alias);
     }
     // now initialize the labels for this page
     // start by loading the default field labels for this Module
     $languageID = $viewer->getLanguageID();
     $seriesKey = modulep2c_stats::MULTILINGUAL_SERIES_KEY;
     $pageKey = modulep2c_stats::MULTILINGUAL_PAGE_FIELDS;
     $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey);
     // then load the page specific labels for this page
     $pageKey = FormProcessor_EditStatistic::MULTILINGUAL_PAGE_KEY;
     $this->labels->loadPageLabels($pageKey);
     // load the site default form link labels
     $this->labels->setSeriesKey(SITE_LABEL_SERIES_SITE);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORM_LINKS);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORMERRORS);
 }
 /**
  * function __construct
  * <pre>
  * Initialize the object.
  * </pre>
  * @param $pathModuleRoot [STRING] The path to this module's root directory
  * @param $viewer [OBJECT] The viewer object.
  * @param $formAction [STRING] The action on a form submit
  * @param $sortBy [STRING] Field data to sort listManager by.
  * @param $cctransaction_id [STRING] The init data for the dataManager obj
  * @param $reg_id [INTEGER] The foreign key data for the data Manager
  * @param $cctype_id [INTEGER] The foreign key data for the data Manager
  * @return [void]
  */
 function __construct($pathModuleRoot, $viewer, $formAction, $sortBy, $cctransaction_id = '', $reg_id)
 {
     // NOTE: be sure to call the parent constructor before trying to
     //       use the ->formXXX arrays...
     $fieldList = FormProcessor_EditRegistrationCCTransactionsList::FORM_FIELDS;
     $fieldTypes = FormProcessor_EditRegistrationCCTransactionsList::FORM_FIELD_TYPES;
     $displayFields = FormProcessor_EditRegistrationCCTransactionsList::DISPLAY_FIELDS;
     parent::__construct($viewer, $formAction, $sortBy, $fieldList, $fieldTypes, $displayFields);
     $this->pathModuleRoot = $pathModuleRoot;
     if ($cctransaction_id != '') {
         $this->cctransaction_id = $cctransaction_id;
         //         			        echo "CC TRANS";
         //         		$formAction .= '&'.modulecim_reg::CCTRANS_ID.'='.$this->cctransaction_id;
         $this->dataManager = new RowManager_CreditCardTransactionManager($cctransaction_id);
     } else {
         $this->dataManager = new RowManager_CreditCardTransactionManager();
     }
     $this->reg_id = $reg_id;
     $this->setPersonID($reg_id);
     // ALSO SETS CONFIRMATION #
     $this->has_overpaid = false;
     $this->creditProcessor = new CreditCardProcessor();
     // figure out the important fields for the dataManager
     $fieldsOfInterest = implode(',', $this->formFields);
     //        $this->dataManager = new RowManager_CreditCardTransactionManager();	// $cctransaction_id );
     //         $this->dataManager->setFieldsOfInterest( $fieldsOfInterest );
     $this->dataManager->setRegID($this->reg_id);
     if ($this->cctransaction_id != '') {
         $this->dataManager->loadByCCTransactionID($this->cctransaction_id);
     }
     $this->formValues = $this->dataManager->getArrayOfValues();
     // now initialize the labels for this page
     // start by loading the default field labels for this Module
     $languageID = $viewer->getLanguageID();
     $seriesKey = modulecim_reg::MULTILINGUAL_SERIES_KEY;
     $pageKey = modulecim_reg::MULTILINGUAL_PAGE_FIELDS;
     $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey);
     // then load the page specific labels for this page
     $pageKey = FormProcessor_EditRegistrationCCTransactionsList::MULTILINGUAL_PAGE_KEY;
     $this->labels->loadPageLabels($pageKey);
     // load the site default form link labels
     $this->labels->setSeriesKey(SITE_LABEL_SERIES_SITE);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORM_LINKS);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORMERRORS);
 }
 /**
  * function __construct
  * <pre>
  * Initialize the object.
  * </pre>
  * @param $pathModuleRoot [STRING] The path to this module's root directory
  * @param $viewer [OBJECT] The viewer object.
  * @param $formAction [STRING] The action on a form submit
  * @param $sortBy [STRING] Field data to sort listManager by.
  * @param $assignment_id [STRING] The init data for the dataManager obj
  * @param $person_id [INTEGER] The foreign key data for the data Manager
  * @param $campus_id [INTEGER] The foreign key data for the data Manager
  * @param $assignmentstatus_id [INTEGER] The foreign key data for the data Manager
  * @return [void]
  */
 function __construct($pathModuleRoot, $viewer, $formAction, $sortBy, $assignment_id, $person_id = '', $campus_id = '', $isSignUp = false)
 {
     // NOTE: be sure to call the parent constructor before trying to
     //       use the ->formXXX arrays...
     $fieldList = FormProcessor_EditCampusAssignment::FORM_FIELDS;
     $fieldTypes = FormProcessor_EditCampusAssignment::FORM_FIELD_TYPES;
     $displayFields = FormProcessor_EditCampusAssignment::DISPLAY_FIELDS;
     parent::__construct($viewer, $formAction, $sortBy, $fieldList, $fieldTypes, $displayFields);
     //		  $this->isAddOnly = $isAddOnly;		// whether or not to allow campus assignment updates
     $this->pathModuleRoot = $pathModuleRoot;
     $this->notice = "NOTE: only use edit for changing a person's status.<br>" . "Add must be used for updating campus and person information.<br>" . "This is done to store historical data and to avoid redundant records.";
     $this->assignment_id = $assignment_id;
     $this->person_id = $person_id;
     //        $this->assignmentstatus_id = $assignmentstatus_id;
     $this->is_sign_up = $isSignUp;
     if ($this->is_sign_up == false) {
         $this->campus_id = $campus_id;
         // Sign-up process is NOT campus-specific
     }
     // figure out the important fields for the dataManager
     $fieldsOfInterest = implode(',', $this->formFields);
     $this->dataManager = new RowManager_EditCampusAssignmentManager($assignment_id);
     //        $this->dataManager->setPersonID($this->person_id);
     //        $this->dataManager->setCampusID($this->campus_id);
     /*        if ($this->person_id!='') {
             		$this->dataManager->constructSearchCondition( 'person_id', '=', $this->person_id, true );
          	  }
             if ($this->campus_id!='') {
             		$this->dataManager->constructSearchCondition( 'campus_id', '=', $this->campus_id, true );
          	  }    
          	  */
     $this->dataManager->setFieldsOfInterest($fieldsOfInterest);
     $this->formValues = $this->dataManager->getArrayOfValues();
     //       echo "<pre>".print_r($this->formValues,true)."</pre>";
     // now initialize the labels for this page
     // start by loading the default field labels for this Module
     $languageID = $viewer->getLanguageID();
     $seriesKey = modulecim_reg::MULTILINGUAL_SERIES_KEY;
     $pageKey = modulecim_reg::MULTILINGUAL_PAGE_FIELDS;
     $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey);
     // then load the page specific labels for this page
     $pageKey = FormProcessor_EditCampusAssignment::MULTILINGUAL_PAGE_KEY;
     $this->labels->loadPageLabels($pageKey);
     // load the site default form link labels
     $this->labels->setSeriesKey(SITE_LABEL_SERIES_SITE);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORM_LINKS);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORMERRORS);
 }
Exemplo n.º 8
0
 /**
  * function __construct
  * <pre>
  * Initialize the object.
  * </pre>
  * @param $pathModuleRoot [STRING] The path to this module's root directory
  * @param $viewer [OBJECT] The viewer object.
  * @param $formAction [STRING] The action on a form submit
  * @param $sortBy [STRING] Field data to sort listManager by.
  * @param $morestats_id [STRING] The init data for the dataManager obj
  * @param $campus_id [INTEGER] The foreign key data for the data Manager
  * @param $exposuretype_id [INTEGER] The foreign key data for the data Manager
  * @return [void]
  */
 function __construct($pathModuleRoot, $viewer, $formAction, $sortBy, $morestats_id, $campus_id = '', $exposuretype_id = '', $week_id, $staff_id)
 {
     // NOTE: be sure to call the parent constructor before trying to
     //       use the ->formXXX arrays...
     $fieldList = FormProcessor_MoreStats::FORM_FIELDS;
     $fieldTypes = FormProcessor_MoreStats::FORM_FIELD_TYPES;
     $displayFields = FormProcessor_MoreStats::DISPLAY_FIELDS;
     parent::__construct($viewer, $formAction, $sortBy, $fieldList, $fieldTypes, $displayFields);
     $this->pathModuleRoot = $pathModuleRoot;
     $this->morestats_id = $morestats_id;
     $this->campus_id = $campus_id;
     $this->exposuretype_id = $exposuretype_id;
     // echo '$this->exposuretype_id['.$this->exposuretype_id.']<br/>';
     $this->week_id = $week_id;
     $this->staff_id = $staff_id;
     // for looking up the person_id of this staff member
     $staffManager = new RowManager_StaffManager($this->staff_id);
     // setup the
     $assignmentManager = new RowManager_AssignmentsManager();
     $assignmentManager->setPersonID($staffManager->getPersonID());
     $assignmentManager->setAssignmentStatusID(CA_STAFF);
     $multiTableManager = new MultiTableManager();
     $multiTableManager->addRowManager($assignmentManager);
     $campusManager = new RowManager_CampusManager();
     $campusManager->setSortOrder('campus_desc');
     $multiTableManager->addRowManager($campusManager, new JoinPair($campusManager->getJoinOnCampusID(), $assignmentManager->getJoinOnCampusID()));
     $this->campusListIterator = $multiTableManager->getListIterator();
     if ($campus_id != '') {
         // echo 'campus_id is SET ['.$campus_id.']<br/>';
         $this->campus_id = $campus_id;
     } else {
         // set a default campus id
         // echo 'Choosing a default campus<br/>';
         $this->campusListIterator->setFirst();
         if ($this->campusListIterator->moveNext()) {
             $campusObject = $this->campusListIterator->getCurrent(new RowManager_CampusManager());
             $this->campus_id = $campusObject->getID();
         } else {
             die('ERROR - unable to set campus_id - page_StaffWeeklyReport');
         }
     }
     if ($this->week_id == '') {
         // give a default value to the week id
         $weekManager = new RowManager_WeekManager();
         if ($weekManager->loadByDate(date('Y-m-d', time()))) {
             $this->week_id = $weekManager->getID();
         } else {
             die("ERROR - couldn't see week_id - page_MoreStats.php");
         }
     }
     // echo '$this->week_id['.$this->week_id.']<br/>';
     // figure out the important fields for the dataManager
     $fieldsOfInterest = implode(',', $this->formFields);
     $this->dataManager = new RowManager_MoreStatsManager($morestats_id);
     $this->dataManager->setFieldsOfInterest($fieldsOfInterest);
     $this->formValues = $this->dataManager->getArrayOfValues();
     // now initialize the labels for this page
     // start by loading the default field labels for this Module
     $languageID = $viewer->getLanguageID();
     $seriesKey = modulecim_stats::MULTILINGUAL_SERIES_KEY;
     $pageKey = modulecim_stats::MULTILINGUAL_PAGE_FIELDS;
     $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey);
     // then load the page specific labels for this page
     $pageKey = FormProcessor_MoreStats::MULTILINGUAL_PAGE_KEY;
     $this->labels->loadPageLabels($pageKey);
     // load the site default form link labels
     $this->labels->setSeriesKey(SITE_LABEL_SERIES_SITE);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORM_LINKS);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORMERRORS);
 }
 /**
  * function __construct
  * <pre>
  * Initialize the object.
  * </pre>
  * @param $pathModuleRoot [STRING] The path to this module's root directory
  * @param $viewer [OBJECT] The viewer object.
  * @param $formAction [STRING] The action on a form submit
  * @param $sortBy [STRING] Field data to sort listManager by.
  * @param $staffactivity_id [STRING] The init data for the dataManager obj
  * @param $person_id [INTEGER] The foreign key data for the data Manager
  * @param $activitytype_id [INTEGER] The foreign key data for the data Manager
  * @return [void]
  */
 function __construct($pathModuleRoot, $viewer, $formAction, $sortBy, $staffactivity_id, $person_id = '', $form_id = '', $personal_form_id = '', $activitytype_id = '', $disableHeading = true, $showContactField = false, $activityTypesFilter = array(), $disableForm = false)
 {
     // NOTE: be sure to call the parent constructor before trying to
     //       use the ->formXXX arrays...
     if ($showContactField == true) {
         $FORM_FIELDS = 'staffactivity_startdate|T|,staffactivity_enddate|T|,staffactivity_contactPhone|T|,activitytype_id|N|,person_id|T|<skip>,form_name|T|<skip>';
         $FORM_FIELD_TYPES = 'datebox,datebox,textbox,droplist,-,hidden';
         $DISPLAY_FIELDS = 'staffactivity_startdate,staffactivity_enddate,staffactivity_contactPhone,activitytype_id';
     } else {
         $FORM_FIELDS = 'staffactivity_startdate|T|,staffactivity_enddate|T|,activitytype_id|N|,person_id|T|<skip>,form_name|T|<skip>';
         $FORM_FIELD_TYPES = 'datebox,datebox,droplist,-,hidden';
         $DISPLAY_FIELDS = 'staffactivity_startdate,staffactivity_enddate,activitytype_id';
     }
     $fieldList = $FORM_FIELDS;
     //FormProcessor_EditStaffActivity::FORM_FIELDS;
     $fieldTypes = $FORM_FIELD_TYPES;
     //FormProcessor_EditStaffActivity::FORM_FIELD_TYPES;
     $displayFields = $DISPLAY_FIELDS;
     //FormProcessor_EditStaffActivity::DISPLAY_FIELDS;
     parent::__construct($viewer, $formAction, $sortBy, $fieldList, $fieldTypes, $displayFields);
     $this->pathModuleRoot = $pathModuleRoot;
     $this->sortBy = $sortBy;
     if ($sortBy == '') {
         $this->sortBy = 'staffactivity_startdate';
     }
     $this->disableForm = $disableForm;
     //         $this->showOnlyVacation = $showOnlyVacation;		// TODO??: replace with activitytype_id = 1
     $this->activityTypesFilter = $activityTypesFilter;
     $this->staffactivity_id = $staffactivity_id;
     $this->person_id = $person_id;
     $this->form_id = $form_id;
     $this->personal_form_id = $personal_form_id;
     // Get person and form type IDs from form instance ID, if applicable
     if ($this->personal_form_id != '') {
         $formInstance = new RowManager_StaffScheduleManager($this->personal_form_id);
         $this->person_id = $formInstance->getPersonID();
         $this->form_id = $formInstance->getFormID();
         // 	        echo 'person_id = '.$this->person_id.'  and   form type id = '.$this->form_id;
     }
     // Set the form instance ID based on other IDs
     if ($this->person_id != '' && $this->form_id != '' && $this->personal_form_id == '') {
         $this->personal_form_id = $personal_form_id;
         $this->scheduleFormManager = new RowManager_StaffScheduleManager();
         $this->scheduleFormManager->setPersonID($this->person_id);
         $this->scheduleFormManager->setFormID($this->form_id);
         $formList = $this->scheduleFormManager->getListIterator();
         $formArray = $formList->getDataList();
         if (count($formArray) > 0) {
             $row = current($formArray);
             // pick first record for grabbing form ID
             $this->personal_form_id = $row['staffschedule_id'];
         }
     }
     $this->activitytype_id = $activitytype_id;
     $this->disableHeading = $disableHeading;
     // figure out the important fields for the dataManager
     $fieldsOfInterest = implode(',', $this->formFields);
     $this->dataManager = new RowManager_StaffActivityManager($this->staffactivity_id);
     //         $this->dataManager->setStaffActivityID($staffactivity_id);
     $this->dataManager->setPersonID($this->person_id);
     if (count($this->activityTypesFilter) > 0) {
         $activityTypesList = implode(',', $this->activityTypesFilter);
         if ($activityTypesList != '') {
             $this->dataManager->addSearchCondition('activitytype_id in (' . $activityTypesList . ')');
         }
     }
     if (!isset($this->form_start_date)) {
         $this->form_start_date = '';
     }
     if (!isset($this->form_start_date)) {
         $this->form_end_date = '';
     }
     if ($form_id != '') {
         $scheduleType = new RowManager_StaffScheduleTypeManager($this->form_id);
         $this->form_start_date = $scheduleType->getStartDate();
         //         		$this->dataManager->addSearchCondition( 'staffactivity_startdate >= '.$form_start_date );
         $this->dataManager->constructSearchCondition('staffactivity_startdate', '>=', $this->form_start_date, true);
         $this->form_end_date = $scheduleType->getEndDate();
         //         		$this->dataManager->addSearchCondition( 'staffactivity_enddate <= '.$form_end_date );
         $this->dataManager->constructSearchCondition('staffactivity_enddate', '<=', $this->form_end_date, true);
         $transformedStartDate = $this->getEasyDate($this->form_start_date);
         $transformedEndDate = $this->getEasyDate($this->form_end_date);
         $this->form_date_range = $transformedStartDate . ' - ' . $transformedEndDate;
     }
     $this->dataManager->setSortOrder($this->sortBy);
     // does nothing, see manager called in getHTML()...
     //      	  $this->dataManager->setFieldsOfInterest( $fieldsOfInterest );
     $this->formValues = $this->dataManager->getArrayOfValues();
     // now initialize the labels for this page
     // start by loading the default field labels for this Module
     $languageID = $viewer->getLanguageID();
     $seriesKey = modulecim_hrdb::MULTILINGUAL_SERIES_KEY;
     $pageKey = modulecim_hrdb::MULTILINGUAL_PAGE_FIELDS;
     $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey);
     // then load the page specific labels for this page
     $pageKey = FormProcessor_EditStaffActivity::MULTILINGUAL_PAGE_KEY;
     $this->labels->loadPageLabels($pageKey);
     // load the site default form link labels
     $this->labels->setSeriesKey(SITE_LABEL_SERIES_SITE);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORM_LINKS);
     $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORMERRORS);
 }