/** * 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 $initVar [INTEGER] Value used to initialize the dataManager * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $initVar) { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... parent::__construct($formAction, FormProcessor_ViewPageFields::FORM_FIELDS, ''); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->formAction = $formAction; $this->initVar = $initVar; // figure out the important fields for the dataManager $fieldsOfInterest = implode(',', $this->formFields); $this->dataManager = new RowManager_PageManager($initVar); // $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 = moduleRAD::MULTILINGUAL_SERIES_KEY; $pageKey = moduleRAD::MULTILINGUAL_PAGE_FIELDS; $this->labels = new XMLObject_MultilingualManager($languageID, $seriesKey, $pageKey); // load the site default form link labels $this->labels->loadPageLabels(SITE_LABEL_SERIES_SITE, SITE_LABEL_PAGE_FORM_LINKS); // then load the page specific labels for this page $pageKey = FormProcessor_ViewPageFields::MULTILINGUAL_PAGE_KEY; $this->labels->loadPageLabels($seriesKey, $pageKey); }
/** * 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 $group_id [INTEGER] Value used to initialize the dataManager * @param $groupType_id [INTEGER] The foreign key data for the data Manager * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $group_id, $groupType_id = '') { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... $fieldList = FormProcessor_ManageGroup::FORM_FIELDS; $fieldDisplayTypes = FormProcessor_ManageGroup::FORM_FIELD_TYPES; parent::__construct($formAction, $fieldList, $fieldDisplayTypes); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->group_id = $group_id; $this->groupType_id = $groupType_id; // figure out the important fields for the dataManager $fieldsOfInterest = implode(',', $this->formFields); $this->dataManager = new RowManager_GroupManager($group_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_sch::MULTILINGUAL_SERIES_KEY; $pageKey = modulecim_sch::MULTILINGUAL_PAGE_FIELDS; $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey); // then load the page specific labels for this page $pageKey = FormProcessor_ManageGroup::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 the module's root dir. * @param $viewer [OBJECT] The viewer object. * @param $sortBy [STRING] Field data to sort listManager by. * @param $managerInit [INTEGER] Initialization value for the listManager. * @return [void] */ function __construct($pathModuleRoot, $viewer, $sortBy, $formAction, $formlist_type) { $fieldList = page_CustomReportsListing::FORM_FIELDS; $fieldTypes = page_CustomReportsListing::FORM_FIELD_TYPES; $displayFields = page_CustomReportsListing::DISPLAY_FIELDS; parent::__construct($formAction, $fieldList, $displayFields); // parent::__construct( page_CustomReportsListing::DISPLAY_FIELDS ); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->access_type = page_HrdbForms::ACCESS_GENERAL; $this->formAction = $formAction; // 11Apr2008: currently just used for Edit Forms page (to add form) $this->dataManager = new RowManager_CustomReportsManager(); if ($formlist_type != modulecim_hrdb::FORMLIST_EDIT) { // only filter by 'is_shown' flag if not editing forms $this->dataManager->setIsShown(true); } $this->dataManager->setSortOrder($sortBy); // $this->listManager = new CustomReportsList( $sortBy ); $this->listManager = $this->dataManager->getListIterator(); // 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 = page_CustomReportsListing::MULTILINGUAL_PAGE_KEY; $this->labels->loadPageLabels($pageKey); $this->labels->setSeriesKey(SITE_LABEL_SERIES_SITE); $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORM_LINKS); }
/** * function __construct * <pre> * Initialize the object. * </pre> * @param $pathModuleRoot [STRING] The path to the module's root dir. * @param $viewer [OBJECT] The viewer object. * @return [void] */ function __construct($pathModuleRoot, $viewer, $sortBy, $regID, $eventID, $campusID = '', $cashTransID = '', $ccTransID = '', $formAction, $cashTransFormAction, $ccTransFormAction, $personID, $isSignUp = false) { $fieldList = page_EditRegistrationDetails::FORM_FIELDS; $fieldTypes = page_EditRegistrationDetails::FORM_FIELD_TYPES; $displayFields = page_EditRegistrationDetails::DISPLAY_FIELDS; parent::__construct($formAction, $fieldList, $displayFields); // initialize the object values $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->sortBy = $sortBy; $this->formAction = $formAction; $this->cashTrans_formAction = $cashTransFormAction; $this->ccTrans_formAction = $ccTransFormAction; $this->is_signup = $isSignUp; $this->event_id = $eventID; $this->campus_id = $campusID; $this->reg_id = $regID; $this->deposit = $this->getEventDeposit(); if ($cashTransID != '') { $this->cashtrans_id = $cashtransID; } if ($ccTransID != '') { $this->cctrans_id = $ccTransID; } // just let these be empty if they are passed as empty $this->person_id = $personID; // ensure that the person is assigned to the "Unknown" campus if s/he forgot to choose a campus if ($this->person_id != '') { $campusAssigner = new RowManager_EditCampusAssignmentManager(); $campusAssigner->setPersonID($this->person_id); $campusAssignList = $campusAssigner->getListIterator(); $campusAssignArray = $campusAssignList->getDataList(); if (count($campusAssignArray) == 0) { // Store default values in dataManager object $defaultValues = array(); $defaultValues['person_id'] = $this->person_id; $defaultValues['campus_id'] = page_ProcessFinancialTransactions::CAMPUS_UNKNOWN; $defaultValues['assignmentstatus_id'] = page_ProcessFinancialTransactions::STATUS_UNKNOWN; $campusAssigner->loadFromArray($defaultValues); // Save the values into the Table. if (!$campusAssigner->isLoaded()) { $campusAssigner->createNewEntry(); } } } // create references to sub-page objects $this->scholarship_list = new page_ScholarshipDisplayList($this->pathModuleRoot, $this->viewer, $this->sortBy, $this->reg_id); //, $this->scholarship_id , $this->reg_id); $this->cashTrans_form = new FormProcessor_EditRegistrationCashTransactionsList($this->pathModuleRoot, $this->viewer, $this->cashTrans_formAction, $this->sortBy, $this->cashtrans_id, $this->reg_id, $this->is_signup); $this->ccTrans_form = new FormProcessor_EditRegistrationCCTransactionsList($this->pathModuleRoot, $this->viewer, $this->ccTrans_formAction, $this->sortBy, $this->cctrans_id, $this->reg_id); // 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 = page_ProcessFinancialTransactions::MULTILINGUAL_PAGE_KEY; $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey); }
/** * function __construct * <pre> * Initialize the object. * </pre> * @param $pathModuleRoot [STRING] The path to the module's root dir. * @param $viewer [OBJECT] The viewer object. * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $sortBy, $person_id, $activity_id = '', $start_date = '', $end_date = '') { $fieldList = FormProcessor_ViewActivitiesByDate::FORM_FIELDS; $fieldTypes = FormProcessor_ViewActivitiesByDate::FORM_FIELD_TYPES; $displayFields = FormProcessor_ViewActivitiesByDate::DISPLAY_FIELDS; parent::__construct($formAction, $fieldList, $displayFields); // initialize the object values $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->sortBy = $sortBy; $this->formAction = $formAction; if ($activity_id != '') { $this->staffactivity_id = $activity_id; } // just let these be empty if they are passed as empty $this->person_id = $person_id; $this->start_date = $start_date; $this->end_date = $end_date; $this->has_activity_contact_nums = false; // set default, could be changed if form info exists $this->activity_types_filter = array(); // Get form type context information // $formType = new RowManager_StaffScheduleTypeManager($this->form_id); // // $formTypeList = $formType->getListIterator(); // $formTypeArray = $formTypeList->getDataList(); // // if (count($formTypeArray) > 0) // { // $row = current($formTypeArray); // pick first record for grabbing form context data // // // // Determine if form activities require contact phone #s // $has_activity_phone_nums = $row['staffscheduletype_has_activity_phone']; // if ($has_activity_phone_nums == '1') // { // $this->has_activity_contact_nums = true; // } // // // Determine if activities form must be filtered by 1 or more activity types // $filters_result = $row['staffscheduletype_activity_types']; // if ($filters_result != '') // { // $this->activity_types_filter = explode(',', $filters_result); // } // } // create references to sub-page objects $disableHeading = true; $this->activitytype_id = ''; $this->activity_list = new page_ViewStaffActivities($this->pathModuleRoot, $this->viewer, $this->sortBy, $this->staffactivity_id, $this->activitytype_id, $disableHeading, $this->start_date, $this->end_date); // 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 = FormProcessor_ViewActivitiesByDate::MULTILINGUAL_PAGE_KEY; $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey); }
/** * 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 $fieldList [STRING] The list of form fields to work with * @param $fieldDisplayTypes [STRING] The list of form field Types * @param $displayFields [STRING] List of field names for the display list * @return [void] */ function __construct($viewer, $formAction, $sortBy, $fieldList, $fieldDisplayTypes, $displayFields) { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... parent::__construct($formAction, $fieldList, $fieldDisplayTypes); $this->displayFields = $displayFields; $this->viewer = $viewer; $this->sortBy = $sortBy; $this->linkColumns = array(); $this->opType = $this->getQueryStringOPType(); $this->shouldDelete = false; }
/** * 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 * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction) { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... $this->viewer = $viewer; // if ((!isset($person_id))||($person_id == '')) // { // $this->person_id = $this->getPersonIDfromViewerID(); // $formAction .= '&'.modulecim_reg::PERSON_ID.'='.$this->person_id; // } $fieldList = FormProcessor_PersonRecordCleanUpForm::FORM_FIELDS; $fieldDisplayTypes = FormProcessor_PersonRecordCleanUpForm::FORM_FIELD_TYPES; parent::__construct($formAction, $fieldList, $fieldDisplayTypes); $this->pathModuleRoot = $pathModuleRoot; // To make sure this is not exploited to edit any other person's id. // If the user has no privileges, this sets the viewer id to be his/her own, // even if the variable given to it is not the viewer's person id. // NOTE: anyone with higher previliges can edit any person's info, by simply // changing the posted variable value. // NOTE: this code was causing problems in app_cim_reg module // Now load the access Priviledge manager of this viewer // $this->accessPrivManager = new RowManager_AdminManager( ); // // Get the person ID // $accessManager = new RowManager_AccessManager( ); // $accessManager->loadByViewerID( $this->viewer->getViewerID( ) ); // $personID = $accessManager->getPersonID(); // // Get the permissions the person has. // $this->accessPrivManager->loadByPersonID( $personID ); // if ( !$this->accessPrivManager->isLoaded() ) { // $this->person_id=$personID; // / } //End of check. // figure out the important fields for the dataManager // $fieldsOfInterest = implode(',', $this->formFields); $this->dataManager = new RowManager_PersonManager($this->person_id); // $this->dataManager->setFieldsOfInterest( $fieldsOfInterest ); $this->formValues = $this->dataManager->getArrayOfValues(); $this->formValues['script_timeout'] = 300; //echo "form values:<br><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_PersonRecordCleanUpForm::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 the module's root dir. * @param $viewer [OBJECT] The viewer object. * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $instrFormAction, $editFieldsFormAction, $sortBy, $staffscheduletype_id, $fields_id = '') { $fieldList = FormProcessor_EditHrdbForm::FORM_FIELDS; $fieldTypes = FormProcessor_EditHrdbForm::FORM_FIELD_TYPES; $displayFields = FormProcessor_EditHrdbForm::DISPLAY_FIELDS; parent::__construct($formAction, $fieldList, $displayFields); // initialize the object values $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->sortBy = $sortBy; $this->formAction = $formAction; $this->editfields_formAction = $editFieldsFormAction; $this->instructions_formAction = $instrFormAction; // $this->has_activity_form = $hasActivityForm; $this->form_id = $staffscheduletype_id; $this->field_id = $fields_id; // just let these be empty if they are passed as empty // $this->person_id = $person_id; $this->form_submitted = false; // figure out the important fields for the dataManager $fieldsOfInterest = implode(',', $this->formFields); $this->dataManager = new RowManager_FormFieldManager($fields_id); $this->dataManager->setFieldsOfInterest($fieldsOfInterest); $this->formValues = $this->dataManager->getArrayOfValues(); // Get form type context information $formType = new RowManager_StaffScheduleTypeManager($this->form_id); $formTypeList = $formType->getListIterator(); $formTypeArray = $formTypeList->getDataList(); // Ensure that a form instance is created for the staff person $scheduleFormManager = new RowManager_StaffScheduleManager(); $scheduleFormManager->setPersonID($this->person_id); $scheduleFormManager->setFormID($this->form_id); $formList = $scheduleFormManager->getListIterator(); $formArray = $formList->getDataList(); // create references to sub-page objects $disableHeading = true; $this->instructions_form = new FormProcessor_EditStaffFormInstructions($this->pathModuleRoot, $this->viewer, $this->instructions_formAction, $this->form_id, $disableHeading); $this->editfields_form = new FormProcessor_EditFormFields($this->pathModuleRoot, $this->viewer, $this->editfields_formAction, $this->sortBy, $this->field_id, $this->form_id, $disableHeading); // 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_EditHrdbForm::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 $staffscheduletype_id [INTEGER] Value used to initialize the dataManager * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $staffscheduletype_id, $disableHeading = false) { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... $fieldList = FormProcessor_EditStaffFormInstructions::FORM_FIELDS; $fieldDisplayTypes = FormProcessor_EditStaffFormInstructions::FORM_FIELD_TYPES; parent::__construct($formAction, $fieldList, $fieldDisplayTypes); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->staffscheduletype_id = $staffscheduletype_id; $this->disableHeading = $disableHeading; // figure out the important fields for the dataManager $fieldsOfInterest = implode(',', $this->formFields); // $instr_id_getter = new RowManager_StaffScheduleInstrManager( ); // $instr_id_getter->setFormTypeID($staffscheduletype_id); // $instr_id_list = $instr_id_getter->getListIterator(); // $instr_id_array = $instr_id_list->getDataList(); // reset($instr_id_array); // $record = current($instr_id_array); // // echo 'found values: <pre>'.print_r( $instr_id_array,true).'</pre><br>'; // // $this->scheduleinstr_id = $record['staffscheduleinstr_id']; $this->dataManager = new RowManager_StaffScheduleInstrManager($this->staffscheduletype_id); $this->dataManager->setFieldsOfInterest($fieldsOfInterest); $this->formValues = $this->dataManager->getArrayOfValues(); if (count($this->formValues) < 1) { $this->createNewEntry = true; } else { $this->createNewEntry = false; } // echo 'form values: <pre>'.print_r( $this->formValues,true).'</pre><br>'; // 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_EditStaffFormInstructions::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 $person_id [INTEGER] Value used to initialize the dataManager * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $person_id) { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... $fieldList = FormProcessor_EditMyInfo::FORM_FIELDS; $fieldDisplayTypes = FormProcessor_EditMyInfo::FORM_FIELD_TYPES; parent::__construct($formAction, $fieldList, $fieldDisplayTypes); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->person_id = $person_id; // To make sure this is not exploited to edit any other person's id. // If the user has no privileges, this sets the viewer id to be his/her own, // even if the variable given to it is not the viewer's person id. // NOTE: anyone with higher previliges can edit any person's info, by simply // changing the posted variable value. // Now load the access Priviledge manager of this viewer $this->accessPrivManager = new RowManager_AdminManager(); // Get the person ID $accessManager = new RowManager_AccessManager(); $accessManager->loadByViewerID($this->viewer->getViewerID()); $personID = $accessManager->getPersonID(); // Get the permissions the person has. $this->accessPrivManager->loadByPersonID($personID); if (!$this->accessPrivManager->isLoaded()) { $this->person_id = $personID; } //End of check. // figure out the important fields for the dataManager $fieldsOfInterest = implode(',', $this->formFields); $this->dataManager = new RowManager_PersonManager($this->person_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_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_EditMyInfo::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 $ [INTEGER] Value used to initialize the rowManager * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $daobj_id) { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... parent::__construct(FormProcessor_AddPerson::FORM_FIELDS); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->formAction = $formAction; $this->daobj_id = $daobj_id; // figure out the important fields for the rowItems $fieldsOfInterest = implode(',', $this->formFields); // create new rowManager (a List Iterator obj.) $this->rowManager = new PersonList($daobj_id); // for each row item ... $this->rowManager->setFirst(); while ($rowItem = $this->rowManager->getNext()) { // make sure rowItems have valid entries in the DB if (!$rowItem->isLoaded()) { $rowItem->createNewEntry(); } // set the fields of interest ... $rowItem->setFieldsOfInterest($fieldsOfInterest); // get the primaryID of this rowItem $primaryID = $rowItem->getPrimaryKeyValue(); // now initialize beginning form values from rowItem object for ($indx = 0; $indx < count($this->formFields); $indx++) { $key = $this->formFields[$indx]; $this->formValues[$key . $primaryID] = $rowItem->getValueByFieldName($key); } // next field } // next rowItem in rowManager // 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_AddPerson::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); }
/** * 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 $person_id [INTEGER] Value used to initialize the dataManager * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $person_id) { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... $fieldList = FormProcessor_NewPerson::FORM_FIELDS; $fieldDisplayTypes = FormProcessor_NewPerson::FORM_FIELD_TYPES; parent::__construct($formAction, $fieldList, $fieldDisplayTypes); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->person_id = $person_id; $fieldsOfInterest = implode(',', $this->formFields); // Using Join $dataAccessObject = new MultiTableManager(); $viewerManager = new RowManager_ViewerManager(); $dataAccessObject->addRowManager($viewerManager); $personManager = new RowManager_PersonManager(); $joinPair = new JoinPair($personManager->getJoinOnPersonID(), $viewerManager->getJoinOnPersonID()); $dataAccessObject->addRowManager($personManager, $joinPair); $dataAccessObject->setFieldsOfInterest($fieldsOfInterest); $this->formValues = $dataAccessObject->getArrayOfValues(); // Done using Join // figure out the important fields for the dataManager /*No Join used, only person manager. $this->dataManager = new RowManager_PersonManager( $person_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_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_NewPerson::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 the module's root dir. * @param $viewer [OBJECT] The viewer object. * @param $sortBy [STRING] Field data to sort listManager by. * @param $managerInit [INTEGER] Initialization value for the listManager. * @return [void] */ function __construct($pathModuleRoot, $viewer, $sortBy, $filter_fname = 'A%', $filter_lname = 'A%', $filter_email = '', $max_exec_time) { // parent::__construct( page_DisplayCCtransactionReceipt::DISPLAY_FIELDS ); $formAction = ''; $fieldList = page_PersonRecordCleanUp::FORM_FIELDS; $fieldTypes = page_PersonRecordCleanUp::FORM_FIELD_TYPES; $displayFields = page_PersonRecordCleanUp::DISPLAY_FIELDS; parent::__construct($viewer, $formAction, $sortBy, $fieldList, $fieldTypes, $displayFields); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->sortBy = $sortBy; // initialize data filters $this->filter_fname = $filter_fname; $this->filter_lname = $filter_lname; $this->filter_email = $filter_email; if (isset($max_exec_time)) { set_time_limit($max_exec_time); // echo "Time limit set to ".$max_exec_time." seconds!"; } $this->person_manager = new RowManager_PersonManager(); // $this->access_manager = new RowManager_AccessManager(); // $this->person_dg_manager = new RowManager_PersonDGManager(); // TODO: implement this class under app_cim_sch // $this->schedule_manager = new RowManager_ScheduleManager(); // TODO: implement this class under app_cim_sch // $this->person_year_manager = new RowManager_PersonYearManager(); // TODO: implement this class under app_cim_sch // $this->emerg_contact_manager = new RowManager_EmergencyInfoManager(); // $this->hrdb_admin_manager = new RowManager_AdminManager(); // $this->campus_assign_manager = new RowManager_AssignmentsManager(); // $this->registration_manager = new RowManager_RegistrationManager(); // $this->staff_manager = new RowManager_StaffManager(); // 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 = page_PersonRecordCleanUp::MULTILINGUAL_PAGE_KEY; $this->labels->loadPageLabels($pageKey); $this->labels->setSeriesKey(SITE_LABEL_SERIES_SITE); $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORM_LINKS); }
/** * function __construct * <pre> * Initialize the object. * </pre> * @param $pathModuleRoot [STRING] The path to the module's root dir. * @param $viewer [OBJECT] The viewer object. * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $sortBy) { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... $fieldList = ''; //FormProcessor_ManageSuperAdmin::FORM_FIELDS; $fieldTypes = ''; //FormProcessor_ManageSuperAdmin::FORM_FIELD_TYPES; $displayFields = ''; //FormProcessor_ManageSuperAdmin::DISPLAY_FIELDS; parent::__construct($formAction, '', ''); // initialzie the object values $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; // now initialize the labels for this page // start by loading the default field labels for this Module $languageID = $viewer->getLanguageID(); $seriesKey = modulecim_sch::MULTILINGUAL_SERIES_KEY; $pageKey = page_MySchedule::MULTILINGUAL_PAGE_KEY; $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey); // init the person id // figure out the viewer's person ID $accessManager = new RowManager_AccessManager(); $accessManager->loadByViewerID($this->viewer->getViewerID()); $this->personID = $accessManager->getPersonID(); echo "Your person ID is:" . $this->personID . "<br/>"; // set the schedule id $scheduleManager = new RowManager_ScheduleManager(); $scheduleManager->setPersonID($this->personID); $scheduleList = new ListIterator($scheduleManager); $scheduleList->setFirst(); $this->scheduleID = -1; if ($scheduleList->moveNext()) { $schManager = $scheduleList->getCurrent(new RowManager_ScheduleManager()); $this->scheduleID = $schManager->getScheduleID(); echo "Schedule ID:" . $this->scheduleID . "<br/>"; } else { echo "ERROR finding schedule id.<br/>"; } }
/** * 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 $template_id [INTEGER] Value used to initialize the dataManager * @param $app_id [INTEGER] The foreign key data for the data Manager * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $template_id, $app_id = '') { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... $fieldList = FormProcessor_EditTemplate::FORM_FIELDS; $fieldDisplayTypes = FormProcessor_EditTemplate::FORM_FIELD_TYPES; parent::__construct($formAction, $fieldList, $fieldDisplayTypes); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->template_id = $template_id; $this->app_id = $app_id; // figure out the important fields for the dataManager $fieldsOfInterest = implode(',', $this->formFields); // 1) Create the RowManager for the table we are editing $emailManager = new RowManager_EmailTemplateManager($template_id); $emailManager->setAppID($this->app_id); // set the current application ID // 2) Now create a Multilintual Context for the labels $seriesKey = $emailManager->getSeriesKey(); $pageKey = $emailManager->getXMLNodeName(); $this->bridgeMultiLingualManager = new MultilingualManager($viewer->getLanguageID(), $seriesKey, $pageKey); $this->dataManager = new RowLabelBridge($emailManager, $this->bridgeMultiLingualManager); $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 = moduleEmailTemplates::MULTILINGUAL_SERIES_KEY; $pageKey = moduleEmailTemplates::MULTILINGUAL_PAGE_FIELDS; $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey); // then load the page specific labels for this page $pageKey = FormProcessor_EditTemplate::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 $viewer_id [INTEGER] Value used to initialize the dataManager * @param $accountgroup_id [INTEGER] The foreign key data for the data Manager * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $viewer_id, $accountgroup_id = '') { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... parent::__construct($formAction, FormProcessor_EditPassword::FORM_FIELDS, FormProcessor_EditPassword::FORM_FIELD_TYPES); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->formAction = $formAction; //Below added so normal users can't exploit the form and edit other users' passwords. // Now load the access Priviledge manager of this viewer $this->accessPrivManager = new RowManager_AccountAdminAccessManager(); $this->accessPrivManager->loadByViewerID($this->viewer->getViewerID()); if ($viewer_id == '' || !($this->accessPrivManager->hasGroupPriv() || $this->accessPrivManager->hasSitePriv())) { $viewer_id = $this->viewer->getViewerID(); } $this->viewer_id = $viewer_id; $this->accountgroup_id = $accountgroup_id; // figure out the important fields for the dataManager $fieldsOfInterest = implode(',', $this->formFields); $this->dataManager = new RowManager_ViewerManager($viewer_id); $this->dataManager->setFieldsOfInterest($fieldsOfInterest); $this->formValues = $this->dataManager->getArrayOfValues(); // now clear form version of password $this->formValues['viewer_passWord'] = ''; // now initialize the labels for this page // start by loading the default field labels for this Module $languageID = $viewer->getLanguageID(); $seriesKey = moduleAccountAdmin::MULTILINGUAL_SERIES_KEY; $pageKey = moduleAccountAdmin::MULTILINGUAL_PAGE_FIELDS; $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey); // then load the page specific labels for this page $pageKey = FormProcessor_EditPassword::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); }
/** * 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 $fieldvalues_id [INTEGER] Value used to initialize the dataManager * @param $fields_id [INTEGER] The foreign key data for the data Manager * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $person_id = '', $staffscheduletype_id = '', $fieldvalues_id = '', $fields_id = '', $disableHeading = false, $showHidden = true, $staffschedule_id = '', $disableForm = false) { $this->disable_heading = $disableHeading; $this->disable_form = $disableForm; $this->show_hidden = $showHidden; // set to FALSE when in sign-up process // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... // store field values in field list; NOTE: probably don't need this now that we are generating custom labels... $fieldList = $this->getFieldList($person_id, $staffscheduletype_id); //FormProcessor_EditStaffScheduleForm::FORM_FIELDS; ; // $this->total_nonrepeatable_fields = count(explode(',', $fieldList)) - 1; // subtract 1 because of special hidden field // $footerFieldList = $this->getFooterFieldList($person_id, $staffscheduletype_id); // store field display types $fieldTypes = $this->getFormFieldTypes($person_id, $staffscheduletype_id); //FormProcessor_EditStaffScheduleForm::FORM_FIELD_TYPES; $footerFieldTypes = $this->getFooterFormFieldTypes($person_id, $staffscheduletype_id); $displayFields = $this->getDisplayFields($person_id, $staffscheduletype_id); //FormProcessor_EditStaffScheduleForm::DISPLAY_FIELDS; //parent::__construct( $formAction, $fieldList, $fieldDisplayTypes ); parent::__construct($formAction, $fieldList, $fieldTypes); //$viewer, $sortBy, $displayFields, $footerFieldList, $footerFieldTypes $this->pathModuleRoot = $pathModuleRoot; // $this->sortBy = $sortBy; $this->viewer = $viewer; $this->formFieldToValueIDmapper = array(); // mapping is setup later in getFieldValuesArray() $this->formFieldToFieldIDmapper = array(); // mapping is setup later in getFieldsArray() $this->formLabels = array(); $this->formLabels = $this->getFieldLabels($person_id, $staffscheduletype_id); $this->listLabels = $this->getListLabels($person_id, $staffscheduletype_id); $this->fieldvalues_id = $fieldvalues_id; $this->fields_id = $fields_id; $this->person_id = $person_id; $this->staffscheduletype_id = $staffscheduletype_id; $this->staffschedule_id = $staffschedule_id; // Get person and form type IDs from form instance ID, if applicable if ($this->staffschedule_id != '') { $formInstance = new RowManager_StaffScheduleManager($this->staffschedule_id); $this->person_id = $formInstance->getPersonID(); $this->staffscheduletype_id = $formInstance->getFormID(); // echo 'person_id = '.$this->person_id.' and form type id = '.$this->staffscheduletype_id; } // Get the real form name if ($this->staffscheduletype_id != '') { $formContext = new RowManager_StaffScheduleTypeManager($this->staffscheduletype_id); $this->form_name = $formContext->getFormName(); } else { $this->form_name = ''; } // echo "PersonID = ".$person_id; // echo "EventID = ".$event_id; // echo "Registration ID = ".$registration_id; // figure out the important fields for the dataManager // $fieldsOfInterest = implode(',', $this->formFields); $this->dataManager = new RowManager_FormFieldValueManager($fieldvalues_id); // $this->dataManager->setFieldsOfInterest( $fieldsOfInterest ); $mainFormValues = $this->getFieldValuesArray($this->person_id, $this->staffscheduletype_id); //$this->dataManager->getArrayOfValues(); // $footerFormValues = $this->getFooterFieldValuesArray( $person_id, $staffscheduletype_id); //$this->dataManager->getArrayOfValues(); $this->formValues = $mainFormValues; //array_merge($mainFormValues, $footerFormValues); // echo 'initial db form values = <pre>'.print_r($this->formValues,true).'</pre>'; // if the database contains no values then flag for new record creation (assumes not all values can be empty strings) if (count($this->formValues) == 0) { $this->isNewRecordCreator = true; // NEVER SET!! } else { $this->isNewRecordCreator = false; } // 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_EditStaffScheduleForm::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 $weeklyReport_id [INTEGER] Value used to initialize the dataManager * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $weeklyReport_id, $staff_id, $week_id = '', $campus_id = '') { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... $fieldList = FormProcessor_StaffAdditionalWeeklyStats::FORM_FIELDS; $fieldDisplayTypes = FormProcessor_StaffAdditionalWeeklyStats::FORM_FIELD_TYPES; parent::__construct($formAction, $fieldList, $fieldDisplayTypes); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->weeklyReport_id = $weeklyReport_id; $this->campus_id = $campus_id; $this->staff_id = $staff_id; if ($week_id != '') { // echo 'week_id is SET ['.$week_id.']<br/>'; $this->week_id = $week_id; } else { // 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_StaffAdditionalWeeklyReport.php"); } } // 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'); } } // figure out the important fields for the dataManager $fieldsOfInterest = implode(',', $this->formFields); $this->dataManager = new RowManager_WeeklyReportManager($this->week_id, $this->staff_id, $this->campus_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_StaffAdditionalWeeklyStats::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 $dafield_id [STRING] The init data for the dataManager obj * @param $daobj_id [STRING] The init data for the dataList obj * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $sortBy, $dafield_id, $daobj_id = "") { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... parent::__construct($formAction, FormProcessor_AddDAFields::FORM_FIELDS, FormProcessor_AddDAFields::FORM_FIELD_TYPES); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->formAction = $formAction; $this->sortBy = $sortBy; $this->linkValues = array(); $this->linkLabels = array(); $this->linkColumns = array(); $this->dafield_id = $dafield_id; $this->daobj_id = $daobj_id; $this->opType = ''; // see what operation type (if any) is requested... if (isset($_REQUEST['admOpType'])) { $this->opType = $_REQUEST['admOpType']; } $this->shouldDelete = false; // figure out the important fields for the dataManager $fieldsOfInterest = implode(',', $this->formFields); $this->dataManager = new RowManager_DAFieldManager($dafield_id); $this->dataManager->setFieldsOfInterest($fieldsOfInterest); $this->formValues = $this->dataManager->getArrayOfValues(); // NOTE: here we break apart the dafield_dbType info into it's 2 parts: // dbType & dbTypeModifier if (isset($this->formValues['dafield_dbType'])) { $parts = explode('(', $this->formValues['dafield_dbType']); $this->formValues['dbType'] = $parts[0]; switch ($parts[0]) { // NOTE: these cases have no modifier info associated with them case 'text': case 'date': case 'time': case 'datetime': case 'timestamp': $this->formValues['dbTypeModifier'] = ''; break; default: // NOTE: all others need to remove the ending ')' for their // modifier info if (isset($parts[1])) { $parts[1] = str_replace(')', '', $parts[1]); $this->formValues['dbTypeModifier'] = $parts[1]; } else { $this->formValues['dbTypeModifier'] = ''; } break; } } else { $this->formValues['dbType'] = ''; $this->formValues['dbTypeModifier'] = ''; } // end if set // now initialize the labels for this page // start by loading the default field labels for this Module $languageID = $viewer->getLanguageID(); $seriesKey = moduleRAD::MULTILINGUAL_SERIES_KEY; $pageKey = moduleRAD::MULTILINGUAL_PAGE_FIELDS; $this->labels = new XMLObject_MultilingualManager($languageID, $seriesKey, $pageKey); // load the site default form link labels $this->labels->loadPageLabels(SITE_LABEL_SERIES_SITE, SITE_LABEL_PAGE_FORM_LINKS); // then load the page specific labels for this page $pageKey = FormProcessor_AddDAFields::MULTILINGUAL_PAGE_KEY; $this->labels->loadPageLabels($seriesKey, $pageKey); }
/** * 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 $accesscategory_id [STRING] The init data for the dataManager obj * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $sortBy, $accesscategory_id) { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... parent::__construct($formAction, FormProcessor_AccessCategories::FORM_FIELDS, FormProcessor_AccessCategories::FORM_FIELD_TYPES); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->formAction = $formAction; $this->sortBy = $sortBy; $this->linkValues = array(); $this->linkLabels = array(); $this->linkColumns = array(); $this->accesscategory_id = $accesscategory_id; $this->opType = ''; // see what operation type (if any) is requested... if (isset($_REQUEST['admOpType'])) { $this->opType = $_REQUEST['admOpType']; } $this->shouldDelete = false; // figure out the important fields for the dataManager $fieldsOfInterest = implode(',', $this->formFields); $accessCategoryManager = new RowManager_AccessCategoryManager($accesscategory_id); $seriesKey = moduleAccountAdmin::MULTILINGUAL_SERIES_KEY; $pageKey = RowManager_AccessCategoryManager::XML_NODE_NAME; $this->bridgeMultiLingualManager = new MultilingualManager($viewer->getLanguageID(), $seriesKey, $pageKey); $this->dataManager = new RowLabelBridge($accessCategoryManager, $this->bridgeMultiLingualManager); $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 = moduleAccountAdmin::MULTILINGUAL_SERIES_KEY; $pageKey = moduleAccountAdmin::MULTILINGUAL_PAGE_FIELDS; $this->labels = new XMLObject_MultilingualManager($languageID, $seriesKey, $pageKey); // load the site default form link labels $this->labels->loadPageLabels(SITE_LABEL_SERIES_SITE, SITE_LABEL_PAGE_FORM_LINKS); // then load the page specific labels for this page $pageKey = FormProcessor_AccessCategories::MULTILINGUAL_PAGE_KEY; $this->labels->loadPageLabels($seriesKey, $pageKey); }
/** * 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 $sortBy [STRING] Field data to sort listManager by. * @param $managerInit [INTEGER] Initialization value for the listManager. * @return [void] */ function __construct($pathModuleRoot, $viewer, $sortBy, $reg_id, $cctrans_id = '', $personID = '') { // parent::__construct( page_DisplayCCtransactionReceipt::DISPLAY_FIELDS ); $formAction = ''; $fieldList = page_DisplayCCtransactionReceipt::FORM_FIELDS; $fieldTypes = page_DisplayCCtransactionReceipt::FORM_FIELD_TYPES; $displayFields = page_DisplayCCtransactionReceipt::DISPLAY_FIELDS; parent::__construct($viewer, $formAction, $sortBy, $fieldList, $fieldTypes, $displayFields); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->sortBy = $sortBy; $this->reg_id = $reg_id; // echo "REG_ID =".$reg_id; if (isset($_POST['cctransaction_id'])) { $this->cctrans_id = $_POST['cctransaction_id']; } else { $this->cctrans_id = $cctrans_id; } // echo "CCTRANSID = <pre>".$this->cctrans_id."</pre>"; // just let these be empty if they are passed as empty $this->person_id = $personID; $registration = new RowManager_RegistrationManager(); // $registration->setSortOrder( $sortBy ); $registration->setRegID($this->reg_id); $person = new RowManager_PersonManager(); $campus = new RowManager_CampusManager(); $assign = new RowManager_AssignmentsManager(); $campusStatus = new RowManager_CampusAssignmentStatusManager(); $status = new RowManager_StatusManager(); // join 2 tables together: cim_reg_registration & cim_hrdb_person $this->statusManager = new MultiTableManager(); $this->statusManager->addRowManager($registration); $this->statusManager->addRowManager($person, new JoinPair($person->getJoinOnPersonID(), $registration->getJoinOnPersonID())); $this->statusManager->addRowManager($assign, new JoinPair($person->getJoinOnPersonID(), $assign->getJoinOnPersonID())); $this->statusManager->addRowManager($campus, new JoinPair($campus->getJoinOnCampusID(), $assign->getJoinOnCampusID())); $this->statusManager->addRowManager($campusStatus, new JoinPair($assign->getJoinOnStatusID(), $campusStatus->getJoinOnStatusID())); $this->statusManager->addRowManager($status, new JoinPair($registration->getJoinOnStatus(), $status->getJoinOnStatusID())); // $multiTableManager2->setLabelTemplate('viewer_userID', '[viewer_userID]'); // $this->listManager = $regPerson->getListIterator(); // $regsArray = $this->listManager->getDataList(); // echo "<pre>".print_r($this->listManager,true)."</pre>"; // echo "<pre>".print_r($regsArray,true)."</pre>"; $this->ccTransManager = new MultiTableManager(); $ccTrans = new RowManager_CreditCardTransactionManager(); $ccTrans->setCCtransID($this->cctrans_id); // $ccTrans->setSortOrder( $sortBy ); $ccType = new RowManager_CreditCardTypeManager(); $this->ccTransManager->addRowManager($ccTrans); $this->ccTransManager->addRowManager($ccType, new JoinPair($ccType->getJoinOnTypeID(), $ccTrans->getJoinOnTypeID())); $this->receiptManager = new RowManager_ReceiptManager(); $this->receiptManager->setCCtransID($this->cctrans_id); // 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 = page_DisplayCCtransactionReceipt::MULTILINGUAL_PAGE_KEY; $this->labels->loadPageLabels($pageKey); $this->labels->setSeriesKey(SITE_LABEL_SERIES_SITE); $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORM_LINKS); }
/** * 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 $sortBy [STRING] Field data to sort listManager by. * @param $reg_id [INTEGER] The ID of the registration whose details to show * @param $formAction [STRING] the form action to take * @param &$controller [OBJECT] *Reference* to controller object used to init. page construction (REMOVED) * @return [void] */ function __construct($pathModuleRoot, $viewer, $sortBy, $reg_id, $event_id, $campus_id, $scholarship_id = '', $cashtrans_id = '', $cctrans_id = '', $formAction, $scholarship_formAction, $cashTrans_formAction, $ccTrans_formAction, $fieldValues_formAction, $personID = '', $fieldvaluesID = '', $fieldsID = '') { $fieldList = page_EditRegistrationDetails::FORM_FIELDS; $fieldTypes = page_EditRegistrationDetails::FORM_FIELD_TYPES; $displayFields = page_EditRegistrationDetails::DISPLAY_FIELDS; parent::__construct($formAction, $fieldList, $displayFields); // parent::__construct($viewer, $formAction, $sortBy, $fieldList, $fieldTypes, $displayFields ); // parent::__construct( page_EditRegistrationDetails::DISPLAY_FIELDS ); // $this->_controller = $controller; // store reference to app. controller for later use $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->sortBy = $sortBy; $this->formAction = $formAction; $this->scholarship_formAction = $scholarship_formAction; $this->cashTrans_formAction = $cashTrans_formAction; $this->ccTrans_formAction = $ccTrans_formAction; $this->fieldValues_formAction = $fieldValues_formAction; $this->event_id = $event_id; $this->campus_id = $campus_id; $this->reg_id = $reg_id; if ($scholarship_id != '') { $this->scholarship_id = $scholarship_id; } if ($cashtrans_id != '') { $this->cashtrans_id = $cashtrans_id; } if ($cctrans_id != '') { $this->cctrans_id = $cctrans_id; } // just let these be empty if they are passed as empty $this->person_id = $personID; $this->fieldvalues_id = $fieldvaluesID; $this->fields_id = $fieldsID; // $dataAccessObject = new RowManager_RegistrationManager(); // $dataAccessObject->setSortOrder( $sortBy ); // $this->listManager = new RegistrationList( $sortBy ); // $this->listManager = $dataAccessObject->getListIterator(); $registration = new RowManager_RegistrationManager(); // $registration->setSortOrder( $sortBy ); $registration->setRegID($this->reg_id); $person = new RowManager_PersonManager(); // join 2 tables together: cim_reg_registration & cim_hrdb_person $regPerson = new MultiTableManager(); $regPerson->addRowManager($person); $regPerson->addRowManager($registration, new JoinPair($person->getJoinOnPersonID(), $registration->getJoinOnPersonID())); // $campusRegs->setPrimaryKeyField( 'registration_id' ); // $multiTableManager2->setLabelTemplate('viewer_userID', '[viewer_userID]'); $this->listManager = $regPerson->getListIterator(); $regsArray = $this->listManager->getDataList(); // echo "<pre>".print_r($this->listManager,true)."</pre>"; // echo "<pre>".print_r($regsArray,true)."</pre>"; // create references to sub-page objects $this->scholarship_subPage = new FormProcessor_EditRegistrationScholarshipList($this->pathModuleRoot, $this->viewer, $this->scholarship_formAction, $this->sortBy, $this->scholarship_id, $this->reg_id); $this->cashTrans_subPage = new FormProcessor_EditRegistrationCashTransactionsList($this->pathModuleRoot, $this->viewer, $this->cashTrans_formAction, $this->sortBy, $this->cashtrans_id, $this->reg_id); $this->ccTrans_subPage = new FormProcessor_EditRegistrationCCTransactionsList($this->pathModuleRoot, $this->viewer, $this->ccTrans_formAction, $this->sortBy, $this->cctrans_id, $this->reg_id); $this->fieldValues_subPage = new FormProcessor_EditFieldValues($this->pathModuleRoot, $this->viewer, $this->ccTrans_formAction, $this->person_id, $this->event_id, $this->fieldvalues_id, $this->fields_id, $this->reg_id, true); // 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 = page_EditRegistrationDetails::MULTILINGUAL_PAGE_KEY; $this->labels->loadPageLabels($pageKey); $this->labels->setSeriesKey(SITE_LABEL_SERIES_SITE); $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORM_LINKS); }
/** * function __construct * <pre> * Initialize the object. * </pre> * @param $pathModuleRoot [STRING] The path to the module's root dir. * @param $viewer [OBJECT] The viewer object. * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $basicFormAction, $activityFormAction, $sortBy, $person_id, $staffscheduletype_id, $staffschedule_id = '', $fieldvalues_id = '', $fields_id = '', $activity_id = '', $showHidden = true) { $fieldList = FormProcessor_EditStaffScheduleForm::FORM_FIELDS; $fieldTypes = FormProcessor_EditStaffScheduleForm::FORM_FIELD_TYPES; $displayFields = FormProcessor_EditStaffScheduleForm::DISPLAY_FIELDS; parent::__construct($formAction, $fieldList, $displayFields); // initialize the object values $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->sortBy = $sortBy; $this->formAction = $formAction; $this->basic_formAction = $basicFormAction; $this->activity_formAction = $activityFormAction; // $this->has_activity_form = $hasActivityForm; $this->form_id = $staffscheduletype_id; $this->personal_form_id = $staffschedule_id; $this->field_id = $fields_id; if ($fieldvalues_id != '') { $this->fieldvalues_id = $fieldvalues_id; } if ($activity_id != '') { $this->staffactivity_id = $activity_id; } // just let these be empty if they are passed as empty $this->person_id = $person_id; $this->has_activity_form = true; // set default, could be changed if form info exists $this->has_activity_contact_nums = false; // set default, could be changed if form info exists $this->activity_types_filter = array(); $this->show_hidden_fields = $showHidden; $this->form_submitted = false; // // Get the real form name // $this->hrdbFormTitle = ''; // if ($this->form_id != '') // { // $formContext = new RowManager_StaffScheduleTypeManager($this->form_id); // // } // Get form type context information $formType = new RowManager_StaffScheduleTypeManager($this->form_id); $this->hrdbFormTitle = $formType->getFormName(); $formTypeList = $formType->getListIterator(); $formTypeArray = $formTypeList->getDataList(); if (count($formTypeArray) > 0) { $row = current($formTypeArray); // pick first record for grabbing form context data // Determine if form should have associated activities $has_activities = $row['staffscheduletype_has_activities']; if ($has_activities == '0') { $this->has_activity_form = false; } // Determine if form activities require contact phone #s $has_activity_phone_nums = $row['staffscheduletype_has_activity_phone']; if ($has_activity_phone_nums == '1') { $this->has_activity_contact_nums = true; } // Determine if activities form must be filtered by 1 or more activity types $filters_result = $row['staffscheduletype_activity_types']; if ($filters_result != '') { $this->activity_types_filter = explode(',', $filters_result); } } // Ensure that a form instance is created for the staff person $scheduleFormManager = new RowManager_StaffScheduleManager(); $scheduleFormManager->setPersonID($this->person_id); $scheduleFormManager->setFormID($this->form_id); $formList = $scheduleFormManager->getListIterator(); $formArray = $formList->getDataList(); $this->is_form_approved = false; if (count($formArray) > 0) { $row = current($formArray); // pick first record for grabbing approval data $approved = $row['staffschedule_approved']; if ($approved == '1') { $this->is_form_approved = true; } $this->approval_notes = $row['staffschedule_approvalnotes']; } // create references to sub-page objects $disableHeading = true; $this->basic_form = new FormProcessor_EditBasicStaffForm($this->pathModuleRoot, $this->viewer, $this->basic_formAction, $this->person_id, $this->form_id, $this->fieldvalues_id, $this->field_id, $disableHeading, $this->show_hidden_fields); // $this->sortBy, if ($this->has_activity_form == true) { $incContactNums = $this->has_activity_contact_nums; // $incContactNums = false; // $onlyShowVacationType = false; // // /** HACK: to be replaced with a more generic approach tied in with Edit Form Fields **/ // if ($this->form_id == '1') // summer schedule form requires contact # for each activity // { // $incContactNums = true; // } // else if ($this->form_id == '2') // { // $onlyShowVacationType = true; // } $this->optional_sheduled_activity_form = new FormProcessor_EditStaffActivity($this->pathModuleRoot, $this->viewer, $this->activity_formAction, $this->sortBy, $this->staffactivity_id, $this->person_id, $this->form_id, $this->personal_form_id, '', true, $incContactNums, $this->activity_types_filter); //, $activitytype_id='' $this->optional_sheduled_activity_form->setFormName('scheduledActivityForm'); } // 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 = FormProcessor_EditStaffScheduleForm::MULTILINGUAL_PAGE_KEY; $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey); }
/** * function __construct * <pre> * Initialize the object. * </pre> * @param $pathModuleRoot [STRING] The path to this module's root directory * @param $formAction [STRING] The action on a form submit * @return [void] */ function __construct($pathModuleRoot, $formAction, $event_id) { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... $this->event_id = $event_id; $this->campus_id = 69; // 'Unknown' campus $this->person_id = -1; // person ID is set later $this->confirmNum = 0; $this->formIsProcessed = false; // $this->setRegistrationID(); // get registration ID for the rest of the process // $formAction .= '&'.moduleaia_reg::REG_ID.'='.$this->registration_id; // pass on new person_id to GET parameters // $formAction = str_replace( moduleaia_reg::PERSON_ID.'=-1', moduleaia_reg::PERSON_ID.'='.$this->person_id, $formAction); $fieldList = FormProcessor_Register::FORM_FIELDS; $fieldDisplayTypes = FormProcessor_Register::FORM_FIELD_TYPES; parent::__construct($formAction, $fieldList, $fieldDisplayTypes); $this->pathModuleRoot = $pathModuleRoot; $this->creditProcessor = new CreditCardProcessor(); // // figure out the important fields for the dataManager // // $fieldsOfInterest = implode(',', $this->formFields); // $this->dataManager = new RowManager_PersonManager(); // // $this->dataManager->setFieldsOfInterest( $fieldsOfInterest ); // $this->formValues = $this->dataManager->getArrayOfValues(); // //echo "form values:<br><pre>".print_r($this->formValues,true)."</pre>"; $this->regManager = new RowManager_RegistrationManager(); // $this->regManager ->setRegID($this->registration_id); // $this->eventManager = new RowManager_EventManager(); // $this->eventManager->setEventID($this->event_id); $this->ticketManager = new RowManager_TicketsManager(); // $this->ticketManager->setRegID($this->registration_id); // $this->regManager = new MultiTableManager(); // $this->regManager->addRowManager($regs); // $this->regManager->addRowManager($events, new JoinPair($regs->getJoinOnEventID(), $events->getJoinOnEventID())); // $this->regManager->addRowManager($tickets, new JoinPair($regs->getJoinOnRegID(), $tickets->getJoinOnRegID())); $this->ccTransManager = new RowManager_CreditCardTransactionManager(); // $this->ccTransManager->setRegID($this->registration_id); // now initialize the labels for this page // start by loading the default field labels for this Module $languageID = FormProcessor_Register::ENGLISH; $seriesKey = moduleaia_reg::MULTILINGUAL_SERIES_KEY; $pageKey = moduleaia_reg::MULTILINGUAL_PAGE_FIELDS; $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey); // then load the page specific labels for this page $pageKey = FormProcessor_Register::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 * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $person_id = '', $statvalues_id = '', $stat_id = '', $freq_id = '', $meastype_id = '', $scope_ref_list = '', $disableHeading = false, $showHidden = true) { $this->disable_heading = $disableHeading; $this->show_hidden = $showHidden; // set to FALSE when in sign-up process $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->statvalues_id = $statvalues_id; $this->stat_id = $stat_id; $this->freq_id = $freq_id; $this->meastype_id = $meastype_id; $this->scope_ref_list = $scope_ref_list; if ($person_id != '') { $this->person_id = $person_id; } else { $this->person_id = $this->getPersonIDfromViewerID(); } // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... // store field values in field list; NOTE: probably don't need this now that we are generating custom labels... $fieldList = $this->getFieldList($scope_ref_list, $freq_id, $meastype_id); //FormProcessor_EditFieldValues::FORM_FIELDS; // store field display types $fieldDisplayTypes = $this->getFormFieldTypes($scope_ref_list, $freq_id, $meastype_id); //FormProcessor_EditFieldValues::FORM_FIELD_TYPES; parent::__construct($formAction, $fieldList, $fieldDisplayTypes); $this->formFieldToValueIDmapper = array(); // mapping is setup later in getFieldValuesArray() $this->formFieldToStatIDmapper = array(); // mapping is setup later in getFieldsArray() $this->formLabels = array(); $this->formLabels = $this->getFieldLabels($scope_ref_list, $freq_id, $meastype_id); $_POST['meas_id'] = $this->meastype_id; $_POST['freq_id'] = $this->freq_id; if (isset($scope_ref_list) && count($scope_ref_list) > 0) { // $_POST['scope_ref_list'] = $scope_ref_list; $_POST['ministry_id'] = $scope_ref_list[modulep2c_stats::SCOPE_REF_MINISTRY]; $_POST['division_id'] = $scope_ref_list[modulep2c_stats::SCOPE_REF_DIVISION]; $_POST['region_id'] = $scope_ref_list[modulep2c_stats::SCOPE_REF_REGION]; $_POST['location_id'] = $scope_ref_list[modulep2c_stats::SCOPE_REF_LOCATION]; } // $this->formValues['meas_id'] = $meastype_id; // $this->formValues['freq_id'] = $freq_id; // echo "POST array: <pre>".print_r($_POST,true)."</pre>"; // figure out the important fields for the dataManager // $fieldsOfInterest = implode(',', $this->formFields); $this->dataManager = new RowManager_StatValueManager($statvalues_id); // $this->dataManager->setFieldsOfInterest( $fieldsOfInterest ); /** NOTE ** this page is for input and not editing, plus no particular freq-value is yet specified so any values would be inaccurate **/ /** values would be inaccurate because only the first ever <freq> stat value would be shown, not for all the other <freq>s (i.e. week) **/ // $this->formValues = $this->getFieldValuesArray( $scope_ref_list,$freq_id,$meastype_id); //$this->dataManager->getArrayOfValues(); // if the database contains no values then flag for new record creation (assumes not all values can be empty strings) // if (count($this->formValues) == 0) // { // $this->isNewRecordCreator = true; // } // else // { // $this->isNewRecordCreator = false; // } // echo "form values:<br><pre>".print_r($this->formValues,true)."</pre>"; // echo "field to value id array: <pre>".print_r($this->formFieldToValueIDmapper,true)."</pre>"; // echo "field to stat id array: <pre>".print_r($this->formFieldToStatIDmapper,true)."</pre>"; // 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_StatsInput::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 $person_id [INTEGER] Value used to initialize the dataManager * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $person_id, $ministry_id = '', $division_id = '', $region_id = '') { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... $this->person_id = $person_id; $this->ministry_id = $ministry_id; $this->division_id = $division_id; $this->region_id = $region_id; $this->viewer = $viewer; // if ((!isset($person_id))||($person_id == '')) // { // $this->person_id = $this->getPersonIDfromViewerID(); // $formAction .= '&'.modulep2c_stats::PERSON_ID.'='.$this->person_id; // } // echo ' min/div = '.$ministry_id.', '.$division_id; /** Setup droplist values using identifiers received via jumplists **/ $this->division_manager = new RowManager_DivisionManager(); $this->region_manager = new RowManager_StatsRegionManager(); $this->location_manager = new RowManager_LocationManager(); if ($ministry_id != '') { // echo "MINISTRY"; $this->division_manager->setMinistryID($ministry_id); if ($division_id != '') { // echo "DIVISION"; $this->region_manager->setMinistryID($ministry_id); $this->region_manager->setDivisionID($division_id); if ($region_id != '') { $this->location_manager->setMinistryID($ministry_id); $this->location_manager->setDivisionID($division_id); $this->location_manager->setRegionID($region_id); } } } // else // { // $this->ministry_id = '1'; // $this->division_manager->setMinistryID($this->ministry_id); // } $fieldList = FormProcessor_StatsInputFilter::FORM_FIELDS; $fieldDisplayTypes = FormProcessor_StatsInputFilter::FORM_FIELD_TYPES; parent::__construct($formAction, $fieldList, $fieldDisplayTypes); $this->pathModuleRoot = $pathModuleRoot; $this->dataManager = new RowManager_StatisticManager(); // $person_manager = new RowManager_PersonManager( $this->person_id ); // $ministry_manager = new RowManager_MinistryManager( $this->person_id ); // $this->dataManager->setFieldsOfInterest( $fieldsOfInterest ); $this->formValues = $this->dataManager->getArrayOfValues(); //echo "form values:<br><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 = 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_StatsInputFilter::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 $event_id [INTEGER] Value used to initialize the dataManager * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $event_id, $campus_id = '', $to_email_opt = '', $base_opt_value = '') { // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... // $this->person_id = $person_id; $this->event_id = $event_id; $this->campus_id = $campus_id; if ($to_email_opt == '') { $this->to_email_choice = FormProcessor_EmailComposer::DEFAULT_RECIPIENTS; } else { $this->to_email_choice = $to_email_opt; } $this->base_opt_value = $base_opt_value; $this->viewer = $viewer; // if ((!isset($person_id))||($person_id == '')) // { // $this->person_id = $this->getPersonIDfromViewerID(); // $formAction .= '&'.modulecim_reg::PERSON_ID.'='.$this->person_id; // } // if (($isInRegProcess == true)&&($registration_id == '')) // { // $this->setRegistrationID(); // get registration ID for the rest of the process // $formAction .= '&'.modulecim_reg::REG_ID.'='.$this->registration_id; // // also note that person_id is set above if it is also not set yet // if ($person_id == -1) // { // // pass on new person_id to GET parameters // $formAction = str_replace( modulecim_reg::PERSON_ID.'=-1', modulecim_reg::PERSON_ID.'='.$this->person_id, $formAction); // } // // } $fieldList = FormProcessor_EmailComposer::FORM_FIELDS; $fieldDisplayTypes = FormProcessor_EmailComposer::FORM_FIELD_TYPES; parent::__construct($formAction, $fieldList, $fieldDisplayTypes); $this->pathModuleRoot = $pathModuleRoot; // if ($this->pageType == FormProcessor_EmailComposer::CAMPUS_EMAIL) if ($this->campus_id != '') { $this->TO_ADDRESS_OPTIONS = array('0' => 'All Campus Registrants', '1' => 'Campus Registrants - Completed', '2' => 'Campus Registrants - Incomplete', '3' => 'Campus Registrants - Cancelled', '4' => 'Campus Registrants - Males', '5' => 'Campus Registrants - Females', '6' => 'Custom List of Campus Registrants...'); //, '6'=>'All Campus Club Students' } else { $this->TO_ADDRESS_OPTIONS = array('0' => 'All Event Registrants', '1' => 'Event Registrants - Completed', '2' => 'Event Registrants - Incomplete', '3' => 'Event Registrants - Cancelled', '4' => 'Event Registrants - Males', '5' => 'Event Registrants - Females', '6' => 'Custom List of Event Registrants...'); } // To make sure this is not exploited to edit any other person's id. // If the user has no privileges, this sets the viewer id to be his/her own, // even if the variable given to it is not the viewer's person id. // NOTE: anyone with higher previliges can edit any person's info, by simply // changing the posted variable value. // NOTE: this code was causing problems in app_cim_reg module // Now load the access Priviledge manager of this viewer // $this->accessPrivManager = new RowManager_AdminManager( ); // // Get the person ID // $accessManager = new RowManager_AccessManager( ); // $accessManager->loadByViewerID( $this->viewer->getViewerID( ) ); // $personID = $accessManager->getPersonID(); // // Get the permissions the person has. // $this->accessPrivManager->loadByPersonID( $personID ); // if ( !$this->accessPrivManager->isLoaded() ) { // $this->person_id=$personID; // / } //End of check. // figure out the important fields for the dataManager // $fieldsOfInterest = implode(',', $this->formFields); $this->dataManager = new MultiTableManager(); $persons = new RowManager_PersonManager(); //$this->person_id $registrations = new RowManager_RegistrationManager(); $registrations->setEventID($this->event_id); $this->dataManager->addRowManager($persons); $this->dataManager->addRowManager($registrations, new JoinPair($persons->getJoinOnPersonID(), $registrations->getJoinOnPersonID())); if ($this->campus_id != '') { $assignments = new RowManager_AssignmentsManager(); $assignments->setCampusID($this->campus_id); $this->dataManager->addRowManager($assignments, new JoinPair($assignments->getJoinOnPersonID(), $persons->getJoinOnPersonID())); } $this->dataManager->setSortOrder('person_lname,person_fname'); // $this->dataManager->setFieldsOfInterest( $fieldsOfInterest ); $this->formValues = $this->dataManager->getArrayOfValues(); // echo "form values:<br><pre>".print_r($this->formValues,true)."</pre>"; // $eventInfo = new RowManager_EventManager($this->event_id); // $event_email = $eventInfo->getEventEmail(); // echo $event_email; $this->formValues['from_email'] = $this->getPersonEmailfromViewerID(); $this->formValues['to_email'] = $this->base_opt_value . $this->to_email_choice; // set jumplist SELECTED value // $this->formValues['email_subject'] = $campus_name.' - '.$event_name.' Notice'; // 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_EmailComposer::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 $fieldvalues_id [INTEGER] Value used to initialize the dataManager * @param $fields_id [INTEGER] The foreign key data for the data Manager * @param $registration_id [INTEGER] The foreign key data for the data Manager * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $person_id = '', $event_id = '', $fieldvalues_id = '', $fields_id = '', $registration_id = '', $disableHeading = false, $showHidden = true) { $this->disable_heading = $disableHeading; $this->show_hidden = $showHidden; // set to FALSE when in sign-up process // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... // store field values in field list; NOTE: probably don't need this now that we are generating custom labels... $fieldList = $this->getFieldList($registration_id, $person_id, $event_id); //FormProcessor_EditFieldValues::FORM_FIELDS; // store field display types $fieldDisplayTypes = $this->getFormFieldTypes($registration_id, $person_id, $event_id); //FormProcessor_EditFieldValues::FORM_FIELD_TYPES; parent::__construct($formAction, $fieldList, $fieldDisplayTypes); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->formFieldToValueIDmapper = array(); // mapping is setup later in getFieldValuesArray() $this->formFieldToFieldIDmapper = array(); // mapping is setup later in getFieldsArray() $this->formLabels = array(); $this->formLabels = $this->getFieldLabels($registration_id, $person_id, $event_id); $this->fieldvalues_id = $fieldvalues_id; $this->fields_id = $fields_id; $this->registration_id = $registration_id; $this->person_id = $person_id; $this->event_id = $event_id; // echo "PersonID = ".$person_id; // echo "EventID = ".$event_id; // echo "Registration ID = ".$registration_id; // figure out the important fields for the dataManager // $fieldsOfInterest = implode(',', $this->formFields); $this->dataManager = new RowManager_FieldValueManager($fieldvalues_id); // $this->dataManager->setFieldsOfInterest( $fieldsOfInterest ); $this->formValues = $this->getFieldValuesArray($registration_id, $person_id, $event_id); //$this->dataManager->getArrayOfValues(); // if the database contains no values then flag for new record creation (assumes not all values can be empty strings) if (count($this->formValues) == 0) { $this->isNewRecordCreator = true; } else { $this->isNewRecordCreator = false; } // echo "form values:<br><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_EditFieldValues::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 * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $person_id = '', $statvalues_id = '', $stat_id = '', $freq_id = '', $meastype_id = '', $scope_ref_list = '', $disableHeading = false, $showHidden = true) { $this->disable_heading = $disableHeading; $this->show_hidden = $showHidden; // set to FALSE when in sign-up process $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->statvalues_id = $statvalues_id; $this->stat_id = $stat_id; $this->freq_id = $freq_id; $this->meastype_id = $meastype_id; $this->scope_ref_list = $scope_ref_list; // if ($person_id != '') // { $this->person_id = $person_id; // } // else // { // $this->person_id = $this->getPersonIDfromViewerID(); // } // NOTE: be sure to call the parent constructor before trying to // use the ->formXXX arrays... // // store field values in field list; NOTE: probably don't need this now that we are generating custom labels... // $fieldList = $this->getFieldList($scope_ref_list,$freq_id,$meastype_id); //FormProcessor_EditFieldValues::FORM_FIELDS; // // // store field display types // $fieldDisplayTypes = $this->getFormFieldTypes($scope_ref_list,$freq_id,$meastype_id); //FormProcessor_EditFieldValues::FORM_FIELD_TYPES; // $fieldList = FormProcessor_StatsReportSelection::FORM_FIELDS; $fieldDisplayTypes = FormProcessor_StatsReportSelection::FORM_FIELD_TYPES; parent::__construct($formAction, $fieldList, $fieldDisplayTypes); // // $_POST['meas_id'] = $this->meastype_id; // $_POST['freq_id'] = $this->freq_id; // if (isset($scope_ref_list)&&(count($scope_ref_list) > 0)) // { // // $_POST['scope_ref_list'] = $scope_ref_list; // $_POST['ministry_id'] = $scope_ref_list[modulep2c_stats::SCOPE_REF_MINISTRY]; // $_POST['division_id'] = $scope_ref_list[modulep2c_stats::SCOPE_REF_DIVISION]; // $_POST['region_id'] = $scope_ref_list[modulep2c_stats::SCOPE_REF_REGION]; // $_POST['location_id'] = $scope_ref_list[modulep2c_stats::SCOPE_REF_LOCATION]; // } // echo "POST array: <pre>".print_r($_POST,true)."</pre>"; // Fill the primary data-manager with the statistics to be displayed in combo list $this->dataManager = new RowManager_StatisticManager(); $this->dataManager->setFreqID($this->freq_id); $this->dataManager->setMeasureTypeID($this->meastype_id); // find all statistics whose scope has been specified by previous filter step $scope_ref_list = $this->scope_ref_list; $scopeFilter = ''; reset($scope_ref_list); foreach (array_keys($scope_ref_list) as $key) { // TODO?: use is_numeric() on $scope_ref_list elements to determine that proper value exists $scopeFilter .= '(scope_id = ' . $key . ' and scope_ref_id = ' . current($scope_ref_list) . ') OR '; next($scope_ref_list); } $scopeFilter = substr($scopeFilter, 0, -4); // remove ' OR ' from the end of the string $this->dataManager->addSearchCondition($scopeFilter); // Fill 'freqValueManager' with freq. values needed to specify date/time-range for report $this->freqValueManager = new RowManager_FreqValueManager(); $this->freqValueManager->setFreqID($this->freq_id); $this->freqValueManager2 = new RowManager_FreqValueManager(); $this->freqValueManager2->setFreqID($this->freq_id); $this->freqValueManager2->addFieldNameAlias('freqvalue_id', 'freqvalue_id_2'); $values = $this->freqValueManager2->getListIterator()->getDataList(); // echo "form values:<br><pre>".print_r($values,true)."</pre>"; // Fill 'filterManager' with filters available for report (i.e. SUM, AVG, etc) $this->filterManager = new RowManager_ReportFilterManager(); // $this->dataManager->setFieldsOfInterest( $fieldsOfInterest ); // $this->formValues = $this->dataManager->getArrayOfValues(); //echo "form values:<br><pre>".print_r($this->formValues,true)."</pre>"; // $this->formLabels = array(); // $this->formLabels['formLabel_statistic_id'] = // $this->formLabels = $this->getFieldLabels($scope_ref_list,$freq_id,$meastype_id); $freqManager = new RowManager_FreqTypeManager($this->freq_id); $freqList = $freqManager->getListIterator(); $freqArray = $freqList->getDataList(); $freqRecord = current($freqArray); $freqStatDesc = $freqRecord['freq_desc']; $freqName = $freqRecord['freq_name']; $this->fieldLabels['statistic_id'] = 'Choose 1 or More ' . $freqStatDesc . ' Statistics:'; $this->fieldLabels['freqvalue_id'] = 'Starting ' . $freqName . ':'; $this->fieldLabels['freqvalue_id_2'] = 'Ending ' . $freqName . ':'; $this->fieldLabels['filter_id'] = 'Additional Calculations:'; // 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_StatsReportSelection::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 the module's root dir. * @param $viewer [OBJECT] The viewer object. * @return [void] */ function __construct($pathModuleRoot, $viewer, $formAction, $basicFormAction, $activityFormAction, $sortBy, $person_id, $staffscheduletype_id, $staffschedule_id = '', $fieldvalues_id = '', $fields_id = '', $activity_id = '', $showHidden = true) { $fieldList = FormProcessor_ApproveStaffSchedule::FORM_FIELDS; $fieldTypes = FormProcessor_ApproveStaffSchedule::FORM_FIELD_TYPES; $displayFields = FormProcessor_ApproveStaffSchedule::DISPLAY_FIELDS; parent::__construct($formAction, $fieldList, $displayFields); // initialize the object values $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; $this->sortBy = $sortBy; $this->formAction = $formAction; $this->basic_formAction = $basicFormAction; $this->activity_formAction = $activityFormAction; // $this->has_activity_form = $hasActivityForm; $this->form_id = $staffscheduletype_id; $this->personal_form_id = $staffschedule_id; $this->field_id = $fields_id; if ($fieldvalues_id != '') { $this->fieldvalues_id = $fieldvalues_id; } if ($activity_id != '') { $this->staffactivity_id = $activity_id; } // just let these be empty if they are passed as empty $this->person_id = $person_id; $this->has_activity_form = true; // set default, could be changed if form info exists $this->has_activity_contact_nums = false; // set default, could be changed if form info exists $this->activity_types_filter = array(); $this->show_hidden_fields = $showHidden; $this->form_submitted = false; // Get form type context information $formType = new RowManager_StaffScheduleTypeManager($this->form_id); $formTypeList = $formType->getListIterator(); $formTypeArray = $formTypeList->getDataList(); if (count($formTypeArray) > 0) { $row = current($formTypeArray); // pick first record for grabbing form context data // Determine if form should have associated activities $has_activities = $row['staffscheduletype_has_activities']; if ($has_activities == '0') { $this->has_activity_form = false; } // Determine if form activities require contact phone #s $has_activity_phone_nums = $row['staffscheduletype_has_activity_phone']; if ($has_activity_phone_nums == '1') { $this->has_activity_contact_nums = true; } // Determine if activities form must be filtered by 1 or more activity types $filters_result = $row['staffscheduletype_activity_types']; if ($filters_result != '') { $this->activity_types_filter = explode(',', $filters_result); } } // 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->staffscheduletype_id = $formInstance->getFormID(); // echo 'person_id = '.$this->person_id.' and form type id = '.$this->staffscheduletype_id; } // Setup data-manager tied to staff schedule table (i.e. for approval) $form_instance = new RowManager_StaffScheduleManager($staffschedule_id); // $registration->setSortOrder( $sortBy ); $form_instance->setFormID($this->form_id); $form_instance->setPersonID($this->person_id); // $multiTableManager2->setLabelTemplate('viewer_userID', '[viewer_userID]'); $this->listManager = $form_instance->getListIterator(); // $formInstanceArray = $this->listManager->getDataList(); // echo "<pre>".print_r($this->listManager,true)."</pre>"; // echo "<pre>".print_r($formInstanceArray,true)."</pre>"; // create references to sub-page objects $disableHeading = true; $disableForm = true; $this->basic_form = new FormProcessor_EditBasicStaffForm($this->pathModuleRoot, $this->viewer, $this->basic_formAction, $this->person_id, $this->form_id, $this->fieldvalues_id, $this->field_id, $disableHeading, $this->show_hidden_fields, $this->personal_form_id, $disableForm); // $this->sortBy, if ($this->has_activity_form == true) { $incContactNums = $this->has_activity_contact_nums; $this->optional_sheduled_activity_form = new FormProcessor_EditStaffActivity($this->pathModuleRoot, $this->viewer, $this->activity_formAction, $this->sortBy, $this->staffactivity_id, $this->person_id, $this->form_id, $this->personal_form_id, '', true, $incContactNums, $this->activity_types_filter, $disableForm); //, $activitytype_id='' } // Ensure that a form instance is created for the staff person $scheduleFormManager = new RowManager_StaffScheduleManager(); $scheduleFormManager->setPersonID($this->person_id); $scheduleFormManager->setFormID($this->form_id); $formList = $scheduleFormManager->getListIterator(); $formArray = $formList->getDataList(); $this->is_form_approved = false; if (count($formArray) > 0) { $row = current($formArray); // pick first record for grabbing approval data $approved = $row['staffschedule_approved']; if ($approved == '1') { $this->is_form_approved = true; } } // 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 = FormProcessor_ApproveStaffSchedule::MULTILINGUAL_PAGE_KEY; $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey); }