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

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

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

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

// Page Rendering event
$hearings_preview->Page_Render();
?>
<?php $hearings_preview->showPageHeader(); ?>
<div class="card ew-grid hearings"><!-- .card -->
<?php if ($hearings_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
$hearings_preview->renderListOptions();

// Render list options (header, left)
$hearings_preview->ListOptions->render("header", "left");
?>
<?php if ($hearings->CaseID->Visible) { // CaseID ?>
	<?php if ($hearings->SortUrl($hearings->CaseID) == "") { ?>
		<th class="<?php echo $hearings->CaseID->headerCellClass() ?>"><?php echo $hearings->CaseID->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $hearings->CaseID->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $hearings->CaseID->Name ?>" data-sort-order="<?php echo $hearings_preview->SortField == $hearings->CaseID->Name && $hearings_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $hearings->CaseID->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($hearings_preview->SortField == $hearings->CaseID->Name) { ?><?php if ($hearings_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($hearings_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($hearings->HearingDate->Visible) { // HearingDate ?>
	<?php if ($hearings->SortUrl($hearings->HearingDate) == "") { ?>
		<th class="<?php echo $hearings->HearingDate->headerCellClass() ?>"><?php echo $hearings->HearingDate->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $hearings->HearingDate->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $hearings->HearingDate->Name ?>" data-sort-order="<?php echo $hearings_preview->SortField == $hearings->HearingDate->Name && $hearings_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $hearings->HearingDate->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($hearings_preview->SortField == $hearings->HearingDate->Name) { ?><?php if ($hearings_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($hearings_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($hearings->HearingTime->Visible) { // HearingTime ?>
	<?php if ($hearings->SortUrl($hearings->HearingTime) == "") { ?>
		<th class="<?php echo $hearings->HearingTime->headerCellClass() ?>"><?php echo $hearings->HearingTime->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $hearings->HearingTime->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $hearings->HearingTime->Name ?>" data-sort-order="<?php echo $hearings_preview->SortField == $hearings->HearingTime->Name && $hearings_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $hearings->HearingTime->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($hearings_preview->SortField == $hearings->HearingTime->Name) { ?><?php if ($hearings_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($hearings_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($hearings->NextHearingDate->Visible) { // NextHearingDate ?>
	<?php if ($hearings->SortUrl($hearings->NextHearingDate) == "") { ?>
		<th class="<?php echo $hearings->NextHearingDate->headerCellClass() ?>"><?php echo $hearings->NextHearingDate->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $hearings->NextHearingDate->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $hearings->NextHearingDate->Name ?>" data-sort-order="<?php echo $hearings_preview->SortField == $hearings->NextHearingDate->Name && $hearings_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $hearings->NextHearingDate->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($hearings_preview->SortField == $hearings->NextHearingDate->Name) { ?><?php if ($hearings_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($hearings_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($hearings->NextHearingTime->Visible) { // NextHearingTime ?>
	<?php if ($hearings->SortUrl($hearings->NextHearingTime) == "") { ?>
		<th class="<?php echo $hearings->NextHearingTime->headerCellClass() ?>"><?php echo $hearings->NextHearingTime->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $hearings->NextHearingTime->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $hearings->NextHearingTime->Name ?>" data-sort-order="<?php echo $hearings_preview->SortField == $hearings->NextHearingTime->Name && $hearings_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $hearings->NextHearingTime->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($hearings_preview->SortField == $hearings->NextHearingTime->Name) { ?><?php if ($hearings_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($hearings_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($hearings->Hearing->Visible) { // Hearing ?>
	<?php if ($hearings->SortUrl($hearings->Hearing) == "") { ?>
		<th class="<?php echo $hearings->Hearing->headerCellClass() ?>"><?php echo $hearings->Hearing->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $hearings->Hearing->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $hearings->Hearing->Name ?>" data-sort-order="<?php echo $hearings_preview->SortField == $hearings->Hearing->Name && $hearings_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $hearings->Hearing->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($hearings_preview->SortField == $hearings->Hearing->Name) { ?><?php if ($hearings_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($hearings_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($hearings->Notes->Visible) { // Notes ?>
	<?php if ($hearings->SortUrl($hearings->Notes) == "") { ?>
		<th class="<?php echo $hearings->Notes->headerCellClass() ?>"><?php echo $hearings->Notes->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $hearings->Notes->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $hearings->Notes->Name ?>" data-sort-order="<?php echo $hearings_preview->SortField == $hearings->Notes->Name && $hearings_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $hearings->Notes->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($hearings_preview->SortField == $hearings->Notes->Name) { ?><?php if ($hearings_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($hearings_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($hearings->LawyerID->Visible) { // LawyerID ?>
	<?php if ($hearings->SortUrl($hearings->LawyerID) == "") { ?>
		<th class="<?php echo $hearings->LawyerID->headerCellClass() ?>"><?php echo $hearings->LawyerID->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $hearings->LawyerID->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $hearings->LawyerID->Name ?>" data-sort-order="<?php echo $hearings_preview->SortField == $hearings->LawyerID->Name && $hearings_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $hearings->LawyerID->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($hearings_preview->SortField == $hearings->LawyerID->Name) { ?><?php if ($hearings_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($hearings_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($hearings->JudgeID->Visible) { // JudgeID ?>
	<?php if ($hearings->SortUrl($hearings->JudgeID) == "") { ?>
		<th class="<?php echo $hearings->JudgeID->headerCellClass() ?>"><?php echo $hearings->JudgeID->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $hearings->JudgeID->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $hearings->JudgeID->Name ?>" data-sort-order="<?php echo $hearings_preview->SortField == $hearings->JudgeID->Name && $hearings_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $hearings->JudgeID->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($hearings_preview->SortField == $hearings->JudgeID->Name) { ?><?php if ($hearings_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($hearings_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($hearings->CaseNumber->Visible) { // CaseNumber ?>
	<?php if ($hearings->SortUrl($hearings->CaseNumber) == "") { ?>
		<th class="<?php echo $hearings->CaseNumber->headerCellClass() ?>"><?php echo $hearings->CaseNumber->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $hearings->CaseNumber->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $hearings->CaseNumber->Name ?>" data-sort-order="<?php echo $hearings_preview->SortField == $hearings->CaseNumber->Name && $hearings_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $hearings->CaseNumber->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($hearings_preview->SortField == $hearings->CaseNumber->Name) { ?><?php if ($hearings_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($hearings_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($hearings->CourtID->Visible) { // CourtID ?>
	<?php if ($hearings->SortUrl($hearings->CourtID) == "") { ?>
		<th class="<?php echo $hearings->CourtID->headerCellClass() ?>"><?php echo $hearings->CourtID->caption() ?></th>
	<?php } else { ?>
		<th class="<?php echo $hearings->CourtID->headerCellClass() ?>"><div class="ew-pointer" data-sort="<?php echo $hearings->CourtID->Name ?>" data-sort-order="<?php echo $hearings_preview->SortField == $hearings->CourtID->Name && $hearings_preview->SortOrder == "ASC" ? "DESC" : "ASC" ?>"><div class="ew-table-header-btn">
		<span class="ew-table-header-caption"><?php echo $hearings->CourtID->caption() ?></span>
		<span class="ew-table-header-sort"><?php if ($hearings_preview->SortField == $hearings->CourtID->Name) { ?><?php if ($hearings_preview->SortOrder == "ASC") { ?><i class="fa fa-sort-up ew-sort-up"></span><?php } elseif ($hearings_preview->SortOrder == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?><?php } ?></span>
	</div></div></th>
	<?php } ?>
<?php } ?>
<?php

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

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

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

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

// Render list options (body, left)
$hearings_preview->ListOptions->render("body", "left", $hearings_preview->RowCnt);
?>
<?php if ($hearings->CaseID->Visible) { // CaseID ?>
		<!-- CaseID -->
		<td<?php echo $hearings->CaseID->cellAttributes() ?>>
<span<?php echo $hearings->CaseID->viewAttributes() ?>>
<?php echo $hearings->CaseID->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($hearings->HearingDate->Visible) { // HearingDate ?>
		<!-- HearingDate -->
		<td<?php echo $hearings->HearingDate->cellAttributes() ?>>
<span<?php echo $hearings->HearingDate->viewAttributes() ?>>
<?php echo $hearings->HearingDate->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($hearings->HearingTime->Visible) { // HearingTime ?>
		<!-- HearingTime -->
		<td<?php echo $hearings->HearingTime->cellAttributes() ?>>
<span<?php echo $hearings->HearingTime->viewAttributes() ?>>
<?php echo $hearings->HearingTime->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($hearings->NextHearingDate->Visible) { // NextHearingDate ?>
		<!-- NextHearingDate -->
		<td<?php echo $hearings->NextHearingDate->cellAttributes() ?>>
<span<?php echo $hearings->NextHearingDate->viewAttributes() ?>>
<?php echo $hearings->NextHearingDate->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($hearings->NextHearingTime->Visible) { // NextHearingTime ?>
		<!-- NextHearingTime -->
		<td<?php echo $hearings->NextHearingTime->cellAttributes() ?>>
<span<?php echo $hearings->NextHearingTime->viewAttributes() ?>>
<?php echo $hearings->NextHearingTime->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($hearings->Hearing->Visible) { // Hearing ?>
		<!-- Hearing -->
		<td<?php echo $hearings->Hearing->cellAttributes() ?>>
<span<?php echo $hearings->Hearing->viewAttributes() ?>>
<?php echo $hearings->Hearing->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($hearings->Notes->Visible) { // Notes ?>
		<!-- Notes -->
		<td<?php echo $hearings->Notes->cellAttributes() ?>>
<span<?php echo $hearings->Notes->viewAttributes() ?>>
<?php echo $hearings->Notes->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($hearings->LawyerID->Visible) { // LawyerID ?>
		<!-- LawyerID -->
		<td<?php echo $hearings->LawyerID->cellAttributes() ?>>
<span<?php echo $hearings->LawyerID->viewAttributes() ?>>
<?php echo $hearings->LawyerID->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($hearings->JudgeID->Visible) { // JudgeID ?>
		<!-- JudgeID -->
		<td<?php echo $hearings->JudgeID->cellAttributes() ?>>
<span<?php echo $hearings->JudgeID->viewAttributes() ?>>
<?php echo $hearings->JudgeID->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($hearings->CaseNumber->Visible) { // CaseNumber ?>
		<!-- CaseNumber -->
		<td<?php echo $hearings->CaseNumber->cellAttributes() ?>>
<span<?php echo $hearings->CaseNumber->viewAttributes() ?>>
<?php echo $hearings->CaseNumber->getViewValue() ?></span>
</td>
<?php } ?>
<?php if ($hearings->CourtID->Visible) { // CourtID ?>
		<!-- CourtID -->
		<td<?php echo $hearings->CourtID->cellAttributes() ?>>
<span<?php echo $hearings->CourtID->viewAttributes() ?>>
<?php echo $hearings->CourtID->getViewValue() ?></span>
</td>
<?php } ?>
<?php

// Render list options (body, right)
$hearings_preview->ListOptions->render("body", "right", $hearings_preview->RowCnt);
?>
	</tr>
<?php
	$hearings_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 ($hearings_preview->TotalRecs > 0) { ?>
<?php if (!isset($hearings_preview->Pager)) $hearings_preview->Pager = new PrevNextPager($hearings_preview->StartRec, $hearings_preview->DisplayRecs, $hearings_preview->TotalRecs) ?>
<?php if ($hearings_preview->Pager->RecordCount > 0 && $hearings_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 ($hearings_preview->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" data-start="<?php echo $hearings_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 ($hearings_preview->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" data-start="<?php echo $hearings_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 ($hearings_preview->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" data-start="<?php echo $hearings_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 ($hearings_preview->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" data-start="<?php echo $hearings_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 $hearings_preview->Pager->FromIndex ?>&nbsp;<?php echo $Language->phrase("To") ?>&nbsp;<?php echo $hearings_preview->Pager->ToIndex ?>&nbsp;<?php echo $Language->phrase("Of") ?>&nbsp;<?php echo $hearings_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 ($hearings_preview->OtherOptions as &$option)
		$option->render("body");
?>
</div>
<div class="clearfix"></div>
</div><!-- /.card-footer -->
</div><!-- /.card -->
<?php
$hearings_preview->showPageFooter();
if (DEBUG_ENABLED)
	echo GetDebugMessage();
?>
<?php
if ($hearings_preview->Recordset)
	$hearings_preview->Recordset->Close();

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