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

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

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

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

// Page Rendering event
$employeecontact_delete->Page_Render();
?>
<?php include_once "header.php" ?>
<script>

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

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

// Dynamic selection lists
femployeecontactdelete.lists["x_EmployeeID"] = <?php echo $employeecontact_delete->EmployeeID->Lookup->toClientList() ?>;
femployeecontactdelete.lists["x_EmployeeID"].options = <?php echo JsonEncode($employeecontact_delete->EmployeeID->lookupOptions()) ?>;
femployeecontactdelete.lists["x_ContactTypeID"] = <?php echo $employeecontact_delete->ContactTypeID->Lookup->toClientList() ?>;
femployeecontactdelete.lists["x_ContactTypeID"].options = <?php echo JsonEncode($employeecontact_delete->ContactTypeID->lookupOptions()) ?>;
femployeecontactdelete.lists["x_Primary[]"] = <?php echo $employeecontact_delete->Primary->Lookup->toClientList() ?>;
femployeecontactdelete.lists["x_Primary[]"].options = <?php echo JsonEncode($employeecontact_delete->Primary->options(FALSE, TRUE)) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $employeecontact_delete->showPageHeader(); ?>
<?php
$employeecontact_delete->showMessage();
?>
<form name="femployeecontactdelete" id="femployeecontactdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($employeecontact_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $employeecontact_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="employeecontact">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($employeecontact_delete->RecKeys as $key) { ?>
<?php $keyvalue = is_array($key) ? implode($COMPOSITE_KEY_SEPARATOR, $key) : $key; ?>
<input type="hidden" name="key_m[]" value="<?php echo HtmlEncode($keyvalue) ?>">
<?php } ?>
<div class="card ew-card ew-grid">
<div class="<?php if (IsResponsiveLayout()) { ?>table-responsive <?php } ?>card-body ew-grid-middle-panel">
<table class="table ew-table">
	<thead>
	<tr class="ew-table-header">
<?php if ($employeecontact->EmployeeID->Visible) { // EmployeeID ?>
		<th class="<?php echo $employeecontact->EmployeeID->headerCellClass() ?>"><span id="elh_employeecontact_EmployeeID" class="employeecontact_EmployeeID"><?php echo $employeecontact->EmployeeID->caption() ?></span></th>
<?php } ?>
<?php if ($employeecontact->ContactTypeID->Visible) { // ContactTypeID ?>
		<th class="<?php echo $employeecontact->ContactTypeID->headerCellClass() ?>"><span id="elh_employeecontact_ContactTypeID" class="employeecontact_ContactTypeID"><?php echo $employeecontact->ContactTypeID->caption() ?></span></th>
<?php } ?>
<?php if ($employeecontact->Contact->Visible) { // Contact ?>
		<th class="<?php echo $employeecontact->Contact->headerCellClass() ?>"><span id="elh_employeecontact_Contact" class="employeecontact_Contact"><?php echo $employeecontact->Contact->caption() ?></span></th>
<?php } ?>
<?php if ($employeecontact->Notes->Visible) { // Notes ?>
		<th class="<?php echo $employeecontact->Notes->headerCellClass() ?>"><span id="elh_employeecontact_Notes" class="employeecontact_Notes"><?php echo $employeecontact->Notes->caption() ?></span></th>
<?php } ?>
<?php if ($employeecontact->Primary->Visible) { // Primary ?>
		<th class="<?php echo $employeecontact->Primary->headerCellClass() ?>"><span id="elh_employeecontact_Primary" class="employeecontact_Primary"><?php echo $employeecontact->Primary->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$employeecontact_delete->RecCnt = 0;
$i = 0;
while (!$employeecontact_delete->Recordset->EOF) {
	$employeecontact_delete->RecCnt++;
	$employeecontact_delete->RowCnt++;

	// Set row properties
	$employeecontact->resetAttributes();
	$employeecontact->RowType = ROWTYPE_VIEW; // View

	// Get the field contents
	$employeecontact_delete->loadRowValues($employeecontact_delete->Recordset);

	// Render row
	$employeecontact_delete->renderRow();
?>
	<tr<?php echo $employeecontact->rowAttributes() ?>>
<?php if ($employeecontact->EmployeeID->Visible) { // EmployeeID ?>
		<td<?php echo $employeecontact->EmployeeID->cellAttributes() ?>>
<span id="el<?php echo $employeecontact_delete->RowCnt ?>_employeecontact_EmployeeID" class="employeecontact_EmployeeID">
<span<?php echo $employeecontact->EmployeeID->viewAttributes() ?>>
<?php echo $employeecontact->EmployeeID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($employeecontact->ContactTypeID->Visible) { // ContactTypeID ?>
		<td<?php echo $employeecontact->ContactTypeID->cellAttributes() ?>>
<span id="el<?php echo $employeecontact_delete->RowCnt ?>_employeecontact_ContactTypeID" class="employeecontact_ContactTypeID">
<span<?php echo $employeecontact->ContactTypeID->viewAttributes() ?>>
<?php echo $employeecontact->ContactTypeID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($employeecontact->Contact->Visible) { // Contact ?>
		<td<?php echo $employeecontact->Contact->cellAttributes() ?>>
<span id="el<?php echo $employeecontact_delete->RowCnt ?>_employeecontact_Contact" class="employeecontact_Contact">
<span<?php echo $employeecontact->Contact->viewAttributes() ?>>
<?php echo $employeecontact->Contact->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($employeecontact->Notes->Visible) { // Notes ?>
		<td<?php echo $employeecontact->Notes->cellAttributes() ?>>
<span id="el<?php echo $employeecontact_delete->RowCnt ?>_employeecontact_Notes" class="employeecontact_Notes">
<span<?php echo $employeecontact->Notes->viewAttributes() ?>>
<?php echo $employeecontact->Notes->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($employeecontact->Primary->Visible) { // Primary ?>
		<td<?php echo $employeecontact->Primary->cellAttributes() ?>>
<span id="el<?php echo $employeecontact_delete->RowCnt ?>_employeecontact_Primary" class="employeecontact_Primary">
<span<?php echo $employeecontact->Primary->viewAttributes() ?>>
<?php if (ConvertToBool($employeecontact->Primary->CurrentValue)) { ?>
<input type="checkbox" value="<?php echo $employeecontact->Primary->getViewValue() ?>" disabled checked>
<?php } else { ?>
<input type="checkbox" value="<?php echo $employeecontact->Primary->getViewValue() ?>" disabled>
<?php } ?>
</span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$employeecontact_delete->Recordset->moveNext();
}
$employeecontact_delete->Recordset->close();
?>
</tbody>
</table>
</div>
</div>
<div>
<button class="btn btn-primary ew-btn" name="btn-action" id="btn-action" type="submit"><?php echo $Language->phrase("DeleteBtn") ?></button>
<button class="btn btn-default ew-btn" name="btn-cancel" id="btn-cancel" type="button" data-href="<?php echo $employeecontact_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$employeecontact_delete->showPageFooter();
if (DEBUG_ENABLED)
	echo GetDebugMessage();
?>
<script>

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

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