<?php
namespace PHPMaker2019\project_germanos;

// 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
$governorates_delete = new governorates_delete();

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

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

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

// Page Rendering event
$governorates_delete->Page_Render();
?>
<?php include_once "header.php" ?>
<script>

// Form object
currentPageID = ew.PAGE_ID = "delete";
var fgovernoratesdelete = currentForm = new ew.Form("fgovernoratesdelete", "delete");

// Form_CustomValidate event
fgovernoratesdelete.Form_CustomValidate = function(fobj) { // DO NOT CHANGE THIS LINE!

	// Your custom validation code here, return false if invalid.
	return true;
}

// Use JavaScript validation or not
fgovernoratesdelete.validateRequired = <?php echo json_encode(CLIENT_VALIDATE) ?>;

// Dynamic selection lists
// Form object for search

</script>
<script>

// Write your client script here, no need to add script tags.
</script>
<?php $governorates_delete->showPageHeader(); ?>
<?php
$governorates_delete->showMessage();
?>
<form name="fgovernoratesdelete" id="fgovernoratesdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($governorates_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $governorates_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="governorates">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($governorates_delete->RecKeys as $key) { ?>
<?php $keyvalue = is_array($key) ? implode($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 if (IsResponsiveLayout()) { ?>table-responsive <?php } ?>card-body ew-grid-middle-panel">
<table class="table ew-table">
	<thead>
	<tr class="ew-table-header">
<?php if ($governorates->Governorate->Visible) { // Governorate ?>
		<th class="<?php echo $governorates->Governorate->headerCellClass() ?>"><span id="elh_governorates_Governorate" class="governorates_Governorate"><?php echo $governorates->Governorate->caption() ?></span></th>
<?php } ?>
<?php if ($governorates->GovernorateEn->Visible) { // GovernorateEn ?>
		<th class="<?php echo $governorates->GovernorateEn->headerCellClass() ?>"><span id="elh_governorates_GovernorateEn" class="governorates_GovernorateEn"><?php echo $governorates->GovernorateEn->caption() ?></span></th>
<?php } ?>
<?php if ($governorates->Notes->Visible) { // Notes ?>
		<th class="<?php echo $governorates->Notes->headerCellClass() ?>"><span id="elh_governorates_Notes" class="governorates_Notes"><?php echo $governorates->Notes->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$governorates_delete->RecCnt = 0;
$i = 0;
while (!$governorates_delete->Recordset->EOF) {
	$governorates_delete->RecCnt++;
	$governorates_delete->RowCnt++;

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

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

	// Render row
	$governorates_delete->renderRow();
?>
	<tr<?php echo $governorates->rowAttributes() ?>>
<?php if ($governorates->Governorate->Visible) { // Governorate ?>
		<td<?php echo $governorates->Governorate->cellAttributes() ?>>
<span id="el<?php echo $governorates_delete->RowCnt ?>_governorates_Governorate" class="governorates_Governorate">
<span<?php echo $governorates->Governorate->viewAttributes() ?>>
<?php echo $governorates->Governorate->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($governorates->GovernorateEn->Visible) { // GovernorateEn ?>
		<td<?php echo $governorates->GovernorateEn->cellAttributes() ?>>
<span id="el<?php echo $governorates_delete->RowCnt ?>_governorates_GovernorateEn" class="governorates_GovernorateEn">
<span<?php echo $governorates->GovernorateEn->viewAttributes() ?>>
<?php echo $governorates->GovernorateEn->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($governorates->Notes->Visible) { // Notes ?>
		<td<?php echo $governorates->Notes->cellAttributes() ?>>
<span id="el<?php echo $governorates_delete->RowCnt ?>_governorates_Notes" class="governorates_Notes">
<span<?php echo $governorates->Notes->viewAttributes() ?>>
<?php echo $governorates->Notes->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$governorates_delete->Recordset->moveNext();
}
$governorates_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 $governorates_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$governorates_delete->showPageFooter();
if (DEBUG_ENABLED)
	echo GetDebugMessage();
?>
<script>

// Write your table-specific startup script here
// document.write("page loaded");

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