<?php
namespace PHPMaker2020\hostelmgr20;

// Session
if (session_status() !== PHP_SESSION_ACTIVE)
	session_start(); // Init session data

// Output buffering
ob_start();

// Autoload
include_once "autoload.php";
?>
<?php

// Write header
WriteHeader(FALSE);

// Create page object
$Daily_Report_summary = new Daily_Report_summary();

// Run the page
$Daily_Report_summary->run();

// Setup login status
SetupLoginStatus();
SetClientVar("login", LoginStatus());

// Global Page Rendering event (in userfn*.php)
Page_Rendering();

// Page Rendering event
$Daily_Report_summary->Page_Render();
?>
<?php if (!$DashboardReport) { ?>
<?php include_once "header.php"; ?>
<?php } ?>
<?php if (!$Daily_Report_summary->isExport() && !$Daily_Report_summary->DrillDown && !$DashboardReport) { ?>
<script>
</script>
<script>
loadjs.ready("head", function() {

	// Client script
	// Write your client script here, no need to add script tags.

});
</script>
<?php } ?>
<a id="top"></a>
<?php if ((!$Daily_Report_summary->isExport() || $Daily_Report_summary->isExport("print")) && !$DashboardReport) { ?>
<!-- Content Container -->
<div id="ew-report" class="ew-report container-fluid">
<?php } ?>
<div class="btn-toolbar ew-toolbar">
<?php
if (!$Daily_Report_summary->DrillDownInPanel) {
	$Daily_Report_summary->ExportOptions->render("body");
	$Daily_Report_summary->SearchOptions->render("body");
	$Daily_Report_summary->FilterOptions->render("body");
}
?>
</div>
<?php $Daily_Report_summary->showPageHeader(); ?>
<?php
$Daily_Report_summary->showMessage();
?>
<?php if ((!$Daily_Report_summary->isExport() || $Daily_Report_summary->isExport("print")) && !$DashboardReport) { ?>
<div class="row">
<?php } ?>
<?php if ((!$Daily_Report_summary->isExport() || $Daily_Report_summary->isExport("print")) && !$DashboardReport) { ?>
<!-- Center Container -->
<div id="ew-center" class="<?php echo $Daily_Report_summary->CenterContentClass ?>">
<?php } ?>
<!-- Summary report (begin) -->
<div id="report_summary">
<?php if (!$Daily_Report_summary->isExport() && !$Daily_Report_summary->DrillDown && !$DashboardReport) { ?>
<?php } ?>
<?php
while ($Daily_Report_summary->GroupCount <= count($Daily_Report_summary->GroupRecords) && $Daily_Report_summary->GroupCount <= $Daily_Report_summary->DisplayGroups) {
?>
<?php

	// Show header
	if ($Daily_Report_summary->ShowHeader) {
?>
<?php if ($Daily_Report_summary->GroupCount > 1) { ?>
</tbody>
</table>
</div>
<!-- /.ew-grid-middle-panel -->
<!-- Report grid (end) -->
<?php if ($Daily_Report_summary->TotalGroups > 0) { ?>
<?php if (!$Daily_Report_summary->isExport() && !($Daily_Report_summary->DrillDown && $Daily_Report_summary->TotalGroups > 0)) { ?>
<!-- Bottom pager -->
<div class="card-footer ew-grid-lower-panel">
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?php echo CurrentPageName() ?>">
<?php echo $Daily_Report_summary->Pager->render() ?>
</form>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php } ?>
</div>
<!-- /.ew-grid -->
<?php echo $Daily_Report_summary->PageBreakContent ?>
<?php } ?>
<div class="<?php if (!$Daily_Report_summary->isExport("word") && !$Daily_Report_summary->isExport("excel")) { ?>card ew-card <?php } ?>ew-grid"<?php echo $Daily_Report_summary->ReportTableStyle ?>>
<?php if (!$Daily_Report_summary->isExport() && !($Daily_Report_summary->DrillDown && $Daily_Report_summary->TotalGroups > 0)) { ?>
<!-- Top pager -->
<div class="card-header ew-grid-upper-panel">
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?php echo CurrentPageName() ?>">
<?php echo $Daily_Report_summary->Pager->render() ?>
</form>
<div class="clearfix"></div>
</div>
<?php } ?>
<!-- Report grid (begin) -->
<div id="gmp_Daily_Report" class="<?php echo ResponsiveTableClass() ?>card-body ew-grid-middle-panel">
<table class="<?php echo $Daily_Report_summary->ReportTableClass ?>">
<thead>
	<!-- Table header -->
	<tr class="ew-table-header">
<?php if ($Daily_Report_summary->Date->Visible) { ?>
	<?php if ($Daily_Report_summary->Date->ShowGroupHeaderAsRow) { ?>
	<th data-name="Date">&nbsp;</th>
	<?php } else { ?>
		<?php if ($Daily_Report_summary->sortUrl($Daily_Report_summary->Date) == "") { ?>
	<th data-name="Date" class="<?php echo $Daily_Report_summary->Date->headerCellClass() ?>"><div class="Daily_Report_Date"><div class="ew-table-header-caption"><?php echo $Daily_Report_summary->Date->caption() ?></div></div></th>
		<?php } else { ?>
	<th data-name="Date" class="<?php echo $Daily_Report_summary->Date->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event, '<?php echo $Daily_Report_summary->sortUrl($Daily_Report_summary->Date) ?>', 1);"><div class="Daily_Report_Date">
		<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $Daily_Report_summary->Date->caption() ?></span><span class="ew-table-header-sort"><?php if ($Daily_Report_summary->Date->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($Daily_Report_summary->Date->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
	</div></div></th>
		<?php } ?>
	<?php } ?>
<?php } ?>
<?php if ($Daily_Report_summary->Hostel->Visible) { ?>
	<?php if ($Daily_Report_summary->Hostel->ShowGroupHeaderAsRow) { ?>
	<th data-name="Hostel">&nbsp;</th>
	<?php } else { ?>
		<?php if ($Daily_Report_summary->sortUrl($Daily_Report_summary->Hostel) == "") { ?>
	<th data-name="Hostel" class="<?php echo $Daily_Report_summary->Hostel->headerCellClass() ?>"><div class="Daily_Report_Hostel"><div class="ew-table-header-caption"><?php echo $Daily_Report_summary->Hostel->caption() ?></div></div></th>
		<?php } else { ?>
	<th data-name="Hostel" class="<?php echo $Daily_Report_summary->Hostel->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event, '<?php echo $Daily_Report_summary->sortUrl($Daily_Report_summary->Hostel) ?>', 1);"><div class="Daily_Report_Hostel">
		<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $Daily_Report_summary->Hostel->caption() ?></span><span class="ew-table-header-sort"><?php if ($Daily_Report_summary->Hostel->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($Daily_Report_summary->Hostel->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
	</div></div></th>
		<?php } ?>
	<?php } ?>
<?php } ?>
<?php if ($Daily_Report_summary->Absent->Visible) { ?>
	<?php if ($Daily_Report_summary->Absent->ShowGroupHeaderAsRow) { ?>
	<th data-name="Absent">&nbsp;</th>
	<?php } else { ?>
		<?php if ($Daily_Report_summary->sortUrl($Daily_Report_summary->Absent) == "") { ?>
	<th data-name="Absent" class="<?php echo $Daily_Report_summary->Absent->headerCellClass() ?>"><div class="Daily_Report_Absent"><div class="ew-table-header-caption"><?php echo $Daily_Report_summary->Absent->caption() ?></div></div></th>
		<?php } else { ?>
	<th data-name="Absent" class="<?php echo $Daily_Report_summary->Absent->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event, '<?php echo $Daily_Report_summary->sortUrl($Daily_Report_summary->Absent) ?>', 1);"><div class="Daily_Report_Absent">
		<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $Daily_Report_summary->Absent->caption() ?></span><span class="ew-table-header-sort"><?php if ($Daily_Report_summary->Absent->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($Daily_Report_summary->Absent->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
	</div></div></th>
		<?php } ?>
	<?php } ?>
<?php } ?>
<?php if ($Daily_Report_summary->Floor->Visible) { ?>
	<?php if ($Daily_Report_summary->sortUrl($Daily_Report_summary->Floor) == "") { ?>
	<th data-name="Floor" class="<?php echo $Daily_Report_summary->Floor->headerCellClass() ?>"><div class="Daily_Report_Floor"><div class="ew-table-header-caption"><?php echo $Daily_Report_summary->Floor->caption() ?></div></div></th>
	<?php } else { ?>
	<th data-name="Floor" class="<?php echo $Daily_Report_summary->Floor->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event, '<?php echo $Daily_Report_summary->sortUrl($Daily_Report_summary->Floor) ?>', 1);"><div class="Daily_Report_Floor">
		<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $Daily_Report_summary->Floor->caption() ?></span><span class="ew-table-header-sort"><?php if ($Daily_Report_summary->Floor->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($Daily_Report_summary->Floor->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
	</div></div></th>
	<?php } ?>
<?php } ?>
	</tr>
</thead>
<tbody>
<?php
		if ($Daily_Report_summary->TotalGroups == 0)
			break; // Show header only
		$Daily_Report_summary->ShowHeader = FALSE;
	} // End show header
?>
<?php

	// Build detail SQL
	$where = DetailFilterSql($Daily_Report_summary->Date, $Daily_Report_summary->getSqlFirstGroupField(), $Daily_Report_summary->Date->groupValue(), $Daily_Report_summary->Dbid);
	if ($Daily_Report_summary->PageFirstGroupFilter != "") $Daily_Report_summary->PageFirstGroupFilter .= " OR ";
	$Daily_Report_summary->PageFirstGroupFilter .= $where;
	if ($Daily_Report_summary->Filter != "")
		$where = "($Daily_Report_summary->Filter) AND ($where)";
	$sql = BuildReportSql($Daily_Report_summary->getSqlSelect(), $Daily_Report_summary->getSqlWhere(), $Daily_Report_summary->getSqlGroupBy(), $Daily_Report_summary->getSqlHaving(), $Daily_Report_summary->getSqlOrderBy(), $where, $Daily_Report_summary->Sort);
	$rs = $Daily_Report_summary->getRecordset($sql);
	$Daily_Report_summary->DetailRecords = $rs ? $rs->getRows() : [];
	$Daily_Report_summary->DetailRecordCount = count($Daily_Report_summary->DetailRecords);

	// Load detail records
	$Daily_Report_summary->Date->Records = &$Daily_Report_summary->DetailRecords;
	$Daily_Report_summary->Date->LevelBreak = TRUE; // Set field level break
		$Daily_Report_summary->GroupCounter[1] = $Daily_Report_summary->GroupCount;
		$Daily_Report_summary->Date->getCnt($Daily_Report_summary->Date->Records); // Get record count
?>
<?php if ($Daily_Report_summary->Date->Visible && $Daily_Report_summary->Date->ShowGroupHeaderAsRow) { ?>
<?php

		// Render header row
		$Daily_Report_summary->resetAttributes();
		$Daily_Report_summary->RowType = ROWTYPE_TOTAL;
		$Daily_Report_summary->RowTotalType = ROWTOTAL_GROUP;
		$Daily_Report_summary->RowTotalSubType = ROWTOTAL_HEADER;
		$Daily_Report_summary->RowGroupLevel = 1;
		$Daily_Report_summary->renderRow();
?>
	<tr<?php echo $Daily_Report_summary->rowAttributes(); ?>>
<?php if ($Daily_Report_summary->Date->Visible) { ?>
		<td data-field="Date"<?php echo $Daily_Report_summary->Date->cellAttributes(); ?>><span class="ew-group-toggle icon-collapse"></span></td>
<?php } ?>
		<td data-field="Date" colspan="<?php echo ($Page->GroupColumnCount + $Page->DetailColumnCount - 1) ?>"<?php echo $Daily_Report_summary->Date->cellAttributes() ?>>
<?php if ($Daily_Report_summary->sortUrl($Daily_Report_summary->Date) == "") { ?>
		<span class="ew-summary-caption Daily_Report_Date"><span class="ew-table-header-caption"><?php echo $Daily_Report_summary->Date->caption() ?></span></span>
<?php } else { ?>
		<span class="ew-table-header-btn ew-pointer ew-summary-caption Daily_Report_Date" onclick="ew.sort(event, '<?php echo $Daily_Report_summary->sortUrl($Daily_Report_summary->Date) ?>', 1);">
			<span class="ew-table-header-caption"><?php echo $Daily_Report_summary->Date->caption() ?></span>
			<span class="ew-table-header-sort"><?php if ($Daily_Report_summary->Date->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($Daily_Report_summary->Date->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span>
		</span>
<?php } ?>
		<?php echo $Language->phrase("SummaryColon") ?><span<?php echo $Daily_Report_summary->Date->viewAttributes() ?>><?php echo $Daily_Report_summary->Date->GroupViewValue ?></span>
		<span class="ew-summary-count">(<span class="ew-aggregate-caption"><?php echo $Language->phrase("RptCnt") ?></span><?php echo $Language->phrase("AggregateEqual") ?><span class="ew-aggregate-value"><?php echo FormatNumber($Daily_Report_summary->Date->Count, 0); ?></span>)</span>
		</td>
	</tr>
<?php } ?>
<?php
	$Daily_Report_summary->Hostel->getDistinctValues($Daily_Report_summary->Date->Records);
	$Daily_Report_summary->setGroupCount(count($Daily_Report_summary->Hostel->DistinctValues), $Daily_Report_summary->GroupCounter[1]);
	$Daily_Report_summary->GroupCounter[2] = 0; // Init group count index
	foreach ($Daily_Report_summary->Hostel->DistinctValues as $Hostel) { // Load records for this distinct value
		$Daily_Report_summary->Hostel->setGroupValue($Hostel); // Set group value
		$Daily_Report_summary->Hostel->getDistinctRecords($Daily_Report_summary->Date->Records, $Daily_Report_summary->Hostel->groupValue());
		$Daily_Report_summary->Hostel->LevelBreak = TRUE; // Set field level break
		$Daily_Report_summary->GroupCounter[2]++;
		$Daily_Report_summary->Hostel->getCnt($Daily_Report_summary->Hostel->Records); // Get record count
?>
<?php if ($Daily_Report_summary->Hostel->Visible && $Daily_Report_summary->Hostel->ShowGroupHeaderAsRow) { ?>
<?php

		// Render header row
		$Daily_Report_summary->Hostel->setDbValue($Hostel); // Set current value for Hostel
		$Daily_Report_summary->resetAttributes();
		$Daily_Report_summary->RowType = ROWTYPE_TOTAL;
		$Daily_Report_summary->RowTotalType = ROWTOTAL_GROUP;
		$Daily_Report_summary->RowTotalSubType = ROWTOTAL_HEADER;
		$Daily_Report_summary->RowGroupLevel = 2;
		$Daily_Report_summary->renderRow();
?>
	<tr<?php echo $Daily_Report_summary->rowAttributes(); ?>>
<?php if ($Daily_Report_summary->Date->Visible) { ?>
		<td data-field="Date"<?php echo $Daily_Report_summary->Date->cellAttributes(); ?>></td>
<?php } ?>
<?php if ($Daily_Report_summary->Hostel->Visible) { ?>
		<td data-field="Hostel"<?php echo $Daily_Report_summary->Hostel->cellAttributes(); ?>><span class="ew-group-toggle icon-collapse"></span></td>
<?php } ?>
		<td data-field="Hostel" colspan="<?php echo ($Page->GroupColumnCount + $Page->DetailColumnCount - 2) ?>"<?php echo $Daily_Report_summary->Hostel->cellAttributes() ?>>
<?php if ($Daily_Report_summary->sortUrl($Daily_Report_summary->Hostel) == "") { ?>
		<span class="ew-summary-caption Daily_Report_Hostel"><span class="ew-table-header-caption"><?php echo $Daily_Report_summary->Hostel->caption() ?></span></span>
<?php } else { ?>
		<span class="ew-table-header-btn ew-pointer ew-summary-caption Daily_Report_Hostel" onclick="ew.sort(event, '<?php echo $Daily_Report_summary->sortUrl($Daily_Report_summary->Hostel) ?>', 1);">
			<span class="ew-table-header-caption"><?php echo $Daily_Report_summary->Hostel->caption() ?></span>
			<span class="ew-table-header-sort"><?php if ($Daily_Report_summary->Hostel->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($Daily_Report_summary->Hostel->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span>
		</span>
<?php } ?>
		<?php echo $Language->phrase("SummaryColon") ?><span<?php echo $Daily_Report_summary->Hostel->viewAttributes() ?>><?php echo $Daily_Report_summary->Hostel->GroupViewValue ?></span>
		<span class="ew-summary-count">(<span class="ew-aggregate-caption"><?php echo $Language->phrase("RptCnt") ?></span><?php echo $Language->phrase("AggregateEqual") ?><span class="ew-aggregate-value"><?php echo FormatNumber($Daily_Report_summary->Hostel->Count, 0); ?></span>)</span>
		</td>
	</tr>
<?php } ?>
<?php
	$Daily_Report_summary->Absent->getDistinctValues($Daily_Report_summary->Hostel->Records);
	$Daily_Report_summary->setGroupCount(count($Daily_Report_summary->Absent->DistinctValues), $Daily_Report_summary->GroupCounter[1], $Daily_Report_summary->GroupCounter[2]);
	$Daily_Report_summary->GroupCounter[3] = 0; // Init group count index
	foreach ($Daily_Report_summary->Absent->DistinctValues as $Absent) { // Load records for this distinct value
		$Daily_Report_summary->Absent->setGroupValue($Absent); // Set group value
		$Daily_Report_summary->Absent->getDistinctRecords($Daily_Report_summary->Hostel->Records, $Daily_Report_summary->Absent->groupValue());
		$Daily_Report_summary->Absent->LevelBreak = TRUE; // Set field level break
		$Daily_Report_summary->GroupCounter[3]++;
		$Daily_Report_summary->Absent->getCnt($Daily_Report_summary->Absent->Records); // Get record count
		$Daily_Report_summary->setGroupCount($Daily_Report_summary->Absent->Count, $Daily_Report_summary->GroupCounter[1], $Daily_Report_summary->GroupCounter[2], $Daily_Report_summary->GroupCounter[3]);
?>
<?php if ($Daily_Report_summary->Absent->Visible && $Daily_Report_summary->Absent->ShowGroupHeaderAsRow) { ?>
<?php

		// Render header row
		$Daily_Report_summary->Absent->setDbValue($Absent); // Set current value for Absent
		$Daily_Report_summary->resetAttributes();
		$Daily_Report_summary->RowType = ROWTYPE_TOTAL;
		$Daily_Report_summary->RowTotalType = ROWTOTAL_GROUP;
		$Daily_Report_summary->RowTotalSubType = ROWTOTAL_HEADER;
		$Daily_Report_summary->RowGroupLevel = 3;
		$Daily_Report_summary->renderRow();
?>
	<tr<?php echo $Daily_Report_summary->rowAttributes(); ?>>
<?php if ($Daily_Report_summary->Date->Visible) { ?>
		<td data-field="Date"<?php echo $Daily_Report_summary->Date->cellAttributes(); ?>></td>
<?php } ?>
<?php if ($Daily_Report_summary->Hostel->Visible) { ?>
		<td data-field="Hostel"<?php echo $Daily_Report_summary->Hostel->cellAttributes(); ?>></td>
<?php } ?>
<?php if ($Daily_Report_summary->Absent->Visible) { ?>
		<td data-field="Absent"<?php echo $Daily_Report_summary->Absent->cellAttributes(); ?>><span class="ew-group-toggle icon-collapse"></span></td>
<?php } ?>
		<td data-field="Absent" colspan="<?php echo ($Page->GroupColumnCount + $Page->DetailColumnCount - 3) ?>"<?php echo $Daily_Report_summary->Absent->cellAttributes() ?>>
<?php if ($Daily_Report_summary->sortUrl($Daily_Report_summary->Absent) == "") { ?>
		<span class="ew-summary-caption Daily_Report_Absent"><span class="ew-table-header-caption"><?php echo $Daily_Report_summary->Absent->caption() ?></span></span>
<?php } else { ?>
		<span class="ew-table-header-btn ew-pointer ew-summary-caption Daily_Report_Absent" onclick="ew.sort(event, '<?php echo $Daily_Report_summary->sortUrl($Daily_Report_summary->Absent) ?>', 1);">
			<span class="ew-table-header-caption"><?php echo $Daily_Report_summary->Absent->caption() ?></span>
			<span class="ew-table-header-sort"><?php if ($Daily_Report_summary->Absent->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($Daily_Report_summary->Absent->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span>
		</span>
<?php } ?>
		<?php echo $Language->phrase("SummaryColon") ?><span<?php echo $Daily_Report_summary->Absent->viewAttributes() ?>><?php echo $Daily_Report_summary->Absent->GroupViewValue ?></span>
		<span class="ew-summary-count">(<span class="ew-aggregate-caption"><?php echo $Language->phrase("RptCnt") ?></span><?php echo $Language->phrase("AggregateEqual") ?><span class="ew-aggregate-value"><?php echo FormatNumber($Daily_Report_summary->Absent->Count, 0); ?></span>)</span>
		</td>
	</tr>
<?php } ?>
<?php
	$Daily_Report_summary->RecordCount = 0; // Reset record count
	foreach ($Daily_Report_summary->Absent->Records as $record) {
		$Daily_Report_summary->RecordCount++;
		$Daily_Report_summary->RecordIndex++;
		$Daily_Report_summary->loadRowValues($record);
?>
<?php

		// Render detail row
		$Daily_Report_summary->resetAttributes();
		$Daily_Report_summary->RowType = ROWTYPE_DETAIL;
		$Daily_Report_summary->renderRow();
?>
	<tr<?php echo $Daily_Report_summary->rowAttributes(); ?>>
<?php if ($Daily_Report_summary->Date->Visible) { ?>
	<?php if ($Daily_Report_summary->Date->ShowGroupHeaderAsRow) { ?>
		<td data-field="Date"<?php echo $Daily_Report_summary->Date->cellAttributes(); ?>>&nbsp;</td>
	<?php } else { ?>
		<td data-field="Date"<?php echo $Daily_Report_summary->Date->cellAttributes(); ?>><span<?php echo $Daily_Report_summary->Date->viewAttributes() ?>><?php echo $Daily_Report_summary->Date->GroupViewValue ?></span></td>
	<?php } ?>
<?php } ?>
<?php if ($Daily_Report_summary->Hostel->Visible) { ?>
	<?php if ($Daily_Report_summary->Hostel->ShowGroupHeaderAsRow) { ?>
		<td data-field="Hostel"<?php echo $Daily_Report_summary->Hostel->cellAttributes(); ?>>&nbsp;</td>
	<?php } else { ?>
		<td data-field="Hostel"<?php echo $Daily_Report_summary->Hostel->cellAttributes(); ?>><span<?php echo $Daily_Report_summary->Hostel->viewAttributes() ?>><?php echo $Daily_Report_summary->Hostel->GroupViewValue ?></span></td>
	<?php } ?>
<?php } ?>
<?php if ($Daily_Report_summary->Absent->Visible) { ?>
	<?php if ($Daily_Report_summary->Absent->ShowGroupHeaderAsRow) { ?>
		<td data-field="Absent"<?php echo $Daily_Report_summary->Absent->cellAttributes(); ?>>&nbsp;</td>
	<?php } else { ?>
		<td data-field="Absent"<?php echo $Daily_Report_summary->Absent->cellAttributes(); ?>><span<?php echo $Daily_Report_summary->Absent->viewAttributes() ?>><?php echo $Daily_Report_summary->Absent->GroupViewValue ?></span></td>
	<?php } ?>
<?php } ?>
<?php if ($Daily_Report_summary->Floor->Visible) { ?>
		<td data-field="Floor"<?php echo $Daily_Report_summary->Floor->cellAttributes() ?>>
<span<?php echo $Daily_Report_summary->Floor->viewAttributes() ?>><?php echo $Daily_Report_summary->Floor->getViewValue() ?></span>
</td>
<?php } ?>
	</tr>
<?php
	}
?>
<?php if ($Daily_Report_summary->TotalGroups > 0) { ?>
<?php
	$Daily_Report_summary->Floor->getSum($Daily_Report_summary->Absent->Records); // Get Sum
	$Daily_Report_summary->resetAttributes();
	$Daily_Report_summary->RowType = ROWTYPE_TOTAL;
	$Daily_Report_summary->RowTotalType = ROWTOTAL_GROUP;
	$Daily_Report_summary->RowTotalSubType = ROWTOTAL_FOOTER;
	$Daily_Report_summary->RowGroupLevel = 3;
	$Daily_Report_summary->renderRow();
?>
<?php if ($Daily_Report_summary->Absent->ShowCompactSummaryFooter) { ?>
	<tr<?php echo $Daily_Report_summary->rowAttributes(); ?>>
<?php if ($Daily_Report_summary->Date->Visible) { ?>
		<td data-field="Date"<?php echo $Daily_Report_summary->Date->cellAttributes() ?>>
	<?php if ($Daily_Report_summary->Date->ShowGroupHeaderAsRow) { ?>
		&nbsp;
	<?php } elseif ($Daily_Report_summary->RowGroupLevel != 1) { ?>
		&nbsp;
	<?php } else { ?>
		<span class="ew-summary-count"><span class="ew-aggregate-caption"><?php echo $Language->phrase("RptCnt") ?></span><?php echo $Language->phrase("AggregateEqual") ?><span class="ew-aggregate-value"><?php echo FormatNumber($Daily_Report_summary->Date->Count, 0); ?></span></span>
	<?php } ?>
		</td>
<?php } ?>
<?php if ($Daily_Report_summary->Hostel->Visible) { ?>
		<td data-field="Hostel"<?php echo $Daily_Report_summary->Hostel->cellAttributes() ?>>
	<?php if ($Daily_Report_summary->Hostel->ShowGroupHeaderAsRow) { ?>
		&nbsp;
	<?php } elseif ($Daily_Report_summary->RowGroupLevel != 2) { ?>
		&nbsp;
	<?php } else { ?>
		<span class="ew-summary-count"><span class="ew-aggregate-caption"><?php echo $Language->phrase("RptCnt") ?></span><?php echo $Language->phrase("AggregateEqual") ?><span class="ew-aggregate-value"><?php echo FormatNumber($Daily_Report_summary->Hostel->Count, 0); ?></span></span>
	<?php } ?>
		</td>
<?php } ?>
<?php if ($Daily_Report_summary->Absent->Visible) { ?>
		<td data-field="Absent"<?php echo $Daily_Report_summary->Absent->cellAttributes() ?>>
	<?php if ($Daily_Report_summary->Absent->ShowGroupHeaderAsRow) { ?>
		&nbsp;
	<?php } elseif ($Daily_Report_summary->RowGroupLevel != 3) { ?>
		&nbsp;
	<?php } else { ?>
		<span class="ew-summary-count"><span class="ew-aggregate-caption"><?php echo $Language->phrase("RptCnt") ?></span><?php echo $Language->phrase("AggregateEqual") ?><span class="ew-aggregate-value"><?php echo FormatNumber($Daily_Report_summary->Absent->Count, 0); ?></span></span>
	<?php } ?>
		</td>
<?php } ?>
<?php if ($Daily_Report_summary->Floor->Visible) { ?>
		<td data-field="Floor"<?php echo $Daily_Report_summary->Absent->cellAttributes() ?>><span class="ew-aggregate-caption"><?php echo $Language->phrase("RptSum") ?></span><?php echo $Language->phrase("AggregateEqual") ?><span class="ew-aggregate-value"><span<?php echo $Daily_Report_summary->Floor->viewAttributes() ?>><?php echo $Daily_Report_summary->Floor->SumViewValue ?></span></span></td>
<?php } ?>
	</tr>
<?php } else { ?>
	<tr<?php echo $Daily_Report_summary->rowAttributes(); ?>>
<?php if ($Daily_Report_summary->Date->Visible) { ?>
		<td data-field="Date"<?php echo $Daily_Report_summary->Date->cellAttributes() ?>>&nbsp;</td>
<?php } ?>
<?php if ($Daily_Report_summary->Hostel->Visible) { ?>
		<td data-field="Hostel"<?php echo $Daily_Report_summary->Hostel->cellAttributes() ?>>&nbsp;</td>
<?php } ?>
<?php if ($Daily_Report_summary->SubGroupColumnCount + $Daily_Report_summary->DetailColumnCount - 1 > 0) { ?>
		<td colspan="<?php echo ($Daily_Report_summary->SubGroupColumnCount + $Daily_Report_summary->DetailColumnCount - 1) ?>"<?php echo $Daily_Report_summary->Absent->cellAttributes() ?>><?php echo str_replace(["%v", "%c"], [$Daily_Report_summary->Absent->GroupViewValue, $Daily_Report_summary->Absent->caption()], $Language->phrase("RptSumHead")) ?> <span class="ew-dir-ltr">(<?php echo FormatNumber($Daily_Report_summary->Absent->Count, 0); ?><?php echo $Language->phrase("RptDtlRec") ?>)</span></td>
<?php } ?>
	</tr>
	<tr<?php echo $Daily_Report_summary->rowAttributes(); ?>>
<?php if ($Daily_Report_summary->Date->Visible) { ?>
		<td data-field="Date"<?php echo $Daily_Report_summary->Date->cellAttributes() ?>>&nbsp;</td>
<?php } ?>
<?php if ($Daily_Report_summary->Hostel->Visible) { ?>
		<td data-field="Hostel"<?php echo $Daily_Report_summary->Hostel->cellAttributes() ?>>&nbsp;</td>
<?php } ?>
<?php if ($Daily_Report_summary->GroupColumnCount > 0) { ?>
		<td colspan="<?php echo ($Daily_Report_summary->GroupColumnCount - 2) ?>"<?php echo $Daily_Report_summary->Absent->cellAttributes() ?>><?php echo $Language->phrase("RptSum") ?></td>
<?php } ?>
<?php if ($Daily_Report_summary->Floor->Visible) { ?>
		<td data-field="Floor"<?php echo $Daily_Report_summary->Floor->cellAttributes() ?>>
<span<?php echo $Daily_Report_summary->Floor->viewAttributes() ?>><?php echo $Daily_Report_summary->Floor->SumViewValue ?></span>
</td>
<?php } ?>
	</tr>
<?php } ?>
<?php } ?>
<?php
	} // End group level 2
	} // End group level 1
?>
<?php

	// Next group
	$Daily_Report_summary->loadGroupRowValues();

	// Show header if page break
	if ($Daily_Report_summary->isExport())
		$Daily_Report_summary->ShowHeader = ($Daily_Report_summary->ExportPageBreakCount == 0) ? FALSE : ($Daily_Report_summary->GroupCount % $Daily_Report_summary->ExportPageBreakCount == 0);

	// Page_Breaking server event
	if ($Daily_Report_summary->ShowHeader)
		$Daily_Report_summary->Page_Breaking($Daily_Report_summary->ShowHeader, $Daily_Report_summary->PageBreakContent);
	$Daily_Report_summary->GroupCount++;
} // End while
?>
<?php if ($Daily_Report_summary->TotalGroups > 0) { ?>
</tbody>
<tfoot>
<?php
	$Daily_Report_summary->resetAttributes();
	$Daily_Report_summary->RowType = ROWTYPE_TOTAL;
	$Daily_Report_summary->RowTotalType = ROWTOTAL_GRAND;
	$Daily_Report_summary->RowTotalSubType = ROWTOTAL_FOOTER;
	$Daily_Report_summary->RowAttrs["class"] = "ew-rpt-grand-summary";
	$Daily_Report_summary->renderRow();
?>
<?php if ($Daily_Report_summary->Date->ShowCompactSummaryFooter) { ?>
	<tr<?php echo $Daily_Report_summary->rowAttributes() ?>><td colspan="<?php echo ($Daily_Report_summary->GroupColumnCount + $Daily_Report_summary->DetailColumnCount) ?>"><?php echo $Language->phrase("RptGrandSummary") ?> <span class="ew-summary-count">(<span class="ew-aggregate-caption"><?php echo $Language->phrase("RptCnt") ?></span><?php echo $Language->phrase("AggregateEqual") ?><span class="ew-aggregate-value"><?php echo FormatNumber($Daily_Report_summary->TotalCount, 0); ?></span>)</span></td></tr>
	<tr<?php echo $Daily_Report_summary->rowAttributes() ?>>
<?php if ($Daily_Report_summary->GroupColumnCount > 0) { ?>
		<td colspan="<?php echo $Daily_Report_summary->GroupColumnCount ?>" class="ew-rpt-grp-aggregate">&nbsp;</td>
<?php } ?>
<?php if ($Daily_Report_summary->Floor->Visible) { ?>
		<td data-field="Floor"<?php echo $Daily_Report_summary->Floor->cellAttributes() ?>><span class="ew-aggregate-caption"><?php echo $Language->phrase("RptSum") ?></span><?php echo $Language->phrase("AggregateEqual") ?><span class="ew-aggregate-value"><span<?php echo $Daily_Report_summary->Floor->viewAttributes() ?>><?php echo $Daily_Report_summary->Floor->SumViewValue ?></span></span></td>
<?php } ?>
	</tr>
<?php } else { ?>
	<tr<?php echo $Daily_Report_summary->rowAttributes() ?>><td colspan="<?php echo ($Daily_Report_summary->GroupColumnCount + $Daily_Report_summary->DetailColumnCount) ?>"><?php echo $Language->phrase("RptGrandSummary") ?> <span class="ew-summary-count">(<?php echo FormatNumber($Daily_Report_summary->TotalCount, 0); ?><?php echo $Language->phrase("RptDtlRec") ?>)</span></td></tr>
	<tr<?php echo $Daily_Report_summary->rowAttributes() ?>>
<?php if ($Daily_Report_summary->GroupColumnCount > 0) { ?>
		<td colspan="<?php echo $Daily_Report_summary->GroupColumnCount ?>" class="ew-rpt-grp-aggregate"><?php echo $Language->phrase("RptSum") ?></td>
<?php } ?>
<?php if ($Daily_Report_summary->Floor->Visible) { ?>
		<td data-field="Floor"<?php echo $Daily_Report_summary->Floor->cellAttributes() ?>>
<span<?php echo $Daily_Report_summary->Floor->viewAttributes() ?>><?php echo $Daily_Report_summary->Floor->SumViewValue ?></span>
</td>
<?php } ?>
	</tr>
<?php } ?>
</tfoot>
</table>
</div>
<!-- /.ew-grid-middle-panel -->
<!-- Report grid (end) -->
<?php if ($Daily_Report_summary->TotalGroups > 0) { ?>
<?php if (!$Daily_Report_summary->isExport() && !($Daily_Report_summary->DrillDown && $Daily_Report_summary->TotalGroups > 0)) { ?>
<!-- Bottom pager -->
<div class="card-footer ew-grid-lower-panel">
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?php echo CurrentPageName() ?>">
<?php echo $Daily_Report_summary->Pager->render() ?>
</form>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php } ?>
</div>
<!-- /.ew-grid -->
<?php } ?>
</div>
<!-- /#report-summary -->
<!-- Summary report (end) -->
<?php if ((!$Daily_Report_summary->isExport() || $Daily_Report_summary->isExport("print")) && !$DashboardReport) { ?>
</div>
<!-- /#ew-center -->
<?php } ?>
<?php if ((!$Daily_Report_summary->isExport() || $Daily_Report_summary->isExport("print")) && !$DashboardReport) { ?>
</div>
<!-- /.row -->
<?php } ?>
<?php if ((!$Daily_Report_summary->isExport() || $Daily_Report_summary->isExport("print")) && !$DashboardReport) { ?>
</div>
<!-- /.ew-report -->
<?php } ?>
<?php
$Daily_Report_summary->showPageFooter();
if (Config("DEBUG"))
	echo GetDebugMessage();
?>
<?php if (!$Daily_Report_summary->isExport() && !$Daily_Report_summary->DrillDown && !$DashboardReport) { ?>
<script>
loadjs.ready("load", function() {

	// Startup script
	// Write your table-specific startup script here
	// console.log("page loaded");

});
</script>
<?php } ?>
<?php if (!$DashboardReport) { ?>
<?php include_once "footer.php"; ?>
<?php } ?>
<?php
$Daily_Report_summary->terminate();
?>