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

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

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

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

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

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

// Form_CustomValidate event
fcourtlocationdelete.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
fcourtlocationdelete.validateRequired = <?php echo json_encode(CLIENT_VALIDATE) ?>;

// Dynamic selection lists
fcourtlocationdelete.lists["x_GovernorateID"] = <?php echo $courtlocation_delete->GovernorateID->Lookup->toClientList() ?>;
fcourtlocationdelete.lists["x_GovernorateID"].options = <?php echo JsonEncode($courtlocation_delete->GovernorateID->lookupOptions()) ?>;

// Form object for search
</script>
<script>

// Write your client script here, no need to add script tags.
</script>
<?php $courtlocation_delete->showPageHeader(); ?>
<?php
$courtlocation_delete->showMessage();
?>
<form name="fcourtlocationdelete" id="fcourtlocationdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($courtlocation_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $courtlocation_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="courtlocation">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($courtlocation_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 ($courtlocation->CourtLocation->Visible) { // CourtLocation ?>
		<th class="<?php echo $courtlocation->CourtLocation->headerCellClass() ?>"><span id="elh_courtlocation_CourtLocation" class="courtlocation_CourtLocation"><?php echo $courtlocation->CourtLocation->caption() ?></span></th>
<?php } ?>
<?php if ($courtlocation->GovernorateID->Visible) { // GovernorateID ?>
		<th class="<?php echo $courtlocation->GovernorateID->headerCellClass() ?>"><span id="elh_courtlocation_GovernorateID" class="courtlocation_GovernorateID"><?php echo $courtlocation->GovernorateID->caption() ?></span></th>
<?php } ?>
<?php if ($courtlocation->Notes->Visible) { // Notes ?>
		<th class="<?php echo $courtlocation->Notes->headerCellClass() ?>"><span id="elh_courtlocation_Notes" class="courtlocation_Notes"><?php echo $courtlocation->Notes->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$courtlocation_delete->RecCnt = 0;
$i = 0;
while (!$courtlocation_delete->Recordset->EOF) {
	$courtlocation_delete->RecCnt++;
	$courtlocation_delete->RowCnt++;

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

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

	// Render row
	$courtlocation_delete->renderRow();
?>
	<tr<?php echo $courtlocation->rowAttributes() ?>>
<?php if ($courtlocation->CourtLocation->Visible) { // CourtLocation ?>
		<td<?php echo $courtlocation->CourtLocation->cellAttributes() ?>>
<span id="el<?php echo $courtlocation_delete->RowCnt ?>_courtlocation_CourtLocation" class="courtlocation_CourtLocation">
<span<?php echo $courtlocation->CourtLocation->viewAttributes() ?>>
<?php echo $courtlocation->CourtLocation->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courtlocation->GovernorateID->Visible) { // GovernorateID ?>
		<td<?php echo $courtlocation->GovernorateID->cellAttributes() ?>>
<span id="el<?php echo $courtlocation_delete->RowCnt ?>_courtlocation_GovernorateID" class="courtlocation_GovernorateID">
<span<?php echo $courtlocation->GovernorateID->viewAttributes() ?>>
<?php echo $courtlocation->GovernorateID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courtlocation->Notes->Visible) { // Notes ?>
		<td<?php echo $courtlocation->Notes->cellAttributes() ?>>
<span id="el<?php echo $courtlocation_delete->RowCnt ?>_courtlocation_Notes" class="courtlocation_Notes">
<span<?php echo $courtlocation->Notes->viewAttributes() ?>>
<?php echo $courtlocation->Notes->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$courtlocation_delete->Recordset->moveNext();
}
$courtlocation_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 $courtlocation_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$courtlocation_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
$courtlocation_delete->terminate();
?>
