/**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Make a new Template object
     $path = SITE_PATH_TEMPLATES;
     // Replace $path with the following line if you want to create a
     // template tailored for this page:
     //$path = $this->pathModuleRoot.'templates/';
     // store the link values
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     // store the link labels
     $this->linkLabels['add'] = $this->labels->getLabel('[Add]');
     $this->linkLabels['edit'] = $this->labels->getLabel('[Edit]');
     $this->linkLabels['del'] = $this->labels->getLabel('[Delete]');
     $this->linkLabels['cont'] = $this->labels->getLabel('[Continue]');
     // $this->linkLabels[ 'view' ] = 'new link label here';
     // store any additional link Columns
     $title = $this->labels->getLabel('[Access]');
     $columnLabel = $this->labels->getLabel('[View]');
     $link = $this->linkValues['view'];
     $fieldName = 'staffschedule_id';
     $this->addLinkColumn($title, $columnLabel, $link, $fieldName);
     // store the page labels
     // NOTE: use this location to update any label tags ...
     // example:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     $this->prepareTemplate($path);
     // store the Row Manager's XML Node Name
     $this->template->set('rowManagerXMLNodeName', MultiTableManager::XML_NODE_NAME);
     //RowManager_StaffScheduleManager
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'staffschedule_id');
     // Get the real form name and add to page as sub-heading
     $form_name = '';
     if ($this->formtype_id != '') {
         $formContext = new RowManager_StaffScheduleTypeManager($this->formtype_id);
         $form_name = $formContext->getFormName();
     }
     $this->template->set('subheading', $form_name);
     /*
      *  Set up any additional data transfer to the Template here...
      */
     //TODO: replace this with a reference to a multi_lingual label constant array...
     $boolArray = array();
     $boolArray['0'] = 'no';
     $boolArray['1'] = 'yes';
     $this->template->set('list_staffschedule_approved', $boolArray);
     $personManager = new RowManager_PersonManager();
     $personManager->setSortOrder('person_lname');
     $personManager->setLabelTemplateLastNameFirstName();
     $personList = $personManager->getListIterator();
     $personArray = $personList->getDropListArray();
     $this->template->set('list_person_id', $personArray);
     $templateName = 'siteDataList.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_FormApprovalListing.php';
     return $this->template->fetch($templateName);
 }
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Uncomment the following line if you want to create a template
     // tailored for this page:
     //$path = $this->pathModuleRoot.'templates/';
     // Otherwise use the standard Templates for the site:
     $path = SITE_PATH_TEMPLATES;
     /*
      * Update any label tags ...
      */
     // example:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     // NOTE:  this parent method prepares the $this->template with the
     // common AdminBox data.
     $this->prepareTemplate($path);
     /*
      *  Set up any additional data transfer to the Template here...
      */
     //Display person names instead of person ids.
     $personManager = new RowManager_PersonManager();
     $personManager->setSortOrder('person_lname');
     $personManager->setLabelTemplateLastNameFirstName();
     $personList = $personManager->getListIterator();
     $personArray = $personList->getDropListArray();
     $this->template->set('list_person_id', $personArray);
     // uncomment this line if you are creating a template for this page
     //$templateName = 'page_DeleteAdmin.php';
     // otherwise use the generic site template
     $templateName = 'siteDeleteConf.php';
     return $this->template->fetch($templateName);
 }
Example #3
0
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Make a new Template object
     $path = SITE_PATH_TEMPLATES;
     // Replace $path with the following line if you want to create a
     // template tailored for this page:
     //$path = $this->pathModuleRoot.'templates/';
     // store the link values
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     // store the link labels
     $this->linkLabels['add'] = $this->labels->getLabel('[Add]');
     $this->linkLabels['edit'] = $this->labels->getLabel('[Edit]');
     $this->linkLabels['del'] = $this->labels->getLabel('[Delete]');
     $this->linkLabels['cont'] = $this->labels->getLabel('[Continue]');
     // $this->linkLabels[ 'view' ] = 'new link label here';
     // store any additional link Columns
     // example:
     //$title = $this->labels->getLabel( '[title_groups]');
     //$columnLabel = $this->labels->getLabel( '[groups]');
     //$link = $this->linkValues[ 'groups' ];
     //$fieldName = 'accessgroup_id';
     //$this->addLinkColumn( $title, $columnLabel, $link, $fieldName);
     $title = $this->labels->getLabel('[view_campuses]');
     $columnLabel = $this->labels->getLabel('[view]');
     $link = $this->linkValues['view'];
     $fieldName = 'admin_id';
     $this->addLinkColumn($title, $columnLabel, $link, $fieldName);
     // store the page labels
     // NOTE: use this location to update any label tags ...
     // example:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     $this->prepareTemplate($path);
     // store the Row Manager's XML Node Name
     $this->template->set('rowManagerXMLNodeName', RowManager_AdminManager::XML_NODE_NAME);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'admin_id');
     /*
      *  Set up any additional data transfer to the Template here...
      */
     // This changes the person ids to the person's first name and last name.
     $personManager = new RowManager_PersonManager();
     $personManager->setSortOrder('person_lname');
     $personManager->setLabelTemplateLastNameFirstName();
     $personList = $personManager->getListIterator();
     $personArray = $personList->getDropListArray();
     $this->template->set('list_person_id', $personArray);
     // priv list.
     $privManager = new RowManager_PrivManager();
     $privManager->setSortOrder('priv_accesslevel');
     $privList = $privManager->getListIterator();
     $privArray = $privList->getDropListArray();
     $this->template->set('list_priv_id', $privArray);
     $templateName = 'siteDataList.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_Admins.php';
     return $this->template->fetch($templateName);
 }
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Uncomment the following line if you want to create a template
     // tailored for this page:
     $path = $this->pathModuleRoot . 'templates/';
     // Otherwise use the standard Templates for the site:
     //$path = SITE_PATH_TEMPLATES;
     // The weeks
     $weekManager = new RowManager_WeekManager();
     $weekManager->setSemesterID($this->semester_id);
     $weekManager->setSortByDate();
     $staffArray = array();
     // figure out all the people we want to report on
     $isCD = $this->permManager->isCD();
     if ($isCD) {
         // get all the people from this campus who have reported stats
         $wklyReportManager = new RowManager_WeeklyReportManager();
         $wklyReportManager->setCampusID($this->campus_id);
         $anotherWeekManager = new RowManager_WeekManager();
         $anotherWeekManager->setSemesterID($this->semester_id);
         $multiTableManager = new MultiTableManager();
         $multiTableManager->addRowManager($wklyReportManager);
         $multiTableManager->addRowManager($anotherWeekManager, new JoinPair($wklyReportManager->getJoinOnWeekID(), $anotherWeekManager->getJoinOnWeekID()));
         $this->listIterator = $multiTableManager->getListIterator();
         $this->listIterator->setFirst();
         while ($this->listIterator->moveNext()) {
             $reportRow = $this->listIterator->getCurrent(new RowManager_WeeklyReportManager());
             $staffArray[] = $reportRow->getStaffID();
         }
         $staffArray = array_unique($staffArray);
         // echo '<pre>'.print_r($staffArray, true).'</pre>';
     } else {
         // just get the stats for the staff viewing the page
         $staffArray[] = $this->staff_id;
     }
     $infoArray = array();
     foreach ($staffArray as $indx => $staffID) {
         //IndSemesterInfo
         $indInfo = new IndSemesterInfo();
         $staffManager = new RowManager_StaffManager($staffID);
         $personID = $staffManager->getPersonID();
         $personManager = new RowManager_PersonManager($personID);
         $personManager->setLabelTemplateLastNameFirstName();
         $indInfo->staffName = $personManager->getLabel();
         $indInfo->staffID = $staffID;
         // calendar
         $indInfo->calendar = array();
         $currentMonth = 0;
         // actual data
         // dataArray[weekID] = arrayOfData
         $indInfo->dataArray = array();
         $weekList = new ListIterator($weekManager);
         $weekList->setFirst();
         while ($weekList->moveNext()) {
             $week = $weekList->getCurrent(new RowManager_WeekManager());
             $weekID = $week->getID();
             // setup stuff for the calendar in the report
             $endDate = $week->getEndDate();
             list($year, $month, $day) = explode('-', $endDate);
             $month = ltrim($month, "0");
             // $day = ltrim($day, "0");
             if ($currentMonth != $month) {
                 // echo 'start new array<br/>';
                 $currentMonth = $month;
             }
             $indInfo->calendar[$currentMonth][$day] = $weekID;
             // end calendar stuff
             // check if an entry exists in the table for
             $weeklyReport = new RowManager_WeeklyReportManager($weekID, $staffID, $this->campus_id);
             if ($weeklyReport->isLoaded()) {
                 // echo $week->getEndDate() . ' loaded <br/>';
                 $indInfo->dataArray[$weekID] = $weeklyReport->getArrayOfValues();
                 // echo '<pre>'.print_r( $weeklyReport->getArrayOfValues() ).'</pre>';
             } else {
                 $indInfo->dataArray[$weekID] = null;
                 // echo $week->getEndDate() . ' NOT loaded <br/>';
             }
         }
         // echo '<pre>'.print_r($calendar,true).'</pre>';
         $infoArray[] = $indInfo;
     }
     /*
      * Update any label tags ...
      */
     // example:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     $campusJumpLinkSelectedValue = $this->linkValues['campusJumpLink'] . $this->campus_id;
     $semesterJumpLinkSelectedValue = $this->linkValues['semesterJumpLink'] . $this->semester_id;
     // NOTE:  this parent method prepares the $this->template with the
     // common Display data.
     $this->prepareTemplate($path);
     // $this->template->set( 'calendar', $calendar );
     // $this->template->set( 'dataArray', $dataArray );
     $this->template->set('infoArray', $infoArray);
     $this->template->set('campusJumpLinkSelectedValue', $campusJumpLinkSelectedValue);
     $this->template->set('semesterJumpLinkSelectedValue', $semesterJumpLinkSelectedValue);
     // campus list
     $jumpLink = $this->linkValues['campusJumpLink'];
     $campusArray = array();
     $this->campusListIterator->setFirst();
     while ($this->campusListIterator->moveNext()) {
         $campusObject = $this->campusListIterator->getCurrent(new RowManager_CampusManager());
         $region_id = $campusObject->getRegionID();
         if ($region_id == 1 || $region_id == 2 || $region_id == 3) {
             $campusArray[$jumpLink . $campusObject->getID()] = $campusObject->getLabel();
         }
     }
     // echo '<pre>'.print_r($campusArray, true ).'</pre>';
     $this->template->set('list_campus_id', $campusArray);
     // semester list
     $jumpLink = $this->linkValues['semesterJumpLink'];
     $semesterArray = array();
     $semesterManager = new RowManager_SemesterManager();
     $this->semesterListIterator = $semesterManager->getListIterator();
     $this->semesterListIterator->setFirst();
     while ($this->semesterListIterator->moveNext()) {
         $semesterObject = $this->semesterListIterator->getCurrent(new RowManager_SemesterManager());
         $semesterArray[$jumpLink . $semesterObject->getID()] = $semesterObject->getLabel();
     }
     // echo '<pre>'.print_r($campusArray, true ).'</pre>';
     $this->template->set('list_semester_id', $semesterArray);
     // uncomment this line if you are creating a template for this page
     $templateName = 'page_StaffSemesterReport.php';
     // otherwise use the generic site template
     //$templateName = '';
     return $this->template->fetch($templateName);
 }
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Uncomment the following line if you want to create a template
     // tailored for this page:
     //$path = $this->pathModuleRoot.'templates/';
     // Otherwise use the standard Templates for the site:
     $path = SITE_PATH_TEMPLATES;
     /*
      * store the link values
      */
     // example:
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     // store the link labels
     $this->linkLabels['edit'] = $this->labels->getLabel('[Edit]');
     $this->linkLabels['del'] = $this->labels->getLabel('[Delete]');
     $this->linkLabels['cont'] = $this->labels->getLabel('[Continue]');
     // $this->linkLabels[ 'view' ] = 'new link label here';
     /*
      * store any additional link Columns
      */
     // example:
     //$title = $this->labels->getLabel( '[title_groups]');
     //$columnLabel = $this->labels->getLabel( '[groups]');
     //$link = $this->linkValues[ 'groups' ];
     //$fieldName = 'accessgroup_id';
     //$this->addLinkColumn( $title, $columnLabel, $link, $fieldName);
     /*
      * Update any label tags ...
      */
     // example:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     // NOTE:  this parent method prepares the $this->template with the
     // common AdminBox data.
     $this->prepareTemplate($path);
     // store the statevar id to edit
     $this->template->set('editEntryID', $this->assignment_id);
     $this->template->set('notice', $this->notice);
     $this->template->set('errorMessage', $this->error_message);
     // store all the fields to the template
     $this->setFormFieldsToTemplate();
     /*
      * Form related Template variables:
      */
     /*
      * Insert the date start/end values for the following date fields:
      */
     // example:
     //$this->template->set( 'startYear_[fieldName]', 2000);
     //$this->template->set( 'endYear_[fieldName]', 2010);
     /*
      * List related Template variables :
      */
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'assignment_id');
     // store data list to the template
     // NOTE: we initialize it here to make sure we capture any new data
     // from a recent processData() call.
     $dataAccessManager = new RowManager_EditCampusAssignmentManager();
     $dataAccessManager->setPersonID($this->person_id);
     if ($this->campus_id != '') {
         $dataAccessManager->setCampusID($this->campus_id);
     }
     $dataAccessManager->setSortOrder($this->sortBy);
     $this->dataList = $dataAccessManager->getListIterator();
     // Store the XML Node name for the Data Access Field List
     $xmlNodeName = $this->dataList->getRowManagerXMLNodeName();
     //RowManager_EditCampusAssignmentManager::XML_NODE_NAME;
     $this->template->set('rowManagerXMLNodeName', $xmlNodeName);
     $this->template->setXML('dataList', $this->dataList->getXML());
     // enable drop-down list for adding new person assignments
     $personManager = new RowManager_PersonManager();
     $campusManager = new RowManager_CampusManager();
     /*        $combinedManager = new MultiTableManager();
             $combinedManager->addRowManager($personManager);
             $combinedManager->addRowManager($dataAccessManager, new JoinPair($personManager->getJoinOnPersonID(),$dataAccessManager->getJoinOnPersonID()));
          //   $combinedManager->addRowManager($campusManager, new JoinPair($campusManager->getJoinOnCampusID(),$dataAccessManager->getJoinOnCampusID()));
           if ($this->person_id!='') {
             		$combinedManager->constructSearchCondition( 'person_id', '=', $this->person_id, true );
          	  }
             if ($this->campus_id!='') {
             		$combinedManager->constructSearchCondition( 'campus_id', '=', $this->campus_id, true );
          	  }    
          	
          	  
          	  $dataList = $combinedManager->getListIterator();   
          	  $dataArray = $dataList->getDropListArray();     /**/
     //   	    $personManager = new RowManager_PersonManager($this->person_id);
     //    $personList = $personManager->getListIterator();
     //    $personArray = $personList ->getDropListArray();
     //     $this->template->set( 'list_person_id', $personArray );
     //       $personList = $combinedManager->getListIterator();
     $personManager->setPersonID($this->person_id);
     $personManager->setLabelTemplateLastNameFirstName();
     $personList = $personManager->getListIterator();
     $personArray = $personList->getDropListArray();
     $this->template->set('list_person_id', $personArray);
     // enable drop-down list for adding new campus assignments
     if ($this->campus_id != '') {
         $campusManager->setCampusID($this->campus_id);
     }
     $campusList = $campusManager->getListIterator();
     //  $campusList = $combinedManager->getListIterator();
     $campusArray = $campusList->getDropListArray();
     $this->template->set('list_campus_id', $campusArray);
     // enable drop-down list for adding new campus assignments
     $statusManager = new RowManager_CampusAssignmentStatusManager();
     $statusList = $statusManager->getListIterator();
     //		  $statusList = $combinedManager->getListIterator();
     $statusArray = $statusList->getDropListArray();
     $this->template->set('list_assignmentstatus_id', $statusArray);
     //     $dataAccessManager->setPersonID($this->person_id);
     //     $dataAccessManager->setCampusID($this->campus_id);
     //        $this->dataList = new EditCampusAssignmentList( $this->sortBy );
     //       $this->dataList = $combinedManager->getListIterator();
     /*
      * Add any additional data required by the template here
      */
     //          $this->displayValues =
     $templateName = 'siteAdminBox.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_EditCampusAssignment.php';
     return $this->template->fetch($templateName);
 }
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Make a new Template object
     //$path = SITE_PATH_TEMPLATES;
     // Replace $path with the following line if you want to create a
     // template tailored for this page:
     $path = $this->pathModuleRoot . 'templates/';
     // store the link values
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     // store the link labels
     //         $this->linkLabels[ 'add' ] = $this->labels->getLabel( '[Add]' );
     //         $this->linkLabels[ 'edit' ] = $this->labels->getLabel( '[Edit]' );
     //         $this->linkLabels[ 'del'  ] = $this->labels->getLabel( '[Delete]' );
     //         $this->linkLabels[ 'cont' ] = $this->labels->getLabel( '[Continue]');
     // $this->linkLabels[ 'view' ] = 'new link label here';
     $this->linkLabels['DownloadCustomReportCSV'] = $this->labels->getLabel('[DownloadCustomReportCSV]');
     // store any additional link Columns
     // example:
     //$title = $this->labels->getLabel( '[title_groups]');
     //$columnLabel = $this->labels->getLabel( '[groups]');
     //$link = $this->linkValues[ 'groups' ];
     //$fieldName = 'accessgroup_id';
     //$this->addLinkColumn( $title, $columnLabel, $link, $fieldName);
     // store the page labels
     // NOTE: use this location to update any label tags ...
     // example:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     $this->prepareTemplate($path);
     // Set the custom labels for the data columns
     $this->template->set('listLabels', $this->listLabels);
     //         $this->template->set( 'dataFieldList', $this->getFieldArray($this->customreport_id));
     // store the Row Manager's XML Node Name
     //         $this->template->set( 'rowManagerXMLNodeName', MultiTableManager::XML_NODE_NAME );
     $this->template->set('rowManagerXMLNodeName', $this->listManager->getRowManagerXMLNodeName());
     // Store the XML Node name for the Data Access Field List
     //         $xmlNodeName = $this->dataList->getRowManagerXMLNodeName();
     //         $this->template->set( 'rowManagerXMLNodeName', $xmlNodeName);
     // //         $xmlNodeName = RowManager_FormFieldValueManager::XML_NODE_NAME;
     // //         $this->template->set( 'rowManagerXMLNodeName', $xmlNodeName);
     //         $this->template->setXML( 'dataList', $this->dataList->getXML() );
     //
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'person_id');
     // disable the heading?
     $this->template->set('disableHeading', $this->disableHeading);
     // Set page sub-heading (i.e. activity type filter)
     if ($this->customreport_id != '') {
         $customReports = new RowManager_CustomReportsManager($this->customreport_id);
         $sub_heading = $customReports->getReportName();
         $this->template->set('subheading', $sub_heading);
     }
     /*
      *  Set up any additional data transfer to the Template here...
      */
     $person_manager = new RowManager_PersonManager();
     $person_list = $person_manager->getListIterator();
     $person_manager->setLabelTemplateLastNameFirstName();
     $personArray = $person_list->getDropListArray();
     /** Create and store download CSV link **/
     if ($this->is_blank_page == false) {
         $downloadLink = array();
         $downloadLink['DownloadCustomReportCSV'] = $this->linkValues['DownloadCustomReportCSV'];
         $this->template->set('linkLabels', $this->linkLabels);
         $this->template->set('downloadLink', $downloadLink);
     }
     $this->template->set('list_person_id', $personArray);
     //         $templateName = 'siteDataList_dynamic.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     $templateName = 'page_ViewCustomReport.tpl.php';
     return $this->template->fetch($templateName);
 }
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Uncomment the following line if you want to create a template
     // tailored for this page:
     //$path = $this->pathModuleRoot.'templates/';
     // Otherwise use the standard Templates for the site:
     $path = SITE_PATH_TEMPLATES;
     // store the page labels in XML format...
     // NOTE: use this location to update any label tags ...
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     // NOTE:  this parent method prepares the $this->template with the
     // common Form data.
     $this->prepareTemplate($path);
     /*
      * Form related Template variables:
      */
     // store the button label
     $this->template->set('buttonText', $this->labels->getLabel('[Update]'));
     // Insert the date start/end values for the following date fields:
     // example:
     //$this->template->set( 'startYear_[fieldName]', 2000);
     //$this->template->set( 'endYear_[fieldName]', 2010);
     /*
      * Add any additional data required by the template here
      */
     //priv list.
     $privManager = new RowManager_PrivManager();
     $privManager->setSortOrder('priv_accesslevel');
     $privList = $privManager->getListIterator();
     $privArray = $privList->getDropListArray();
     $this->template->set('list_priv_id', $privArray);
     //Person list.
     $personManager = new RowManager_PersonManager();
     $personManager->setSortOrder('person_lname');
     $personManager->setLabelTemplateLastNameFirstName();
     $personList = $personManager->getListIterator();
     $personArray = $personList->getDropListArray();
     $this->template->set('list_person_id', $personArray);
     // uncomment this line if you are creating a template for this page
     //$templateName = 'page_AddAdmin.php';
     // otherwise use the generic admin box template
     $templateName = 'siteFormSingle.php';
     return $this->template->fetch($templateName);
 }
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Make a new Template object
     //$this->pathModuleRoot.'templates/';
     // Replace $path with the following line if you want to create a
     // template tailored for this page:
     $path = $this->pathModuleRoot . 'templates/';
     // store the link values
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     // store the link labels
     $this->linkLabels['add'] = $this->labels->getLabel('[Add]');
     //        $this->linkLabels[ 'edit' ] = $this->labels->getLabel( '[Edit]' );
     //        $this->linkLabels[ 'del'  ] = $this->labels->getLabel( '[Delete]' );
     if (!isset($this->linkLabels['cont'])) {
         $this->linkLabels['cont'] = $this->labels->getLabel('[Back]');
         // [Continue]
     }
     // $this->linkLabels[ 'view' ] = 'new link label here';
     $this->prepareTemplate($path);
     // Set form approval status message
     // 		$form_approved = "Approval Pending";
     // 		if ($this->is_form_approved == true)
     // 		{
     // 			$form_approved = "Form Approved";
     // 		}
     // 		$this->template->set('form_approval_msg', $form_approved );
     //
     // Display message if form has just been submitted
     if ($this->form_submitted == true) {
         $statusMessage = 'Form information successfully submitted.';
         $this->template->set('form_status_msg', $statusMessage);
         $this->form_submitted = false;
     }
     // Set the sub-page objects
     $this->template->set('basicStaffForm', $this->generateTopForm());
     if ($this->has_activity_form == true) {
         $this->template->set('scheduledActivityForm', $this->generateBottomForm());
     }
     // Set approval form information
     $is_approved = '';
     $approved_by = '';
     $last_change = '';
     $approval_array = $this->listManager->getDataList();
     reset($approval_array);
     foreach (array_keys($approval_array) as $k) {
         $record = current($approval_array);
         $approved = $record['staffschedule_approved'];
         if ($approved == '1') {
             $is_approved = 'CHECKED';
         }
         $approved_by = $record['staffschedule_approvedby'];
         $last_change = $record['staffschedule_lastmodifiedbydirector'];
         $approval_notes = $record['staffschedule_approvalnotes'];
         next($approval_array);
     }
     $personManager = new RowManager_PersonManager($approved_by);
     $personManager->setSortOrder('person_lname');
     $personManager->setLabelTemplateLastNameFirstName();
     $approved_by = $personManager->getPersonFirstName() . ' ' . $personManager->getPersonLastName();
     //         $personList = $personManager->getListIterator( );
     //         $personArray = $personList->getDropListArray( );
     //         $this->template->set( 'list_approved_by', $personArray );
     $this->template->set('approvalFormAction', $this->formAction);
     $this->template->set('is_approved', $is_approved);
     $this->template->set('approvalButtonText', 'Approve/Disapprove');
     $this->template->set('approval_notes', $approval_notes);
     $this->template->set('director_field', 'Last Change By');
     $this->template->set('approved_by', $approved_by);
     $this->template->set('time_field', 'Last Change At');
     if ($last_change != '') {
         $date_regex = '/[2-9]([0-9]{3})\\-[0-9]{1,2}\\-[0-9]{1,2}/';
         if (preg_match($date_regex, $last_change) >= 1) {
             $time = strtotime($last_change);
             $last_change = strftime("%d %b %Y  %H:%M:%S", $time);
         }
     }
     $this->template->set('last_change', $last_change);
     // 			$this->template->set('last_change', $last_change);
     // store any additional link Columns
     // example:
     //$title = $this->labels->getLabel( '[title_groups]');
     //$columnLabel = $this->labels->getLabel( '[groups]');
     //$link = $this->linkValues[ 'groups' ];
     //$fieldName = 'accessgroup_id';
     //$this->addLinkColumn( $title, $columnLabel, $link, $fieldName);
     // store the page labels
     // NOTE: use this location to update any label tags ...
     // example:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     // store the Row Manager's XML Node Name
     //        $this->template->set( 'rowManagerXMLNodeName', RowManager_RegistrationManager::XML_NODE_NAME );
     $this->template->set('rowManagerXMLNodeName', MultiTableManager::XML_NODE_NAME);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'person_id');
     // TODO: somehow merge the primary join with the balance owing join.... for efficiency
     /*
      *  Set up any additional data transfer to the Template here...
      */
     //       $this->template->set( 'dataList', $this->dataList);
     // Get the real form name
     $form_name = '';
     if ($this->form_id != '') {
         $formContext = new RowManager_StaffScheduleTypeManager($this->form_id);
         $form_name = $formContext->getFormName();
     }
     // Get the person's name
     $person_name = '';
     if ($this->person_id != '') {
         $personInfo = new RowManager_PersonManager($this->person_id);
         $person_name = $personInfo->getPersonFirstName() . ' ' . $personInfo->getPersonLastName();
     }
     //      	  $form_notice = 'Please note that the "Update" button only updates the top form.<br>The bottom form is updated via its own buttons/links.';
     $this->template->set('heading', $form_name);
     $this->template->set('subheading', $person_name);
     //         $this->template->set( 'formsNotice', $form_notice);
     $templateName = 'page_ApproveStaffSchedule.tpl.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_EditCampusRegistrations.php';
     return $this->template->fetch($templateName);
 }
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Uncomment the following line if you want to create a template
     // tailored for this page:
     //$path = $this->pathModuleRoot.'templates/';
     // Otherwise use the standard Templates for the site:
     $path = SITE_PATH_TEMPLATES;
     /*
      * Update any label tags ...
      */
     // example:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     // NOTE:  this parent method prepares the $this->template with the
     // common AdminBox data.
     $this->prepareTemplate($path);
     $reg = $this->itemManager;
     // retrieve RegistrationManager set to a particular reg_id earlier
     //        $reg->setEventID($this->event_id);
     $person = new RowManager_PersonManager();
     $person->setLabelTemplateLastNameFirstName();
     $event = new RowManager_EventManager();
     //        $event->setEventID($this->event_id);
     // create join on person and registration tables
     $multiTableManager = new MultiTableManager();
     $multiTableManager->addRowManager($person);
     $multiTableManager->addRowManager($reg, new JoinPair($reg->getJoinOnPersonID(), $person->getJoinOnPersonID()));
     $listIterator = $multiTableManager->getListIterator();
     $personArray = $listIterator->getDropListArray();
     //$listIterator
     $this->template->set('list_person_id', $personArray);
     //        echo print_r($personArray,true);
     // create join on event and registration tables
     $multiTableManager2 = new MultiTableManager();
     $multiTableManager2->addRowManager($event);
     $multiTableManager2->addRowManager($reg, new JoinPair($reg->getJoinOnEventID(), $event->getJoinOnEventID()));
     $listIterator2 = $multiTableManager2->getListIterator();
     $eventArray = $listIterator2->getDropListArray();
     //$listIterator
     $this->template->set('list_event_id', $eventArray);
     //        echo print_r($eventArray,true);
     // uncomment this line if you are creating a template for this page
     //$templateName = 'page_ConfirmDeleteRegistration.php';
     // otherwise use the generic site template
     $templateName = 'siteDeleteConf.php';
     return $this->template->fetch($templateName);
 }
Example #10
0
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  *
  * ON JAN 2, 2008 Russ made two changes to this page to restore the original functionality... they are documented below.
  * ON JAN 8, 2008 Hobbe added conditional statements to allow registration record searches IF viewer has Reg. Sys. Super Admin privs.
  */
 function getHTML()
 {
     // Uncomment the following line if you want to create a template
     // tailored for this page:
     $privManager = new PrivilegeManager($this->viewer->getID());
     if ($privManager->isSuperAdmin() == true) {
         $path = SITE_PATH_TEMPLATES;
     } else {
         // Changed by RM from using the assignment below on Jan 2, 2008.
         $path = $this->pathModuleRoot . 'templates/';
     }
     // Otherwise use the standard Templates for the site:
     // $path = SITE_PATH_TEMPLATES;
     /*
      * store the link values
      */
     // example:
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     // store the link labels
     $this->linkLabels['edit'] = $this->labels->getLabel('[Edit]');
     $this->linkLabels['del'] = $this->labels->getLabel('[Delete]');
     //         $this->linkLabels[ 'cont' ] = $this->labels->getLabel( '[Continue]');
     // $this->linkLabels[ 'view' ] = 'new link label here';
     /*
      * store any additional link Columns
      */
     // example:
     //$title = $this->labels->getLabel( '[title_groups]');
     //$columnLabel = $this->labels->getLabel( '[groups]');
     //$link = $this->linkValues[ 'groups' ];
     //$fieldName = 'accessgroup_id';
     //$this->addLinkColumn( $title, $columnLabel, $link, $fieldName);
     /*
      * Update any label tags ...
      */
     // example:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     // NOTE:  this parent method prepares the $this->template with the
     // common AdminBox data.
     $this->prepareTemplate($path);
     // store the statevar id to edit
     $this->template->set('editEntryID', $this->registration_id);
     // store all the fields to the template
     $this->setFormFieldsToTemplate();
     /*
      * Form related Template variables:
      */
     /*
      * Insert the date start/end values for the following date fields:
      */
     // example:
     //$this->template->set( 'startYear_[fieldName]', 2000);
     //$this->template->set( 'endYear_[fieldName]', 2010);
     /*
      * List related Template variables :
      */
     // Store the XML Node name for the Data Access Field List
     $xmlNodeName = RowManager_RegistrationManager::XML_NODE_NAME;
     $this->template->set('rowManagerXMLNodeName', $xmlNodeName);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'registration_id');
     // store data list to the template
     // NOTE: we initialize it here to make sure we capture any new data
     // from a recent processData() call.
     if ($this->person_id != '') {
         $dataAccessManager = new RowManager_RegistrationManager();
         $dataAccessManager->setPersonID($this->person_id);
         $dataAccessManager->setSortOrder($this->sortBy);
         //        $this->dataList = new PriceRuleList( $this->sortBy );
         $this->dataList = $dataAccessManager->getListIterator();
         $this->template->setXML('dataList', $this->dataList->getXML());
     }
     //         else
     //         {
     // 	        $this->dataList = array();
     // // 	        $this->template->setXML( 'dataList', $this->dataList->getXML() );
     //         }
     /*
      * Add any additional data required by the template here
      */
     $person = new RowManager_PersonManager();
     $person->setLabelTemplateLastNameFirstName();
     //         $field->setPersonID( $this->person_id);
     $person->setSortOrder('person_lname, person_fname');
     $personList = new ListIterator($person);
     $personArray = $personList->getDropListArray();
     $this->template->set('list_person_id', $personArray);
     $notice = "<br><b>NOTE:</b> Duplicate names may appear if a person has multiple records.";
     $this->template->set('note_person_id', $notice);
     $event = new RowManager_EventManager();
     //         $field->setPersonID( $this->person_id);
     $eventList = new ListIterator($event);
     $eventArray = $eventList->getDropListArray();
     $this->template->set('list_event_id', $eventArray);
     $status = new RowManager_StatusManager();
     $statusList = new ListIterator($status);
     $statusArray = $statusList->getDropListArray();
     $this->template->set('list_registration_status', $statusArray);
     //
     //         $nameFields = 'person_lname,person_fname';
     //         $template = '[person_lname], [person_fname]';
     //         $this->dataManager->setLabelTemplate( $nameFields, $template );
     if ($privManager->isSuperAdmin() == true) {
         $templateName = 'siteSearchFormDataList.php';
         //'page_HrdbHome.php';
     } else {
         // Changed by RM on Jan 2, 2008 - We can't have just anybody being able to access this data.
         $templateName = 'page_HrdbHome.php';
     }
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_EditPriceRules.php';
     return $this->template->fetch($templateName);
 }
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Make a new Template object
     $path = SITE_PATH_TEMPLATES;
     // Replace $path with the following line if you want to create a
     // template tailored for this page:
     //$path = $this->pathModuleRoot.'templates/';
     // store the link values
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     // store the link labels
     $this->linkLabels['add'] = $this->labels->getLabel('[Add]');
     $this->linkLabels['edit'] = $this->labels->getLabel('[Edit]');
     $this->linkLabels['del'] = $this->labels->getLabel('[Delete]');
     $this->linkLabels['cont'] = $this->labels->getLabel('[Continue]');
     // $this->linkLabels[ 'view' ] = 'new link label here';
     // store any additional link Columns
     // example:
     //$title = $this->labels->getLabel( '[title_groups]');
     //$columnLabel = $this->labels->getLabel( '[groups]');
     //$link = $this->linkValues[ 'groups' ];
     //$fieldName = 'accessgroup_id';
     //$this->addLinkColumn( $title, $columnLabel, $link, $fieldName);
     // store the page labels
     // NOTE: use this location to update any label tags ...
     // example:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     $this->prepareTemplate($path);
     // store the Row Manager's XML Node Name
     $this->template->set('rowManagerXMLNodeName', RowManager_StaffActivityManager::XML_NODE_NAME);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'staffactivity_id');
     // disable the heading?
     $this->template->set('disableHeading', $this->disableHeading);
     // Set page sub-heading (i.e. activity type filter)
     if ($this->activityTypeID != '') {
         $activityTypes = new RowManager_ActivityTypeManager($this->activityTypeID);
         $sub_heading = $activityTypes->getActivityTypeDesc();
         $this->template->set('subheading', $sub_heading);
     }
     /*
      *  Set up any additional data transfer to the Template here...
      */
     $person_manager = new RowManager_PersonManager();
     $person_list = $person_manager->getListIterator();
     $person_manager->setLabelTemplateLastNameFirstName();
     $personArray = $person_list->getDropListArray();
     $this->template->set('list_person_id', $personArray);
     $eventtypes_manager = new RowManager_ActivityTypeManager();
     $types_list = $eventtypes_manager->getListIterator();
     $typesArray = $types_list->getDropListArray();
     $this->template->set('list_activitytype_id', $typesArray);
     $templateName = 'siteDataList.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_ViewStaffActivities.php';
     return $this->template->fetch($templateName);
 }