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

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

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

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

// Page Rendering event
$judgeaddress_list->Page_Render();
?>
<?php include_once "header.php" ?>
<?php if (!$judgeaddress->isExport()) { ?>
<script>

// Form object
currentPageID = ew.PAGE_ID = "list";
var fjudgeaddresslist = currentForm = new ew.Form("fjudgeaddresslist", "list");
fjudgeaddresslist.formKeyCountName = '<?php echo $judgeaddress_list->FormKeyCountName ?>';

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

// Dynamic selection lists
fjudgeaddresslist.lists["x_JudgeID"] = <?php echo $judgeaddress_list->JudgeID->Lookup->toClientList() ?>;
fjudgeaddresslist.lists["x_JudgeID"].options = <?php echo JsonEncode($judgeaddress_list->JudgeID->lookupOptions()) ?>;
fjudgeaddresslist.lists["x_AddressTypeID"] = <?php echo $judgeaddress_list->AddressTypeID->Lookup->toClientList() ?>;
fjudgeaddresslist.lists["x_AddressTypeID"].options = <?php echo JsonEncode($judgeaddress_list->AddressTypeID->lookupOptions()) ?>;
fjudgeaddresslist.lists["x_Primary[]"] = <?php echo $judgeaddress_list->Primary->Lookup->toClientList() ?>;
fjudgeaddresslist.lists["x_Primary[]"].options = <?php echo JsonEncode($judgeaddress_list->Primary->options(FALSE, TRUE)) ?>;

// Form object for search
var fjudgeaddresslistsrch = currentSearchForm = new ew.Form("fjudgeaddresslistsrch");

// Validate function for search
fjudgeaddresslistsrch.validate = function(fobj) {
	if (!this.validateRequired)
		return true; // Ignore validation
	fobj = fobj || this._form;
	var infix = "";

	// Fire Form_CustomValidate event
	if (!this.Form_CustomValidate(fobj))
		return false;
	return true;
}

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

// Dynamic selection lists
fjudgeaddresslistsrch.lists["x_Primary[]"] = <?php echo $judgeaddress_list->Primary->Lookup->toClientList() ?>;
fjudgeaddresslistsrch.lists["x_Primary[]"].options = <?php echo JsonEncode($judgeaddress_list->Primary->options(FALSE, TRUE)) ?>;

// Filters
fjudgeaddresslistsrch.filterList = <?php echo $judgeaddress_list->getFilterList() ?>;
</script>
<script src="phpjs/ewscrolltable.js"></script>
<style type="text/css">
.ew-table-preview-row { /* main table preview row color */
	background-color: #FFFFFF; /* preview row color */
}
.ew-table-preview-row .ew-grid {
	display: table;
}
</style>
<div id="ew-preview" class="d-none"><!-- preview -->
	<div class="ew-nav-tabs"><!-- .ew-nav-tabs -->
		<ul class="nav nav-tabs"></ul>
		<div class="tab-content"><!-- .tab-content -->
			<div class="tab-pane fade active show"></div>
		</div><!-- /.tab-content -->
	</div><!-- /.ew-nav-tabs -->
</div><!-- /preview -->
<script src="phpjs/ewpreview.js"></script>
<script>
ew.PREVIEW_PLACEMENT = ew.CSS_FLIP ? "left" : "right";
ew.PREVIEW_SINGLE_ROW = false;
ew.PREVIEW_OVERLAY = true;
</script>
<script>

// Write your client script here, no need to add script tags.
</script>
<?php } ?>
<?php if (!$judgeaddress->isExport()) { ?>
<div class="btn-toolbar ew-toolbar">
<?php if ($judgeaddress_list->TotalRecs > 0 && $judgeaddress_list->ExportOptions->visible()) { ?>
<?php $judgeaddress_list->ExportOptions->render("body") ?>
<?php } ?>
<?php if ($judgeaddress_list->ImportOptions->visible()) { ?>
<?php $judgeaddress_list->ImportOptions->render("body") ?>
<?php } ?>
<?php if ($judgeaddress_list->SearchOptions->visible()) { ?>
<?php $judgeaddress_list->SearchOptions->render("body") ?>
<?php } ?>
<?php if ($judgeaddress_list->FilterOptions->visible()) { ?>
<?php $judgeaddress_list->FilterOptions->render("body") ?>
<?php } ?>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php if (!$judgeaddress->isExport() || EXPORT_MASTER_RECORD && $judgeaddress->isExport("print")) { ?>
<?php
if ($judgeaddress_list->DbMasterFilter <> "" && $judgeaddress->getCurrentMasterTable() == "judges") {
	if ($judgeaddress_list->MasterRecordExists) {
		include_once "judgesmaster.php";
	}
}
?>
<?php } ?>
<?php
$judgeaddress_list->renderOtherOptions();
?>
<?php if ($Security->CanSearch()) { ?>
<?php if (!$judgeaddress->isExport() && !$judgeaddress->CurrentAction) { ?>
<form name="fjudgeaddresslistsrch" id="fjudgeaddresslistsrch" class="form-inline ew-form ew-ext-search-form" action="<?php echo CurrentPageName() ?>">
<?php $searchPanelClass = ($judgeaddress_list->SearchWhere <> "") ? " show" : " show"; ?>
<div id="fjudgeaddresslistsrch-search-panel" class="ew-search-panel collapse<?php echo $searchPanelClass ?>">
<input type="hidden" name="cmd" value="search">
<input type="hidden" name="t" value="judgeaddress">
	<div class="ew-basic-search">
<?php
if ($SearchError == "")
	$judgeaddress_list->LoadAdvancedSearch(); // Load advanced search

// Render for search
$judgeaddress->RowType = ROWTYPE_SEARCH;

// Render row
$judgeaddress->resetAttributes();
$judgeaddress_list->renderRow();
?>
<div id="xsr_1" class="ew-row d-sm-flex">
<?php if ($judgeaddress->Primary->Visible) { // Primary ?>
	<div id="xsc_Primary" class="ew-cell form-group">
		<label class="ew-search-caption ew-label"><?php echo $judgeaddress->Primary->caption() ?></label>
		<span class="ew-search-operator"><?php echo $Language->phrase("=") ?><input type="hidden" name="z_Primary" id="z_Primary" value="="></span>
		<span class="ew-search-field">
<?php
$selwrk = (ConvertToBool($judgeaddress->Primary->AdvancedSearch->SearchValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="judgeaddress" data-field="x_Primary" name="x_Primary[]" id="x_Primary[]" value="1"<?php echo $selwrk ?><?php echo $judgeaddress->Primary->editAttributes() ?>>
</span>
	</div>
<?php } ?>
</div>
<div id="xsr_2" class="ew-row d-sm-flex">
	<div class="ew-quick-search input-group">
		<input type="text" name="<?php echo TABLE_BASIC_SEARCH ?>" id="<?php echo TABLE_BASIC_SEARCH ?>" class="form-control" value="<?php echo HtmlEncode($judgeaddress_list->BasicSearch->getKeyword()) ?>" placeholder="<?php echo HtmlEncode($Language->phrase("Search")) ?>">
		<input type="hidden" name="<?php echo TABLE_BASIC_SEARCH_TYPE ?>" id="<?php echo TABLE_BASIC_SEARCH_TYPE ?>" value="<?php echo HtmlEncode($judgeaddress_list->BasicSearch->getType()) ?>">
		<div class="input-group-append">
			<button class="btn btn-primary" name="btn-submit" id="btn-submit" type="submit"><?php echo $Language->phrase("SearchBtn") ?></button>
			<button type="button" data-toggle="dropdown" class="btn btn-primary dropdown-toggle dropdown-toggle-split" aria-haspopup="true" aria-expanded="false"><span id="searchtype"><?php echo $judgeaddress_list->BasicSearch->getTypeNameShort() ?></span></button>
			<div class="dropdown-menu dropdown-menu-right">
				<a class="dropdown-item<?php if ($judgeaddress_list->BasicSearch->getType() == "") echo " active"; ?>" href="javascript:void(0);" onclick="ew.setSearchType(this)"><?php echo $Language->phrase("QuickSearchAuto") ?></a>
				<a class="dropdown-item<?php if ($judgeaddress_list->BasicSearch->getType() == "=") echo " active"; ?>" href="javascript:void(0);" onclick="ew.setSearchType(this,'=')"><?php echo $Language->phrase("QuickSearchExact") ?></a>
				<a class="dropdown-item<?php if ($judgeaddress_list->BasicSearch->getType() == "AND") echo " active"; ?>" href="javascript:void(0);" onclick="ew.setSearchType(this,'AND')"><?php echo $Language->phrase("QuickSearchAll") ?></a>
				<a class="dropdown-item<?php if ($judgeaddress_list->BasicSearch->getType() == "OR") echo " active"; ?>" href="javascript:void(0);" onclick="ew.setSearchType(this,'OR')"><?php echo $Language->phrase("QuickSearchAny") ?></a>
			</div>
		</div>
	</div>
</div>
	</div>
</div>
</form>
<?php } ?>
<?php } ?>
<?php $judgeaddress_list->showPageHeader(); ?>
<?php
$judgeaddress_list->showMessage();
?>
<?php if ($judgeaddress_list->TotalRecs > 0 || $judgeaddress->CurrentAction) { ?>
<div class="card ew-card ew-grid<?php if ($judgeaddress_list->isAddOrEdit()) { ?> ew-grid-add-edit<?php } ?> judgeaddress">
<?php if (!$judgeaddress->isExport()) { ?>
<div class="card-header ew-grid-upper-panel">
<?php if (!$judgeaddress->isGridAdd()) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?php echo CurrentPageName() ?>">
<?php if (!isset($judgeaddress_list->Pager)) $judgeaddress_list->Pager = new PrevNextPager($judgeaddress_list->StartRec, $judgeaddress_list->DisplayRecs, $judgeaddress_list->TotalRecs, $judgeaddress_list->AutoHidePager) ?>
<?php if ($judgeaddress_list->Pager->RecordCount > 0 && $judgeaddress_list->Pager->Visible) { ?>
<div class="ew-pager">
<span><?php echo $Language->Phrase("Page") ?>&nbsp;</span>
<div class="ew-prev-next"><div class="input-group input-group-sm">
<div class="input-group-prepend">
<!-- first page button -->
	<?php if ($judgeaddress_list->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" href="<?php echo $judgeaddress_list->pageUrl() ?>start=<?php echo $judgeaddress_list->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 ($judgeaddress_list->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" href="<?php echo $judgeaddress_list->pageUrl() ?>start=<?php echo $judgeaddress_list->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 } ?>
</div>
<!-- current page number -->
	<input class="form-control" type="text" name="<?php echo TABLE_PAGE_NO ?>" value="<?php echo $judgeaddress_list->Pager->CurrentPage ?>">
<div class="input-group-append">
<!-- next page button -->
	<?php if ($judgeaddress_list->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" href="<?php echo $judgeaddress_list->pageUrl() ?>start=<?php echo $judgeaddress_list->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 ($judgeaddress_list->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" href="<?php echo $judgeaddress_list->pageUrl() ?>start=<?php echo $judgeaddress_list->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>
<span>&nbsp;<?php echo $Language->Phrase("of") ?>&nbsp;<?php echo $judgeaddress_list->Pager->PageCount ?></span>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php if ($judgeaddress_list->Pager->RecordCount > 0) { ?>
<div class="ew-pager ew-rec">
	<span><?php echo $Language->Phrase("Record") ?>&nbsp;<?php echo $judgeaddress_list->Pager->FromIndex ?>&nbsp;<?php echo $Language->Phrase("To") ?>&nbsp;<?php echo $judgeaddress_list->Pager->ToIndex ?>&nbsp;<?php echo $Language->Phrase("Of") ?>&nbsp;<?php echo $judgeaddress_list->Pager->RecordCount ?></span>
</div>
<?php } ?>
<?php if ($judgeaddress_list->TotalRecs > 0 && (!$judgeaddress_list->AutoHidePageSizeSelector || $judgeaddress_list->Pager->Visible)) { ?>
<div class="ew-pager">
<input type="hidden" name="t" value="judgeaddress">
<select name="<?php echo TABLE_REC_PER_PAGE ?>" class="form-control form-control-sm ew-tooltip" title="<?php echo $Language->phrase("RecordsPerPage") ?>" onchange="this.form.submit();">
<option value="5"<?php if ($judgeaddress_list->DisplayRecs == 5) { ?> selected<?php } ?>>5</option>
<option value="10"<?php if ($judgeaddress_list->DisplayRecs == 10) { ?> selected<?php } ?>>10</option>
<option value="20"<?php if ($judgeaddress_list->DisplayRecs == 20) { ?> selected<?php } ?>>20</option>
<option value="30"<?php if ($judgeaddress_list->DisplayRecs == 30) { ?> selected<?php } ?>>30</option>
<option value="40"<?php if ($judgeaddress_list->DisplayRecs == 40) { ?> selected<?php } ?>>40</option>
<option value="50"<?php if ($judgeaddress_list->DisplayRecs == 50) { ?> selected<?php } ?>>50</option>
<option value="100"<?php if ($judgeaddress_list->DisplayRecs == 100) { ?> selected<?php } ?>>100</option>
<option value="200"<?php if ($judgeaddress_list->DisplayRecs == 200) { ?> selected<?php } ?>>200</option>
<option value="500"<?php if ($judgeaddress_list->DisplayRecs == 500) { ?> selected<?php } ?>>500</option>
<option value="ALL"<?php if ($judgeaddress->getRecordsPerPage() == -1) { ?> selected<?php } ?>><?php echo $Language->Phrase("AllRecords") ?></option>
</select>
</div>
<?php } ?>
</form>
<?php } ?>
<div class="ew-list-other-options">
<?php $judgeaddress_list->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
</div>
<?php } ?>
<form name="fjudgeaddresslist" id="fjudgeaddresslist" class="form-inline ew-form ew-list-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($judgeaddress_list->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $judgeaddress_list->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="judgeaddress">
<?php if ($judgeaddress->getCurrentMasterTable() == "judges" && $judgeaddress->CurrentAction) { ?>
<input type="hidden" name="<?php echo TABLE_SHOW_MASTER ?>" value="judges">
<input type="hidden" name="fk_JudgeID" value="<?php echo $judgeaddress->JudgeID->getSessionValue() ?>">
<?php } ?>
<div id="gmp_judgeaddress" class="<?php if (IsResponsiveLayout()) { ?>table-responsive <?php } ?>card-body ew-grid-middle-panel">
<?php if ($judgeaddress_list->TotalRecs > 0 || $judgeaddress->isGridEdit()) { ?>
<table id="tbl_judgeaddresslist" class="table ew-table"><!-- .ew-table ##-->
<thead>
	<tr class="ew-table-header">
<?php

// Header row
$judgeaddress_list->RowType = ROWTYPE_HEADER;

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

// Render list options (header, left)
$judgeaddress_list->ListOptions->render("header", "left");
?>
<?php if ($judgeaddress->JudgeID->Visible) { // JudgeID ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->JudgeID) == "") { ?>
		<th data-name="JudgeID" class="<?php echo $judgeaddress->JudgeID->headerCellClass() ?>"><div id="elh_judgeaddress_JudgeID" class="judgeaddress_JudgeID"><div class="ew-table-header-caption"><?php echo $judgeaddress->JudgeID->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="JudgeID" class="<?php echo $judgeaddress->JudgeID->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $judgeaddress->SortUrl($judgeaddress->JudgeID) ?>',2);"><div id="elh_judgeaddress_JudgeID" class="judgeaddress_JudgeID">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->JudgeID->caption() ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->JudgeID->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->JudgeID->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->AddressTypeID->Visible) { // AddressTypeID ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->AddressTypeID) == "") { ?>
		<th data-name="AddressTypeID" class="<?php echo $judgeaddress->AddressTypeID->headerCellClass() ?>"><div id="elh_judgeaddress_AddressTypeID" class="judgeaddress_AddressTypeID"><div class="ew-table-header-caption"><?php echo $judgeaddress->AddressTypeID->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="AddressTypeID" class="<?php echo $judgeaddress->AddressTypeID->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $judgeaddress->SortUrl($judgeaddress->AddressTypeID) ?>',2);"><div id="elh_judgeaddress_AddressTypeID" class="judgeaddress_AddressTypeID">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->AddressTypeID->caption() ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->AddressTypeID->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->AddressTypeID->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->Address->Visible) { // Address ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->Address) == "") { ?>
		<th data-name="Address" class="<?php echo $judgeaddress->Address->headerCellClass() ?>"><div id="elh_judgeaddress_Address" class="judgeaddress_Address"><div class="ew-table-header-caption"><?php echo $judgeaddress->Address->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Address" class="<?php echo $judgeaddress->Address->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $judgeaddress->SortUrl($judgeaddress->Address) ?>',2);"><div id="elh_judgeaddress_Address" class="judgeaddress_Address">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->Address->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->Address->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->Address->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->City->Visible) { // City ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->City) == "") { ?>
		<th data-name="City" class="<?php echo $judgeaddress->City->headerCellClass() ?>"><div id="elh_judgeaddress_City" class="judgeaddress_City"><div class="ew-table-header-caption"><?php echo $judgeaddress->City->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="City" class="<?php echo $judgeaddress->City->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $judgeaddress->SortUrl($judgeaddress->City) ?>',2);"><div id="elh_judgeaddress_City" class="judgeaddress_City">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->City->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->City->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->City->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->Region->Visible) { // Region ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->Region) == "") { ?>
		<th data-name="Region" class="<?php echo $judgeaddress->Region->headerCellClass() ?>"><div id="elh_judgeaddress_Region" class="judgeaddress_Region"><div class="ew-table-header-caption"><?php echo $judgeaddress->Region->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Region" class="<?php echo $judgeaddress->Region->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $judgeaddress->SortUrl($judgeaddress->Region) ?>',2);"><div id="elh_judgeaddress_Region" class="judgeaddress_Region">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->Region->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->Region->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->Region->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->PostalCode->Visible) { // PostalCode ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->PostalCode) == "") { ?>
		<th data-name="PostalCode" class="<?php echo $judgeaddress->PostalCode->headerCellClass() ?>"><div id="elh_judgeaddress_PostalCode" class="judgeaddress_PostalCode"><div class="ew-table-header-caption"><?php echo $judgeaddress->PostalCode->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="PostalCode" class="<?php echo $judgeaddress->PostalCode->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $judgeaddress->SortUrl($judgeaddress->PostalCode) ?>',2);"><div id="elh_judgeaddress_PostalCode" class="judgeaddress_PostalCode">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->PostalCode->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->PostalCode->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->PostalCode->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->Country->Visible) { // Country ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->Country) == "") { ?>
		<th data-name="Country" class="<?php echo $judgeaddress->Country->headerCellClass() ?>"><div id="elh_judgeaddress_Country" class="judgeaddress_Country"><div class="ew-table-header-caption"><?php echo $judgeaddress->Country->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Country" class="<?php echo $judgeaddress->Country->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $judgeaddress->SortUrl($judgeaddress->Country) ?>',2);"><div id="elh_judgeaddress_Country" class="judgeaddress_Country">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->Country->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->Country->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->Country->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->Notes->Visible) { // Notes ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->Notes) == "") { ?>
		<th data-name="Notes" class="<?php echo $judgeaddress->Notes->headerCellClass() ?>"><div id="elh_judgeaddress_Notes" class="judgeaddress_Notes"><div class="ew-table-header-caption"><?php echo $judgeaddress->Notes->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Notes" class="<?php echo $judgeaddress->Notes->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $judgeaddress->SortUrl($judgeaddress->Notes) ?>',2);"><div id="elh_judgeaddress_Notes" class="judgeaddress_Notes">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->Notes->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->Notes->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->Notes->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->Primary->Visible) { // Primary ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->Primary) == "") { ?>
		<th data-name="Primary" class="<?php echo $judgeaddress->Primary->headerCellClass() ?>"><div id="elh_judgeaddress_Primary" class="judgeaddress_Primary"><div class="ew-table-header-caption"><?php echo $judgeaddress->Primary->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Primary" class="<?php echo $judgeaddress->Primary->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $judgeaddress->SortUrl($judgeaddress->Primary) ?>',2);"><div id="elh_judgeaddress_Primary" class="judgeaddress_Primary">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->Primary->caption() ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->Primary->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->Primary->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php

// Render list options (header, right)
$judgeaddress_list->ListOptions->render("header", "right");
?>
	</tr>
</thead>
<tbody>
<?php
if ($judgeaddress->ExportAll && $judgeaddress->isExport()) {
	$judgeaddress_list->StopRec = $judgeaddress_list->TotalRecs;
} else {

	// Set the last record to display
	if ($judgeaddress_list->TotalRecs > $judgeaddress_list->StartRec + $judgeaddress_list->DisplayRecs - 1)
		$judgeaddress_list->StopRec = $judgeaddress_list->StartRec + $judgeaddress_list->DisplayRecs - 1;
	else
		$judgeaddress_list->StopRec = $judgeaddress_list->TotalRecs;
}
$judgeaddress_list->RecCnt = $judgeaddress_list->StartRec - 1;
if ($judgeaddress_list->Recordset && !$judgeaddress_list->Recordset->EOF) {
	$judgeaddress_list->Recordset->moveFirst();
	$selectLimit = $judgeaddress_list->UseSelectLimit;
	if (!$selectLimit && $judgeaddress_list->StartRec > 1)
		$judgeaddress_list->Recordset->move($judgeaddress_list->StartRec - 1);
} elseif (!$judgeaddress->AllowAddDeleteRow && $judgeaddress_list->StopRec == 0) {
	$judgeaddress_list->StopRec = $judgeaddress->GridAddRowCount;
}

// Initialize aggregate
$judgeaddress->RowType = ROWTYPE_AGGREGATEINIT;
$judgeaddress->resetAttributes();
$judgeaddress_list->renderRow();
while ($judgeaddress_list->RecCnt < $judgeaddress_list->StopRec) {
	$judgeaddress_list->RecCnt++;
	if ($judgeaddress_list->RecCnt >= $judgeaddress_list->StartRec) {
		$judgeaddress_list->RowCnt++;

		// Set up key count
		$judgeaddress_list->KeyCount = $judgeaddress_list->RowIndex;

		// Init row class and style
		$judgeaddress->resetAttributes();
		$judgeaddress->CssClass = "";
		if ($judgeaddress->isGridAdd()) {
		} else {
			$judgeaddress_list->loadRowValues($judgeaddress_list->Recordset); // Load row values
		}
		$judgeaddress->RowType = ROWTYPE_VIEW; // Render view

		// Set up row id / data-rowindex
		$judgeaddress->RowAttrs = array_merge($judgeaddress->RowAttrs, array('data-rowindex'=>$judgeaddress_list->RowCnt, 'id'=>'r' . $judgeaddress_list->RowCnt . '_judgeaddress', 'data-rowtype'=>$judgeaddress->RowType));

		// Render row
		$judgeaddress_list->renderRow();

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

// Render list options (body, left)
$judgeaddress_list->ListOptions->render("body", "left", $judgeaddress_list->RowCnt);
?>
	<?php if ($judgeaddress->JudgeID->Visible) { // JudgeID ?>
		<td data-name="JudgeID"<?php echo $judgeaddress->JudgeID->cellAttributes() ?>>
<span id="el<?php echo $judgeaddress_list->RowCnt ?>_judgeaddress_JudgeID" class="judgeaddress_JudgeID">
<span<?php echo $judgeaddress->JudgeID->viewAttributes() ?>>
<?php echo $judgeaddress->JudgeID->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($judgeaddress->AddressTypeID->Visible) { // AddressTypeID ?>
		<td data-name="AddressTypeID"<?php echo $judgeaddress->AddressTypeID->cellAttributes() ?>>
<span id="el<?php echo $judgeaddress_list->RowCnt ?>_judgeaddress_AddressTypeID" class="judgeaddress_AddressTypeID">
<span<?php echo $judgeaddress->AddressTypeID->viewAttributes() ?>>
<?php echo $judgeaddress->AddressTypeID->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($judgeaddress->Address->Visible) { // Address ?>
		<td data-name="Address"<?php echo $judgeaddress->Address->cellAttributes() ?>>
<span id="el<?php echo $judgeaddress_list->RowCnt ?>_judgeaddress_Address" class="judgeaddress_Address">
<span<?php echo $judgeaddress->Address->viewAttributes() ?>>
<?php echo $judgeaddress->Address->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($judgeaddress->City->Visible) { // City ?>
		<td data-name="City"<?php echo $judgeaddress->City->cellAttributes() ?>>
<span id="el<?php echo $judgeaddress_list->RowCnt ?>_judgeaddress_City" class="judgeaddress_City">
<span<?php echo $judgeaddress->City->viewAttributes() ?>>
<?php echo $judgeaddress->City->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($judgeaddress->Region->Visible) { // Region ?>
		<td data-name="Region"<?php echo $judgeaddress->Region->cellAttributes() ?>>
<span id="el<?php echo $judgeaddress_list->RowCnt ?>_judgeaddress_Region" class="judgeaddress_Region">
<span<?php echo $judgeaddress->Region->viewAttributes() ?>>
<?php echo $judgeaddress->Region->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($judgeaddress->PostalCode->Visible) { // PostalCode ?>
		<td data-name="PostalCode"<?php echo $judgeaddress->PostalCode->cellAttributes() ?>>
<span id="el<?php echo $judgeaddress_list->RowCnt ?>_judgeaddress_PostalCode" class="judgeaddress_PostalCode">
<span<?php echo $judgeaddress->PostalCode->viewAttributes() ?>>
<?php echo $judgeaddress->PostalCode->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($judgeaddress->Country->Visible) { // Country ?>
		<td data-name="Country"<?php echo $judgeaddress->Country->cellAttributes() ?>>
<span id="el<?php echo $judgeaddress_list->RowCnt ?>_judgeaddress_Country" class="judgeaddress_Country">
<span<?php echo $judgeaddress->Country->viewAttributes() ?>>
<?php echo $judgeaddress->Country->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($judgeaddress->Notes->Visible) { // Notes ?>
		<td data-name="Notes"<?php echo $judgeaddress->Notes->cellAttributes() ?>>
<span id="el<?php echo $judgeaddress_list->RowCnt ?>_judgeaddress_Notes" class="judgeaddress_Notes">
<span<?php echo $judgeaddress->Notes->viewAttributes() ?>>
<?php echo $judgeaddress->Notes->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($judgeaddress->Primary->Visible) { // Primary ?>
		<td data-name="Primary"<?php echo $judgeaddress->Primary->cellAttributes() ?>>
<span id="el<?php echo $judgeaddress_list->RowCnt ?>_judgeaddress_Primary" class="judgeaddress_Primary">
<span<?php echo $judgeaddress->Primary->viewAttributes() ?>>
<?php if (ConvertToBool($judgeaddress->Primary->CurrentValue)) { ?>
<input type="checkbox" value="<?php echo $judgeaddress->Primary->getViewValue() ?>" disabled checked>
<?php } else { ?>
<input type="checkbox" value="<?php echo $judgeaddress->Primary->getViewValue() ?>" disabled>
<?php } ?>
</span>
</span>
</td>
	<?php } ?>
<?php

// Render list options (body, right)
$judgeaddress_list->ListOptions->render("body", "right", $judgeaddress_list->RowCnt);
?>
	</tr>
<?php
	}
	if (!$judgeaddress->isGridAdd())
		$judgeaddress_list->Recordset->moveNext();
}
?>
</tbody>
</table><!-- /.ew-table -->
<?php } ?>
<?php if (!$judgeaddress->CurrentAction) { ?>
<input type="hidden" name="action" id="action" value="">
<?php } ?>
</div><!-- /.ew-grid-middle-panel -->
</form><!-- /.ew-list-form -->
<?php

// Close recordset
if ($judgeaddress_list->Recordset)
	$judgeaddress_list->Recordset->Close();
?>
<?php if (!$judgeaddress->isExport()) { ?>
<div class="card-footer ew-grid-lower-panel">
<?php if (!$judgeaddress->isGridAdd()) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?php echo CurrentPageName() ?>">
<?php if (!isset($judgeaddress_list->Pager)) $judgeaddress_list->Pager = new PrevNextPager($judgeaddress_list->StartRec, $judgeaddress_list->DisplayRecs, $judgeaddress_list->TotalRecs, $judgeaddress_list->AutoHidePager) ?>
<?php if ($judgeaddress_list->Pager->RecordCount > 0 && $judgeaddress_list->Pager->Visible) { ?>
<div class="ew-pager">
<span><?php echo $Language->Phrase("Page") ?>&nbsp;</span>
<div class="ew-prev-next"><div class="input-group input-group-sm">
<div class="input-group-prepend">
<!-- first page button -->
	<?php if ($judgeaddress_list->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" href="<?php echo $judgeaddress_list->pageUrl() ?>start=<?php echo $judgeaddress_list->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 ($judgeaddress_list->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" href="<?php echo $judgeaddress_list->pageUrl() ?>start=<?php echo $judgeaddress_list->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 } ?>
</div>
<!-- current page number -->
	<input class="form-control" type="text" name="<?php echo TABLE_PAGE_NO ?>" value="<?php echo $judgeaddress_list->Pager->CurrentPage ?>">
<div class="input-group-append">
<!-- next page button -->
	<?php if ($judgeaddress_list->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" href="<?php echo $judgeaddress_list->pageUrl() ?>start=<?php echo $judgeaddress_list->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 ($judgeaddress_list->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" href="<?php echo $judgeaddress_list->pageUrl() ?>start=<?php echo $judgeaddress_list->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>
<span>&nbsp;<?php echo $Language->Phrase("of") ?>&nbsp;<?php echo $judgeaddress_list->Pager->PageCount ?></span>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php if ($judgeaddress_list->Pager->RecordCount > 0) { ?>
<div class="ew-pager ew-rec">
	<span><?php echo $Language->Phrase("Record") ?>&nbsp;<?php echo $judgeaddress_list->Pager->FromIndex ?>&nbsp;<?php echo $Language->Phrase("To") ?>&nbsp;<?php echo $judgeaddress_list->Pager->ToIndex ?>&nbsp;<?php echo $Language->Phrase("Of") ?>&nbsp;<?php echo $judgeaddress_list->Pager->RecordCount ?></span>
</div>
<?php } ?>
<?php if ($judgeaddress_list->TotalRecs > 0 && (!$judgeaddress_list->AutoHidePageSizeSelector || $judgeaddress_list->Pager->Visible)) { ?>
<div class="ew-pager">
<input type="hidden" name="t" value="judgeaddress">
<select name="<?php echo TABLE_REC_PER_PAGE ?>" class="form-control form-control-sm ew-tooltip" title="<?php echo $Language->phrase("RecordsPerPage") ?>" onchange="this.form.submit();">
<option value="5"<?php if ($judgeaddress_list->DisplayRecs == 5) { ?> selected<?php } ?>>5</option>
<option value="10"<?php if ($judgeaddress_list->DisplayRecs == 10) { ?> selected<?php } ?>>10</option>
<option value="20"<?php if ($judgeaddress_list->DisplayRecs == 20) { ?> selected<?php } ?>>20</option>
<option value="30"<?php if ($judgeaddress_list->DisplayRecs == 30) { ?> selected<?php } ?>>30</option>
<option value="40"<?php if ($judgeaddress_list->DisplayRecs == 40) { ?> selected<?php } ?>>40</option>
<option value="50"<?php if ($judgeaddress_list->DisplayRecs == 50) { ?> selected<?php } ?>>50</option>
<option value="100"<?php if ($judgeaddress_list->DisplayRecs == 100) { ?> selected<?php } ?>>100</option>
<option value="200"<?php if ($judgeaddress_list->DisplayRecs == 200) { ?> selected<?php } ?>>200</option>
<option value="500"<?php if ($judgeaddress_list->DisplayRecs == 500) { ?> selected<?php } ?>>500</option>
<option value="ALL"<?php if ($judgeaddress->getRecordsPerPage() == -1) { ?> selected<?php } ?>><?php echo $Language->Phrase("AllRecords") ?></option>
</select>
</div>
<?php } ?>
</form>
<?php } ?>
<div class="ew-list-other-options">
<?php $judgeaddress_list->OtherOptions->render("body", "bottom") ?>
</div>
<div class="clearfix"></div>
</div>
<?php } ?>
</div><!-- /.ew-grid -->
<?php } ?>
<?php if ($judgeaddress_list->TotalRecs == 0 && !$judgeaddress->CurrentAction) { // Show other options ?>
<div class="ew-list-other-options">
<?php $judgeaddress_list->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
<?php
$judgeaddress_list->showPageFooter();
if (DEBUG_ENABLED)
	echo GetDebugMessage();
?>
<?php if (!$judgeaddress->isExport()) { ?>
<script>

// Write your table-specific startup script here
// document.write("page loaded");

</script>
<?php if (!$judgeaddress->isExport()) { ?>
<script>
ew.scrollableTable("gmp_judgeaddress", "", "");
</script>
<?php } ?>
<?php } ?>
<?php include_once "footer.php" ?>
<?php
$judgeaddress_list->terminate();
?>
