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

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

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

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

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

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

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

// Dynamic selection lists
flitigantcontactlist.lists["x_LitigantID"] = <?php echo $litigantcontact_list->LitigantID->Lookup->toClientList() ?>;
flitigantcontactlist.lists["x_LitigantID"].options = <?php echo JsonEncode($litigantcontact_list->LitigantID->lookupOptions()) ?>;
flitigantcontactlist.lists["x_ContactTypeID"] = <?php echo $litigantcontact_list->ContactTypeID->Lookup->toClientList() ?>;
flitigantcontactlist.lists["x_ContactTypeID"].options = <?php echo JsonEncode($litigantcontact_list->ContactTypeID->lookupOptions()) ?>;
flitigantcontactlist.lists["x_Primary[]"] = <?php echo $litigantcontact_list->Primary->Lookup->toClientList() ?>;
flitigantcontactlist.lists["x_Primary[]"].options = <?php echo JsonEncode($litigantcontact_list->Primary->options(FALSE, TRUE)) ?>;

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

// Validate function for search
flitigantcontactlistsrch.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
flitigantcontactlistsrch.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
flitigantcontactlistsrch.validateRequired = <?php echo json_encode(CLIENT_VALIDATE) ?>;

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

// Filters
flitigantcontactlistsrch.filterList = <?php echo $litigantcontact_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 (!$litigantcontact->isExport()) { ?>
<div class="btn-toolbar ew-toolbar">
<?php if ($litigantcontact_list->TotalRecs > 0 && $litigantcontact_list->ExportOptions->visible()) { ?>
<?php $litigantcontact_list->ExportOptions->render("body") ?>
<?php } ?>
<?php if ($litigantcontact_list->ImportOptions->visible()) { ?>
<?php $litigantcontact_list->ImportOptions->render("body") ?>
<?php } ?>
<?php if ($litigantcontact_list->SearchOptions->visible()) { ?>
<?php $litigantcontact_list->SearchOptions->render("body") ?>
<?php } ?>
<?php if ($litigantcontact_list->FilterOptions->visible()) { ?>
<?php $litigantcontact_list->FilterOptions->render("body") ?>
<?php } ?>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php if (!$litigantcontact->isExport() || EXPORT_MASTER_RECORD && $litigantcontact->isExport("print")) { ?>
<?php
if ($litigantcontact_list->DbMasterFilter <> "" && $litigantcontact->getCurrentMasterTable() == "litigants") {
	if ($litigantcontact_list->MasterRecordExists) {
		include_once "litigantsmaster.php";
	}
}
?>
<?php } ?>
<?php
$litigantcontact_list->renderOtherOptions();
?>
<?php if ($Security->CanSearch()) { ?>
<?php if (!$litigantcontact->isExport() && !$litigantcontact->CurrentAction) { ?>
<form name="flitigantcontactlistsrch" id="flitigantcontactlistsrch" class="form-inline ew-form ew-ext-search-form" action="<?php echo CurrentPageName() ?>">
<?php $searchPanelClass = ($litigantcontact_list->SearchWhere <> "") ? " show" : " show"; ?>
<div id="flitigantcontactlistsrch-search-panel" class="ew-search-panel collapse<?php echo $searchPanelClass ?>">
<input type="hidden" name="cmd" value="search">
<input type="hidden" name="t" value="litigantcontact">
	<div class="ew-basic-search">
<?php
if ($SearchError == "")
	$litigantcontact_list->LoadAdvancedSearch(); // Load advanced search

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

// Render row
$litigantcontact->resetAttributes();
$litigantcontact_list->renderRow();
?>
<div id="xsr_1" class="ew-row d-sm-flex">
<?php if ($litigantcontact->Primary->Visible) { // Primary ?>
	<div id="xsc_Primary" class="ew-cell form-group">
		<label class="ew-search-caption ew-label"><?php echo $litigantcontact->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($litigantcontact->Primary->AdvancedSearch->SearchValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="litigantcontact" data-field="x_Primary" name="x_Primary[]" id="x_Primary[]" value="1"<?php echo $selwrk ?><?php echo $litigantcontact->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($litigantcontact_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($litigantcontact_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 $litigantcontact_list->BasicSearch->getTypeNameShort() ?></span></button>
			<div class="dropdown-menu dropdown-menu-right">
				<a class="dropdown-item<?php if ($litigantcontact_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 ($litigantcontact_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 ($litigantcontact_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 ($litigantcontact_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 $litigantcontact_list->showPageHeader(); ?>
<?php
$litigantcontact_list->showMessage();
?>
<?php if ($litigantcontact_list->TotalRecs > 0 || $litigantcontact->CurrentAction) { ?>
<div class="card ew-card ew-grid<?php if ($litigantcontact_list->isAddOrEdit()) { ?> ew-grid-add-edit<?php } ?> litigantcontact">
<?php if (!$litigantcontact->isExport()) { ?>
<div class="card-header ew-grid-upper-panel">
<?php if (!$litigantcontact->isGridAdd()) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?php echo CurrentPageName() ?>">
<?php if (!isset($litigantcontact_list->Pager)) $litigantcontact_list->Pager = new PrevNextPager($litigantcontact_list->StartRec, $litigantcontact_list->DisplayRecs, $litigantcontact_list->TotalRecs, $litigantcontact_list->AutoHidePager) ?>
<?php if ($litigantcontact_list->Pager->RecordCount > 0 && $litigantcontact_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 ($litigantcontact_list->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" href="<?php echo $litigantcontact_list->pageUrl() ?>start=<?php echo $litigantcontact_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 ($litigantcontact_list->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" href="<?php echo $litigantcontact_list->pageUrl() ?>start=<?php echo $litigantcontact_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 $litigantcontact_list->Pager->CurrentPage ?>">
<div class="input-group-append">
<!-- next page button -->
	<?php if ($litigantcontact_list->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" href="<?php echo $litigantcontact_list->pageUrl() ?>start=<?php echo $litigantcontact_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 ($litigantcontact_list->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" href="<?php echo $litigantcontact_list->pageUrl() ?>start=<?php echo $litigantcontact_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 $litigantcontact_list->Pager->PageCount ?></span>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php if ($litigantcontact_list->Pager->RecordCount > 0) { ?>
<div class="ew-pager ew-rec">
	<span><?php echo $Language->Phrase("Record") ?>&nbsp;<?php echo $litigantcontact_list->Pager->FromIndex ?>&nbsp;<?php echo $Language->Phrase("To") ?>&nbsp;<?php echo $litigantcontact_list->Pager->ToIndex ?>&nbsp;<?php echo $Language->Phrase("Of") ?>&nbsp;<?php echo $litigantcontact_list->Pager->RecordCount ?></span>
</div>
<?php } ?>
<?php if ($litigantcontact_list->TotalRecs > 0 && (!$litigantcontact_list->AutoHidePageSizeSelector || $litigantcontact_list->Pager->Visible)) { ?>
<div class="ew-pager">
<input type="hidden" name="t" value="litigantcontact">
<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 ($litigantcontact_list->DisplayRecs == 5) { ?> selected<?php } ?>>5</option>
<option value="10"<?php if ($litigantcontact_list->DisplayRecs == 10) { ?> selected<?php } ?>>10</option>
<option value="20"<?php if ($litigantcontact_list->DisplayRecs == 20) { ?> selected<?php } ?>>20</option>
<option value="30"<?php if ($litigantcontact_list->DisplayRecs == 30) { ?> selected<?php } ?>>30</option>
<option value="40"<?php if ($litigantcontact_list->DisplayRecs == 40) { ?> selected<?php } ?>>40</option>
<option value="50"<?php if ($litigantcontact_list->DisplayRecs == 50) { ?> selected<?php } ?>>50</option>
<option value="100"<?php if ($litigantcontact_list->DisplayRecs == 100) { ?> selected<?php } ?>>100</option>
<option value="200"<?php if ($litigantcontact_list->DisplayRecs == 200) { ?> selected<?php } ?>>200</option>
<option value="500"<?php if ($litigantcontact_list->DisplayRecs == 500) { ?> selected<?php } ?>>500</option>
<option value="ALL"<?php if ($litigantcontact->getRecordsPerPage() == -1) { ?> selected<?php } ?>><?php echo $Language->Phrase("AllRecords") ?></option>
</select>
</div>
<?php } ?>
</form>
<?php } ?>
<div class="ew-list-other-options">
<?php $litigantcontact_list->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
</div>
<?php } ?>
<form name="flitigantcontactlist" id="flitigantcontactlist" class="form-inline ew-form ew-list-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($litigantcontact_list->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $litigantcontact_list->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="litigantcontact">
<?php if ($litigantcontact->getCurrentMasterTable() == "litigants" && $litigantcontact->CurrentAction) { ?>
<input type="hidden" name="<?php echo TABLE_SHOW_MASTER ?>" value="litigants">
<input type="hidden" name="fk_LitigantID" value="<?php echo $litigantcontact->LitigantID->getSessionValue() ?>">
<?php } ?>
<div id="gmp_litigantcontact" class="<?php if (IsResponsiveLayout()) { ?>table-responsive <?php } ?>card-body ew-grid-middle-panel">
<?php if ($litigantcontact_list->TotalRecs > 0 || $litigantcontact->isGridEdit()) { ?>
<table id="tbl_litigantcontactlist" class="table ew-table"><!-- .ew-table ##-->
<thead>
	<tr class="ew-table-header">
<?php

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

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

// Render list options (header, left)
$litigantcontact_list->ListOptions->render("header", "left");
?>
<?php if ($litigantcontact->LitigantID->Visible) { // LitigantID ?>
	<?php if ($litigantcontact->sortUrl($litigantcontact->LitigantID) == "") { ?>
		<th data-name="LitigantID" class="<?php echo $litigantcontact->LitigantID->headerCellClass() ?>"><div id="elh_litigantcontact_LitigantID" class="litigantcontact_LitigantID"><div class="ew-table-header-caption"><?php echo $litigantcontact->LitigantID->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="LitigantID" class="<?php echo $litigantcontact->LitigantID->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $litigantcontact->SortUrl($litigantcontact->LitigantID) ?>',2);"><div id="elh_litigantcontact_LitigantID" class="litigantcontact_LitigantID">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $litigantcontact->LitigantID->caption() ?></span><span class="ew-table-header-sort"><?php if ($litigantcontact->LitigantID->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($litigantcontact->LitigantID->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($litigantcontact->ContactTypeID->Visible) { // ContactTypeID ?>
	<?php if ($litigantcontact->sortUrl($litigantcontact->ContactTypeID) == "") { ?>
		<th data-name="ContactTypeID" class="<?php echo $litigantcontact->ContactTypeID->headerCellClass() ?>"><div id="elh_litigantcontact_ContactTypeID" class="litigantcontact_ContactTypeID"><div class="ew-table-header-caption"><?php echo $litigantcontact->ContactTypeID->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="ContactTypeID" class="<?php echo $litigantcontact->ContactTypeID->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $litigantcontact->SortUrl($litigantcontact->ContactTypeID) ?>',2);"><div id="elh_litigantcontact_ContactTypeID" class="litigantcontact_ContactTypeID">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $litigantcontact->ContactTypeID->caption() ?></span><span class="ew-table-header-sort"><?php if ($litigantcontact->ContactTypeID->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($litigantcontact->ContactTypeID->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($litigantcontact->Contact->Visible) { // Contact ?>
	<?php if ($litigantcontact->sortUrl($litigantcontact->Contact) == "") { ?>
		<th data-name="Contact" class="<?php echo $litigantcontact->Contact->headerCellClass() ?>"><div id="elh_litigantcontact_Contact" class="litigantcontact_Contact"><div class="ew-table-header-caption"><?php echo $litigantcontact->Contact->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Contact" class="<?php echo $litigantcontact->Contact->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $litigantcontact->SortUrl($litigantcontact->Contact) ?>',2);"><div id="elh_litigantcontact_Contact" class="litigantcontact_Contact">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $litigantcontact->Contact->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($litigantcontact->Contact->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($litigantcontact->Contact->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($litigantcontact->Notes->Visible) { // Notes ?>
	<?php if ($litigantcontact->sortUrl($litigantcontact->Notes) == "") { ?>
		<th data-name="Notes" class="<?php echo $litigantcontact->Notes->headerCellClass() ?>"><div id="elh_litigantcontact_Notes" class="litigantcontact_Notes"><div class="ew-table-header-caption"><?php echo $litigantcontact->Notes->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Notes" class="<?php echo $litigantcontact->Notes->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $litigantcontact->SortUrl($litigantcontact->Notes) ?>',2);"><div id="elh_litigantcontact_Notes" class="litigantcontact_Notes">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $litigantcontact->Notes->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($litigantcontact->Notes->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($litigantcontact->Notes->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($litigantcontact->Primary->Visible) { // Primary ?>
	<?php if ($litigantcontact->sortUrl($litigantcontact->Primary) == "") { ?>
		<th data-name="Primary" class="<?php echo $litigantcontact->Primary->headerCellClass() ?>"><div id="elh_litigantcontact_Primary" class="litigantcontact_Primary"><div class="ew-table-header-caption"><?php echo $litigantcontact->Primary->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Primary" class="<?php echo $litigantcontact->Primary->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $litigantcontact->SortUrl($litigantcontact->Primary) ?>',2);"><div id="elh_litigantcontact_Primary" class="litigantcontact_Primary">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $litigantcontact->Primary->caption() ?></span><span class="ew-table-header-sort"><?php if ($litigantcontact->Primary->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($litigantcontact->Primary->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php

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

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

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

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

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

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

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

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

// Render list options (body, left)
$litigantcontact_list->ListOptions->render("body", "left", $litigantcontact_list->RowCnt);
?>
	<?php if ($litigantcontact->LitigantID->Visible) { // LitigantID ?>
		<td data-name="LitigantID"<?php echo $litigantcontact->LitigantID->cellAttributes() ?>>
<span id="el<?php echo $litigantcontact_list->RowCnt ?>_litigantcontact_LitigantID" class="litigantcontact_LitigantID">
<span<?php echo $litigantcontact->LitigantID->viewAttributes() ?>>
<?php echo $litigantcontact->LitigantID->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($litigantcontact->ContactTypeID->Visible) { // ContactTypeID ?>
		<td data-name="ContactTypeID"<?php echo $litigantcontact->ContactTypeID->cellAttributes() ?>>
<span id="el<?php echo $litigantcontact_list->RowCnt ?>_litigantcontact_ContactTypeID" class="litigantcontact_ContactTypeID">
<span<?php echo $litigantcontact->ContactTypeID->viewAttributes() ?>>
<?php echo $litigantcontact->ContactTypeID->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($litigantcontact->Contact->Visible) { // Contact ?>
		<td data-name="Contact"<?php echo $litigantcontact->Contact->cellAttributes() ?>>
<span id="el<?php echo $litigantcontact_list->RowCnt ?>_litigantcontact_Contact" class="litigantcontact_Contact">
<span<?php echo $litigantcontact->Contact->viewAttributes() ?>>
<?php echo $litigantcontact->Contact->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($litigantcontact->Notes->Visible) { // Notes ?>
		<td data-name="Notes"<?php echo $litigantcontact->Notes->cellAttributes() ?>>
<span id="el<?php echo $litigantcontact_list->RowCnt ?>_litigantcontact_Notes" class="litigantcontact_Notes">
<span<?php echo $litigantcontact->Notes->viewAttributes() ?>>
<?php echo $litigantcontact->Notes->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($litigantcontact->Primary->Visible) { // Primary ?>
		<td data-name="Primary"<?php echo $litigantcontact->Primary->cellAttributes() ?>>
<span id="el<?php echo $litigantcontact_list->RowCnt ?>_litigantcontact_Primary" class="litigantcontact_Primary">
<span<?php echo $litigantcontact->Primary->viewAttributes() ?>>
<?php if (ConvertToBool($litigantcontact->Primary->CurrentValue)) { ?>
<input type="checkbox" value="<?php echo $litigantcontact->Primary->getViewValue() ?>" disabled checked>
<?php } else { ?>
<input type="checkbox" value="<?php echo $litigantcontact->Primary->getViewValue() ?>" disabled>
<?php } ?>
</span>
</span>
</td>
	<?php } ?>
<?php

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

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

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

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