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

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

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

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

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

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

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

// Dynamic selection lists
fcourtaddressdelete.lists["x_CourtID"] = <?php echo $courtaddress_delete->CourtID->Lookup->toClientList() ?>;
fcourtaddressdelete.lists["x_CourtID"].options = <?php echo JsonEncode($courtaddress_delete->CourtID->lookupOptions()) ?>;
fcourtaddressdelete.lists["x_AddressTypeID"] = <?php echo $courtaddress_delete->AddressTypeID->Lookup->toClientList() ?>;
fcourtaddressdelete.lists["x_AddressTypeID"].options = <?php echo JsonEncode($courtaddress_delete->AddressTypeID->lookupOptions()) ?>;
fcourtaddressdelete.lists["x_Primary[]"] = <?php echo $courtaddress_delete->Primary->Lookup->toClientList() ?>;
fcourtaddressdelete.lists["x_Primary[]"].options = <?php echo JsonEncode($courtaddress_delete->Primary->options(FALSE, TRUE)) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $courtaddress_delete->showPageHeader(); ?>
<?php
$courtaddress_delete->showMessage();
?>
<form name="fcourtaddressdelete" id="fcourtaddressdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($courtaddress_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $courtaddress_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="courtaddress">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($courtaddress_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 ($courtaddress->CourtID->Visible) { // CourtID ?>
		<th class="<?php echo $courtaddress->CourtID->headerCellClass() ?>"><span id="elh_courtaddress_CourtID" class="courtaddress_CourtID"><?php echo $courtaddress->CourtID->caption() ?></span></th>
<?php } ?>
<?php if ($courtaddress->AddressTypeID->Visible) { // AddressTypeID ?>
		<th class="<?php echo $courtaddress->AddressTypeID->headerCellClass() ?>"><span id="elh_courtaddress_AddressTypeID" class="courtaddress_AddressTypeID"><?php echo $courtaddress->AddressTypeID->caption() ?></span></th>
<?php } ?>
<?php if ($courtaddress->Address->Visible) { // Address ?>
		<th class="<?php echo $courtaddress->Address->headerCellClass() ?>"><span id="elh_courtaddress_Address" class="courtaddress_Address"><?php echo $courtaddress->Address->caption() ?></span></th>
<?php } ?>
<?php if ($courtaddress->City->Visible) { // City ?>
		<th class="<?php echo $courtaddress->City->headerCellClass() ?>"><span id="elh_courtaddress_City" class="courtaddress_City"><?php echo $courtaddress->City->caption() ?></span></th>
<?php } ?>
<?php if ($courtaddress->Region->Visible) { // Region ?>
		<th class="<?php echo $courtaddress->Region->headerCellClass() ?>"><span id="elh_courtaddress_Region" class="courtaddress_Region"><?php echo $courtaddress->Region->caption() ?></span></th>
<?php } ?>
<?php if ($courtaddress->PostalCode->Visible) { // PostalCode ?>
		<th class="<?php echo $courtaddress->PostalCode->headerCellClass() ?>"><span id="elh_courtaddress_PostalCode" class="courtaddress_PostalCode"><?php echo $courtaddress->PostalCode->caption() ?></span></th>
<?php } ?>
<?php if ($courtaddress->Country->Visible) { // Country ?>
		<th class="<?php echo $courtaddress->Country->headerCellClass() ?>"><span id="elh_courtaddress_Country" class="courtaddress_Country"><?php echo $courtaddress->Country->caption() ?></span></th>
<?php } ?>
<?php if ($courtaddress->Notes->Visible) { // Notes ?>
		<th class="<?php echo $courtaddress->Notes->headerCellClass() ?>"><span id="elh_courtaddress_Notes" class="courtaddress_Notes"><?php echo $courtaddress->Notes->caption() ?></span></th>
<?php } ?>
<?php if ($courtaddress->Primary->Visible) { // Primary ?>
		<th class="<?php echo $courtaddress->Primary->headerCellClass() ?>"><span id="elh_courtaddress_Primary" class="courtaddress_Primary"><?php echo $courtaddress->Primary->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$courtaddress_delete->RecCnt = 0;
$i = 0;
while (!$courtaddress_delete->Recordset->EOF) {
	$courtaddress_delete->RecCnt++;
	$courtaddress_delete->RowCnt++;

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

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

	// Render row
	$courtaddress_delete->renderRow();
?>
	<tr<?php echo $courtaddress->rowAttributes() ?>>
<?php if ($courtaddress->CourtID->Visible) { // CourtID ?>
		<td<?php echo $courtaddress->CourtID->cellAttributes() ?>>
<span id="el<?php echo $courtaddress_delete->RowCnt ?>_courtaddress_CourtID" class="courtaddress_CourtID">
<span<?php echo $courtaddress->CourtID->viewAttributes() ?>>
<?php echo $courtaddress->CourtID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courtaddress->AddressTypeID->Visible) { // AddressTypeID ?>
		<td<?php echo $courtaddress->AddressTypeID->cellAttributes() ?>>
<span id="el<?php echo $courtaddress_delete->RowCnt ?>_courtaddress_AddressTypeID" class="courtaddress_AddressTypeID">
<span<?php echo $courtaddress->AddressTypeID->viewAttributes() ?>>
<?php echo $courtaddress->AddressTypeID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courtaddress->Address->Visible) { // Address ?>
		<td<?php echo $courtaddress->Address->cellAttributes() ?>>
<span id="el<?php echo $courtaddress_delete->RowCnt ?>_courtaddress_Address" class="courtaddress_Address">
<span<?php echo $courtaddress->Address->viewAttributes() ?>>
<?php echo $courtaddress->Address->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courtaddress->City->Visible) { // City ?>
		<td<?php echo $courtaddress->City->cellAttributes() ?>>
<span id="el<?php echo $courtaddress_delete->RowCnt ?>_courtaddress_City" class="courtaddress_City">
<span<?php echo $courtaddress->City->viewAttributes() ?>>
<?php echo $courtaddress->City->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courtaddress->Region->Visible) { // Region ?>
		<td<?php echo $courtaddress->Region->cellAttributes() ?>>
<span id="el<?php echo $courtaddress_delete->RowCnt ?>_courtaddress_Region" class="courtaddress_Region">
<span<?php echo $courtaddress->Region->viewAttributes() ?>>
<?php echo $courtaddress->Region->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courtaddress->PostalCode->Visible) { // PostalCode ?>
		<td<?php echo $courtaddress->PostalCode->cellAttributes() ?>>
<span id="el<?php echo $courtaddress_delete->RowCnt ?>_courtaddress_PostalCode" class="courtaddress_PostalCode">
<span<?php echo $courtaddress->PostalCode->viewAttributes() ?>>
<?php echo $courtaddress->PostalCode->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courtaddress->Country->Visible) { // Country ?>
		<td<?php echo $courtaddress->Country->cellAttributes() ?>>
<span id="el<?php echo $courtaddress_delete->RowCnt ?>_courtaddress_Country" class="courtaddress_Country">
<span<?php echo $courtaddress->Country->viewAttributes() ?>>
<?php echo $courtaddress->Country->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courtaddress->Notes->Visible) { // Notes ?>
		<td<?php echo $courtaddress->Notes->cellAttributes() ?>>
<span id="el<?php echo $courtaddress_delete->RowCnt ?>_courtaddress_Notes" class="courtaddress_Notes">
<span<?php echo $courtaddress->Notes->viewAttributes() ?>>
<?php echo $courtaddress->Notes->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courtaddress->Primary->Visible) { // Primary ?>
		<td<?php echo $courtaddress->Primary->cellAttributes() ?>>
<span id="el<?php echo $courtaddress_delete->RowCnt ?>_courtaddress_Primary" class="courtaddress_Primary">
<span<?php echo $courtaddress->Primary->viewAttributes() ?>>
<?php if (ConvertToBool($courtaddress->Primary->CurrentValue)) { ?>
<input type="checkbox" value="<?php echo $courtaddress->Primary->getViewValue() ?>" disabled checked>
<?php } else { ?>
<input type="checkbox" value="<?php echo $courtaddress->Primary->getViewValue() ?>" disabled>
<?php } ?>
</span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$courtaddress_delete->Recordset->moveNext();
}
$courtaddress_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 $courtaddress_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$courtaddress_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
$courtaddress_delete->terminate();
?>
