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

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

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

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

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

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

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

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

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

// Write your client script here, no need to add script tags.
</script>
<?php $clients_delete->showPageHeader(); ?>
<?php
$clients_delete->showMessage();
?>
<form name="fclientsdelete" id="fclientsdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($clients_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $clients_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="clients">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($clients_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 ($clients->ClientTypeID->Visible) { // ClientTypeID ?>
		<th class="<?php echo $clients->ClientTypeID->headerCellClass() ?>"><span id="elh_clients_ClientTypeID" class="clients_ClientTypeID"><?php echo $clients->ClientTypeID->caption() ?></span></th>
<?php } ?>
<?php if ($clients->ClientGroupID->Visible) { // ClientGroupID ?>
		<th class="<?php echo $clients->ClientGroupID->headerCellClass() ?>"><span id="elh_clients_ClientGroupID" class="clients_ClientGroupID"><?php echo $clients->ClientGroupID->caption() ?></span></th>
<?php } ?>
<?php if ($clients->TitleID->Visible) { // TitleID ?>
		<th class="<?php echo $clients->TitleID->headerCellClass() ?>"><span id="elh_clients_TitleID" class="clients_TitleID"><?php echo $clients->TitleID->caption() ?></span></th>
<?php } ?>
<?php if ($clients->FirstName->Visible) { // FirstName ?>
		<th class="<?php echo $clients->FirstName->headerCellClass() ?>"><span id="elh_clients_FirstName" class="clients_FirstName"><?php echo $clients->FirstName->caption() ?></span></th>
<?php } ?>
<?php if ($clients->MiddleName->Visible) { // MiddleName ?>
		<th class="<?php echo $clients->MiddleName->headerCellClass() ?>"><span id="elh_clients_MiddleName" class="clients_MiddleName"><?php echo $clients->MiddleName->caption() ?></span></th>
<?php } ?>
<?php if ($clients->LastName->Visible) { // LastName ?>
		<th class="<?php echo $clients->LastName->headerCellClass() ?>"><span id="elh_clients_LastName" class="clients_LastName"><?php echo $clients->LastName->caption() ?></span></th>
<?php } ?>
<?php if ($clients->PartnersName->Visible) { // PartnersName ?>
		<th class="<?php echo $clients->PartnersName->headerCellClass() ?>"><span id="elh_clients_PartnersName" class="clients_PartnersName"><?php echo $clients->PartnersName->caption() ?></span></th>
<?php } ?>
<?php if ($clients->CompanyName->Visible) { // CompanyName ?>
		<th class="<?php echo $clients->CompanyName->headerCellClass() ?>"><span id="elh_clients_CompanyName" class="clients_CompanyName"><?php echo $clients->CompanyName->caption() ?></span></th>
<?php } ?>
<?php if ($clients->ContactPerson->Visible) { // ContactPerson ?>
		<th class="<?php echo $clients->ContactPerson->headerCellClass() ?>"><span id="elh_clients_ContactPerson" class="clients_ContactPerson"><?php echo $clients->ContactPerson->caption() ?></span></th>
<?php } ?>
<?php if ($clients->WorkNature->Visible) { // WorkNature ?>
		<th class="<?php echo $clients->WorkNature->headerCellClass() ?>"><span id="elh_clients_WorkNature" class="clients_WorkNature"><?php echo $clients->WorkNature->caption() ?></span></th>
<?php } ?>
<?php if ($clients->JobTitle->Visible) { // JobTitle ?>
		<th class="<?php echo $clients->JobTitle->headerCellClass() ?>"><span id="elh_clients_JobTitle" class="clients_JobTitle"><?php echo $clients->JobTitle->caption() ?></span></th>
<?php } ?>
<?php if ($clients->Photo->Visible) { // Photo ?>
		<th class="<?php echo $clients->Photo->headerCellClass() ?>"><span id="elh_clients_Photo" class="clients_Photo"><?php echo $clients->Photo->caption() ?></span></th>
<?php } ?>
<?php if ($clients->BirthDate->Visible) { // BirthDate ?>
		<th class="<?php echo $clients->BirthDate->headerCellClass() ?>"><span id="elh_clients_BirthDate" class="clients_BirthDate"><?php echo $clients->BirthDate->caption() ?></span></th>
<?php } ?>
<?php if ($clients->Gender->Visible) { // Gender ?>
		<th class="<?php echo $clients->Gender->headerCellClass() ?>"><span id="elh_clients_Gender" class="clients_Gender"><?php echo $clients->Gender->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$clients_delete->RecCnt = 0;
$i = 0;
while (!$clients_delete->Recordset->EOF) {
	$clients_delete->RecCnt++;
	$clients_delete->RowCnt++;

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

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

	// Render row
	$clients_delete->renderRow();
?>
	<tr<?php echo $clients->rowAttributes() ?>>
<?php if ($clients->ClientTypeID->Visible) { // ClientTypeID ?>
		<td<?php echo $clients->ClientTypeID->cellAttributes() ?>>
<span id="el<?php echo $clients_delete->RowCnt ?>_clients_ClientTypeID" class="clients_ClientTypeID">
<span<?php echo $clients->ClientTypeID->viewAttributes() ?>>
<?php echo $clients->ClientTypeID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients->ClientGroupID->Visible) { // ClientGroupID ?>
		<td<?php echo $clients->ClientGroupID->cellAttributes() ?>>
<span id="el<?php echo $clients_delete->RowCnt ?>_clients_ClientGroupID" class="clients_ClientGroupID">
<span<?php echo $clients->ClientGroupID->viewAttributes() ?>>
<?php echo $clients->ClientGroupID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients->TitleID->Visible) { // TitleID ?>
		<td<?php echo $clients->TitleID->cellAttributes() ?>>
<span id="el<?php echo $clients_delete->RowCnt ?>_clients_TitleID" class="clients_TitleID">
<span<?php echo $clients->TitleID->viewAttributes() ?>>
<?php echo $clients->TitleID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients->FirstName->Visible) { // FirstName ?>
		<td<?php echo $clients->FirstName->cellAttributes() ?>>
<span id="el<?php echo $clients_delete->RowCnt ?>_clients_FirstName" class="clients_FirstName">
<span<?php echo $clients->FirstName->viewAttributes() ?>>
<?php echo $clients->FirstName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients->MiddleName->Visible) { // MiddleName ?>
		<td<?php echo $clients->MiddleName->cellAttributes() ?>>
<span id="el<?php echo $clients_delete->RowCnt ?>_clients_MiddleName" class="clients_MiddleName">
<span<?php echo $clients->MiddleName->viewAttributes() ?>>
<?php echo $clients->MiddleName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients->LastName->Visible) { // LastName ?>
		<td<?php echo $clients->LastName->cellAttributes() ?>>
<span id="el<?php echo $clients_delete->RowCnt ?>_clients_LastName" class="clients_LastName">
<span<?php echo $clients->LastName->viewAttributes() ?>>
<?php echo $clients->LastName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients->PartnersName->Visible) { // PartnersName ?>
		<td<?php echo $clients->PartnersName->cellAttributes() ?>>
<span id="el<?php echo $clients_delete->RowCnt ?>_clients_PartnersName" class="clients_PartnersName">
<span<?php echo $clients->PartnersName->viewAttributes() ?>>
<?php echo $clients->PartnersName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients->CompanyName->Visible) { // CompanyName ?>
		<td<?php echo $clients->CompanyName->cellAttributes() ?>>
<span id="el<?php echo $clients_delete->RowCnt ?>_clients_CompanyName" class="clients_CompanyName">
<span<?php echo $clients->CompanyName->viewAttributes() ?>>
<?php echo $clients->CompanyName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients->ContactPerson->Visible) { // ContactPerson ?>
		<td<?php echo $clients->ContactPerson->cellAttributes() ?>>
<span id="el<?php echo $clients_delete->RowCnt ?>_clients_ContactPerson" class="clients_ContactPerson">
<span<?php echo $clients->ContactPerson->viewAttributes() ?>>
<?php echo $clients->ContactPerson->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients->WorkNature->Visible) { // WorkNature ?>
		<td<?php echo $clients->WorkNature->cellAttributes() ?>>
<span id="el<?php echo $clients_delete->RowCnt ?>_clients_WorkNature" class="clients_WorkNature">
<span<?php echo $clients->WorkNature->viewAttributes() ?>>
<?php echo $clients->WorkNature->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients->JobTitle->Visible) { // JobTitle ?>
		<td<?php echo $clients->JobTitle->cellAttributes() ?>>
<span id="el<?php echo $clients_delete->RowCnt ?>_clients_JobTitle" class="clients_JobTitle">
<span<?php echo $clients->JobTitle->viewAttributes() ?>>
<?php echo $clients->JobTitle->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients->Photo->Visible) { // Photo ?>
		<td<?php echo $clients->Photo->cellAttributes() ?>>
<span id="el<?php echo $clients_delete->RowCnt ?>_clients_Photo" class="clients_Photo">
<span>
<?php echo GetFileViewTag($clients->Photo, $clients->Photo->getViewValue()) ?>
</span>
</span>
</td>
<?php } ?>
<?php if ($clients->BirthDate->Visible) { // BirthDate ?>
		<td<?php echo $clients->BirthDate->cellAttributes() ?>>
<span id="el<?php echo $clients_delete->RowCnt ?>_clients_BirthDate" class="clients_BirthDate">
<span<?php echo $clients->BirthDate->viewAttributes() ?>>
<?php echo $clients->BirthDate->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($clients->Gender->Visible) { // Gender ?>
		<td<?php echo $clients->Gender->cellAttributes() ?>>
<span id="el<?php echo $clients_delete->RowCnt ?>_clients_Gender" class="clients_Gender">
<span<?php echo $clients->Gender->viewAttributes() ?>>
<?php echo $clients->Gender->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$clients_delete->Recordset->moveNext();
}
$clients_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 $clients_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$clients_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
$clients_delete->terminate();
?>
