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

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

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

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

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

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

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

// Dynamic selection lists
flitigantcontactdelete.lists["x_LitigantID"] = <?php echo $litigantcontact_delete->LitigantID->Lookup->toClientList() ?>;
flitigantcontactdelete.lists["x_LitigantID"].options = <?php echo JsonEncode($litigantcontact_delete->LitigantID->lookupOptions()) ?>;
flitigantcontactdelete.lists["x_ContactTypeID"] = <?php echo $litigantcontact_delete->ContactTypeID->Lookup->toClientList() ?>;
flitigantcontactdelete.lists["x_ContactTypeID"].options = <?php echo JsonEncode($litigantcontact_delete->ContactTypeID->lookupOptions()) ?>;
flitigantcontactdelete.lists["x_Primary[]"] = <?php echo $litigantcontact_delete->Primary->Lookup->toClientList() ?>;
flitigantcontactdelete.lists["x_Primary[]"].options = <?php echo JsonEncode($litigantcontact_delete->Primary->options(FALSE, TRUE)) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $litigantcontact_delete->showPageHeader(); ?>
<?php
$litigantcontact_delete->showMessage();
?>
<form name="flitigantcontactdelete" id="flitigantcontactdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($litigantcontact_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $litigantcontact_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="litigantcontact">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($litigantcontact_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 ($litigantcontact->LitigantID->Visible) { // LitigantID ?>
		<th class="<?php echo $litigantcontact->LitigantID->headerCellClass() ?>"><span id="elh_litigantcontact_LitigantID" class="litigantcontact_LitigantID"><?php echo $litigantcontact->LitigantID->caption() ?></span></th>
<?php } ?>
<?php if ($litigantcontact->ContactTypeID->Visible) { // ContactTypeID ?>
		<th class="<?php echo $litigantcontact->ContactTypeID->headerCellClass() ?>"><span id="elh_litigantcontact_ContactTypeID" class="litigantcontact_ContactTypeID"><?php echo $litigantcontact->ContactTypeID->caption() ?></span></th>
<?php } ?>
<?php if ($litigantcontact->Contact->Visible) { // Contact ?>
		<th class="<?php echo $litigantcontact->Contact->headerCellClass() ?>"><span id="elh_litigantcontact_Contact" class="litigantcontact_Contact"><?php echo $litigantcontact->Contact->caption() ?></span></th>
<?php } ?>
<?php if ($litigantcontact->Notes->Visible) { // Notes ?>
		<th class="<?php echo $litigantcontact->Notes->headerCellClass() ?>"><span id="elh_litigantcontact_Notes" class="litigantcontact_Notes"><?php echo $litigantcontact->Notes->caption() ?></span></th>
<?php } ?>
<?php if ($litigantcontact->Primary->Visible) { // Primary ?>
		<th class="<?php echo $litigantcontact->Primary->headerCellClass() ?>"><span id="elh_litigantcontact_Primary" class="litigantcontact_Primary"><?php echo $litigantcontact->Primary->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$litigantcontact_delete->RecCnt = 0;
$i = 0;
while (!$litigantcontact_delete->Recordset->EOF) {
	$litigantcontact_delete->RecCnt++;
	$litigantcontact_delete->RowCnt++;

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

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

	// Render row
	$litigantcontact_delete->renderRow();
?>
	<tr<?php echo $litigantcontact->rowAttributes() ?>>
<?php if ($litigantcontact->LitigantID->Visible) { // LitigantID ?>
		<td<?php echo $litigantcontact->LitigantID->cellAttributes() ?>>
<span id="el<?php echo $litigantcontact_delete->RowCnt ?>_litigantcontact_LitigantID" class="litigantcontact_LitigantID">
<span<?php echo $litigantcontact->LitigantID->viewAttributes() ?>>
<?php echo $litigantcontact->LitigantID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($litigantcontact->ContactTypeID->Visible) { // ContactTypeID ?>
		<td<?php echo $litigantcontact->ContactTypeID->cellAttributes() ?>>
<span id="el<?php echo $litigantcontact_delete->RowCnt ?>_litigantcontact_ContactTypeID" class="litigantcontact_ContactTypeID">
<span<?php echo $litigantcontact->ContactTypeID->viewAttributes() ?>>
<?php echo $litigantcontact->ContactTypeID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($litigantcontact->Contact->Visible) { // Contact ?>
		<td<?php echo $litigantcontact->Contact->cellAttributes() ?>>
<span id="el<?php echo $litigantcontact_delete->RowCnt ?>_litigantcontact_Contact" class="litigantcontact_Contact">
<span<?php echo $litigantcontact->Contact->viewAttributes() ?>>
<?php echo $litigantcontact->Contact->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($litigantcontact->Notes->Visible) { // Notes ?>
		<td<?php echo $litigantcontact->Notes->cellAttributes() ?>>
<span id="el<?php echo $litigantcontact_delete->RowCnt ?>_litigantcontact_Notes" class="litigantcontact_Notes">
<span<?php echo $litigantcontact->Notes->viewAttributes() ?>>
<?php echo $litigantcontact->Notes->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($litigantcontact->Primary->Visible) { // Primary ?>
		<td<?php echo $litigantcontact->Primary->cellAttributes() ?>>
<span id="el<?php echo $litigantcontact_delete->RowCnt ?>_litigantcontact_Primary" class="litigantcontact_Primary">
<span<?php echo $litigantcontact->Primary->viewAttributes() ?>>
<?php if (ConvertToBool($litigantcontact->Primary->CurrentValue)) { ?>
<input type="checkbox" value="<?php echo $litigantcontact->Primary->getViewValue() ?>" disabled checked>
<?php } else { ?>
<input type="checkbox" value="<?php echo $litigantcontact->Primary->getViewValue() ?>" disabled>
<?php } ?>
</span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$litigantcontact_delete->Recordset->moveNext();
}
$litigantcontact_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 $litigantcontact_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$litigantcontact_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
$litigantcontact_delete->terminate();
?>
