<?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
$health_view = new health_view();

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

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

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

// Page Rendering event
$health_view->Page_Render();
?>
<?php include_once "header.php"; ?>
<?php if (!$health_view->isExport()) { ?>
<script>
var fhealthview, currentPageID;
loadjs.ready("head", function() {

	// Form object
	currentPageID = ew.PAGE_ID = "view";
	fhealthview = currentForm = new ew.Form("fhealthview", "view");
	loadjs.done("fhealthview");
});
</script>
<script>
loadjs.ready("head", function() {

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

});
</script>
<?php } ?>
<?php if (!$health_view->isExport()) { ?>
<div class="btn-toolbar ew-toolbar">
<?php $health_view->ExportOptions->render("body") ?>
<?php $health_view->OtherOptions->render("body") ?>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php $health_view->showPageHeader(); ?>
<?php
$health_view->showMessage();
?>
<form name="fhealthview" id="fhealthview" class="form-inline ew-form ew-view-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($Page->CheckToken) { ?>
<input type="hidden" name="<?php echo Config("TOKEN_NAME") ?>" value="<?php echo $Page->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="health">
<input type="hidden" name="modal" value="<?php echo (int)$health_view->IsModal ?>">
<table class="table table-striped table-sm ew-view-table">
<?php if ($health_view->id->Visible) { // id ?>
	<tr id="r_id">
		<td class="<?php echo $health_view->TableLeftColumnClass ?>"><span id="elh_health_id"><?php echo $health_view->id->caption() ?></span></td>
		<td data-name="id" <?php echo $health_view->id->cellAttributes() ?>>
<span id="el_health_id">
<span<?php echo $health_view->id->viewAttributes() ?>><?php echo $health_view->id->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($health_view->Health_Issue->Visible) { // Health_Issue ?>
	<tr id="r_Health_Issue">
		<td class="<?php echo $health_view->TableLeftColumnClass ?>"><span id="elh_health_Health_Issue"><?php echo $health_view->Health_Issue->caption() ?></span></td>
		<td data-name="Health_Issue" <?php echo $health_view->Health_Issue->cellAttributes() ?>>
<span id="el_health_Health_Issue">
<span<?php echo $health_view->Health_Issue->viewAttributes() ?>><?php echo $health_view->Health_Issue->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($health_view->Status->Visible) { // Status ?>
	<tr id="r_Status">
		<td class="<?php echo $health_view->TableLeftColumnClass ?>"><span id="elh_health_Status"><?php echo $health_view->Status->caption() ?></span></td>
		<td data-name="Status" <?php echo $health_view->Status->cellAttributes() ?>>
<span id="el_health_Status">
<span<?php echo $health_view->Status->viewAttributes() ?>><div class="custom-control custom-checkbox d-inline-block"><input type="checkbox" id="x_Status" class="custom-control-input" value="<?php echo $health_view->Status->getViewValue() ?>" disabled<?php if (ConvertToBool($health_view->Status->CurrentValue)) { ?> checked<?php } ?>><label class="custom-control-label" for="x_Status"></label></div></span>
</span>
</td>
	</tr>
<?php } ?>
</table>
</form>
<?php
$health_view->showPageFooter();
if (Config("DEBUG"))
	echo GetDebugMessage();
?>
<?php if (!$health_view->isExport()) { ?>
<script>
loadjs.ready("load", function() {

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

});
</script>
<?php } ?>
<?php include_once "footer.php"; ?>
<?php
$health_view->terminate();
?>