<?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, "utf-8");

// Create page object
$clientaddress_preview = new clientaddress_preview();

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

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

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

// Page Rendering event
$clientaddress_preview->Page_Render();
?>
<?php $clientaddress_preview->showPageHeader(); ?>
<div class="card ew-grid clientaddress"><!-- .card -->
<?php if ($clientaddress_preview->TotalRecs > 0) { ?>
<div class="<?php if (IsResponsiveLayout()) { ?>table-responsive <?php } ?>card-body ew-grid-middle-panel"><!-- .table-responsive -->
<table class="table ew-table ew-preview-table"><!-- .table -->
	<thead><!-- Table header -->
		<tr class="ew-table-header">
<?php

// Render list options
$clientaddress_preview->renderListOptions();

// Render list options (header, left)
$clientaddress_preview->ListOptions->render("header", "left");
?>
<?php if ($clientaddress->ClientID->Visible) { // ClientID ?>
	<?php if ($clientaddress->SortUrl($clientaddress->ClientID) == "") { ?>
		<th class="<?php echo $clientaddress->ClientID->headerCellClass() ?>"><?php echo $clientaddress->ClientID->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $clientaddress->ClientID->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $clientaddress->ClientID->Name ?>" data-sort-order="<?php echo $clientaddress_preview->SortField == $clientaddress->ClientID->Name && $clientaddress_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $clientaddress->ClientID->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($clientaddress_preview->SortField == $clientaddress->ClientID->Name) { ?><?php if ($clientaddress_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($clientaddress_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($clientaddress->AddressTypeID->Visible) { // AddressTypeID ?>
	<?php if ($clientaddress->SortUrl($clientaddress->AddressTypeID) == "") { ?>
		<th class="<?php echo $clientaddress->AddressTypeID->headerCellClass() ?>"><?php echo $clientaddress->AddressTypeID->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $clientaddress->AddressTypeID->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $clientaddress->AddressTypeID->Name ?>" data-sort-order="<?php echo $clientaddress_preview->SortField == $clientaddress->AddressTypeID->Name && $clientaddress_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $clientaddress->AddressTypeID->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($clientaddress_preview->SortField == $clientaddress->AddressTypeID->Name) { ?><?php if ($clientaddress_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($clientaddress_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($clientaddress->Address->Visible) { // Address ?>
	<?php if ($clientaddress->SortUrl($clientaddress->Address) == "") { ?>
		<th class="<?php echo $clientaddress->Address->headerCellClass() ?>"><?php echo $clientaddress->Address->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $clientaddress->Address->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $clientaddress->Address->Name ?>" data-sort-order="<?php echo $clientaddress_preview->SortField == $clientaddress->Address->Name && $clientaddress_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $clientaddress->Address->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($clientaddress_preview->SortField == $clientaddress->Address->Name) { ?><?php if ($clientaddress_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($clientaddress_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($clientaddress->City->Visible) { // City ?>
	<?php if ($clientaddress->SortUrl($clientaddress->City) == "") { ?>
		<th class="<?php echo $clientaddress->City->headerCellClass() ?>"><?php echo $clientaddress->City->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $clientaddress->City->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $clientaddress->City->Name ?>" data-sort-order="<?php echo $clientaddress_preview->SortField == $clientaddress->City->Name && $clientaddress_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $clientaddress->City->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($clientaddress_preview->SortField == $clientaddress->City->Name) { ?><?php if ($clientaddress_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($clientaddress_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($clientaddress->Region->Visible) { // Region ?>
	<?php if ($clientaddress->SortUrl($clientaddress->Region) == "") { ?>
		<th class="<?php echo $clientaddress->Region->headerCellClass() ?>"><?php echo $clientaddress->Region->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $clientaddress->Region->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $clientaddress->Region->Name ?>" data-sort-order="<?php echo $clientaddress_preview->SortField == $clientaddress->Region->Name && $clientaddress_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $clientaddress->Region->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($clientaddress_preview->SortField == $clientaddress->Region->Name) { ?><?php if ($clientaddress_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($clientaddress_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($clientaddress->PostalCode->Visible) { // PostalCode ?>
	<?php if ($clientaddress->SortUrl($clientaddress->PostalCode) == "") { ?>
		<th class="<?php echo $clientaddress->PostalCode->headerCellClass() ?>"><?php echo $clientaddress->PostalCode->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $clientaddress->PostalCode->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $clientaddress->PostalCode->Name ?>" data-sort-order="<?php echo $clientaddress_preview->SortField == $clientaddress->PostalCode->Name && $clientaddress_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $clientaddress->PostalCode->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($clientaddress_preview->SortField == $clientaddress->PostalCode->Name) { ?><?php if ($clientaddress_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($clientaddress_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($clientaddress->Country->Visible) { // Country ?>
	<?php if ($clientaddress->SortUrl($clientaddress->Country) == "") { ?>
		<th class="<?php echo $clientaddress->Country->headerCellClass() ?>"><?php echo $clientaddress->Country->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $clientaddress->Country->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $clientaddress->Country->Name ?>" data-sort-order="<?php echo $clientaddress_preview->SortField == $clientaddress->Country->Name && $clientaddress_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $clientaddress->Country->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($clientaddress_preview->SortField == $clientaddress->Country->Name) { ?><?php if ($clientaddress_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($clientaddress_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($clientaddress->Notes->Visible) { // Notes ?>
	<?php if ($clientaddress->SortUrl($clientaddress->Notes) == "") { ?>
		<th class="<?php echo $clientaddress->Notes->headerCellClass() ?>"><?php echo $clientaddress->Notes->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $clientaddress->Notes->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $clientaddress->Notes->Name ?>" data-sort-order="<?php echo $clientaddress_preview->SortField == $clientaddress->Notes->Name && $clientaddress_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $clientaddress->Notes->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($clientaddress_preview->SortField == $clientaddress->Notes->Name) { ?><?php if ($clientaddress_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($clientaddress_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($clientaddress->Primary->Visible) { // Primary ?>
	<?php if ($clientaddress->SortUrl($clientaddress->Primary) == "") { ?>
		<th class="<?php echo $clientaddress->Primary->headerCellClass() ?>"><?php echo $clientaddress->Primary->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $clientaddress->Primary->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $clientaddress->Primary->Name ?>" data-sort-order="<?php echo $clientaddress_preview->SortField == $clientaddress->Primary->Name && $clientaddress_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $clientaddress->Primary->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($clientaddress_preview->SortField == $clientaddress->Primary->Name) { ?><?php if ($clientaddress_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($clientaddress_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php

// Render list options (header, right)
$clientaddress_preview->ListOptions->render("header", "right");
?>
		</tr>
	</thead>
	<tbody><!-- Table body -->
<?php
$clientaddress_preview->RecCount = 0;
$clientaddress_preview->RowCnt = 0;
while ($clientaddress_preview->Recordset && !$clientaddress_preview->Recordset->EOF) {

	// Init row class and style
	$clientaddress_preview->RecCount++;
	$clientaddress_preview->RowCnt++;
	$clientaddress_preview->CssStyle = "";
	$clientaddress_preview->loadListRowValues($clientaddress_preview->Recordset);

	// Render row
	$clientaddress_preview->RowType = ROWTYPE_PREVIEW; // Preview record
	$clientaddress_preview->resetAttributes();
	$clientaddress_preview->renderListRow();

	// Render list options
	$clientaddress_preview->renderListOptions();
?>
	<tr<?php echo $clientaddress_preview->rowAttributes() ?>>
<?php

// Render list options (body, left)
$clientaddress_preview->ListOptions->render("body", "left", $clientaddress_preview->RowCnt);
?>
<?php if ($clientaddress->ClientID->Visible) { // ClientID ?>
		<!-- ClientID -->
		<td<?php echo $clientaddress->ClientID->cellAttributes() ?>>
<span<?php echo $clientaddress->ClientID->viewAttributes() ?>>
<?php echo $clientaddress->ClientID->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($clientaddress->AddressTypeID->Visible) { // AddressTypeID ?>
		<!-- AddressTypeID -->
		<td<?php echo $clientaddress->AddressTypeID->cellAttributes() ?>>
<span<?php echo $clientaddress->AddressTypeID->viewAttributes() ?>>
<?php echo $clientaddress->AddressTypeID->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($clientaddress->Address->Visible) { // Address ?>
		<!-- Address -->
		<td<?php echo $clientaddress->Address->cellAttributes() ?>>
<span<?php echo $clientaddress->Address->viewAttributes() ?>>
<?php echo $clientaddress->Address->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($clientaddress->City->Visible) { // City ?>
		<!-- City -->
		<td<?php echo $clientaddress->City->cellAttributes() ?>>
<span<?php echo $clientaddress->City->viewAttributes() ?>>
<?php echo $clientaddress->City->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($clientaddress->Region->Visible) { // Region ?>
		<!-- Region -->
		<td<?php echo $clientaddress->Region->cellAttributes() ?>>
<span<?php echo $clientaddress->Region->viewAttributes() ?>>
<?php echo $clientaddress->Region->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($clientaddress->PostalCode->Visible) { // PostalCode ?>
		<!-- PostalCode -->
		<td<?php echo $clientaddress->PostalCode->cellAttributes() ?>>
<span<?php echo $clientaddress->PostalCode->viewAttributes() ?>>
<?php echo $clientaddress->PostalCode->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($clientaddress->Country->Visible) { // Country ?>
		<!-- Country -->
		<td<?php echo $clientaddress->Country->cellAttributes() ?>>
<span<?php echo $clientaddress->Country->viewAttributes() ?>>
<?php echo $clientaddress->Country->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($clientaddress->Notes->Visible) { // Notes ?>
		<!-- Notes -->
		<td<?php echo $clientaddress->Notes->cellAttributes() ?>>
<span<?php echo $clientaddress->Notes->viewAttributes() ?>>
<?php echo $clientaddress->Notes->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($clientaddress->Primary->Visible) { // Primary ?>
		<!-- Primary -->
		<td<?php echo $clientaddress->Primary->cellAttributes() ?>>
<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>
</td>
<?php } ?>
<?php

// Render list options (body, right)
$clientaddress_preview->ListOptions->render("body", "right", $clientaddress_preview->RowCnt);
?>
	</tr>
<?php
	$clientaddress_preview->Recordset->MoveNext();
}
?>
	</tbody>
</table><!-- /.table -->
</div><!-- /.table-responsive -->
<?php } ?>
<div class="card-footer ew-grid-lower-panel ew-preview-lower-panel"><!-- .card-footer -->
<?php if ($clientaddress_preview->TotalRecs > 0) { ?>
<?php if (!isset($clientaddress_preview->Pager)) $clientaddress_preview->Pager = new PrevNextPager($clientaddress_preview->StartRec, $clientaddress_preview->DisplayRecs, $clientaddress_preview->TotalRecs) ?>
<?php if ($clientaddress_preview->Pager->RecordCount > 0 && $clientaddress_preview->Pager->Visible) { ?>
<div class="ew-pager"><div class="ew-prev-next"><div class="btn-group btn-group-sm ew-btn-group">
<!--first page button-->
	<?php if ($clientaddress_preview->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" data-start="<?php echo $clientaddress_preview->Pager->FirstButton->Start ?>"><i class="icon-first ew-icon"></i></a>
	<?php } else { ?>
	<a class="btn btn-default disabled" title="<?php echo $Language->phrase("PagerFirst") ?>"><i class="icon-first ew-icon"></i></a>
	<?php } ?>
<!--previous page button-->
	<?php if ($clientaddress_preview->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" data-start="<?php echo $clientaddress_preview->Pager->PrevButton->Start ?>"><i class="icon-prev ew-icon"></i></a>
	<?php } else { ?>
	<a class="btn btn-default disabled" title="<?php echo $Language->phrase("PagerPrevious") ?>"><i class="icon-prev ew-icon"></i></a>
	<?php } ?>
<!--next page button-->
	<?php if ($clientaddress_preview->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" data-start="<?php echo $clientaddress_preview->Pager->NextButton->Start ?>"><i class="icon-next ew-icon"></i></a>
	<?php } else { ?>
	<a class="btn btn-default disabled" title="<?php echo $Language->phrase("PagerNext") ?>"><i class="icon-next ew-icon"></i></a>
	<?php } ?>
<!--last page button-->
	<?php if ($clientaddress_preview->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" data-start="<?php echo $clientaddress_preview->Pager->LastButton->Start ?>"><i class="icon-last ew-icon"></i></a>
	<?php } else { ?>
	<a class="btn btn-default disabled" title="<?php echo $Language->phrase("PagerLast") ?>"><i class="icon-last ew-icon"></i></a>
	<?php } ?>
</div></div></div>
<div class="ew-pager ew-rec">
	<span><?php echo $Language->phrase("Record") ?>&nbsp;<?php echo $clientaddress_preview->Pager->FromIndex ?>&nbsp;<?php echo $Language->phrase("To") ?>&nbsp;<?php echo $clientaddress_preview->Pager->ToIndex ?>&nbsp;<?php echo $Language->phrase("Of") ?>&nbsp;<?php echo $clientaddress_preview->Pager->RecordCount ?></span>
</div>
<?php } ?>
<?php } else { ?>
<div class="ew-detail-count"><?php echo $Language->Phrase("NoRecord") ?></div>
<?php } ?>
<div class="ew-preview-other-options">
<?php
	foreach ($clientaddress_preview->OtherOptions as &$option)
		$option->render("body");
?>
</div>
<div class="clearfix"></div>
</div><!-- /.card-footer -->
</div><!-- /.card -->
<?php
$clientaddress_preview->showPageFooter();
if (DEBUG_ENABLED)
	echo GetDebugMessage();
?>
<?php
if ($clientaddress_preview->Recordset)
	$clientaddress_preview->Recordset->Close();

// Output
$content = ob_get_contents();
ob_end_clean();
echo ConvertToUtf8($content);
?>
<?php
$clientaddress_preview->terminate();
?>
