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

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

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

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

// Page Rendering event
$hostel_delete->Page_Render();
?>
<?php include_once "header.php"; ?>
<script>
var fhosteldelete, currentPageID;
loadjs.ready("head", function() {

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

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

});
</script>
<?php $hostel_delete->showPageHeader(); ?>
<?php
$hostel_delete->showMessage();
?>
<form name="fhosteldelete" id="fhosteldelete" class="form-inline ew-form ew-delete-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="hostel">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($hostel_delete->RecKeys as $key) { ?>
<?php $keyvalue = is_array($key) ? implode(Config("COMPOSITE_KEY_SEPARATOR"), $key) : $key; ?>
<input type="hidden" name="key_m[]" value="<?php echo HtmlEncode($keyvalue) ?>">
<?php } ?>
<div class="card ew-card ew-grid">
<div class="<?php echo ResponsiveTableClass() ?>card-body ew-grid-middle-panel">
<table class="table ew-table">
	<thead>
	<tr class="ew-table-header">
<?php if ($hostel_delete->id->Visible) { // id ?>
		<th class="<?php echo $hostel_delete->id->headerCellClass() ?>"><span id="elh_hostel_id" class="hostel_id"><?php echo $hostel_delete->id->caption() ?></span></th>
<?php } ?>
<?php if ($hostel_delete->Hostel_Name->Visible) { // Hostel_Name ?>
		<th class="<?php echo $hostel_delete->Hostel_Name->headerCellClass() ?>"><span id="elh_hostel_Hostel_Name" class="hostel_Hostel_Name"><?php echo $hostel_delete->Hostel_Name->caption() ?></span></th>
<?php } ?>
<?php if ($hostel_delete->Fee->Visible) { // Fee ?>
		<th class="<?php echo $hostel_delete->Fee->headerCellClass() ?>"><span id="elh_hostel_Fee" class="hostel_Fee"><?php echo $hostel_delete->Fee->caption() ?></span></th>
<?php } ?>
<?php if ($hostel_delete->Remarks->Visible) { // Remarks ?>
		<th class="<?php echo $hostel_delete->Remarks->headerCellClass() ?>"><span id="elh_hostel_Remarks" class="hostel_Remarks"><?php echo $hostel_delete->Remarks->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$hostel_delete->RecordCount = 0;
$i = 0;
while (!$hostel_delete->Recordset->EOF) {
	$hostel_delete->RecordCount++;
	$hostel_delete->RowCount++;

	// Set row properties
	$hostel->resetAttributes();
	$hostel->RowType = ROWTYPE_VIEW; // View

	// Get the field contents
	$hostel_delete->loadRowValues($hostel_delete->Recordset);

	// Render row
	$hostel_delete->renderRow();
?>
	<tr <?php echo $hostel->rowAttributes() ?>>
<?php if ($hostel_delete->id->Visible) { // id ?>
		<td <?php echo $hostel_delete->id->cellAttributes() ?>>
<span id="el<?php echo $hostel_delete->RowCount ?>_hostel_id" class="hostel_id">
<span<?php echo $hostel_delete->id->viewAttributes() ?>><?php echo $hostel_delete->id->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($hostel_delete->Hostel_Name->Visible) { // Hostel_Name ?>
		<td <?php echo $hostel_delete->Hostel_Name->cellAttributes() ?>>
<span id="el<?php echo $hostel_delete->RowCount ?>_hostel_Hostel_Name" class="hostel_Hostel_Name">
<span<?php echo $hostel_delete->Hostel_Name->viewAttributes() ?>><?php echo $hostel_delete->Hostel_Name->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($hostel_delete->Fee->Visible) { // Fee ?>
		<td <?php echo $hostel_delete->Fee->cellAttributes() ?>>
<span id="el<?php echo $hostel_delete->RowCount ?>_hostel_Fee" class="hostel_Fee">
<span<?php echo $hostel_delete->Fee->viewAttributes() ?>><?php echo $hostel_delete->Fee->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($hostel_delete->Remarks->Visible) { // Remarks ?>
		<td <?php echo $hostel_delete->Remarks->cellAttributes() ?>>
<span id="el<?php echo $hostel_delete->RowCount ?>_hostel_Remarks" class="hostel_Remarks">
<span<?php echo $hostel_delete->Remarks->viewAttributes() ?>><?php echo $hostel_delete->Remarks->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$hostel_delete->Recordset->moveNext();
}
$hostel_delete->Recordset->close();
?>
</tbody>
</table>
</div>
</div>
<div>
<button class="btn btn-primary ew-btn" name="btn-action" id="btn-action" type="submit"><?php echo $Language->phrase("DeleteBtn") ?></button>
<button class="btn btn-default ew-btn" name="btn-cancel" id="btn-cancel" type="button" data-href="<?php echo $hostel_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$hostel_delete->showPageFooter();
if (Config("DEBUG"))
	echo GetDebugMessage();
?>
<script>
loadjs.ready("load", function() {

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

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