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

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

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

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

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

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

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

// Dynamic selection lists
flawyersdelete.lists["x_LawyerTypeID"] = <?php echo $lawyers_delete->LawyerTypeID->Lookup->toClientList() ?>;
flawyersdelete.lists["x_LawyerTypeID"].options = <?php echo JsonEncode($lawyers_delete->LawyerTypeID->lookupOptions()) ?>;
flawyersdelete.lists["x_FirmID"] = <?php echo $lawyers_delete->FirmID->Lookup->toClientList() ?>;
flawyersdelete.lists["x_FirmID"].options = <?php echo JsonEncode($lawyers_delete->FirmID->lookupOptions()) ?>;
flawyersdelete.lists["x_TitleID"] = <?php echo $lawyers_delete->TitleID->Lookup->toClientList() ?>;
flawyersdelete.lists["x_TitleID"].options = <?php echo JsonEncode($lawyers_delete->TitleID->lookupOptions()) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $lawyers_delete->showPageHeader(); ?>
<?php
$lawyers_delete->showMessage();
?>
<form name="flawyersdelete" id="flawyersdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($lawyers_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $lawyers_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="lawyers">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($lawyers_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 ($lawyers->LawyerTypeID->Visible) { // LawyerTypeID ?>
		<th class="<?php echo $lawyers->LawyerTypeID->headerCellClass() ?>"><span id="elh_lawyers_LawyerTypeID" class="lawyers_LawyerTypeID"><?php echo $lawyers->LawyerTypeID->caption() ?></span></th>
<?php } ?>
<?php if ($lawyers->SyndicateNumber->Visible) { // SyndicateNumber ?>
		<th class="<?php echo $lawyers->SyndicateNumber->headerCellClass() ?>"><span id="elh_lawyers_SyndicateNumber" class="lawyers_SyndicateNumber"><?php echo $lawyers->SyndicateNumber->caption() ?></span></th>
<?php } ?>
<?php if ($lawyers->FirmID->Visible) { // FirmID ?>
		<th class="<?php echo $lawyers->FirmID->headerCellClass() ?>"><span id="elh_lawyers_FirmID" class="lawyers_FirmID"><?php echo $lawyers->FirmID->caption() ?></span></th>
<?php } ?>
<?php if ($lawyers->TitleID->Visible) { // TitleID ?>
		<th class="<?php echo $lawyers->TitleID->headerCellClass() ?>"><span id="elh_lawyers_TitleID" class="lawyers_TitleID"><?php echo $lawyers->TitleID->caption() ?></span></th>
<?php } ?>
<?php if ($lawyers->FirstName->Visible) { // FirstName ?>
		<th class="<?php echo $lawyers->FirstName->headerCellClass() ?>"><span id="elh_lawyers_FirstName" class="lawyers_FirstName"><?php echo $lawyers->FirstName->caption() ?></span></th>
<?php } ?>
<?php if ($lawyers->MiddleName->Visible) { // MiddleName ?>
		<th class="<?php echo $lawyers->MiddleName->headerCellClass() ?>"><span id="elh_lawyers_MiddleName" class="lawyers_MiddleName"><?php echo $lawyers->MiddleName->caption() ?></span></th>
<?php } ?>
<?php if ($lawyers->LastName->Visible) { // LastName ?>
		<th class="<?php echo $lawyers->LastName->headerCellClass() ?>"><span id="elh_lawyers_LastName" class="lawyers_LastName"><?php echo $lawyers->LastName->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$lawyers_delete->RecCnt = 0;
$i = 0;
while (!$lawyers_delete->Recordset->EOF) {
	$lawyers_delete->RecCnt++;
	$lawyers_delete->RowCnt++;

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

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

	// Render row
	$lawyers_delete->renderRow();
?>
	<tr<?php echo $lawyers->rowAttributes() ?>>
<?php if ($lawyers->LawyerTypeID->Visible) { // LawyerTypeID ?>
		<td<?php echo $lawyers->LawyerTypeID->cellAttributes() ?>>
<span id="el<?php echo $lawyers_delete->RowCnt ?>_lawyers_LawyerTypeID" class="lawyers_LawyerTypeID">
<span<?php echo $lawyers->LawyerTypeID->viewAttributes() ?>>
<?php echo $lawyers->LawyerTypeID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($lawyers->SyndicateNumber->Visible) { // SyndicateNumber ?>
		<td<?php echo $lawyers->SyndicateNumber->cellAttributes() ?>>
<span id="el<?php echo $lawyers_delete->RowCnt ?>_lawyers_SyndicateNumber" class="lawyers_SyndicateNumber">
<span<?php echo $lawyers->SyndicateNumber->viewAttributes() ?>>
<?php echo $lawyers->SyndicateNumber->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($lawyers->FirmID->Visible) { // FirmID ?>
		<td<?php echo $lawyers->FirmID->cellAttributes() ?>>
<span id="el<?php echo $lawyers_delete->RowCnt ?>_lawyers_FirmID" class="lawyers_FirmID">
<span<?php echo $lawyers->FirmID->viewAttributes() ?>>
<?php echo $lawyers->FirmID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($lawyers->TitleID->Visible) { // TitleID ?>
		<td<?php echo $lawyers->TitleID->cellAttributes() ?>>
<span id="el<?php echo $lawyers_delete->RowCnt ?>_lawyers_TitleID" class="lawyers_TitleID">
<span<?php echo $lawyers->TitleID->viewAttributes() ?>>
<?php echo $lawyers->TitleID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($lawyers->FirstName->Visible) { // FirstName ?>
		<td<?php echo $lawyers->FirstName->cellAttributes() ?>>
<span id="el<?php echo $lawyers_delete->RowCnt ?>_lawyers_FirstName" class="lawyers_FirstName">
<span<?php echo $lawyers->FirstName->viewAttributes() ?>>
<?php echo $lawyers->FirstName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($lawyers->MiddleName->Visible) { // MiddleName ?>
		<td<?php echo $lawyers->MiddleName->cellAttributes() ?>>
<span id="el<?php echo $lawyers_delete->RowCnt ?>_lawyers_MiddleName" class="lawyers_MiddleName">
<span<?php echo $lawyers->MiddleName->viewAttributes() ?>>
<?php echo $lawyers->MiddleName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($lawyers->LastName->Visible) { // LastName ?>
		<td<?php echo $lawyers->LastName->cellAttributes() ?>>
<span id="el<?php echo $lawyers_delete->RowCnt ?>_lawyers_LastName" class="lawyers_LastName">
<span<?php echo $lawyers->LastName->viewAttributes() ?>>
<?php echo $lawyers->LastName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$lawyers_delete->Recordset->moveNext();
}
$lawyers_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 $lawyers_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$lawyers_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
$lawyers_delete->terminate();
?>
