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

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

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

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

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

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

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

});
</script>
<?php $staff_delete->showPageHeader(); ?>
<?php
$staff_delete->showMessage();
?>
<form name="fstaffdelete" id="fstaffdelete" 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="staff">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($staff_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 ($staff_delete->id->Visible) { // id ?>
		<th class="<?php echo $staff_delete->id->headerCellClass() ?>"><span id="elh_staff_id" class="staff_id"><?php echo $staff_delete->id->caption() ?></span></th>
<?php } ?>
<?php if ($staff_delete->Staff_Name->Visible) { // Staff_Name ?>
		<th class="<?php echo $staff_delete->Staff_Name->headerCellClass() ?>"><span id="elh_staff_Staff_Name" class="staff_Staff_Name"><?php echo $staff_delete->Staff_Name->caption() ?></span></th>
<?php } ?>
<?php if ($staff_delete->ContactNo->Visible) { // ContactNo ?>
		<th class="<?php echo $staff_delete->ContactNo->headerCellClass() ?>"><span id="elh_staff_ContactNo" class="staff_ContactNo"><?php echo $staff_delete->ContactNo->caption() ?></span></th>
<?php } ?>
<?php if ($staff_delete->_email->Visible) { // email ?>
		<th class="<?php echo $staff_delete->_email->headerCellClass() ?>"><span id="elh_staff__email" class="staff__email"><?php echo $staff_delete->_email->caption() ?></span></th>
<?php } ?>
<?php if ($staff_delete->password->Visible) { // password ?>
		<th class="<?php echo $staff_delete->password->headerCellClass() ?>"><span id="elh_staff_password" class="staff_password"><?php echo $staff_delete->password->caption() ?></span></th>
<?php } ?>
<?php if ($staff_delete->userlevel->Visible) { // userlevel ?>
		<th class="<?php echo $staff_delete->userlevel->headerCellClass() ?>"><span id="elh_staff_userlevel" class="staff_userlevel"><?php echo $staff_delete->userlevel->caption() ?></span></th>
<?php } ?>
<?php if ($staff_delete->profile->Visible) { // profile ?>
		<th class="<?php echo $staff_delete->profile->headerCellClass() ?>"><span id="elh_staff_profile" class="staff_profile"><?php echo $staff_delete->profile->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$staff_delete->RecordCount = 0;
$i = 0;
while (!$staff_delete->Recordset->EOF) {
	$staff_delete->RecordCount++;
	$staff_delete->RowCount++;

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

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

	// Render row
	$staff_delete->renderRow();
?>
	<tr <?php echo $staff->rowAttributes() ?>>
<?php if ($staff_delete->id->Visible) { // id ?>
		<td <?php echo $staff_delete->id->cellAttributes() ?>>
<span id="el<?php echo $staff_delete->RowCount ?>_staff_id" class="staff_id">
<span<?php echo $staff_delete->id->viewAttributes() ?>><?php echo $staff_delete->id->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($staff_delete->Staff_Name->Visible) { // Staff_Name ?>
		<td <?php echo $staff_delete->Staff_Name->cellAttributes() ?>>
<span id="el<?php echo $staff_delete->RowCount ?>_staff_Staff_Name" class="staff_Staff_Name">
<span<?php echo $staff_delete->Staff_Name->viewAttributes() ?>><?php echo $staff_delete->Staff_Name->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($staff_delete->ContactNo->Visible) { // ContactNo ?>
		<td <?php echo $staff_delete->ContactNo->cellAttributes() ?>>
<span id="el<?php echo $staff_delete->RowCount ?>_staff_ContactNo" class="staff_ContactNo">
<span<?php echo $staff_delete->ContactNo->viewAttributes() ?>><?php echo $staff_delete->ContactNo->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($staff_delete->_email->Visible) { // email ?>
		<td <?php echo $staff_delete->_email->cellAttributes() ?>>
<span id="el<?php echo $staff_delete->RowCount ?>_staff__email" class="staff__email">
<span<?php echo $staff_delete->_email->viewAttributes() ?>><?php echo $staff_delete->_email->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($staff_delete->password->Visible) { // password ?>
		<td <?php echo $staff_delete->password->cellAttributes() ?>>
<span id="el<?php echo $staff_delete->RowCount ?>_staff_password" class="staff_password">
<span<?php echo $staff_delete->password->viewAttributes() ?>><?php echo $staff_delete->password->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($staff_delete->userlevel->Visible) { // userlevel ?>
		<td <?php echo $staff_delete->userlevel->cellAttributes() ?>>
<span id="el<?php echo $staff_delete->RowCount ?>_staff_userlevel" class="staff_userlevel">
<span<?php echo $staff_delete->userlevel->viewAttributes() ?>><?php echo $staff_delete->userlevel->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($staff_delete->profile->Visible) { // profile ?>
		<td <?php echo $staff_delete->profile->cellAttributes() ?>>
<span id="el<?php echo $staff_delete->RowCount ?>_staff_profile" class="staff_profile">
<span<?php echo $staff_delete->profile->viewAttributes() ?>><?php echo $staff_delete->profile->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$staff_delete->Recordset->moveNext();
}
$staff_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 $staff_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$staff_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
$staff_delete->terminate();
?>