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

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

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

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

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

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

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

// Dynamic selection lists
// Form object for search

var fenvelopeslistsrch = currentSearchForm = new ew.Form("fenvelopeslistsrch");

// Filters
fenvelopeslistsrch.filterList = <?php echo $envelopes_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 (!$envelopes->isExport()) { ?>
<div class="btn-toolbar ew-toolbar">
<?php if ($envelopes_list->TotalRecs > 0 && $envelopes_list->ExportOptions->visible()) { ?>
<?php $envelopes_list->ExportOptions->render("body") ?>
<?php } ?>
<?php if ($envelopes_list->ImportOptions->visible()) { ?>
<?php $envelopes_list->ImportOptions->render("body") ?>
<?php } ?>
<?php if ($envelopes_list->SearchOptions->visible()) { ?>
<?php $envelopes_list->SearchOptions->render("body") ?>
<?php } ?>
<?php if ($envelopes_list->FilterOptions->visible()) { ?>
<?php $envelopes_list->FilterOptions->render("body") ?>
<?php } ?>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php
$envelopes_list->renderOtherOptions();
?>
<?php if ($Security->CanSearch()) { ?>
<?php if (!$envelopes->isExport() && !$envelopes->CurrentAction) { ?>
<form name="fenvelopeslistsrch" id="fenvelopeslistsrch" class="form-inline ew-form ew-ext-search-form" action="<?php echo CurrentPageName() ?>">
<?php $searchPanelClass = ($envelopes_list->SearchWhere <> "") ? " show" : " show"; ?>
<div id="fenvelopeslistsrch-search-panel" class="ew-search-panel collapse<?php echo $searchPanelClass ?>">
<input type="hidden" name="cmd" value="search">
<input type="hidden" name="t" value="envelopes">
	<div class="ew-basic-search">
<div id="xsr_1" 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($envelopes_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($envelopes_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 $envelopes_list->BasicSearch->getTypeNameShort() ?></span></button>
			<div class="dropdown-menu dropdown-menu-right">
				<a class="dropdown-item<?php if ($envelopes_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 ($envelopes_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 ($envelopes_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 ($envelopes_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 $envelopes_list->showPageHeader(); ?>
<?php
$envelopes_list->showMessage();
?>
<?php if ($envelopes_list->TotalRecs > 0 || $envelopes->CurrentAction) { ?>
<div class="card ew-card ew-grid<?php if ($envelopes_list->isAddOrEdit()) { ?> ew-grid-add-edit<?php } ?> envelopes">
<?php if (!$envelopes->isExport()) { ?>
<div class="card-header ew-grid-upper-panel">
<?php if (!$envelopes->isGridAdd()) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?php echo CurrentPageName() ?>">
<?php if (!isset($envelopes_list->Pager)) $envelopes_list->Pager = new PrevNextPager($envelopes_list->StartRec, $envelopes_list->DisplayRecs, $envelopes_list->TotalRecs, $envelopes_list->AutoHidePager) ?>
<?php if ($envelopes_list->Pager->RecordCount > 0 && $envelopes_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 ($envelopes_list->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" href="<?php echo $envelopes_list->pageUrl() ?>start=<?php echo $envelopes_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 ($envelopes_list->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" href="<?php echo $envelopes_list->pageUrl() ?>start=<?php echo $envelopes_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 $envelopes_list->Pager->CurrentPage ?>">
<div class="input-group-append">
<!-- next page button -->
	<?php if ($envelopes_list->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" href="<?php echo $envelopes_list->pageUrl() ?>start=<?php echo $envelopes_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 ($envelopes_list->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" href="<?php echo $envelopes_list->pageUrl() ?>start=<?php echo $envelopes_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 $envelopes_list->Pager->PageCount ?></span>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php if ($envelopes_list->Pager->RecordCount > 0) { ?>
<div class="ew-pager ew-rec">
	<span><?php echo $Language->Phrase("Record") ?>&nbsp;<?php echo $envelopes_list->Pager->FromIndex ?>&nbsp;<?php echo $Language->Phrase("To") ?>&nbsp;<?php echo $envelopes_list->Pager->ToIndex ?>&nbsp;<?php echo $Language->Phrase("Of") ?>&nbsp;<?php echo $envelopes_list->Pager->RecordCount ?></span>
</div>
<?php } ?>
<?php if ($envelopes_list->TotalRecs > 0 && (!$envelopes_list->AutoHidePageSizeSelector || $envelopes_list->Pager->Visible)) { ?>
<div class="ew-pager">
<input type="hidden" name="t" value="envelopes">
<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 ($envelopes_list->DisplayRecs == 5) { ?> selected<?php } ?>>5</option>
<option value="10"<?php if ($envelopes_list->DisplayRecs == 10) { ?> selected<?php } ?>>10</option>
<option value="20"<?php if ($envelopes_list->DisplayRecs == 20) { ?> selected<?php } ?>>20</option>
<option value="30"<?php if ($envelopes_list->DisplayRecs == 30) { ?> selected<?php } ?>>30</option>
<option value="40"<?php if ($envelopes_list->DisplayRecs == 40) { ?> selected<?php } ?>>40</option>
<option value="50"<?php if ($envelopes_list->DisplayRecs == 50) { ?> selected<?php } ?>>50</option>
<option value="100"<?php if ($envelopes_list->DisplayRecs == 100) { ?> selected<?php } ?>>100</option>
<option value="200"<?php if ($envelopes_list->DisplayRecs == 200) { ?> selected<?php } ?>>200</option>
<option value="500"<?php if ($envelopes_list->DisplayRecs == 500) { ?> selected<?php } ?>>500</option>
<option value="ALL"<?php if ($envelopes->getRecordsPerPage() == -1) { ?> selected<?php } ?>><?php echo $Language->Phrase("AllRecords") ?></option>
</select>
</div>
<?php } ?>
</form>
<?php } ?>
<div class="ew-list-other-options">
<?php $envelopes_list->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
</div>
<?php } ?>
<form name="fenvelopeslist" id="fenvelopeslist" class="form-inline ew-form ew-list-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($envelopes_list->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $envelopes_list->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="envelopes">
<div id="gmp_envelopes" class="<?php if (IsResponsiveLayout()) { ?>table-responsive <?php } ?>card-body ew-grid-middle-panel">
<?php if ($envelopes_list->TotalRecs > 0 || $envelopes->isGridEdit()) { ?>
<table id="tbl_envelopeslist" class="table ew-table"><!-- .ew-table ##-->
<thead>
	<tr class="ew-table-header">
<?php

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

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

// Render list options (header, left)
$envelopes_list->ListOptions->render("header", "left");
?>
<?php if ($envelopes->CaseNumber->Visible) { // CaseNumber ?>
	<?php if ($envelopes->sortUrl($envelopes->CaseNumber) == "") { ?>
		<th data-name="CaseNumber" class="<?php echo $envelopes->CaseNumber->headerCellClass() ?>"><div id="elh_envelopes_CaseNumber" class="envelopes_CaseNumber"><div class="ew-table-header-caption"><?php echo $envelopes->CaseNumber->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="CaseNumber" class="<?php echo $envelopes->CaseNumber->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->CaseNumber) ?>',2);"><div id="elh_envelopes_CaseNumber" class="envelopes_CaseNumber">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->CaseNumber->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($envelopes->CaseNumber->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->CaseNumber->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($envelopes->FileNumber->Visible) { // FileNumber ?>
	<?php if ($envelopes->sortUrl($envelopes->FileNumber) == "") { ?>
		<th data-name="FileNumber" class="<?php echo $envelopes->FileNumber->headerCellClass() ?>"><div id="elh_envelopes_FileNumber" class="envelopes_FileNumber"><div class="ew-table-header-caption"><?php echo $envelopes->FileNumber->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="FileNumber" class="<?php echo $envelopes->FileNumber->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->FileNumber) ?>',2);"><div id="elh_envelopes_FileNumber" class="envelopes_FileNumber">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->FileNumber->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($envelopes->FileNumber->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->FileNumber->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($envelopes->EnvelopeNumber->Visible) { // EnvelopeNumber ?>
	<?php if ($envelopes->sortUrl($envelopes->EnvelopeNumber) == "") { ?>
		<th data-name="EnvelopeNumber" class="<?php echo $envelopes->EnvelopeNumber->headerCellClass() ?>"><div id="elh_envelopes_EnvelopeNumber" class="envelopes_EnvelopeNumber"><div class="ew-table-header-caption"><?php echo $envelopes->EnvelopeNumber->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="EnvelopeNumber" class="<?php echo $envelopes->EnvelopeNumber->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->EnvelopeNumber) ?>',2);"><div id="elh_envelopes_EnvelopeNumber" class="envelopes_EnvelopeNumber">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->EnvelopeNumber->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($envelopes->EnvelopeNumber->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->EnvelopeNumber->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($envelopes->FileLocation->Visible) { // FileLocation ?>
	<?php if ($envelopes->sortUrl($envelopes->FileLocation) == "") { ?>
		<th data-name="FileLocation" class="<?php echo $envelopes->FileLocation->headerCellClass() ?>"><div id="elh_envelopes_FileLocation" class="envelopes_FileLocation"><div class="ew-table-header-caption"><?php echo $envelopes->FileLocation->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="FileLocation" class="<?php echo $envelopes->FileLocation->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->FileLocation) ?>',2);"><div id="elh_envelopes_FileLocation" class="envelopes_FileLocation">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->FileLocation->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($envelopes->FileLocation->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->FileLocation->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($envelopes->_Case->Visible) { // Case ?>
	<?php if ($envelopes->sortUrl($envelopes->_Case) == "") { ?>
		<th data-name="_Case" class="<?php echo $envelopes->_Case->headerCellClass() ?>"><div id="elh_envelopes__Case" class="envelopes__Case"><div class="ew-table-header-caption"><?php echo $envelopes->_Case->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="_Case" class="<?php echo $envelopes->_Case->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->_Case) ?>',2);"><div id="elh_envelopes__Case" class="envelopes__Case">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->_Case->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($envelopes->_Case->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->_Case->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($envelopes->CaseEn->Visible) { // CaseEn ?>
	<?php if ($envelopes->sortUrl($envelopes->CaseEn) == "") { ?>
		<th data-name="CaseEn" class="<?php echo $envelopes->CaseEn->headerCellClass() ?>"><div id="elh_envelopes_CaseEn" class="envelopes_CaseEn"><div class="ew-table-header-caption"><?php echo $envelopes->CaseEn->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="CaseEn" class="<?php echo $envelopes->CaseEn->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->CaseEn) ?>',2);"><div id="elh_envelopes_CaseEn" class="envelopes_CaseEn">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->CaseEn->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($envelopes->CaseEn->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->CaseEn->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($envelopes->CaseType->Visible) { // CaseType ?>
	<?php if ($envelopes->sortUrl($envelopes->CaseType) == "") { ?>
		<th data-name="CaseType" class="<?php echo $envelopes->CaseType->headerCellClass() ?>"><div id="elh_envelopes_CaseType" class="envelopes_CaseType"><div class="ew-table-header-caption"><?php echo $envelopes->CaseType->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="CaseType" class="<?php echo $envelopes->CaseType->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->CaseType) ?>',2);"><div id="elh_envelopes_CaseType" class="envelopes_CaseType">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->CaseType->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($envelopes->CaseType->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->CaseType->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($envelopes->ClientName->Visible) { // ClientName ?>
	<?php if ($envelopes->sortUrl($envelopes->ClientName) == "") { ?>
		<th data-name="ClientName" class="<?php echo $envelopes->ClientName->headerCellClass() ?>"><div id="elh_envelopes_ClientName" class="envelopes_ClientName"><div class="ew-table-header-caption"><?php echo $envelopes->ClientName->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="ClientName" class="<?php echo $envelopes->ClientName->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->ClientName) ?>',2);"><div id="elh_envelopes_ClientName" class="envelopes_ClientName">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->ClientName->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($envelopes->ClientName->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->ClientName->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($envelopes->LitigantName->Visible) { // LitigantName ?>
	<?php if ($envelopes->sortUrl($envelopes->LitigantName) == "") { ?>
		<th data-name="LitigantName" class="<?php echo $envelopes->LitigantName->headerCellClass() ?>"><div id="elh_envelopes_LitigantName" class="envelopes_LitigantName"><div class="ew-table-header-caption"><?php echo $envelopes->LitigantName->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="LitigantName" class="<?php echo $envelopes->LitigantName->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->LitigantName) ?>',2);"><div id="elh_envelopes_LitigantName" class="envelopes_LitigantName">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->LitigantName->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($envelopes->LitigantName->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->LitigantName->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($envelopes->CourtName->Visible) { // CourtName ?>
	<?php if ($envelopes->sortUrl($envelopes->CourtName) == "") { ?>
		<th data-name="CourtName" class="<?php echo $envelopes->CourtName->headerCellClass() ?>"><div id="elh_envelopes_CourtName" class="envelopes_CourtName"><div class="ew-table-header-caption"><?php echo $envelopes->CourtName->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="CourtName" class="<?php echo $envelopes->CourtName->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->CourtName) ?>',2);"><div id="elh_envelopes_CourtName" class="envelopes_CourtName">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->CourtName->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($envelopes->CourtName->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->CourtName->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($envelopes->CourtID->Visible) { // CourtID ?>
	<?php if ($envelopes->sortUrl($envelopes->CourtID) == "") { ?>
		<th data-name="CourtID" class="<?php echo $envelopes->CourtID->headerCellClass() ?>"><div id="elh_envelopes_CourtID" class="envelopes_CourtID"><div class="ew-table-header-caption"><?php echo $envelopes->CourtID->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="CourtID" class="<?php echo $envelopes->CourtID->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->CourtID) ?>',2);"><div id="elh_envelopes_CourtID" class="envelopes_CourtID">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->CourtID->caption() ?></span><span class="ew-table-header-sort"><?php if ($envelopes->CourtID->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->CourtID->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($envelopes->CourtTypeName->Visible) { // CourtTypeName ?>
	<?php if ($envelopes->sortUrl($envelopes->CourtTypeName) == "") { ?>
		<th data-name="CourtTypeName" class="<?php echo $envelopes->CourtTypeName->headerCellClass() ?>"><div id="elh_envelopes_CourtTypeName" class="envelopes_CourtTypeName"><div class="ew-table-header-caption"><?php echo $envelopes->CourtTypeName->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="CourtTypeName" class="<?php echo $envelopes->CourtTypeName->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->CourtTypeName) ?>',2);"><div id="elh_envelopes_CourtTypeName" class="envelopes_CourtTypeName">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->CourtTypeName->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($envelopes->CourtTypeName->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->CourtTypeName->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($envelopes->CourtGenderName->Visible) { // CourtGenderName ?>
	<?php if ($envelopes->sortUrl($envelopes->CourtGenderName) == "") { ?>
		<th data-name="CourtGenderName" class="<?php echo $envelopes->CourtGenderName->headerCellClass() ?>"><div id="elh_envelopes_CourtGenderName" class="envelopes_CourtGenderName"><div class="ew-table-header-caption"><?php echo $envelopes->CourtGenderName->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="CourtGenderName" class="<?php echo $envelopes->CourtGenderName->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->CourtGenderName) ?>',2);"><div id="elh_envelopes_CourtGenderName" class="envelopes_CourtGenderName">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->CourtGenderName->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($envelopes->CourtGenderName->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->CourtGenderName->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($envelopes->JudgeName->Visible) { // JudgeName ?>
	<?php if ($envelopes->sortUrl($envelopes->JudgeName) == "") { ?>
		<th data-name="JudgeName" class="<?php echo $envelopes->JudgeName->headerCellClass() ?>"><div id="elh_envelopes_JudgeName" class="envelopes_JudgeName"><div class="ew-table-header-caption"><?php echo $envelopes->JudgeName->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="JudgeName" class="<?php echo $envelopes->JudgeName->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->JudgeName) ?>',2);"><div id="elh_envelopes_JudgeName" class="envelopes_JudgeName">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->JudgeName->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($envelopes->JudgeName->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->JudgeName->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($envelopes->ClientID->Visible) { // ClientID ?>
	<?php if ($envelopes->sortUrl($envelopes->ClientID) == "") { ?>
		<th data-name="ClientID" class="<?php echo $envelopes->ClientID->headerCellClass() ?>"><div id="elh_envelopes_ClientID" class="envelopes_ClientID"><div class="ew-table-header-caption"><?php echo $envelopes->ClientID->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="ClientID" class="<?php echo $envelopes->ClientID->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->ClientID) ?>',2);"><div id="elh_envelopes_ClientID" class="envelopes_ClientID">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->ClientID->caption() ?></span><span class="ew-table-header-sort"><?php if ($envelopes->ClientID->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->ClientID->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($envelopes->LitigantID->Visible) { // LitigantID ?>
	<?php if ($envelopes->sortUrl($envelopes->LitigantID) == "") { ?>
		<th data-name="LitigantID" class="<?php echo $envelopes->LitigantID->headerCellClass() ?>"><div id="elh_envelopes_LitigantID" class="envelopes_LitigantID"><div class="ew-table-header-caption"><?php echo $envelopes->LitigantID->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="LitigantID" class="<?php echo $envelopes->LitigantID->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event,'<?php echo $envelopes->SortUrl($envelopes->LitigantID) ?>',2);"><div id="elh_envelopes_LitigantID" class="envelopes_LitigantID">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $envelopes->LitigantID->caption() ?></span><span class="ew-table-header-sort"><?php if ($envelopes->LitigantID->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($envelopes->LitigantID->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php

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

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

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

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

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

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

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

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

// Render list options (body, left)
$envelopes_list->ListOptions->render("body", "left", $envelopes_list->RowCnt);
?>
	<?php if ($envelopes->CaseNumber->Visible) { // CaseNumber ?>
		<td data-name="CaseNumber"<?php echo $envelopes->CaseNumber->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes_CaseNumber" class="envelopes_CaseNumber">
<span<?php echo $envelopes->CaseNumber->viewAttributes() ?>>
<?php echo $envelopes->CaseNumber->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($envelopes->FileNumber->Visible) { // FileNumber ?>
		<td data-name="FileNumber"<?php echo $envelopes->FileNumber->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes_FileNumber" class="envelopes_FileNumber">
<span<?php echo $envelopes->FileNumber->viewAttributes() ?>>
<?php echo $envelopes->FileNumber->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($envelopes->EnvelopeNumber->Visible) { // EnvelopeNumber ?>
		<td data-name="EnvelopeNumber"<?php echo $envelopes->EnvelopeNumber->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes_EnvelopeNumber" class="envelopes_EnvelopeNumber">
<span<?php echo $envelopes->EnvelopeNumber->viewAttributes() ?>>
<?php echo $envelopes->EnvelopeNumber->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($envelopes->FileLocation->Visible) { // FileLocation ?>
		<td data-name="FileLocation"<?php echo $envelopes->FileLocation->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes_FileLocation" class="envelopes_FileLocation">
<span<?php echo $envelopes->FileLocation->viewAttributes() ?>>
<?php echo $envelopes->FileLocation->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($envelopes->_Case->Visible) { // Case ?>
		<td data-name="_Case"<?php echo $envelopes->_Case->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes__Case" class="envelopes__Case">
<span<?php echo $envelopes->_Case->viewAttributes() ?>>
<?php echo $envelopes->_Case->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($envelopes->CaseEn->Visible) { // CaseEn ?>
		<td data-name="CaseEn"<?php echo $envelopes->CaseEn->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes_CaseEn" class="envelopes_CaseEn">
<span<?php echo $envelopes->CaseEn->viewAttributes() ?>>
<?php echo $envelopes->CaseEn->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($envelopes->CaseType->Visible) { // CaseType ?>
		<td data-name="CaseType"<?php echo $envelopes->CaseType->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes_CaseType" class="envelopes_CaseType">
<span<?php echo $envelopes->CaseType->viewAttributes() ?>>
<?php echo $envelopes->CaseType->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($envelopes->ClientName->Visible) { // ClientName ?>
		<td data-name="ClientName"<?php echo $envelopes->ClientName->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes_ClientName" class="envelopes_ClientName">
<span<?php echo $envelopes->ClientName->viewAttributes() ?>>
<?php echo $envelopes->ClientName->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($envelopes->LitigantName->Visible) { // LitigantName ?>
		<td data-name="LitigantName"<?php echo $envelopes->LitigantName->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes_LitigantName" class="envelopes_LitigantName">
<span<?php echo $envelopes->LitigantName->viewAttributes() ?>>
<?php echo $envelopes->LitigantName->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($envelopes->CourtName->Visible) { // CourtName ?>
		<td data-name="CourtName"<?php echo $envelopes->CourtName->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes_CourtName" class="envelopes_CourtName">
<span<?php echo $envelopes->CourtName->viewAttributes() ?>>
<?php echo $envelopes->CourtName->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($envelopes->CourtID->Visible) { // CourtID ?>
		<td data-name="CourtID"<?php echo $envelopes->CourtID->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes_CourtID" class="envelopes_CourtID">
<span<?php echo $envelopes->CourtID->viewAttributes() ?>>
<?php echo $envelopes->CourtID->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($envelopes->CourtTypeName->Visible) { // CourtTypeName ?>
		<td data-name="CourtTypeName"<?php echo $envelopes->CourtTypeName->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes_CourtTypeName" class="envelopes_CourtTypeName">
<span<?php echo $envelopes->CourtTypeName->viewAttributes() ?>>
<?php echo $envelopes->CourtTypeName->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($envelopes->CourtGenderName->Visible) { // CourtGenderName ?>
		<td data-name="CourtGenderName"<?php echo $envelopes->CourtGenderName->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes_CourtGenderName" class="envelopes_CourtGenderName">
<span<?php echo $envelopes->CourtGenderName->viewAttributes() ?>>
<?php echo $envelopes->CourtGenderName->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($envelopes->JudgeName->Visible) { // JudgeName ?>
		<td data-name="JudgeName"<?php echo $envelopes->JudgeName->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes_JudgeName" class="envelopes_JudgeName">
<span<?php echo $envelopes->JudgeName->viewAttributes() ?>>
<?php echo $envelopes->JudgeName->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($envelopes->ClientID->Visible) { // ClientID ?>
		<td data-name="ClientID"<?php echo $envelopes->ClientID->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes_ClientID" class="envelopes_ClientID">
<span<?php echo $envelopes->ClientID->viewAttributes() ?>>
<?php echo $envelopes->ClientID->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($envelopes->LitigantID->Visible) { // LitigantID ?>
		<td data-name="LitigantID"<?php echo $envelopes->LitigantID->cellAttributes() ?>>
<span id="el<?php echo $envelopes_list->RowCnt ?>_envelopes_LitigantID" class="envelopes_LitigantID">
<span<?php echo $envelopes->LitigantID->viewAttributes() ?>>
<?php echo $envelopes->LitigantID->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
<?php

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

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

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

</script>
<?php if (!$envelopes->isExport()) { ?>
<script>
ew.scrollableTable("gmp_envelopes", "1250px", "");
</script>
<?php } ?>
<?php } ?>
<?php include_once "footer.php" ?>
<?php
$envelopes_list->terminate();
?>
