/**
  * 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;
     // get a list of all the semesters associated with this year
     $semesterManager = new RowManager_SemesterManager();
     $semesterManager->setYearID($this->year_id);
     $semesterList = $semesterManager->getListIterator();
     $semesterArray = $semesterList->getDropListArray();
     // echo "<pre>".print_r( $semesterArray, true)."</pre>";
     // changed on June 4, 2009 by RM to reflect that we are now longer collecting certain fields
     // $semStatsFieldsOfInterest = "semesterreport_avgPrayer,semesterreport_avgWklyMtg,semesterreport_numStaffChall,semesterreport_numInternChall,semesterreport_numFrosh,semesterreport_numStaffDG,semesterreport_numInStaffDG,semesterreport_numStudentDG,semesterreport_numInStudentDG,semesterreport_numSpMultStaffDG,semesterreport_numSpMultStdDG";
     $semStatsFieldsOfInterest = "semesterreport_numStaffChall,semesterreport_numInternChall,semesterreport_numFrosh,semesterreport_numSpMultStaffDG,semesterreport_numSpMultStdDG";
     $semStatsFieldArray = explode(",", $semStatsFieldsOfInterest);
     // changed on June 4, 2009 by RM to reflect that we are no longer collecting certain fields
     // $perStatsFieldsOfInterest = "weeklyReport_1on1SpConv,weeklyReport_1on1SpConvStd,weeklyReport_1on1GosPres,weeklyReport_1on1GosPresStd,weeklyReport_1on1HsPres,weeklyReport_1on1HsPresStd,weeklyReport_7upCompleted,weeklyReport_7upCompletedStd,weeklyReport_cjVideo,weeklyReport_mda,weeklyReport_otherEVMats,weeklyReport_rlk,weeklyReport_siq";
     $perStatsFieldsOfInterest = "weeklyReport_1on1SpConv,weeklyReport_1on1SpConvStd,weeklyReport_1on1GosPres,weeklyReport_1on1GosPresStd,weeklyReport_1on1HsPres";
     $perStatsFieldArray = explode(",", $perStatsFieldsOfInterest);
     $prcTotals = array();
     $semesterStatsArray = array();
     foreach ($semesterArray as $semesterID => $desc) {
         // init the personal stats array
         foreach ($perStatsFieldArray as $key => $fieldName) {
             $personalMinStatsArray[$fieldName][$semesterID] = 0;
         }
         // GET INDICATED DECISIONS
         $prcManager = new RowManager_PRCManager();
         $prcManager->setSemester($semesterID);
         $prcManager->setCampus($this->campus_id);
         $prcList = $prcManager->getListIterator();
         $totalPRC = $prcList->getNumRows();
         $prcTotals[$semesterID] = $totalPRC;
         // GET SEMESTER STATS
         $semReportManager = new RowManager_SemesterReportManager($semesterID, $this->campus_id);
         $semReportManager->setFieldsOfInterest($semStatsFieldsOfInterest);
         $valuesArray = $semReportManager->getArrayOfValues();
         // echo "<pre>".print_r( $valuesArray, true)."</pre>";
         foreach ($semStatsFieldArray as $key => $fieldName) {
             $num = 0;
             if (isset($valuesArray[$fieldName])) {
                 $num = $valuesArray[$fieldName];
             }
             $semesterStatsArray[$fieldName][$semesterID] = $num;
         }
         // foreach semStatsFieldArray
         // GET CAMPUS TEAM EXPOSURE STATS
         $exposureTypeManager = new RowManager_ExposureTypeManager();
         $exIt = $exposureTypeManager->getListIterator();
         $exIt->setFirst();
         while ($exIt->moveNext()) {
             $anEx = $exIt->getCurrent(new RowManager_ExposureTypeManager());
             $typeID = $anEx->getID();
             $weekManager = new RowManager_WeekManager();
             $weekManager->setSemesterID($semesterID);
             $moreStatsManager = new RowManager_MoreStatsManager();
             $moreStatsManager->setExposureTypeID($typeID);
             $moreStatsManager->setCampusID($this->campus_id);
             $multiTableManager = new MultiTableManager();
             $multiTableManager->addRowManager($weekManager);
             $multiTableManager->addRowManager($moreStatsManager, new JoinPair($weekManager->getJoinOnWeekID(), $moreStatsManager->getJoinOnWeekID()));
             $listIterator = $multiTableManager->getListIterator();
             $listIterator->setFirst();
             $dataArray = array();
             $expTotal = 0;
             while ($listIterator->moveNext()) {
                 $anItem = $listIterator->getCurrent(new RowManager_MoreStatsManager());
                 $expTotal += $anItem->getNumExposures();
             }
             $campusTeamMinArray[$anEx->getLabel()][$semesterID] = $expTotal;
         }
         // all exposureTypes
         // GET PERSONAL MINISTRY STATS
         $weekManager = new RowManager_WeekManager();
         $weekManager->setSemesterID($semesterID);
         $weeklyReport = new RowManager_WeeklyReportManager();
         $weeklyReport->setCampusID($this->campus_id);
         $multiTableManager = new MultiTableManager();
         $multiTableManager->addRowManager($weekManager);
         $multiTableManager->addRowManager($weeklyReport, new JoinPair($weekManager->getJoinOnWeekID(), $weeklyReport->getJoinOnWeekID()));
         $listIterator = $multiTableManager->getListIterator();
         $listIterator->setFirst();
         $expTotal = 0;
         while ($listIterator->moveNext()) {
             $aReport = $listIterator->getCurrent(new RowManager_WeeklyReportManager());
             $dataArray = $aReport->getArrayOfValues();
             foreach ($perStatsFieldArray as $key => $fieldName) {
                 $personalMinStatsArray[$fieldName][$semesterID] += $dataArray[$fieldName];
             }
         }
     }
     // foreach semesterArray
     $prcArray = array("Indicated Decisions" => $prcTotals);
     /*
      * Update any label tags ...
      */
     // example:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     $campusJumpLinkSelectedValue = $this->linkValues['campusJumpLink'] . $this->campus_id;
     $yearJumpLinkSelectedValue = $this->linkValues['yearJumpLink'] . $this->year_id;
     // NOTE:  this parent method prepares the $this->template with the
     // common Display data.
     $this->prepareTemplate($path);
     $this->template->set('semesterArray', $semesterArray);
     // the actual stats
     $this->template->set('personalMinStatsArray', $personalMinStatsArray);
     $this->template->set('prcArray', $prcArray);
     $this->template->set('campusTeamMinArray', $campusTeamMinArray);
     $this->template->set('semesterStatsArray', $semesterStatsArray);
     $this->template->set('semStatsLink', $this->linkValues['semStatsLink']);
     $this->template->set('campusTeamLink', $this->linkValues['campusTeamLink']);
     $this->template->set('indDecLink', $this->linkValues['indDecLink']);
     $this->template->set('personalMinLink', $this->linkValues['personalMinLink']);
     $this->template->set('campusJumpLinkSelectedValue', $campusJumpLinkSelectedValue);
     $this->template->set('yearJumpLinkSelectedValue', $yearJumpLinkSelectedValue);
     // 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();
         // only include Canadian campuses
         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);
     // year list
     $jumpLink = $this->linkValues['yearJumpLink'];
     $yearArray = array();
     $yearManager = new RowManager_YearManager();
     $this->yearListIterator = $yearManager->getListIterator();
     $this->yearListIterator->setFirst();
     while ($this->yearListIterator->moveNext()) {
         $yearObject = $this->yearListIterator->getCurrent(new RowManager_YearManager());
         $yearArray[$jumpLink . $yearObject->getID()] = $yearObject->getLabel();
     }
     // echo '<pre>'.print_r($campusArray, true ).'</pre>';
     $this->template->set('list_year_id', $yearArray);
     // uncomment this line if you are creating a template for this page
     $templateName = 'page_CampusYearSummary.php';
     // otherwise use the generic site template
     //$templateName = '';
     return $this->template->fetch($templateName);
 }
     * coordinator_id [INTEGER]  unique id
     * access_id [INTEGER]  the access_id of a staff member
     * campus_id [INTEGER]  a campus to which this coordinator is assigned
     */
    $Coordinator = new RowManager_CoordinatorManager();
    $Coordinator->dropTable();
    $Coordinator->createTable();
    /*
     * Year Table
     *
     * Manages info related to a year
     *
     * year_id [INTEGER]  unique id
     * year_desc [STRING]  textual description of the year
     */
    $Year = new RowManager_YearManager();
    $Year->dropTable();
    $Year->createTable();
    /*[RAD_DAOBJ_TABLE]*/
} else {
    echo 'Skipping Tables ... <br>';
}
// end if !skipTables
// check to see if parameter 'skipLabel' was provided
$skipLabel = isset($_REQUEST['skipLabel']);
// if not, then add labels to DB ...
if (!$skipLabel) {
    /*
     *  Insert Labels in DB
     */
    // Create Application Upload Series