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

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

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

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

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

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

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

// Dynamic selection lists
fcases2delete.lists["x_ClientID"] = <?php echo $cases2_delete->ClientID->Lookup->toClientList() ?>;
fcases2delete.lists["x_ClientID"].options = <?php echo JsonEncode($cases2_delete->ClientID->lookupOptions()) ?>;
fcases2delete.autoSuggests["x_ClientID"] = <?php echo json_encode(["data" => "ajax=autosuggest"]) ?>;
fcases2delete.lists["x_LitigantID"] = <?php echo $cases2_delete->LitigantID->Lookup->toClientList() ?>;
fcases2delete.lists["x_LitigantID"].options = <?php echo JsonEncode($cases2_delete->LitigantID->lookupOptions()) ?>;
fcases2delete.autoSuggests["x_LitigantID"] = <?php echo json_encode(["data" => "ajax=autosuggest"]) ?>;
fcases2delete.lists["x_CaseTypeID"] = <?php echo $cases2_delete->CaseTypeID->Lookup->toClientList() ?>;
fcases2delete.lists["x_CaseTypeID"].options = <?php echo JsonEncode($cases2_delete->CaseTypeID->lookupOptions()) ?>;
fcases2delete.lists["x_ClientStatusID"] = <?php echo $cases2_delete->ClientStatusID->Lookup->toClientList() ?>;
fcases2delete.lists["x_ClientStatusID"].options = <?php echo JsonEncode($cases2_delete->ClientStatusID->lookupOptions()) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $cases2_delete->showPageHeader(); ?>
<?php
$cases2_delete->showMessage();
?>
<form name="fcases2delete" id="fcases2delete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($cases2_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $cases2_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="cases2">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($cases2_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 ($cases2->ClientID->Visible) { // ClientID ?>
		<th class="<?php echo $cases2->ClientID->headerCellClass() ?>"><span id="elh_cases2_ClientID" class="cases2_ClientID"><?php echo $cases2->ClientID->caption() ?></span></th>
<?php } ?>
<?php if ($cases2->LitigantID->Visible) { // LitigantID ?>
		<th class="<?php echo $cases2->LitigantID->headerCellClass() ?>"><span id="elh_cases2_LitigantID" class="cases2_LitigantID"><?php echo $cases2->LitigantID->caption() ?></span></th>
<?php } ?>
<?php if ($cases2->CaseTypeID->Visible) { // CaseTypeID ?>
		<th class="<?php echo $cases2->CaseTypeID->headerCellClass() ?>"><span id="elh_cases2_CaseTypeID" class="cases2_CaseTypeID"><?php echo $cases2->CaseTypeID->caption() ?></span></th>
<?php } ?>
<?php if ($cases2->CaseNumber->Visible) { // CaseNumber ?>
		<th class="<?php echo $cases2->CaseNumber->headerCellClass() ?>"><span id="elh_cases2_CaseNumber" class="cases2_CaseNumber"><?php echo $cases2->CaseNumber->caption() ?></span></th>
<?php } ?>
<?php if ($cases2->FileNumber->Visible) { // FileNumber ?>
		<th class="<?php echo $cases2->FileNumber->headerCellClass() ?>"><span id="elh_cases2_FileNumber" class="cases2_FileNumber"><?php echo $cases2->FileNumber->caption() ?></span></th>
<?php } ?>
<?php if ($cases2->ClientStatusID->Visible) { // ClientStatusID ?>
		<th class="<?php echo $cases2->ClientStatusID->headerCellClass() ?>"><span id="elh_cases2_ClientStatusID" class="cases2_ClientStatusID"><?php echo $cases2->ClientStatusID->caption() ?></span></th>
<?php } ?>
<?php if ($cases2->Notes->Visible) { // Notes ?>
		<th class="<?php echo $cases2->Notes->headerCellClass() ?>"><span id="elh_cases2_Notes" class="cases2_Notes"><?php echo $cases2->Notes->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$cases2_delete->RecCnt = 0;
$i = 0;
while (!$cases2_delete->Recordset->EOF) {
	$cases2_delete->RecCnt++;
	$cases2_delete->RowCnt++;

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

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

	// Render row
	$cases2_delete->renderRow();
?>
	<tr<?php echo $cases2->rowAttributes() ?>>
<?php if ($cases2->ClientID->Visible) { // ClientID ?>
		<td<?php echo $cases2->ClientID->cellAttributes() ?>>
<span id="el<?php echo $cases2_delete->RowCnt ?>_cases2_ClientID" class="cases2_ClientID">
<span<?php echo $cases2->ClientID->viewAttributes() ?>>
<?php if ((!EmptyString($cases2->ClientID->getViewValue())) && $cases2->ClientID->linkAttributes() <> "") { ?>
<a<?php echo $cases2->ClientID->linkAttributes() ?>><?php echo $cases2->ClientID->getViewValue() ?></a>
<?php } else { ?>
<?php echo $cases2->ClientID->getViewValue() ?>
<?php } ?>
</span>
</span>
</td>
<?php } ?>
<?php if ($cases2->LitigantID->Visible) { // LitigantID ?>
		<td<?php echo $cases2->LitigantID->cellAttributes() ?>>
<span id="el<?php echo $cases2_delete->RowCnt ?>_cases2_LitigantID" class="cases2_LitigantID">
<span<?php echo $cases2->LitigantID->viewAttributes() ?>>
<?php if ((!EmptyString($cases2->LitigantID->getViewValue())) && $cases2->LitigantID->linkAttributes() <> "") { ?>
<a<?php echo $cases2->LitigantID->linkAttributes() ?>><?php echo $cases2->LitigantID->getViewValue() ?></a>
<?php } else { ?>
<?php echo $cases2->LitigantID->getViewValue() ?>
<?php } ?>
</span>
</span>
</td>
<?php } ?>
<?php if ($cases2->CaseTypeID->Visible) { // CaseTypeID ?>
		<td<?php echo $cases2->CaseTypeID->cellAttributes() ?>>
<span id="el<?php echo $cases2_delete->RowCnt ?>_cases2_CaseTypeID" class="cases2_CaseTypeID">
<span<?php echo $cases2->CaseTypeID->viewAttributes() ?>>
<?php echo $cases2->CaseTypeID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($cases2->CaseNumber->Visible) { // CaseNumber ?>
		<td<?php echo $cases2->CaseNumber->cellAttributes() ?>>
<span id="el<?php echo $cases2_delete->RowCnt ?>_cases2_CaseNumber" class="cases2_CaseNumber">
<span<?php echo $cases2->CaseNumber->viewAttributes() ?>>
<?php echo $cases2->CaseNumber->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($cases2->FileNumber->Visible) { // FileNumber ?>
		<td<?php echo $cases2->FileNumber->cellAttributes() ?>>
<span id="el<?php echo $cases2_delete->RowCnt ?>_cases2_FileNumber" class="cases2_FileNumber">
<span<?php echo $cases2->FileNumber->viewAttributes() ?>>
<?php echo $cases2->FileNumber->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($cases2->ClientStatusID->Visible) { // ClientStatusID ?>
		<td<?php echo $cases2->ClientStatusID->cellAttributes() ?>>
<span id="el<?php echo $cases2_delete->RowCnt ?>_cases2_ClientStatusID" class="cases2_ClientStatusID">
<span<?php echo $cases2->ClientStatusID->viewAttributes() ?>>
<?php echo $cases2->ClientStatusID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($cases2->Notes->Visible) { // Notes ?>
		<td<?php echo $cases2->Notes->cellAttributes() ?>>
<span id="el<?php echo $cases2_delete->RowCnt ?>_cases2_Notes" class="cases2_Notes">
<span<?php echo $cases2->Notes->viewAttributes() ?>>
<?php echo $cases2->Notes->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$cases2_delete->Recordset->moveNext();
}
$cases2_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 $cases2_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$cases2_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
$cases2_delete->terminate();
?>
