protected function render() { parent::render(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); // Males foreach ($this->report->getMaleTotals() as $total) { $this->tpl['male_totals'][] = array('COUNT' => $total); } $this->tpl['MALE_SUB'] = $this->report->getMaleSubTotal(); // Females foreach ($this->report->getFemaleTotals() as $total) { $this->tpl['female_totals'][] = array('COUNT' => $total); } $this->tpl['FEMALE_SUB'] = $this->report->getFemaleSubTotal(); // Type totals foreach ($this->report->getTypeTotals() as $total) { $this->tpl['type_totals'][] = array('COUNT' => $total); } $this->tpl['SUB_TOTAL'] = $this->report->getSubTotal(); // Cancelled totals $cancelledTotals = $this->report->getCancelledTotals(); $this->tpl['FEMALE_CANCELLED'] = $cancelledTotals[FEMALE]; $this->tpl['MALE_CANCELLED'] = $cancelledTotals[MALE]; $this->tpl['CANCELLED_SUB'] = $this->report->getCancelledSubTotal(); $this->tpl['FEMALE_TOTAL'] = $this->report->getFemaleGrandTotal(); $this->tpl['MALE_TOTAL'] = $this->report->getMaleGrandTotal(); $this->tpl['ALL_TOTAL'] = $this->report->getTotal(); return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/ApplicantDemographics.tpl'); }
protected function render() { parent::render(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $rows = array(); $totalAssignments = 0; foreach ($this->report->getTypeCounts() as $result) { $row = array(); // Translate the reason string into a human readable label, if it exists // Otherwsie, use the raw reason code $name = constant($result['reason']); if (isset($name)) { $row['REASON'] = $name; } else { $row['REASON'] = $result['reason']; } $row['COUNT'] = $result['count']; $rows[] = $row; // Add the count for this reason to the running total $totalAssignments += $result['count']; } $this->tpl['TABLE_ROWS'] = $rows; $this->tpl['TOTAL_ASSIGNMENTS'] = $totalAssignments; return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/AssignmentsByType.tpl'); }
protected function render() { require_once PHPWS_SOURCE_DIR . 'mod/hms/class/Term.php'; parent::render(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $this->tpl['TOTAL_BEDS'] = $this->report->getTotalBeds(); $this->tpl['TOTAL_ROOMS'] = $this->report->getTotalRooms(); $this->tpl['MALE'] = $this->report->getMale(); $this->tpl['FEMALE'] = $this->report->getFemale(); $this->tpl['COED'] = $this->report->getCoed(); // Copy results into the template foreach ($this->report->getData() as $row) { if (empty($row['maleRooms'])) { $row['maleRooms'] = "None"; } if (empty($row['femaleRooms'])) { $row['femaleRooms'] = "None"; } if (empty($row['coedRooms'])) { $row['coedRooms'] = "None"; } $this->tpl['rows'][] = $row; } return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/UnassignedBeds.tpl'); }
protected function render() { $this->tpl = $this->report->getSortedRows(); parent::render(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/SpecialNeedsRequest.tpl'); }
protected function render() { parent::render(); $rows = $this->report->getRows(); $this->tpl['rows'] = $rows; $this->tpl['TERM'] = Term::toString($this->report->getTerm()); return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/TwentyFive.tpl'); }
protected function render() { parent::render(); $this->tpl['rows'] = $this->report->getRows(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $this->tpl['totalCoed'] = $this->report->getTotalCoed(); return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/CoedRooms.tpl'); }
protected function render() { parent::render(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $this->tpl['MALE_SINGLE_GENDER'] = $this->report->getMaleSingle(); $this->tpl['MALE_COED'] = $this->report->getMaleCoed(); $this->tpl['FEMALE_SINGLE_GENDER'] = $this->report->getFemaleSingle(); $this->tpl['FEMALE_COED'] = $this->report->getFemaleCoed(); return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/SingleGenderVsCoedPref.tpl'); }
protected function render() { parent::render(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $this->tpl['lastTerm'] = Term::toString($this->report->getLastTerm()); $this->tpl['thisTerm'] = Term::toSTring($this->report->getTerm()); $this->tpl['lastYearSeries'] = $this->report->getLastYearJson(); $this->tpl['thisYearSeries'] = $this->report->getThisYearJson(); return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/CancelledAppsContinuingGraph.tpl'); }
protected function render() { parent::render(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); // Copy keys and values from the report. Kinda a hack foreach ($this->report->getData() as $key => $value) { $this->tpl[$key] = $value; } return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/ReapplicationOverview.tpl'); }
protected function render() { parent::render(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $this->tpl['MISMATCH_COUNT'] = $this->report->getMismatchCount(); foreach ($this->report->getData() as $row) { $this->tpl['rows'][] = $row; } return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/MismatchedRoommates.tpl'); }
protected function render() { parent::render(); $this->tps['TERM'] = Term::toString($this->report->getTerm()); // Copy results into the template foreach ($this->report->getData() as $row) { $this->tpl['halls'][] = $row; } return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/ReappAvailableBeds.tpl'); }
protected function render() { parent::render(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $this->tpl['TOTAL'] = $this->report->getTotal(); // Copy results into the template foreach ($this->report->getData() as $row) { $this->tpl['rows'][] = $row; } return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/CheckinList.tpl'); }
protected function render() { parent::render(); $this->tpl['rows'] = $this->report->getRows(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $this->tpl['totalCurrOccupancy'] = $this->report->getTotalCurrOccupancy(); $this->tpl['totalMales'] = $this->report->getTotalMales(); $this->tpl['totalFemales'] = $this->report->getTotalFemales(); $this->tpl['totalMalePercent'] = $this->report->getTotalMalePercent(); $this->tpl['totalFemalePercent'] = $this->report->getTotalFemalePercent(); return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/TwentyOne.tpl'); }
protected function render() { parent::render(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $this->tpl['MEMBER_COUNT'] = $this->report->getMemberCount(); foreach ($this->report->getData() as $row) { if (empty($row['COMMUNITY'])) { $row['COMMUNITY'] = '<em class="text-muted">No Membership</em>'; } $this->tpl['rows'][] = $row; } return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/RlcRoster.tpl'); }
protected function render() { parent::render(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $rows = array(); $totalAssignments = 0; foreach ($this->report->getCheckinCounts() as $tRows) { $row = array(); $row['HALL_NAME'] = $tRows['hall_name']; $row['COUNT'] = (int) $tRows['count']; $rows[] = $row; $totalAssignments += (int) $tRows['count']; } $this->tpl['TABLE_ROWS'] = $rows; $this->tpl['TOTAL_CHECKINS'] = $totalAssignments; return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/CheckinsByHall.tpl'); }
protected function render() { parent::render(); PHPWS_Core::initModClass('hms', 'HMS_Util.php'); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $rows = array(); $totalCancellations = 0; foreach ($this->report->getTypeCounts() as $type => $count) { $row = array(); $row['TYPE'] = HMS_Util::formatType($type); $row['COUNT'] = $count; $rows[] = $row; $totalCancellations += $count; } $this->tpl['TABLE_ROWS'] = $rows; $this->tpl['TOTAL_CANCELLATIONS'] = $totalCancellations; return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/CancelledAppsByType.tpl'); }
protected function render() { parent::render(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $reasons = $this->report->getReasons(); // All Students $rows = array(); $totalCancellations = 0; foreach ($this->report->getReasonCounts() as $reason => $count) { $row = array(); $row['ALL_REASON'] = $reasons[$reason]; $row['ALL_COUNT'] = $count; $rows[] = $row; $totalCancellations += $count; } $this->tpl['TABLE_ROWS'] = $rows; $this->tpl['TOTAL_CANCELLATIONS'] = $totalCancellations; // Freshmen $freshmenRows = array(); $freshmenCancellations = 0; foreach ($this->report->getFreshmenReasonCounts() as $reason => $count) { $row = array(); $row['FR_REASON'] = $reasons[$reason]; $row['FR_COUNT'] = $count; $freshmenRows[] = $row; $freshmenCancellations += $count; } $this->tpl['FRESHMEN_ROWS'] = $freshmenRows; $this->tpl['FRESHMEN_TOTAL'] = $freshmenCancellations; // Countinuing $continuingRows = array(); $continuingCancellations = 0; foreach ($this->report->getContinuingReasonCounts() as $reason => $count) { $row = array(); $row['C_REASON'] = $reasons[$reason]; $row['C_COUNT'] = $count; $continuingRows[] = $row; $continuingCancellations += $count; } $this->tpl['CONTINUING_ROWS'] = $continuingRows; $this->tpl['CONTINUING_TOTAL'] = $continuingCancellations; return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/CancelledAppsByReason.tpl'); }
protected function render() { parent::render(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $halls = $this->report->getHalls(); // Need to create our own Template object $myTpl = new PHPWS_Template('hms'); $myTpl->setFile('admin/reports/AssignmentTypeByFloor.tpl'); // Set the existing tags $myTpl->setData($this->tpl); $hallTags = array(); foreach ($halls as $hall) { $hallCounts = $this->report->getCountsForHall($hall); // Hall totals summary foreach ($hallCounts as $hallCount) { $myTpl->setCurrentBlock('hall_totals'); $myTpl->setData(array('HALL_TOTAL_TYPE' => constant($hallCount['reason']), 'HALL_TOTAL_COUNT' => $hallCount['count'])); $myTpl->parseCurrentBlock(); } $floors = $hall->get_floors(); foreach ($floors as $floor) { $counts = $this->report->getCountsForFloor($floor); foreach ($counts as $countRow) { $myTpl->setCurrentBlock('floor_counts'); $myTpl->setData(array('TYPE' => constant($countRow['reason']), 'COUNT' => $countRow['count'])); $myTpl->parseCurrentBlock(); } // Floor tags $myTpl->setCurrentBlock('floors'); $myTpl->setData(array('FLOOR_NUMBER' => HMS_Util::ordinal($floor->getFloorNumber()))); $myTpl->parseCurrentBlock(); } // Set hall tags $hallTags['HALL_NAME'] = $hall->getHallName(); $hallTags['HALL_OCCUPANCY'] = $hall->get_number_of_assignees(); $hallTags['HALL_CAPACITY'] = $hall->countNominalBeds(); $myTpl->setCurrentBlock('hall_repeat'); $myTpl->setData($hallTags); $myTpl->parseCurrentBlock(); } //return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/AssignmentTypeByFloor.tpl'); return $myTpl->get(); }
protected function render() { parent::render(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); if ($this->report->getTotal()) { $this->tpl['TOTAL'] = $this->report->getTotal(); } else { $this->tpl['EMPTY_MESSAGE'] = 'No students requesting early release.'; } if ($this->report->getTransfersTotal()) { $this->tpl['TRANSFERS_TOTAL'] = $this->report->getTransfersTotal(); } if ($this->report->getGradTotal()) { $this->tpl['GRAD_TOTAL'] = $this->report->getGradTotal(); } if ($this->report->getTeachingTotal()) { $this->tpl['TEACHING_TOTAL'] = $this->report->getTeachingTotal(); } if ($this->report->getInternTotal()) { $this->tpl['INTERN_TOTAL'] = $this->report->getInternTotal(); } if ($this->report->getWithdrawTotal()) { $this->tpl['WITHDRAW_TOTAL'] = $this->report->getWithdrawTotal(); } if ($this->report->getMarriageTotal()) { $this->tpl['MARRIAGE_TOTAL'] = $this->report->getMarriageTotal(); } if ($this->report->getAbroadTotal()) { $this->tpl['ABROAD_TOTAL'] = $this->report->getAbroadTotal(); } if ($this->report->getInternationalTotal()) { $this->tpl['INTL_TOTAL'] = $this->report->getInternationalTotal(); } foreach ($this->report->getData() as $row) { $this->tpl['rows'][] = $row; } return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/EarlyRelease.tpl'); }
protected function render() { parent::render(); $rows = $this->report->getRows(); $tpl = new PHPWS_Template('hms'); $tpl->setFile('admin/reports/MoveInTimes.tpl'); foreach ($rows as $hall) { $tpl->setCurrentBlock('floor-rows'); foreach ($hall['floor_rows'] as $floor) { $tpl->setData($floor); $tpl->parseCurrentBlock(); } unset($hall['floor-rows']); $tpl->setCurrentBlock('hall-rows'); $tpl->setData($hall); $tpl->parseCurrentBlock(); } $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $tpl->setCurrentBlock(); $tpl->setData($this->tpl); $tpl->parseCurrentBlock(); return $tpl->get(); }
protected function render() { parent::render(); $rows = $this->report->getRows(); $tpl = new PHPWS_Template('hms'); $tpl->setFile('admin/reports/HallOccupancy.tpl'); foreach ($rows['hall_rows'] as $hall) { $tpl->setCurrentBlock('floor-rows'); foreach ($hall['floor_rows'] as $floor) { $tpl->setData($floor); $tpl->parseCurrentBlock(); } unset($hall['floor-rows']); $tpl->setCurrentBlock('hall-rows'); $tpl->setData($hall); $tpl->parseCurrentBlock(); } $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $tpl->setCurrentBlock(); $tpl->setData(array('total_beds' => $rows['total_beds'], 'vacant_beds' => $rows['vacant_beds'])); $tpl->setData($this->tpl); $tpl->parseCurrentBlock(); return $tpl->get(); }
protected function render() { parent::render(); // term $this->tpl['TERM'] = Term::toString($this->report->getTerm()); /****************** * Hall summaries * */ $hallSummaries = $this->report->getHallSummaries(); $summaries = array(); foreach ($hallSummaries as $hallName => $sum) { $tplRow = array(); $tplRow['HALL_NAME'] = $hallName; // Males $tplRow['BLG_F_FR_MALE'] = $sum[TYPE_FRESHMEN][CLASS_FRESHMEN][MALE]; $tplRow['BLG_T_FR_MALE'] = $sum[TYPE_TRANSFER][CLASS_FRESHMEN][MALE]; $tplRow['BLG_T_SO_MALE'] = $sum[TYPE_TRANSFER][CLASS_SOPHOMORE][MALE]; $tplRow['BLG_T_JR_MALE'] = $sum[TYPE_TRANSFER][CLASS_JUNIOR][MALE]; $tplRow['BLG_T_SR_MALE'] = $sum[TYPE_TRANSFER][CLASS_SENIOR][MALE]; $tplRow['BLG_C_FR_MALE'] = $sum[TYPE_CONTINUING][CLASS_FRESHMEN][MALE]; $tplRow['BLG_C_SO_MALE'] = $sum[TYPE_CONTINUING][CLASS_SOPHOMORE][MALE]; $tplRow['BLG_C_JR_MALE'] = $sum[TYPE_CONTINUING][CLASS_JUNIOR][MALE]; $tplRow['BLG_C_SR_MALE'] = $sum[TYPE_CONTINUING][CLASS_SENIOR][MALE]; // Females $tplRow['BLG_F_FR_FEMALE'] = $sum[TYPE_FRESHMEN][CLASS_FRESHMEN][FEMALE]; $tplRow['BLG_T_FR_FEMALE'] = $sum[TYPE_TRANSFER][CLASS_FRESHMEN][FEMALE]; $tplRow['BLG_T_SO_FEMALE'] = $sum[TYPE_TRANSFER][CLASS_SOPHOMORE][FEMALE]; $tplRow['BLG_T_JR_FEMALE'] = $sum[TYPE_TRANSFER][CLASS_JUNIOR][FEMALE]; $tplRow['BLG_T_SR_FEMALE'] = $sum[TYPE_TRANSFER][CLASS_SENIOR][FEMALE]; $tplRow['BLG_C_FR_FEMALE'] = $sum[TYPE_CONTINUING][CLASS_FRESHMEN][FEMALE]; $tplRow['BLG_C_SO_FEMALE'] = $sum[TYPE_CONTINUING][CLASS_SOPHOMORE][FEMALE]; $tplRow['BLG_C_JR_FEMALE'] = $sum[TYPE_CONTINUING][CLASS_JUNIOR][FEMALE]; $tplRow['BLG_C_SR_FEMALE'] = $sum[TYPE_CONTINUING][CLASS_SENIOR][FEMALE]; $byGender = array(); $byType = array(); $byGender[MALE] = 0; $byGender[FEMALE] = 0; $byType[TYPE_FRESHMEN] = 0; $byType[TYPE_TRANSFER] = 0; $byType[TYPE_CONTINUING] = 0; foreach ($sum as $type => $t) { if ($type == 'OTHER') { continue; } foreach ($t as $class => $c) { foreach ($c as $gender => $g) { $byGender[$gender] += $g; $byType[$type] += $g; } } } // totals by gender $tplRow['BLG_TOTAL_MALES'] = $byGender[MALE]; $tplRow['BLG_TOTAL_FEMALES'] = $byGender[FEMALE]; // totals by types $tplRow['BLG_TOTAL_F'] = $byType[TYPE_FRESHMEN]; $tplRow['BLG_TOTAL_T'] = $byType[TYPE_TRANSFER]; $tplRow['BLG_TOTAL_C'] = $byType[TYPE_CONTINUING]; $tplRow['BLG_TOTAL'] = $byType[TYPE_FRESHMEN] + $byType[TYPE_TRANSFER] + $byType[TYPE_CONTINUING] + $sum['OTHER']; $tplRow['BLG_OTHER'] = $sum['OTHER']; $summaries[] = $tplRow; } // Use row-repeats to show all those summaries $this->tpl['summaries'] = $summaries; /************************ * Grand totals */ $grandTotals = $this->report->getGrandTotals(); $genderTotals = $this->report->getGrandTotalsByGender(); $typeTotals = $this->report->getGrandTotalsByType(); // Males $this->tpl['TOTAL_F_FR_MALE'] = $grandTotals[TYPE_FRESHMEN][CLASS_FRESHMEN][MALE]; $this->tpl['TOTAL_T_FR_MALE'] = $grandTotals[TYPE_TRANSFER][CLASS_FRESHMEN][MALE]; $this->tpl['TOTAL_T_SO_MALE'] = $grandTotals[TYPE_TRANSFER][CLASS_SOPHOMORE][MALE]; $this->tpl['TOTAL_T_JR_MALE'] = $grandTotals[TYPE_TRANSFER][CLASS_JUNIOR][MALE]; $this->tpl['TOTAL_T_SR_MALE'] = $grandTotals[TYPE_TRANSFER][CLASS_SENIOR][MALE]; $this->tpl['TOTAL_C_FR_MALE'] = $grandTotals[TYPE_CONTINUING][CLASS_FRESHMEN][MALE]; $this->tpl['TOTAL_C_SO_MALE'] = $grandTotals[TYPE_CONTINUING][CLASS_SOPHOMORE][MALE]; $this->tpl['TOTAL_C_JR_MALE'] = $grandTotals[TYPE_CONTINUING][CLASS_JUNIOR][MALE]; $this->tpl['TOTAL_C_SR_MALE'] = $grandTotals[TYPE_CONTINUING][CLASS_SENIOR][MALE]; // Females $this->tpl['TOTAL_F_FR_FEMALE'] = $grandTotals[TYPE_FRESHMEN][CLASS_FRESHMEN][FEMALE]; $this->tpl['TOTAL_T_FR_FEMALE'] = $grandTotals[TYPE_TRANSFER][CLASS_FRESHMEN][FEMALE]; $this->tpl['TOTAL_T_SO_FEMALE'] = $grandTotals[TYPE_TRANSFER][CLASS_SOPHOMORE][FEMALE]; $this->tpl['TOTAL_T_JR_FEMALE'] = $grandTotals[TYPE_TRANSFER][CLASS_JUNIOR][FEMALE]; $this->tpl['TOTAL_T_SR_FEMALE'] = $grandTotals[TYPE_TRANSFER][CLASS_SENIOR][FEMALE]; $this->tpl['TOTAL_C_FR_FEMALE'] = $grandTotals[TYPE_CONTINUING][CLASS_FRESHMEN][FEMALE]; $this->tpl['TOTAL_C_SO_FEMALE'] = $grandTotals[TYPE_CONTINUING][CLASS_SOPHOMORE][FEMALE]; $this->tpl['TOTAL_C_JR_FEMALE'] = $grandTotals[TYPE_CONTINUING][CLASS_JUNIOR][FEMALE]; $this->tpl['TOTAL_C_SR_FEMALE'] = $grandTotals[TYPE_CONTINUING][CLASS_SENIOR][FEMALE]; // totals by gender $this->tpl['TOTAL_TOTAL_MALES'] = $genderTotals[MALE]; $this->tpl['TOTAL_TOTAL_FEMALES'] = $genderTotals[FEMALE]; // totals by types $this->tpl['TOTAL_TOTAL_F'] = $typeTotals[TYPE_FRESHMEN]; $this->tpl['TOTAL_TOTAL_T'] = $typeTotals[TYPE_TRANSFER]; $this->tpl['TOTAL_TOTAL_C'] = $typeTotals[TYPE_CONTINUING]; $this->tpl['TOTAL_OTHER'] = $typeTotals['OTHER']; $this->tpl['TOTAL_TOTAL'] = $genderTotals[MALE] + $genderTotals[FEMALE] + $typeTotals['OTHER']; // Problems.... $problems = $this->report->getProblemsList(); foreach ($problems as $prob) { $row = array('DESC' => $prob); $this->tpl['problems'][] = $row; } return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/AssignmentDemographics.tpl'); }
protected function render() { parent::render(); $this->tpl['TERM'] = Term::toString($this->report->getTerm()); $unavailableBeds = $this->report->getUnavailableBeds(); $totalCount = $this->report->getTotalBedCount(); $unavailableCount = count($unavailableBeds); $availableCount = $totalCount - $unavailableCount; $this->tpl['TOTAL_BEDS'] = $totalCount; $this->tpl['UNAVAILABLE_BEDS'] = $unavailableCount; $this->tpl['AVAILABLE_BEDS'] = $availableCount; $rows = array(); $reservedTotal = 0; $raTotal = 0; $raRoommateTotal = 0; $privateTotal = 0; $overflowTotal = 0; $parlorTotal = 0; $intlTotal = 0; $offlineTotal = 0; // foreach beds, rende a row in a table foreach ($unavailableBeds as $bed) { // Check for and count special attributes if ($bed['reserved'] == 1) { $reservedTotal++; } if ($bed['ra'] == 1) { $raTotal++; } if ($bed['ra_roommate'] == 1) { $raRoommateTotal++; } if ($bed['private'] == 1) { $privateTotal++; } if ($bed['overflow'] == 1) { $overflowTotal++; } if ($bed['parlor'] == 1) { $parlorTotal++; } if ($bed['international_reserved'] == 1) { $intlTotal++; } if ($bed['offline'] == 1) { $offlineTotal++; } // Output row $row = array(); $row['HALL'] = $bed['hall_name']; $row['ROOM'] = $bed['room_number']; $row['BED_LETTER'] = $bed['bed_letter']; $row['RESERVED'] = $bed['reserved']; $row['RA'] = $bed['ra']; $row['RA_ROOMMATE'] = $bed['ra_roommate']; $row['PRIVATE'] = $bed['private']; $row['OVERFLOW'] = $bed['overflow']; $row['PARLOR'] = $bed['parlor']; $row['INTL'] = $bed['international_reserved']; $row['OFFLINE'] = $bed['offline']; $rows[] = $row; } $this->tpl['bed_rows'] = $rows; $this->tpl['RESERVED_TOTAL'] = $reservedTotal; $this->tpl['RA_TOTAL'] = $raTotal; $this->tpl['RA_ROOMMATE_TOTAL'] = $raRoommateTotal; $this->tpl['PRIVATE_TOTAL'] = $privateTotal; $this->tpl['OVERFLOW_TOTAL'] = $overflowTotal; $this->tpl['PARLOR_TOTAL'] = $parlorTotal; $this->tpl['INTL_TOTAL'] = $intlTotal; $this->tpl['OFFLINE_TOTAL'] = $offlineTotal; return PHPWS_Template::process($this->tpl, 'hms', 'admin/reports/UnavailableBeds.tpl'); }