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

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

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

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

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

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

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

// Dynamic selection lists
flawyercontactdelete.lists["x_LawyerID"] = <?php echo $lawyercontact_delete->LawyerID->Lookup->toClientList() ?>;
flawyercontactdelete.lists["x_LawyerID"].options = <?php echo JsonEncode($lawyercontact_delete->LawyerID->lookupOptions()) ?>;
flawyercontactdelete.lists["x_ContactTypeID"] = <?php echo $lawyercontact_delete->ContactTypeID->Lookup->toClientList() ?>;
flawyercontactdelete.lists["x_ContactTypeID"].options = <?php echo JsonEncode($lawyercontact_delete->ContactTypeID->lookupOptions()) ?>;
flawyercontactdelete.lists["x_Primary[]"] = <?php echo $lawyercontact_delete->Primary->Lookup->toClientList() ?>;
flawyercontactdelete.lists["x_Primary[]"].options = <?php echo JsonEncode($lawyercontact_delete->Primary->options(FALSE, TRUE)) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $lawyercontact_delete->showPageHeader(); ?>
<?php
$lawyercontact_delete->showMessage();
?>
<form name="flawyercontactdelete" id="flawyercontactdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($lawyercontact_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $lawyercontact_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="lawyercontact">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($lawyercontact_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 ($lawyercontact->LawyerID->Visible) { // LawyerID ?>
		<th class="<?php echo $lawyercontact->LawyerID->headerCellClass() ?>"><span id="elh_lawyercontact_LawyerID" class="lawyercontact_LawyerID"><?php echo $lawyercontact->LawyerID->caption() ?></span></th>
<?php } ?>
<?php if ($lawyercontact->ContactTypeID->Visible) { // ContactTypeID ?>
		<th class="<?php echo $lawyercontact->ContactTypeID->headerCellClass() ?>"><span id="elh_lawyercontact_ContactTypeID" class="lawyercontact_ContactTypeID"><?php echo $lawyercontact->ContactTypeID->caption() ?></span></th>
<?php } ?>
<?php if ($lawyercontact->Contact->Visible) { // Contact ?>
		<th class="<?php echo $lawyercontact->Contact->headerCellClass() ?>"><span id="elh_lawyercontact_Contact" class="lawyercontact_Contact"><?php echo $lawyercontact->Contact->caption() ?></span></th>
<?php } ?>
<?php if ($lawyercontact->Notes->Visible) { // Notes ?>
		<th class="<?php echo $lawyercontact->Notes->headerCellClass() ?>"><span id="elh_lawyercontact_Notes" class="lawyercontact_Notes"><?php echo $lawyercontact->Notes->caption() ?></span></th>
<?php } ?>
<?php if ($lawyercontact->Primary->Visible) { // Primary ?>
		<th class="<?php echo $lawyercontact->Primary->headerCellClass() ?>"><span id="elh_lawyercontact_Primary" class="lawyercontact_Primary"><?php echo $lawyercontact->Primary->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$lawyercontact_delete->RecCnt = 0;
$i = 0;
while (!$lawyercontact_delete->Recordset->EOF) {
	$lawyercontact_delete->RecCnt++;
	$lawyercontact_delete->RowCnt++;

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

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

	// Render row
	$lawyercontact_delete->renderRow();
?>
	<tr<?php echo $lawyercontact->rowAttributes() ?>>
<?php if ($lawyercontact->LawyerID->Visible) { // LawyerID ?>
		<td<?php echo $lawyercontact->LawyerID->cellAttributes() ?>>
<span id="el<?php echo $lawyercontact_delete->RowCnt ?>_lawyercontact_LawyerID" class="lawyercontact_LawyerID">
<span<?php echo $lawyercontact->LawyerID->viewAttributes() ?>>
<?php echo $lawyercontact->LawyerID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($lawyercontact->ContactTypeID->Visible) { // ContactTypeID ?>
		<td<?php echo $lawyercontact->ContactTypeID->cellAttributes() ?>>
<span id="el<?php echo $lawyercontact_delete->RowCnt ?>_lawyercontact_ContactTypeID" class="lawyercontact_ContactTypeID">
<span<?php echo $lawyercontact->ContactTypeID->viewAttributes() ?>>
<?php echo $lawyercontact->ContactTypeID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($lawyercontact->Contact->Visible) { // Contact ?>
		<td<?php echo $lawyercontact->Contact->cellAttributes() ?>>
<span id="el<?php echo $lawyercontact_delete->RowCnt ?>_lawyercontact_Contact" class="lawyercontact_Contact">
<span<?php echo $lawyercontact->Contact->viewAttributes() ?>>
<?php echo $lawyercontact->Contact->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($lawyercontact->Notes->Visible) { // Notes ?>
		<td<?php echo $lawyercontact->Notes->cellAttributes() ?>>
<span id="el<?php echo $lawyercontact_delete->RowCnt ?>_lawyercontact_Notes" class="lawyercontact_Notes">
<span<?php echo $lawyercontact->Notes->viewAttributes() ?>>
<?php echo $lawyercontact->Notes->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($lawyercontact->Primary->Visible) { // Primary ?>
		<td<?php echo $lawyercontact->Primary->cellAttributes() ?>>
<span id="el<?php echo $lawyercontact_delete->RowCnt ?>_lawyercontact_Primary" class="lawyercontact_Primary">
<span<?php echo $lawyercontact->Primary->viewAttributes() ?>>
<?php if (ConvertToBool($lawyercontact->Primary->CurrentValue)) { ?>
<input type="checkbox" value="<?php echo $lawyercontact->Primary->getViewValue() ?>" disabled checked>
<?php } else { ?>
<input type="checkbox" value="<?php echo $lawyercontact->Primary->getViewValue() ?>" disabled>
<?php } ?>
</span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$lawyercontact_delete->Recordset->moveNext();
}
$lawyercontact_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 $lawyercontact_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$lawyercontact_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
$lawyercontact_delete->terminate();
?>
