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

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

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

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

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

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

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

});
</script>
<?php $rooms_delete->showPageHeader(); ?>
<?php
$rooms_delete->showMessage();
?>
<form name="froomsdelete" id="froomsdelete" 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="rooms">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($rooms_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 ($rooms_delete->id->Visible) { // id ?>
		<th class="<?php echo $rooms_delete->id->headerCellClass() ?>"><span id="elh_rooms_id" class="rooms_id"><?php echo $rooms_delete->id->caption() ?></span></th>
<?php } ?>
<?php if ($rooms_delete->Hostel_Name->Visible) { // Hostel_Name ?>
		<th class="<?php echo $rooms_delete->Hostel_Name->headerCellClass() ?>"><span id="elh_rooms_Hostel_Name" class="rooms_Hostel_Name"><?php echo $rooms_delete->Hostel_Name->caption() ?></span></th>
<?php } ?>
<?php if ($rooms_delete->Floor->Visible) { // Floor ?>
		<th class="<?php echo $rooms_delete->Floor->headerCellClass() ?>"><span id="elh_rooms_Floor" class="rooms_Floor"><?php echo $rooms_delete->Floor->caption() ?></span></th>
<?php } ?>
<?php if ($rooms_delete->Room_No->Visible) { // Room_No ?>
		<th class="<?php echo $rooms_delete->Room_No->headerCellClass() ?>"><span id="elh_rooms_Room_No" class="rooms_Room_No"><?php echo $rooms_delete->Room_No->caption() ?></span></th>
<?php } ?>
<?php if ($rooms_delete->Bed->Visible) { // Bed ?>
		<th class="<?php echo $rooms_delete->Bed->headerCellClass() ?>"><span id="elh_rooms_Bed" class="rooms_Bed"><?php echo $rooms_delete->Bed->caption() ?></span></th>
<?php } ?>
<?php if ($rooms_delete->Filled->Visible) { // Filled ?>
		<th class="<?php echo $rooms_delete->Filled->headerCellClass() ?>"><span id="elh_rooms_Filled" class="rooms_Filled"><?php echo $rooms_delete->Filled->caption() ?></span></th>
<?php } ?>
<?php if ($rooms_delete->Vacant->Visible) { // Vacant ?>
		<th class="<?php echo $rooms_delete->Vacant->headerCellClass() ?>"><span id="elh_rooms_Vacant" class="rooms_Vacant"><?php echo $rooms_delete->Vacant->caption() ?></span></th>
<?php } ?>
<?php if ($rooms_delete->Status->Visible) { // Status ?>
		<th class="<?php echo $rooms_delete->Status->headerCellClass() ?>"><span id="elh_rooms_Status" class="rooms_Status"><?php echo $rooms_delete->Status->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$rooms_delete->RecordCount = 0;
$i = 0;
while (!$rooms_delete->Recordset->EOF) {
	$rooms_delete->RecordCount++;
	$rooms_delete->RowCount++;

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

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

	// Render row
	$rooms_delete->renderRow();
?>
	<tr <?php echo $rooms->rowAttributes() ?>>
<?php if ($rooms_delete->id->Visible) { // id ?>
		<td <?php echo $rooms_delete->id->cellAttributes() ?>>
<span id="el<?php echo $rooms_delete->RowCount ?>_rooms_id" class="rooms_id">
<span<?php echo $rooms_delete->id->viewAttributes() ?>><?php echo $rooms_delete->id->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($rooms_delete->Hostel_Name->Visible) { // Hostel_Name ?>
		<td <?php echo $rooms_delete->Hostel_Name->cellAttributes() ?>>
<span id="el<?php echo $rooms_delete->RowCount ?>_rooms_Hostel_Name" class="rooms_Hostel_Name">
<span<?php echo $rooms_delete->Hostel_Name->viewAttributes() ?>><?php echo $rooms_delete->Hostel_Name->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($rooms_delete->Floor->Visible) { // Floor ?>
		<td <?php echo $rooms_delete->Floor->cellAttributes() ?>>
<span id="el<?php echo $rooms_delete->RowCount ?>_rooms_Floor" class="rooms_Floor">
<span<?php echo $rooms_delete->Floor->viewAttributes() ?>><?php echo $rooms_delete->Floor->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($rooms_delete->Room_No->Visible) { // Room_No ?>
		<td <?php echo $rooms_delete->Room_No->cellAttributes() ?>>
<span id="el<?php echo $rooms_delete->RowCount ?>_rooms_Room_No" class="rooms_Room_No">
<span<?php echo $rooms_delete->Room_No->viewAttributes() ?>><?php echo $rooms_delete->Room_No->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($rooms_delete->Bed->Visible) { // Bed ?>
		<td <?php echo $rooms_delete->Bed->cellAttributes() ?>>
<span id="el<?php echo $rooms_delete->RowCount ?>_rooms_Bed" class="rooms_Bed">
<span<?php echo $rooms_delete->Bed->viewAttributes() ?>><?php echo $rooms_delete->Bed->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($rooms_delete->Filled->Visible) { // Filled ?>
		<td <?php echo $rooms_delete->Filled->cellAttributes() ?>>
<span id="el<?php echo $rooms_delete->RowCount ?>_rooms_Filled" class="rooms_Filled">
<span<?php echo $rooms_delete->Filled->viewAttributes() ?>><?php echo $rooms_delete->Filled->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($rooms_delete->Vacant->Visible) { // Vacant ?>
		<td <?php echo $rooms_delete->Vacant->cellAttributes() ?>>
<span id="el<?php echo $rooms_delete->RowCount ?>_rooms_Vacant" class="rooms_Vacant">
<span<?php echo $rooms_delete->Vacant->viewAttributes() ?>><?php echo $rooms_delete->Vacant->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($rooms_delete->Status->Visible) { // Status ?>
		<td <?php echo $rooms_delete->Status->cellAttributes() ?>>
<span id="el<?php echo $rooms_delete->RowCount ?>_rooms_Status" class="rooms_Status">
<span<?php echo $rooms_delete->Status->viewAttributes() ?>><?php echo $rooms_delete->Status->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$rooms_delete->Recordset->moveNext();
}
$rooms_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 $rooms_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$rooms_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
$rooms_delete->terminate();
?>