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

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

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

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

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

// Form object
currentPageID = ew.PAGE_ID = "view";
var freferredbyview = currentForm = new ew.Form("freferredbyview", "view");

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

// Dynamic selection lists
// Form object for search

</script>
<script>

// Write your client script here, no need to add script tags.
</script>
<?php } ?>
<?php if (!$referredby->isExport()) { ?>
<div class="btn-toolbar ew-toolbar">
<?php $referredby_view->ExportOptions->render("body") ?>
<?php $referredby_view->OtherOptions->render("body") ?>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php $referredby_view->showPageHeader(); ?>
<?php
$referredby_view->showMessage();
?>
<?php if (!$referredby_view->IsModal) { ?>
<?php if (!$referredby->isExport()) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?php echo CurrentPageName() ?>">
<?php if (!isset($referredby_view->Pager)) $referredby_view->Pager = new PrevNextPager($referredby_view->StartRec, $referredby_view->DisplayRecs, $referredby_view->TotalRecs, $referredby_view->AutoHidePager) ?>
<?php if ($referredby_view->Pager->RecordCount > 0 && $referredby_view->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 ($referredby_view->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" href="<?php echo $referredby_view->pageUrl() ?>start=<?php echo $referredby_view->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 ($referredby_view->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" href="<?php echo $referredby_view->pageUrl() ?>start=<?php echo $referredby_view->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 $referredby_view->Pager->CurrentPage ?>">
<div class="input-group-append">
<!-- next page button -->
	<?php if ($referredby_view->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" href="<?php echo $referredby_view->pageUrl() ?>start=<?php echo $referredby_view->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 ($referredby_view->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" href="<?php echo $referredby_view->pageUrl() ?>start=<?php echo $referredby_view->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 $referredby_view->Pager->PageCount ?></span>
<div class="clearfix"></div>
</div>
<?php } ?>
<div class="clearfix"></div>
</form>
<?php } ?>
<?php } ?>
<form name="freferredbyview" id="freferredbyview" class="form-inline ew-form ew-view-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($referredby_view->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $referredby_view->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="referredby">
<input type="hidden" name="modal" value="<?php echo (int)$referredby_view->IsModal ?>">
<table class="table table-striped table-sm ew-view-table">
<?php if ($referredby->ReferredByID->Visible) { // ReferredByID ?>
	<tr id="r_ReferredByID">
		<td class="<?php echo $referredby_view->TableLeftColumnClass ?>"><span id="elh_referredby_ReferredByID"><?php echo $referredby->ReferredByID->caption() ?></span></td>
		<td data-name="ReferredByID"<?php echo $referredby->ReferredByID->cellAttributes() ?>>
<span id="el_referredby_ReferredByID">
<span<?php echo $referredby->ReferredByID->viewAttributes() ?>>
<?php echo $referredby->ReferredByID->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($referredby->ReferredBy->Visible) { // ReferredBy ?>
	<tr id="r_ReferredBy">
		<td class="<?php echo $referredby_view->TableLeftColumnClass ?>"><span id="elh_referredby_ReferredBy"><?php echo $referredby->ReferredBy->caption() ?></span></td>
		<td data-name="ReferredBy"<?php echo $referredby->ReferredBy->cellAttributes() ?>>
<span id="el_referredby_ReferredBy">
<span<?php echo $referredby->ReferredBy->viewAttributes() ?>>
<?php echo $referredby->ReferredBy->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($referredby->ReferredByEn->Visible) { // ReferredByEn ?>
	<tr id="r_ReferredByEn">
		<td class="<?php echo $referredby_view->TableLeftColumnClass ?>"><span id="elh_referredby_ReferredByEn"><?php echo $referredby->ReferredByEn->caption() ?></span></td>
		<td data-name="ReferredByEn"<?php echo $referredby->ReferredByEn->cellAttributes() ?>>
<span id="el_referredby_ReferredByEn">
<span<?php echo $referredby->ReferredByEn->viewAttributes() ?>>
<?php echo $referredby->ReferredByEn->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($referredby->Notes->Visible) { // Notes ?>
	<tr id="r_Notes">
		<td class="<?php echo $referredby_view->TableLeftColumnClass ?>"><span id="elh_referredby_Notes"><?php echo $referredby->Notes->caption() ?></span></td>
		<td data-name="Notes"<?php echo $referredby->Notes->cellAttributes() ?>>
<span id="el_referredby_Notes">
<span<?php echo $referredby->Notes->viewAttributes() ?>>
<?php echo $referredby->Notes->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
</table>
<?php if (!$referredby_view->IsModal) { ?>
<?php if (!$referredby->isExport()) { ?>
<?php if (!isset($referredby_view->Pager)) $referredby_view->Pager = new PrevNextPager($referredby_view->StartRec, $referredby_view->DisplayRecs, $referredby_view->TotalRecs, $referredby_view->AutoHidePager) ?>
<?php if ($referredby_view->Pager->RecordCount > 0 && $referredby_view->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 ($referredby_view->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" href="<?php echo $referredby_view->pageUrl() ?>start=<?php echo $referredby_view->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 ($referredby_view->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" href="<?php echo $referredby_view->pageUrl() ?>start=<?php echo $referredby_view->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 $referredby_view->Pager->CurrentPage ?>">
<div class="input-group-append">
<!-- next page button -->
	<?php if ($referredby_view->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" href="<?php echo $referredby_view->pageUrl() ?>start=<?php echo $referredby_view->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 ($referredby_view->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" href="<?php echo $referredby_view->pageUrl() ?>start=<?php echo $referredby_view->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 $referredby_view->Pager->PageCount ?></span>
<div class="clearfix"></div>
</div>
<?php } ?>
<div class="clearfix"></div>
<?php } ?>
<?php } ?>
</form>
<?php
$referredby_view->showPageFooter();
if (DEBUG_ENABLED)
	echo GetDebugMessage();
?>
<?php if (!$referredby->isExport()) { ?>
<script>

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

</script>
<?php } ?>
<?php include_once "footer.php" ?>
<?php
$referredby_view->terminate();
?>
