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

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

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

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

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

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

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

// Dynamic selection lists
fjudgesdelete.lists["x_CourtID"] = <?php echo $judges_delete->CourtID->Lookup->toClientList() ?>;
fjudgesdelete.lists["x_CourtID"].options = <?php echo JsonEncode($judges_delete->CourtID->lookupOptions()) ?>;
fjudgesdelete.autoSuggests["x_CourtID"] = <?php echo json_encode(["data" => "ajax=autosuggest"]) ?>;
fjudgesdelete.lists["x_TitleID"] = <?php echo $judges_delete->TitleID->Lookup->toClientList() ?>;
fjudgesdelete.lists["x_TitleID"].options = <?php echo JsonEncode($judges_delete->TitleID->lookupOptions()) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $judges_delete->showPageHeader(); ?>
<?php
$judges_delete->showMessage();
?>
<form name="fjudgesdelete" id="fjudgesdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($judges_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $judges_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="judges">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($judges_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 ($judges->CourtID->Visible) { // CourtID ?>
		<th class="<?php echo $judges->CourtID->headerCellClass() ?>"><span id="elh_judges_CourtID" class="judges_CourtID"><?php echo $judges->CourtID->caption() ?></span></th>
<?php } ?>
<?php if ($judges->TitleID->Visible) { // TitleID ?>
		<th class="<?php echo $judges->TitleID->headerCellClass() ?>"><span id="elh_judges_TitleID" class="judges_TitleID"><?php echo $judges->TitleID->caption() ?></span></th>
<?php } ?>
<?php if ($judges->FirstName->Visible) { // FirstName ?>
		<th class="<?php echo $judges->FirstName->headerCellClass() ?>"><span id="elh_judges_FirstName" class="judges_FirstName"><?php echo $judges->FirstName->caption() ?></span></th>
<?php } ?>
<?php if ($judges->MiddleName->Visible) { // MiddleName ?>
		<th class="<?php echo $judges->MiddleName->headerCellClass() ?>"><span id="elh_judges_MiddleName" class="judges_MiddleName"><?php echo $judges->MiddleName->caption() ?></span></th>
<?php } ?>
<?php if ($judges->LastName->Visible) { // LastName ?>
		<th class="<?php echo $judges->LastName->headerCellClass() ?>"><span id="elh_judges_LastName" class="judges_LastName"><?php echo $judges->LastName->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$judges_delete->RecCnt = 0;
$i = 0;
while (!$judges_delete->Recordset->EOF) {
	$judges_delete->RecCnt++;
	$judges_delete->RowCnt++;

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

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

	// Render row
	$judges_delete->renderRow();
?>
	<tr<?php echo $judges->rowAttributes() ?>>
<?php if ($judges->CourtID->Visible) { // CourtID ?>
		<td<?php echo $judges->CourtID->cellAttributes() ?>>
<span id="el<?php echo $judges_delete->RowCnt ?>_judges_CourtID" class="judges_CourtID">
<span<?php echo $judges->CourtID->viewAttributes() ?>>
<?php echo $judges->CourtID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($judges->TitleID->Visible) { // TitleID ?>
		<td<?php echo $judges->TitleID->cellAttributes() ?>>
<span id="el<?php echo $judges_delete->RowCnt ?>_judges_TitleID" class="judges_TitleID">
<span<?php echo $judges->TitleID->viewAttributes() ?>>
<?php echo $judges->TitleID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($judges->FirstName->Visible) { // FirstName ?>
		<td<?php echo $judges->FirstName->cellAttributes() ?>>
<span id="el<?php echo $judges_delete->RowCnt ?>_judges_FirstName" class="judges_FirstName">
<span<?php echo $judges->FirstName->viewAttributes() ?>>
<?php echo $judges->FirstName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($judges->MiddleName->Visible) { // MiddleName ?>
		<td<?php echo $judges->MiddleName->cellAttributes() ?>>
<span id="el<?php echo $judges_delete->RowCnt ?>_judges_MiddleName" class="judges_MiddleName">
<span<?php echo $judges->MiddleName->viewAttributes() ?>>
<?php echo $judges->MiddleName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($judges->LastName->Visible) { // LastName ?>
		<td<?php echo $judges->LastName->cellAttributes() ?>>
<span id="el<?php echo $judges_delete->RowCnt ?>_judges_LastName" class="judges_LastName">
<span<?php echo $judges->LastName->viewAttributes() ?>>
<?php echo $judges->LastName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$judges_delete->Recordset->moveNext();
}
$judges_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 $judges_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$judges_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
$judges_delete->terminate();
?>
