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

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

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

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

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

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

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

// Dynamic selection lists
fclientaddressdelete.lists["x_ClientID"] = <?php echo $clientaddress_delete->ClientID->Lookup->toClientList() ?>;
fclientaddressdelete.lists["x_ClientID"].options = <?php echo JsonEncode($clientaddress_delete->ClientID->lookupOptions()) ?>;
fclientaddressdelete.lists["x_AddressTypeID"] = <?php echo $clientaddress_delete->AddressTypeID->Lookup->toClientList() ?>;
fclientaddressdelete.lists["x_AddressTypeID"].options = <?php echo JsonEncode($clientaddress_delete->AddressTypeID->lookupOptions()) ?>;
fclientaddressdelete.lists["x_Primary[]"] = <?php echo $clientaddress_delete->Primary->Lookup->toClientList() ?>;
fclientaddressdelete.lists["x_Primary[]"].options = <?php echo JsonEncode($clientaddress_delete->Primary->options(FALSE, TRUE)) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $clientaddress_delete->showPageHeader(); ?>
<?php
$clientaddress_delete->showMessage();
?>
<form name="fclientaddressdelete" id="fclientaddressdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($clientaddress_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $clientaddress_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="clientaddress">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($clientaddress_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 ($clientaddress->ClientID->Visible) { // ClientID ?>
		<th class="<?php echo $clientaddress->ClientID->headerCellClass() ?>"><span id="elh_clientaddress_ClientID" class="clientaddress_ClientID"><?php echo $clientaddress->ClientID->caption() ?></span></th>
<?php } ?>
<?php if ($clientaddress->AddressTypeID->Visible) { // AddressTypeID ?>
		<th class="<?php echo $clientaddress->AddressTypeID->headerCellClass() ?>"><span id="elh_clientaddress_AddressTypeID" class="clientaddress_AddressTypeID"><?php echo $clientaddress->AddressTypeID->caption() ?></span></th>
<?php } ?>
<?php if ($clientaddress->Address->Visible) { // Address ?>
		<th class="<?php echo $clientaddress->Address->headerCellClass() ?>"><span id="elh_clientaddress_Address" class="clientaddress_Address"><?php echo $clientaddress->Address->caption() ?></span></th>
<?php } ?>
<?php if ($clientaddress->City->Visible) { // City ?>
		<th class="<?php echo $clientaddress->City->headerCellClass() ?>"><span id="elh_clientaddress_City" class="clientaddress_City"><?php echo $clientaddress->City->caption() ?></span></th>
<?php } ?>
<?php if ($clientaddress->Region->Visible) { // Region ?>
		<th class="<?php echo $clientaddress->Region->headerCellClass() ?>"><span id="elh_clientaddress_Region" class="clientaddress_Region"><?php echo $clientaddress->Region->caption() ?></span></th>
<?php } ?>
<?php if ($clientaddress->PostalCode->Visible) { // PostalCode ?>
		<th class="<?php echo $clientaddress->PostalCode->headerCellClass() ?>"><span id="elh_clientaddress_PostalCode" class="clientaddress_PostalCode"><?php echo $clientaddress->PostalCode->caption() ?></span></th>
<?php } ?>
<?php if ($clientaddress->Country->Visible) { // Country ?>
		<th class="<?php echo $clientaddress->Country->headerCellClass() ?>"><span id="elh_clientaddress_Country" class="clientaddress_Country"><?php echo $clientaddress->Country->caption() ?></span></th>
<?php } ?>
<?php if ($clientaddress->Notes->Visible) { // Notes ?>
		<th class="<?php echo $clientaddress->Notes->headerCellClass() ?>"><span id="elh_clientaddress_Notes" class="clientaddress_Notes"><?php echo $clientaddress->Notes->caption() ?></span></th>
<?php } ?>
<?php if ($clientaddress->Primary->Visible) { // Primary ?>
		<th class="<?php echo $clientaddress->Primary->headerCellClass() ?>"><span id="elh_clientaddress_Primary" class="clientaddress_Primary"><?php echo $clientaddress->Primary->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$clientaddress_delete->RecCnt = 0;
$i = 0;
while (!$clientaddress_delete->Recordset->EOF) {
	$clientaddress_delete->RecCnt++;
	$clientaddress_delete->RowCnt++;

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

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

	// Render row
	$clientaddress_delete->renderRow();
?>
	<tr<?php echo $clientaddress->rowAttributes() ?>>
<?php if ($clientaddress->ClientID->Visible) { // ClientID ?>
		<td<?php echo $clientaddress->ClientID->cellAttributes() ?>>
<span id="el<?php echo $clientaddress_delete->RowCnt ?>_clientaddress_ClientID" class="clientaddress_ClientID">
<span<?php echo $clientaddress->ClientID->viewAttributes() ?>>
<?php echo $clientaddress->ClientID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clientaddress->AddressTypeID->Visible) { // AddressTypeID ?>
		<td<?php echo $clientaddress->AddressTypeID->cellAttributes() ?>>
<span id="el<?php echo $clientaddress_delete->RowCnt ?>_clientaddress_AddressTypeID" class="clientaddress_AddressTypeID">
<span<?php echo $clientaddress->AddressTypeID->viewAttributes() ?>>
<?php echo $clientaddress->AddressTypeID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clientaddress->Address->Visible) { // Address ?>
		<td<?php echo $clientaddress->Address->cellAttributes() ?>>
<span id="el<?php echo $clientaddress_delete->RowCnt ?>_clientaddress_Address" class="clientaddress_Address">
<span<?php echo $clientaddress->Address->viewAttributes() ?>>
<?php echo $clientaddress->Address->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clientaddress->City->Visible) { // City ?>
		<td<?php echo $clientaddress->City->cellAttributes() ?>>
<span id="el<?php echo $clientaddress_delete->RowCnt ?>_clientaddress_City" class="clientaddress_City">
<span<?php echo $clientaddress->City->viewAttributes() ?>>
<?php echo $clientaddress->City->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clientaddress->Region->Visible) { // Region ?>
		<td<?php echo $clientaddress->Region->cellAttributes() ?>>
<span id="el<?php echo $clientaddress_delete->RowCnt ?>_clientaddress_Region" class="clientaddress_Region">
<span<?php echo $clientaddress->Region->viewAttributes() ?>>
<?php echo $clientaddress->Region->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clientaddress->PostalCode->Visible) { // PostalCode ?>
		<td<?php echo $clientaddress->PostalCode->cellAttributes() ?>>
<span id="el<?php echo $clientaddress_delete->RowCnt ?>_clientaddress_PostalCode" class="clientaddress_PostalCode">
<span<?php echo $clientaddress->PostalCode->viewAttributes() ?>>
<?php echo $clientaddress->PostalCode->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clientaddress->Country->Visible) { // Country ?>
		<td<?php echo $clientaddress->Country->cellAttributes() ?>>
<span id="el<?php echo $clientaddress_delete->RowCnt ?>_clientaddress_Country" class="clientaddress_Country">
<span<?php echo $clientaddress->Country->viewAttributes() ?>>
<?php echo $clientaddress->Country->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clientaddress->Notes->Visible) { // Notes ?>
		<td<?php echo $clientaddress->Notes->cellAttributes() ?>>
<span id="el<?php echo $clientaddress_delete->RowCnt ?>_clientaddress_Notes" class="clientaddress_Notes">
<span<?php echo $clientaddress->Notes->viewAttributes() ?>>
<?php echo $clientaddress->Notes->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clientaddress->Primary->Visible) { // Primary ?>
		<td<?php echo $clientaddress->Primary->cellAttributes() ?>>
<span id="el<?php echo $clientaddress_delete->RowCnt ?>_clientaddress_Primary" class="clientaddress_Primary">
<span<?php echo $clientaddress->Primary->viewAttributes() ?>>
<?php if (ConvertToBool($clientaddress->Primary->CurrentValue)) { ?>
<input type="checkbox" value="<?php echo $clientaddress->Primary->getViewValue() ?>" disabled checked>
<?php } else { ?>
<input type="checkbox" value="<?php echo $clientaddress->Primary->getViewValue() ?>" disabled>
<?php } ?>
</span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$clientaddress_delete->Recordset->moveNext();
}
$clientaddress_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 $clientaddress_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$clientaddress_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
$clientaddress_delete->terminate();
?>
