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

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

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

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

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

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

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

// Dynamic selection lists
fclients2delete.lists["x_ClientTypeID"] = <?php echo $clients2_delete->ClientTypeID->Lookup->toClientList() ?>;
fclients2delete.lists["x_ClientTypeID"].options = <?php echo JsonEncode($clients2_delete->ClientTypeID->lookupOptions()) ?>;
fclients2delete.lists["x_ClientGroupID"] = <?php echo $clients2_delete->ClientGroupID->Lookup->toClientList() ?>;
fclients2delete.lists["x_ClientGroupID"].options = <?php echo JsonEncode($clients2_delete->ClientGroupID->lookupOptions()) ?>;
fclients2delete.autoSuggests["x_ClientGroupID"] = <?php echo json_encode(["data" => "ajax=autosuggest"]) ?>;
fclients2delete.lists["x_TitleID"] = <?php echo $clients2_delete->TitleID->Lookup->toClientList() ?>;
fclients2delete.lists["x_TitleID"].options = <?php echo JsonEncode($clients2_delete->TitleID->lookupOptions()) ?>;
fclients2delete.lists["x_Gender"] = <?php echo $clients2_delete->Gender->Lookup->toClientList() ?>;
fclients2delete.lists["x_Gender"].options = <?php echo JsonEncode($clients2_delete->Gender->options(FALSE, TRUE)) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $clients2_delete->showPageHeader(); ?>
<?php
$clients2_delete->showMessage();
?>
<form name="fclients2delete" id="fclients2delete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($clients2_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $clients2_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="clients2">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($clients2_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 ($clients2->ClientTypeID->Visible) { // ClientTypeID ?>
		<th class="<?php echo $clients2->ClientTypeID->headerCellClass() ?>"><span id="elh_clients2_ClientTypeID" class="clients2_ClientTypeID"><?php echo $clients2->ClientTypeID->caption() ?></span></th>
<?php } ?>
<?php if ($clients2->ClientGroupID->Visible) { // ClientGroupID ?>
		<th class="<?php echo $clients2->ClientGroupID->headerCellClass() ?>"><span id="elh_clients2_ClientGroupID" class="clients2_ClientGroupID"><?php echo $clients2->ClientGroupID->caption() ?></span></th>
<?php } ?>
<?php if ($clients2->WorkNature->Visible) { // WorkNature ?>
		<th class="<?php echo $clients2->WorkNature->headerCellClass() ?>"><span id="elh_clients2_WorkNature" class="clients2_WorkNature"><?php echo $clients2->WorkNature->caption() ?></span></th>
<?php } ?>
<?php if ($clients2->CompanyName->Visible) { // CompanyName ?>
		<th class="<?php echo $clients2->CompanyName->headerCellClass() ?>"><span id="elh_clients2_CompanyName" class="clients2_CompanyName"><?php echo $clients2->CompanyName->caption() ?></span></th>
<?php } ?>
<?php if ($clients2->TitleID->Visible) { // TitleID ?>
		<th class="<?php echo $clients2->TitleID->headerCellClass() ?>"><span id="elh_clients2_TitleID" class="clients2_TitleID"><?php echo $clients2->TitleID->caption() ?></span></th>
<?php } ?>
<?php if ($clients2->FirstName->Visible) { // FirstName ?>
		<th class="<?php echo $clients2->FirstName->headerCellClass() ?>"><span id="elh_clients2_FirstName" class="clients2_FirstName"><?php echo $clients2->FirstName->caption() ?></span></th>
<?php } ?>
<?php if ($clients2->MiddleName->Visible) { // MiddleName ?>
		<th class="<?php echo $clients2->MiddleName->headerCellClass() ?>"><span id="elh_clients2_MiddleName" class="clients2_MiddleName"><?php echo $clients2->MiddleName->caption() ?></span></th>
<?php } ?>
<?php if ($clients2->LastName->Visible) { // LastName ?>
		<th class="<?php echo $clients2->LastName->headerCellClass() ?>"><span id="elh_clients2_LastName" class="clients2_LastName"><?php echo $clients2->LastName->caption() ?></span></th>
<?php } ?>
<?php if ($clients2->PartnersName->Visible) { // PartnersName ?>
		<th class="<?php echo $clients2->PartnersName->headerCellClass() ?>"><span id="elh_clients2_PartnersName" class="clients2_PartnersName"><?php echo $clients2->PartnersName->caption() ?></span></th>
<?php } ?>
<?php if ($clients2->ContactPerson->Visible) { // ContactPerson ?>
		<th class="<?php echo $clients2->ContactPerson->headerCellClass() ?>"><span id="elh_clients2_ContactPerson" class="clients2_ContactPerson"><?php echo $clients2->ContactPerson->caption() ?></span></th>
<?php } ?>
<?php if ($clients2->JobTitle->Visible) { // JobTitle ?>
		<th class="<?php echo $clients2->JobTitle->headerCellClass() ?>"><span id="elh_clients2_JobTitle" class="clients2_JobTitle"><?php echo $clients2->JobTitle->caption() ?></span></th>
<?php } ?>
<?php if ($clients2->Photo->Visible) { // Photo ?>
		<th class="<?php echo $clients2->Photo->headerCellClass() ?>"><span id="elh_clients2_Photo" class="clients2_Photo"><?php echo $clients2->Photo->caption() ?></span></th>
<?php } ?>
<?php if ($clients2->BirthDate->Visible) { // BirthDate ?>
		<th class="<?php echo $clients2->BirthDate->headerCellClass() ?>"><span id="elh_clients2_BirthDate" class="clients2_BirthDate"><?php echo $clients2->BirthDate->caption() ?></span></th>
<?php } ?>
<?php if ($clients2->Gender->Visible) { // Gender ?>
		<th class="<?php echo $clients2->Gender->headerCellClass() ?>"><span id="elh_clients2_Gender" class="clients2_Gender"><?php echo $clients2->Gender->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$clients2_delete->RecCnt = 0;
$i = 0;
while (!$clients2_delete->Recordset->EOF) {
	$clients2_delete->RecCnt++;
	$clients2_delete->RowCnt++;

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

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

	// Render row
	$clients2_delete->renderRow();
?>
	<tr<?php echo $clients2->rowAttributes() ?>>
<?php if ($clients2->ClientTypeID->Visible) { // ClientTypeID ?>
		<td<?php echo $clients2->ClientTypeID->cellAttributes() ?>>
<span id="el<?php echo $clients2_delete->RowCnt ?>_clients2_ClientTypeID" class="clients2_ClientTypeID">
<span<?php echo $clients2->ClientTypeID->viewAttributes() ?>>
<?php echo $clients2->ClientTypeID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients2->ClientGroupID->Visible) { // ClientGroupID ?>
		<td<?php echo $clients2->ClientGroupID->cellAttributes() ?>>
<span id="el<?php echo $clients2_delete->RowCnt ?>_clients2_ClientGroupID" class="clients2_ClientGroupID">
<span<?php echo $clients2->ClientGroupID->viewAttributes() ?>>
<?php echo $clients2->ClientGroupID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients2->WorkNature->Visible) { // WorkNature ?>
		<td<?php echo $clients2->WorkNature->cellAttributes() ?>>
<span id="el<?php echo $clients2_delete->RowCnt ?>_clients2_WorkNature" class="clients2_WorkNature">
<span<?php echo $clients2->WorkNature->viewAttributes() ?>>
<?php echo $clients2->WorkNature->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients2->CompanyName->Visible) { // CompanyName ?>
		<td<?php echo $clients2->CompanyName->cellAttributes() ?>>
<span id="el<?php echo $clients2_delete->RowCnt ?>_clients2_CompanyName" class="clients2_CompanyName">
<span<?php echo $clients2->CompanyName->viewAttributes() ?>>
<?php echo $clients2->CompanyName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients2->TitleID->Visible) { // TitleID ?>
		<td<?php echo $clients2->TitleID->cellAttributes() ?>>
<span id="el<?php echo $clients2_delete->RowCnt ?>_clients2_TitleID" class="clients2_TitleID">
<span<?php echo $clients2->TitleID->viewAttributes() ?>>
<?php echo $clients2->TitleID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients2->FirstName->Visible) { // FirstName ?>
		<td<?php echo $clients2->FirstName->cellAttributes() ?>>
<span id="el<?php echo $clients2_delete->RowCnt ?>_clients2_FirstName" class="clients2_FirstName">
<span<?php echo $clients2->FirstName->viewAttributes() ?>>
<?php echo $clients2->FirstName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients2->MiddleName->Visible) { // MiddleName ?>
		<td<?php echo $clients2->MiddleName->cellAttributes() ?>>
<span id="el<?php echo $clients2_delete->RowCnt ?>_clients2_MiddleName" class="clients2_MiddleName">
<span<?php echo $clients2->MiddleName->viewAttributes() ?>>
<?php echo $clients2->MiddleName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients2->LastName->Visible) { // LastName ?>
		<td<?php echo $clients2->LastName->cellAttributes() ?>>
<span id="el<?php echo $clients2_delete->RowCnt ?>_clients2_LastName" class="clients2_LastName">
<span<?php echo $clients2->LastName->viewAttributes() ?>>
<?php echo $clients2->LastName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients2->PartnersName->Visible) { // PartnersName ?>
		<td<?php echo $clients2->PartnersName->cellAttributes() ?>>
<span id="el<?php echo $clients2_delete->RowCnt ?>_clients2_PartnersName" class="clients2_PartnersName">
<span<?php echo $clients2->PartnersName->viewAttributes() ?>>
<?php echo $clients2->PartnersName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients2->ContactPerson->Visible) { // ContactPerson ?>
		<td<?php echo $clients2->ContactPerson->cellAttributes() ?>>
<span id="el<?php echo $clients2_delete->RowCnt ?>_clients2_ContactPerson" class="clients2_ContactPerson">
<span<?php echo $clients2->ContactPerson->viewAttributes() ?>>
<?php echo $clients2->ContactPerson->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients2->JobTitle->Visible) { // JobTitle ?>
		<td<?php echo $clients2->JobTitle->cellAttributes() ?>>
<span id="el<?php echo $clients2_delete->RowCnt ?>_clients2_JobTitle" class="clients2_JobTitle">
<span<?php echo $clients2->JobTitle->viewAttributes() ?>>
<?php echo $clients2->JobTitle->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients2->Photo->Visible) { // Photo ?>
		<td<?php echo $clients2->Photo->cellAttributes() ?>>
<span id="el<?php echo $clients2_delete->RowCnt ?>_clients2_Photo" class="clients2_Photo">
<span>
<?php echo GetFileViewTag($clients2->Photo, $clients2->Photo->getViewValue()) ?>
</span>
</span>
</td>
<?php } ?>
<?php if ($clients2->BirthDate->Visible) { // BirthDate ?>
		<td<?php echo $clients2->BirthDate->cellAttributes() ?>>
<span id="el<?php echo $clients2_delete->RowCnt ?>_clients2_BirthDate" class="clients2_BirthDate">
<span<?php echo $clients2->BirthDate->viewAttributes() ?>>
<?php echo $clients2->BirthDate->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients2->Gender->Visible) { // Gender ?>
		<td<?php echo $clients2->Gender->cellAttributes() ?>>
<span id="el<?php echo $clients2_delete->RowCnt ?>_clients2_Gender" class="clients2_Gender">
<span<?php echo $clients2->Gender->viewAttributes() ?>>
<?php echo $clients2->Gender->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$clients2_delete->Recordset->moveNext();
}
$clients2_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 $clients2_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$clients2_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
$clients2_delete->terminate();
?>
