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

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

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

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

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

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

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

// Dynamic selection lists
fattachmentsview.lists["x_AttachmentSource_ID"] = <?php echo $attachments_view->AttachmentSource_ID->Lookup->toClientList() ?>;
fattachmentsview.lists["x_AttachmentSource_ID"].options = <?php echo JsonEncode($attachments_view->AttachmentSource_ID->lookupOptions()) ?>;
fattachmentsview.autoSuggests["x_AttachmentSource_ID"] = <?php echo json_encode(["data" => "ajax=autosuggest"]) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php } ?>
<?php if (!$attachments->isExport()) { ?>
<div class="btn-toolbar ew-toolbar">
<?php $attachments_view->ExportOptions->render("body") ?>
<?php $attachments_view->OtherOptions->render("body") ?>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php $attachments_view->showPageHeader(); ?>
<?php
$attachments_view->showMessage();
?>
<?php if (!$attachments_view->IsModal) { ?>
<?php if (!$attachments->isExport()) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?php echo CurrentPageName() ?>">
<?php if (!isset($attachments_view->Pager)) $attachments_view->Pager = new PrevNextPager($attachments_view->StartRec, $attachments_view->DisplayRecs, $attachments_view->TotalRecs, $attachments_view->AutoHidePager) ?>
<?php if ($attachments_view->Pager->RecordCount > 0 && $attachments_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 ($attachments_view->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" href="<?php echo $attachments_view->pageUrl() ?>start=<?php echo $attachments_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 ($attachments_view->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" href="<?php echo $attachments_view->pageUrl() ?>start=<?php echo $attachments_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 $attachments_view->Pager->CurrentPage ?>">
<div class="input-group-append">
<!-- next page button -->
	<?php if ($attachments_view->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" href="<?php echo $attachments_view->pageUrl() ?>start=<?php echo $attachments_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 ($attachments_view->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" href="<?php echo $attachments_view->pageUrl() ?>start=<?php echo $attachments_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 $attachments_view->Pager->PageCount ?></span>
<div class="clearfix"></div>
</div>
<?php } ?>
<div class="clearfix"></div>
</form>
<?php } ?>
<?php } ?>
<form name="fattachmentsview" id="fattachmentsview" class="form-inline ew-form ew-view-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($attachments_view->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $attachments_view->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="attachments">
<input type="hidden" name="modal" value="<?php echo (int)$attachments_view->IsModal ?>">
<table class="table table-striped table-sm ew-view-table">
<?php if ($attachments->AttachmentID->Visible) { // AttachmentID ?>
	<tr id="r_AttachmentID">
		<td class="<?php echo $attachments_view->TableLeftColumnClass ?>"><span id="elh_attachments_AttachmentID"><?php echo $attachments->AttachmentID->caption() ?></span></td>
		<td data-name="AttachmentID"<?php echo $attachments->AttachmentID->cellAttributes() ?>>
<span id="el_attachments_AttachmentID">
<span<?php echo $attachments->AttachmentID->viewAttributes() ?>>
<?php echo $attachments->AttachmentID->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($attachments->AttachmentSource_ID->Visible) { // AttachmentSource_ID ?>
	<tr id="r_AttachmentSource_ID">
		<td class="<?php echo $attachments_view->TableLeftColumnClass ?>"><span id="elh_attachments_AttachmentSource_ID"><?php echo $attachments->AttachmentSource_ID->caption() ?></span></td>
		<td data-name="AttachmentSource_ID"<?php echo $attachments->AttachmentSource_ID->cellAttributes() ?>>
<span id="el_attachments_AttachmentSource_ID">
<span<?php echo $attachments->AttachmentSource_ID->viewAttributes() ?>>
<?php echo $attachments->AttachmentSource_ID->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($attachments->CaseID->Visible) { // CaseID ?>
	<tr id="r_CaseID">
		<td class="<?php echo $attachments_view->TableLeftColumnClass ?>"><span id="elh_attachments_CaseID"><?php echo $attachments->CaseID->caption() ?></span></td>
		<td data-name="CaseID"<?php echo $attachments->CaseID->cellAttributes() ?>>
<span id="el_attachments_CaseID">
<span<?php echo $attachments->CaseID->viewAttributes() ?>>
<?php echo $attachments->CaseID->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($attachments->EmployeeID->Visible) { // EmployeeID ?>
	<tr id="r_EmployeeID">
		<td class="<?php echo $attachments_view->TableLeftColumnClass ?>"><span id="elh_attachments_EmployeeID"><?php echo $attachments->EmployeeID->caption() ?></span></td>
		<td data-name="EmployeeID"<?php echo $attachments->EmployeeID->cellAttributes() ?>>
<span id="el_attachments_EmployeeID">
<span<?php echo $attachments->EmployeeID->viewAttributes() ?>>
<?php echo $attachments->EmployeeID->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($attachments->AttachID->Visible) { // AttachID ?>
	<tr id="r_AttachID">
		<td class="<?php echo $attachments_view->TableLeftColumnClass ?>"><span id="elh_attachments_AttachID"><?php echo $attachments->AttachID->caption() ?></span></td>
		<td data-name="AttachID"<?php echo $attachments->AttachID->cellAttributes() ?>>
<span id="el_attachments_AttachID">
<span<?php echo $attachments->AttachID->viewAttributes() ?>>
<?php echo $attachments->AttachID->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($attachments->AttachFilename->Visible) { // AttachFilename ?>
	<tr id="r_AttachFilename">
		<td class="<?php echo $attachments_view->TableLeftColumnClass ?>"><span id="elh_attachments_AttachFilename"><?php echo $attachments->AttachFilename->caption() ?></span></td>
		<td data-name="AttachFilename"<?php echo $attachments->AttachFilename->cellAttributes() ?>>
<span id="el_attachments_AttachFilename">
<span<?php echo $attachments->AttachFilename->viewAttributes() ?>>
<?php echo GetFileViewTag($attachments->AttachFilename, $attachments->AttachFilename->getViewValue()) ?>
</span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($attachments->AttachFilenameInitial->Visible) { // AttachFilenameInitial ?>
	<tr id="r_AttachFilenameInitial">
		<td class="<?php echo $attachments_view->TableLeftColumnClass ?>"><span id="elh_attachments_AttachFilenameInitial"><?php echo $attachments->AttachFilenameInitial->caption() ?></span></td>
		<td data-name="AttachFilenameInitial"<?php echo $attachments->AttachFilenameInitial->cellAttributes() ?>>
<span id="el_attachments_AttachFilenameInitial">
<span<?php echo $attachments->AttachFilenameInitial->viewAttributes() ?>>
<?php echo $attachments->AttachFilenameInitial->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($attachments->AttachExtension->Visible) { // AttachExtension ?>
	<tr id="r_AttachExtension">
		<td class="<?php echo $attachments_view->TableLeftColumnClass ?>"><span id="elh_attachments_AttachExtension"><?php echo $attachments->AttachExtension->caption() ?></span></td>
		<td data-name="AttachExtension"<?php echo $attachments->AttachExtension->cellAttributes() ?>>
<span id="el_attachments_AttachExtension">
<span<?php echo $attachments->AttachExtension->viewAttributes() ?>>
<?php echo $attachments->AttachExtension->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($attachments->AttachDescription->Visible) { // AttachDescription ?>
	<tr id="r_AttachDescription">
		<td class="<?php echo $attachments_view->TableLeftColumnClass ?>"><span id="elh_attachments_AttachDescription"><?php echo $attachments->AttachDescription->caption() ?></span></td>
		<td data-name="AttachDescription"<?php echo $attachments->AttachDescription->cellAttributes() ?>>
<span id="el_attachments_AttachDescription">
<span<?php echo $attachments->AttachDescription->viewAttributes() ?>>
<?php echo $attachments->AttachDescription->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($attachments->AttachNotes->Visible) { // AttachNotes ?>
	<tr id="r_AttachNotes">
		<td class="<?php echo $attachments_view->TableLeftColumnClass ?>"><span id="elh_attachments_AttachNotes"><?php echo $attachments->AttachNotes->caption() ?></span></td>
		<td data-name="AttachNotes"<?php echo $attachments->AttachNotes->cellAttributes() ?>>
<span id="el_attachments_AttachNotes">
<span<?php echo $attachments->AttachNotes->viewAttributes() ?>>
<?php echo $attachments->AttachNotes->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($attachments->AttachFilepath->Visible) { // AttachFilepath ?>
	<tr id="r_AttachFilepath">
		<td class="<?php echo $attachments_view->TableLeftColumnClass ?>"><span id="elh_attachments_AttachFilepath"><?php echo $attachments->AttachFilepath->caption() ?></span></td>
		<td data-name="AttachFilepath"<?php echo $attachments->AttachFilepath->cellAttributes() ?>>
<span id="el_attachments_AttachFilepath">
<span<?php echo $attachments->AttachFilepath->viewAttributes() ?>>
<?php echo $attachments->AttachFilepath->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($attachments->AttachPath->Visible) { // AttachPath ?>
	<tr id="r_AttachPath">
		<td class="<?php echo $attachments_view->TableLeftColumnClass ?>"><span id="elh_attachments_AttachPath"><?php echo $attachments->AttachPath->caption() ?></span></td>
		<td data-name="AttachPath"<?php echo $attachments->AttachPath->cellAttributes() ?>>
<span id="el_attachments_AttachPath">
<span<?php echo $attachments->AttachPath->viewAttributes() ?>>
<?php echo $attachments->AttachPath->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($attachments->Notes->Visible) { // Notes ?>
	<tr id="r_Notes">
		<td class="<?php echo $attachments_view->TableLeftColumnClass ?>"><span id="elh_attachments_Notes"><?php echo $attachments->Notes->caption() ?></span></td>
		<td data-name="Notes"<?php echo $attachments->Notes->cellAttributes() ?>>
<span id="el_attachments_Notes">
<span<?php echo $attachments->Notes->viewAttributes() ?>>
<?php echo $attachments->Notes->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($attachments->_Case->Visible) { // Case ?>
	<tr id="r__Case">
		<td class="<?php echo $attachments_view->TableLeftColumnClass ?>"><span id="elh_attachments__Case"><?php echo $attachments->_Case->caption() ?></span></td>
		<td data-name="_Case"<?php echo $attachments->_Case->cellAttributes() ?>>
<span id="el_attachments__Case">
<span<?php echo $attachments->_Case->viewAttributes() ?>>
<?php echo $attachments->_Case->getViewValue() ?></span>
</span>
</td>
	</tr>
<?php } ?>
</table>
<?php if (!$attachments_view->IsModal) { ?>
<?php if (!$attachments->isExport()) { ?>
<?php if (!isset($attachments_view->Pager)) $attachments_view->Pager = new PrevNextPager($attachments_view->StartRec, $attachments_view->DisplayRecs, $attachments_view->TotalRecs, $attachments_view->AutoHidePager) ?>
<?php if ($attachments_view->Pager->RecordCount > 0 && $attachments_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 ($attachments_view->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" href="<?php echo $attachments_view->pageUrl() ?>start=<?php echo $attachments_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 ($attachments_view->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" href="<?php echo $attachments_view->pageUrl() ?>start=<?php echo $attachments_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 $attachments_view->Pager->CurrentPage ?>">
<div class="input-group-append">
<!-- next page button -->
	<?php if ($attachments_view->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" href="<?php echo $attachments_view->pageUrl() ?>start=<?php echo $attachments_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 ($attachments_view->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" href="<?php echo $attachments_view->pageUrl() ?>start=<?php echo $attachments_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 $attachments_view->Pager->PageCount ?></span>
<div class="clearfix"></div>
</div>
<?php } ?>
<div class="clearfix"></div>
<?php } ?>
<?php } ?>
</form>
<?php
$attachments_view->showPageFooter();
if (DEBUG_ENABLED)
	echo GetDebugMessage();
?>
<?php if (!$attachments->isExport()) { ?>
<script>

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

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