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

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

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

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

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

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

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

// Dynamic selection lists
fclientcontactview.lists["x_ClientID"] = <?php echo $clientcontact_view->ClientID->Lookup->toClientList() ?>;
fclientcontactview.lists["x_ClientID"].options = <?php echo JsonEncode($clientcontact_view->ClientID->lookupOptions()) ?>;
fclientcontactview.lists["x_ContactTypeID"] = <?php echo $clientcontact_view->ContactTypeID->Lookup->toClientList() ?>;
fclientcontactview.lists["x_ContactTypeID"].options = <?php echo JsonEncode($clientcontact_view->ContactTypeID->lookupOptions()) ?>;
fclientcontactview.lists["x_Primary[]"] = <?php echo $clientcontact_view->Primary->Lookup->toClientList() ?>;
fclientcontactview.lists["x_Primary[]"].options = <?php echo JsonEncode($clientcontact_view->Primary->options(FALSE, TRUE)) ?>;

// Form object for search
</script>
<script>

// Write your client script here, no need to add script tags.
</script>
<?php } ?>
<?php if (!$clientcontact->isExport()) { ?>
<div class="btn-toolbar ew-toolbar">
<?php $clientcontact_view->ExportOptions->render("body") ?>
<?php $clientcontact_view->OtherOptions->render("body") ?>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php $clientcontact_view->showPageHeader(); ?>
<?php
$clientcontact_view->showMessage();
?>
<?php if (!$clientcontact_view->IsModal) { ?>
<?php if (!$clientcontact->isExport()) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?php echo CurrentPageName() ?>">
<?php if (!isset($clientcontact_view->Pager)) $clientcontact_view->Pager = new PrevNextPager($clientcontact_view->StartRec, $clientcontact_view->DisplayRecs, $clientcontact_view->TotalRecs, $clientcontact_view->AutoHidePager) ?>
<?php if ($clientcontact_view->Pager->RecordCount > 0 && $clientcontact_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 ($clientcontact_view->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" href="<?php echo $clientcontact_view->pageUrl() ?>start=<?php echo $clientcontact_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 ($clientcontact_view->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" href="<?php echo $clientcontact_view->pageUrl() ?>start=<?php echo $clientcontact_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 $clientcontact_view->Pager->CurrentPage ?>">
<div class="input-group-append">
<!-- next page button -->
	<?php if ($clientcontact_view->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" href="<?php echo $clientcontact_view->pageUrl() ?>start=<?php echo $clientcontact_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 ($clientcontact_view->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" href="<?php echo $clientcontact_view->pageUrl() ?>start=<?php echo $clientcontact_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 $clientcontact_view->Pager->PageCount ?></span>
<div class="clearfix"></div>
</div>
<?php } ?>
<div class="clearfix"></div>
</form>
<?php } ?>
<?php } ?>
<form name="fclientcontactview" id="fclientcontactview" class="form-inline ew-form ew-view-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($clientcontact_view->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $clientcontact_view->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="clientcontact">
<input type="hidden" name="modal" value="<?php echo (int)$clientcontact_view->IsModal ?>">
<table class="table table-striped table-sm ew-view-table">
<?php if ($clientcontact->ClientID->Visible) { // ClientID ?>
	<tr id="r_ClientID">
		<td class="<?php echo $clientcontact_view->TableLeftColumnClass ?>"><span id="elh_clientcontact_ClientID"><?php echo $clientcontact->ClientID->caption() ?></span></td>
		<td data-name="ClientID"<?php echo $clientcontact->ClientID->cellAttributes() ?>>
<span id="el_clientcontact_ClientID">
<span<?php echo $clientcontact->ClientID->viewAttributes() ?>>
<?php echo $clientcontact->ClientID->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($clientcontact->ContactTypeID->Visible) { // ContactTypeID ?>
	<tr id="r_ContactTypeID">
		<td class="<?php echo $clientcontact_view->TableLeftColumnClass ?>"><span id="elh_clientcontact_ContactTypeID"><?php echo $clientcontact->ContactTypeID->caption() ?></span></td>
		<td data-name="ContactTypeID"<?php echo $clientcontact->ContactTypeID->cellAttributes() ?>>
<span id="el_clientcontact_ContactTypeID">
<span<?php echo $clientcontact->ContactTypeID->viewAttributes() ?>>
<?php echo $clientcontact->ContactTypeID->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($clientcontact->Contact->Visible) { // Contact ?>
	<tr id="r_Contact">
		<td class="<?php echo $clientcontact_view->TableLeftColumnClass ?>"><span id="elh_clientcontact_Contact"><?php echo $clientcontact->Contact->caption() ?></span></td>
		<td data-name="Contact"<?php echo $clientcontact->Contact->cellAttributes() ?>>
<span id="el_clientcontact_Contact">
<span<?php echo $clientcontact->Contact->viewAttributes() ?>>
<?php if ((!EmptyString($clientcontact->Contact->getViewValue())) && $clientcontact->Contact->linkAttributes() <> "") { ?>
<a<?php echo $clientcontact->Contact->linkAttributes() ?>><?php echo $clientcontact->Contact->getViewValue() ?></a>
<?php } else { ?>
<?php echo $clientcontact->Contact->getViewValue() ?>
<?php } ?>
</span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($clientcontact->Notes->Visible) { // Notes ?>
	<tr id="r_Notes">
		<td class="<?php echo $clientcontact_view->TableLeftColumnClass ?>"><span id="elh_clientcontact_Notes"><?php echo $clientcontact->Notes->caption() ?></span></td>
		<td data-name="Notes"<?php echo $clientcontact->Notes->cellAttributes() ?>>
<span id="el_clientcontact_Notes">
<span<?php echo $clientcontact->Notes->viewAttributes() ?>>
<?php echo $clientcontact->Notes->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($clientcontact->Primary->Visible) { // Primary ?>
	<tr id="r_Primary">
		<td class="<?php echo $clientcontact_view->TableLeftColumnClass ?>"><span id="elh_clientcontact_Primary"><?php echo $clientcontact->Primary->caption() ?></span></td>
		<td data-name="Primary"<?php echo $clientcontact->Primary->cellAttributes() ?>>
<span id="el_clientcontact_Primary">
<span<?php echo $clientcontact->Primary->viewAttributes() ?>>
<?php if (ConvertToBool($clientcontact->Primary->CurrentValue)) { ?>
<input type="checkbox" value="<?php echo $clientcontact->Primary->getViewValue() ?>" disabled checked>
<?php } else { ?>
<input type="checkbox" value="<?php echo $clientcontact->Primary->getViewValue() ?>" disabled>
<?php } ?>
</span>
</span>
</td>
	</tr>
<?php } ?>
</table>
<?php if (!$clientcontact_view->IsModal) { ?>
<?php if (!$clientcontact->isExport()) { ?>
<?php if (!isset($clientcontact_view->Pager)) $clientcontact_view->Pager = new PrevNextPager($clientcontact_view->StartRec, $clientcontact_view->DisplayRecs, $clientcontact_view->TotalRecs, $clientcontact_view->AutoHidePager) ?>
<?php if ($clientcontact_view->Pager->RecordCount > 0 && $clientcontact_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 ($clientcontact_view->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" href="<?php echo $clientcontact_view->pageUrl() ?>start=<?php echo $clientcontact_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 ($clientcontact_view->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" href="<?php echo $clientcontact_view->pageUrl() ?>start=<?php echo $clientcontact_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 $clientcontact_view->Pager->CurrentPage ?>">
<div class="input-group-append">
<!-- next page button -->
	<?php if ($clientcontact_view->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" href="<?php echo $clientcontact_view->pageUrl() ?>start=<?php echo $clientcontact_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 ($clientcontact_view->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" href="<?php echo $clientcontact_view->pageUrl() ?>start=<?php echo $clientcontact_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 $clientcontact_view->Pager->PageCount ?></span>
<div class="clearfix"></div>
</div>
<?php } ?>
<div class="clearfix"></div>
<?php } ?>
<?php } ?>
</form>
<?php
$clientcontact_view->showPageFooter();
if (DEBUG_ENABLED)
	echo GetDebugMessage();
?>
<?php if (!$clientcontact->isExport()) { ?>
<script>

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

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