<?php
namespace PHPMaker2019\project_germanos;

// Session
if (session_status() !== PHP_SESSION_ACTIVE)
	session_start(); // Init session data

// Output buffering
ob_start(); 

// Autoload
include_once "autoload.php";
?>
<?php

// Write header
WriteHeader(FALSE, "utf-8");

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

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

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

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

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

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

// Render list options (header, left)
$litigantcontact_preview->ListOptions->render("header", "left");
?>
<?php if ($litigantcontact->LitigantID->Visible) { // LitigantID ?>
	<?php if ($litigantcontact->SortUrl($litigantcontact->LitigantID) == "") { ?>
		<th class="<?php echo $litigantcontact->LitigantID->headerCellClass() ?>"><?php echo $litigantcontact->LitigantID->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $litigantcontact->LitigantID->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $litigantcontact->LitigantID->Name ?>" data-sort-order="<?php echo $litigantcontact_preview->SortField == $litigantcontact->LitigantID->Name && $litigantcontact_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><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_preview->SortField == $litigantcontact->LitigantID->Name) { ?><?php if ($litigantcontact_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($litigantcontact_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($litigantcontact->ContactTypeID->Visible) { // ContactTypeID ?>
	<?php if ($litigantcontact->SortUrl($litigantcontact->ContactTypeID) == "") { ?>
		<th class="<?php echo $litigantcontact->ContactTypeID->headerCellClass() ?>"><?php echo $litigantcontact->ContactTypeID->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $litigantcontact->ContactTypeID->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $litigantcontact->ContactTypeID->Name ?>" data-sort-order="<?php echo $litigantcontact_preview->SortField == $litigantcontact->ContactTypeID->Name && $litigantcontact_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><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_preview->SortField == $litigantcontact->ContactTypeID->Name) { ?><?php if ($litigantcontact_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($litigantcontact_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($litigantcontact->Contact->Visible) { // Contact ?>
	<?php if ($litigantcontact->SortUrl($litigantcontact->Contact) == "") { ?>
		<th class="<?php echo $litigantcontact->Contact->headerCellClass() ?>"><?php echo $litigantcontact->Contact->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $litigantcontact->Contact->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $litigantcontact->Contact->Name ?>" data-sort-order="<?php echo $litigantcontact_preview->SortField == $litigantcontact->Contact->Name && $litigantcontact_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $litigantcontact->Contact->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($litigantcontact_preview->SortField == $litigantcontact->Contact->Name) { ?><?php if ($litigantcontact_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($litigantcontact_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($litigantcontact->Notes->Visible) { // Notes ?>
	<?php if ($litigantcontact->SortUrl($litigantcontact->Notes) == "") { ?>
		<th class="<?php echo $litigantcontact->Notes->headerCellClass() ?>"><?php echo $litigantcontact->Notes->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $litigantcontact->Notes->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $litigantcontact->Notes->Name ?>" data-sort-order="<?php echo $litigantcontact_preview->SortField == $litigantcontact->Notes->Name && $litigantcontact_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $litigantcontact->Notes->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($litigantcontact_preview->SortField == $litigantcontact->Notes->Name) { ?><?php if ($litigantcontact_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($litigantcontact_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($litigantcontact->Primary->Visible) { // Primary ?>
	<?php if ($litigantcontact->SortUrl($litigantcontact->Primary) == "") { ?>
		<th class="<?php echo $litigantcontact->Primary->headerCellClass() ?>"><?php echo $litigantcontact->Primary->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $litigantcontact->Primary->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $litigantcontact->Primary->Name ?>" data-sort-order="<?php echo $litigantcontact_preview->SortField == $litigantcontact->Primary->Name && $litigantcontact_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><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_preview->SortField == $litigantcontact->Primary->Name) { ?><?php if ($litigantcontact_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($litigantcontact_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php

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

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

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

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

// Render list options (body, left)
$litigantcontact_preview->ListOptions->render("body", "left", $litigantcontact_preview->RowCnt);
?>
<?php if ($litigantcontact->LitigantID->Visible) { // LitigantID ?>
		<!-- LitigantID -->
		<td<?php echo $litigantcontact->LitigantID->cellAttributes() ?>>
<span<?php echo $litigantcontact->LitigantID->viewAttributes() ?>>
<?php echo $litigantcontact->LitigantID->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($litigantcontact->ContactTypeID->Visible) { // ContactTypeID ?>
		<!-- ContactTypeID -->
		<td<?php echo $litigantcontact->ContactTypeID->cellAttributes() ?>>
<span<?php echo $litigantcontact->ContactTypeID->viewAttributes() ?>>
<?php echo $litigantcontact->ContactTypeID->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($litigantcontact->Contact->Visible) { // Contact ?>
		<!-- Contact -->
		<td<?php echo $litigantcontact->Contact->cellAttributes() ?>>
<span<?php echo $litigantcontact->Contact->viewAttributes() ?>>
<?php echo $litigantcontact->Contact->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($litigantcontact->Notes->Visible) { // Notes ?>
		<!-- Notes -->
		<td<?php echo $litigantcontact->Notes->cellAttributes() ?>>
<span<?php echo $litigantcontact->Notes->viewAttributes() ?>>
<?php echo $litigantcontact->Notes->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($litigantcontact->Primary->Visible) { // Primary ?>
		<!-- Primary -->
		<td<?php echo $litigantcontact->Primary->cellAttributes() ?>>
<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>
</td>
<?php } ?>
<?php

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

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