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

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

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

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

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

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

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

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

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

// Write your client script here, no need to add script tags.
</script>
<?php $cases_delete->showPageHeader(); ?>
<?php
$cases_delete->showMessage();
?>
<form name="fcasesdelete" id="fcasesdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($cases_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $cases_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="cases">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($cases_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 ($cases->ClientID->Visible) { // ClientID ?>
		<th class="<?php echo $cases->ClientID->headerCellClass() ?>"><span id="elh_cases_ClientID" class="cases_ClientID"><?php echo $cases->ClientID->caption() ?></span></th>
<?php } ?>
<?php if ($cases->LitigantID->Visible) { // LitigantID ?>
		<th class="<?php echo $cases->LitigantID->headerCellClass() ?>"><span id="elh_cases_LitigantID" class="cases_LitigantID"><?php echo $cases->LitigantID->caption() ?></span></th>
<?php } ?>
<?php if ($cases->CaseTypeID->Visible) { // CaseTypeID ?>
		<th class="<?php echo $cases->CaseTypeID->headerCellClass() ?>"><span id="elh_cases_CaseTypeID" class="cases_CaseTypeID"><?php echo $cases->CaseTypeID->caption() ?></span></th>
<?php } ?>
<?php if ($cases->CourtID->Visible) { // CourtID ?>
		<th class="<?php echo $cases->CourtID->headerCellClass() ?>"><span id="elh_cases_CourtID" class="cases_CourtID"><?php echo $cases->CourtID->caption() ?></span></th>
<?php } ?>
<?php if ($cases->CaseNumber->Visible) { // CaseNumber ?>
		<th class="<?php echo $cases->CaseNumber->headerCellClass() ?>"><span id="elh_cases_CaseNumber" class="cases_CaseNumber"><?php echo $cases->CaseNumber->caption() ?></span></th>
<?php } ?>
<?php if ($cases->FileNumber->Visible) { // FileNumber ?>
		<th class="<?php echo $cases->FileNumber->headerCellClass() ?>"><span id="elh_cases_FileNumber" class="cases_FileNumber"><?php echo $cases->FileNumber->caption() ?></span></th>
<?php } ?>
<?php if ($cases->ClientStatusID->Visible) { // ClientStatusID ?>
		<th class="<?php echo $cases->ClientStatusID->headerCellClass() ?>"><span id="elh_cases_ClientStatusID" class="cases_ClientStatusID"><?php echo $cases->ClientStatusID->caption() ?></span></th>
<?php } ?>
<?php if ($cases->LitigantStatusID->Visible) { // LitigantStatusID ?>
		<th class="<?php echo $cases->LitigantStatusID->headerCellClass() ?>"><span id="elh_cases_LitigantStatusID" class="cases_LitigantStatusID"><?php echo $cases->LitigantStatusID->caption() ?></span></th>
<?php } ?>
<?php if ($cases->Notes->Visible) { // Notes ?>
		<th class="<?php echo $cases->Notes->headerCellClass() ?>"><span id="elh_cases_Notes" class="cases_Notes"><?php echo $cases->Notes->caption() ?></span></th>
<?php } ?>
<?php if ($cases->ParentCaseID->Visible) { // ParentCaseID ?>
		<th class="<?php echo $cases->ParentCaseID->headerCellClass() ?>"><span id="elh_cases_ParentCaseID" class="cases_ParentCaseID"><?php echo $cases->ParentCaseID->caption() ?></span></th>
<?php } ?>
<?php if ($cases->FileNumber2->Visible) { // FileNumber2 ?>
		<th class="<?php echo $cases->FileNumber2->headerCellClass() ?>"><span id="elh_cases_FileNumber2" class="cases_FileNumber2"><?php echo $cases->FileNumber2->caption() ?></span></th>
<?php } ?>
<?php if ($cases->ClientNameConvFiles->Visible) { // ClientNameConvFiles ?>
		<th class="<?php echo $cases->ClientNameConvFiles->headerCellClass() ?>"><span id="elh_cases_ClientNameConvFiles" class="cases_ClientNameConvFiles"><?php echo $cases->ClientNameConvFiles->caption() ?></span></th>
<?php } ?>
<?php if ($cases->LitigantNameConvFiles->Visible) { // LitigantNameConvFiles ?>
		<th class="<?php echo $cases->LitigantNameConvFiles->headerCellClass() ?>"><span id="elh_cases_LitigantNameConvFiles" class="cases_LitigantNameConvFiles"><?php echo $cases->LitigantNameConvFiles->caption() ?></span></th>
<?php } ?>
<?php if ($cases->CaseTypeConvFiles->Visible) { // CaseTypeConvFiles ?>
		<th class="<?php echo $cases->CaseTypeConvFiles->headerCellClass() ?>"><span id="elh_cases_CaseTypeConvFiles" class="cases_CaseTypeConvFiles"><?php echo $cases->CaseTypeConvFiles->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$cases_delete->RecCnt = 0;
$i = 0;
while (!$cases_delete->Recordset->EOF) {
	$cases_delete->RecCnt++;
	$cases_delete->RowCnt++;

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

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

	// Render row
	$cases_delete->renderRow();
?>
	<tr<?php echo $cases->rowAttributes() ?>>
<?php if ($cases->ClientID->Visible) { // ClientID ?>
		<td<?php echo $cases->ClientID->cellAttributes() ?>>
<span id="el<?php echo $cases_delete->RowCnt ?>_cases_ClientID" class="cases_ClientID">
<span<?php echo $cases->ClientID->viewAttributes() ?>>
<?php if ((!EmptyString($cases->ClientID->getViewValue())) && $cases->ClientID->linkAttributes() <> "") { ?>
<a<?php echo $cases->ClientID->linkAttributes() ?>><?php echo $cases->ClientID->getViewValue() ?></a>
<?php } else { ?>
<?php echo $cases->ClientID->getViewValue() ?>
<?php } ?>
</span>
</span>
</td>
<?php } ?>
<?php if ($cases->LitigantID->Visible) { // LitigantID ?>
		<td<?php echo $cases->LitigantID->cellAttributes() ?>>
<span id="el<?php echo $cases_delete->RowCnt ?>_cases_LitigantID" class="cases_LitigantID">
<span<?php echo $cases->LitigantID->viewAttributes() ?>>
<?php if ((!EmptyString($cases->LitigantID->getViewValue())) && $cases->LitigantID->linkAttributes() <> "") { ?>
<a<?php echo $cases->LitigantID->linkAttributes() ?>><?php echo $cases->LitigantID->getViewValue() ?></a>
<?php } else { ?>
<?php echo $cases->LitigantID->getViewValue() ?>
<?php } ?>
</span>
</span>
</td>
<?php } ?>
<?php if ($cases->CaseTypeID->Visible) { // CaseTypeID ?>
		<td<?php echo $cases->CaseTypeID->cellAttributes() ?>>
<span id="el<?php echo $cases_delete->RowCnt ?>_cases_CaseTypeID" class="cases_CaseTypeID">
<span<?php echo $cases->CaseTypeID->viewAttributes() ?>>
<?php echo $cases->CaseTypeID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($cases->CourtID->Visible) { // CourtID ?>
		<td<?php echo $cases->CourtID->cellAttributes() ?>>
<span id="el<?php echo $cases_delete->RowCnt ?>_cases_CourtID" class="cases_CourtID">
<span<?php echo $cases->CourtID->viewAttributes() ?>>
<?php if ((!EmptyString($cases->CourtID->getViewValue())) && $cases->CourtID->linkAttributes() <> "") { ?>
<a<?php echo $cases->CourtID->linkAttributes() ?>><?php echo $cases->CourtID->getViewValue() ?></a>
<?php } else { ?>
<?php echo $cases->CourtID->getViewValue() ?>
<?php } ?>
</span>
</span>
</td>
<?php } ?>
<?php if ($cases->CaseNumber->Visible) { // CaseNumber ?>
		<td<?php echo $cases->CaseNumber->cellAttributes() ?>>
<span id="el<?php echo $cases_delete->RowCnt ?>_cases_CaseNumber" class="cases_CaseNumber">
<span<?php echo $cases->CaseNumber->viewAttributes() ?>>
<?php echo $cases->CaseNumber->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($cases->FileNumber->Visible) { // FileNumber ?>
		<td<?php echo $cases->FileNumber->cellAttributes() ?>>
<span id="el<?php echo $cases_delete->RowCnt ?>_cases_FileNumber" class="cases_FileNumber">
<span<?php echo $cases->FileNumber->viewAttributes() ?>>
<?php echo $cases->FileNumber->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($cases->ClientStatusID->Visible) { // ClientStatusID ?>
		<td<?php echo $cases->ClientStatusID->cellAttributes() ?>>
<span id="el<?php echo $cases_delete->RowCnt ?>_cases_ClientStatusID" class="cases_ClientStatusID">
<span<?php echo $cases->ClientStatusID->viewAttributes() ?>>
<?php echo $cases->ClientStatusID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($cases->LitigantStatusID->Visible) { // LitigantStatusID ?>
		<td<?php echo $cases->LitigantStatusID->cellAttributes() ?>>
<span id="el<?php echo $cases_delete->RowCnt ?>_cases_LitigantStatusID" class="cases_LitigantStatusID">
<span<?php echo $cases->LitigantStatusID->viewAttributes() ?>>
<?php echo $cases->LitigantStatusID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($cases->Notes->Visible) { // Notes ?>
		<td<?php echo $cases->Notes->cellAttributes() ?>>
<span id="el<?php echo $cases_delete->RowCnt ?>_cases_Notes" class="cases_Notes">
<span<?php echo $cases->Notes->viewAttributes() ?>>
<?php echo $cases->Notes->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($cases->ParentCaseID->Visible) { // ParentCaseID ?>
		<td<?php echo $cases->ParentCaseID->cellAttributes() ?>>
<span id="el<?php echo $cases_delete->RowCnt ?>_cases_ParentCaseID" class="cases_ParentCaseID">
<span<?php echo $cases->ParentCaseID->viewAttributes() ?>>
<?php echo $cases->ParentCaseID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($cases->FileNumber2->Visible) { // FileNumber2 ?>
		<td<?php echo $cases->FileNumber2->cellAttributes() ?>>
<span id="el<?php echo $cases_delete->RowCnt ?>_cases_FileNumber2" class="cases_FileNumber2">
<span<?php echo $cases->FileNumber2->viewAttributes() ?>>
<?php echo $cases->FileNumber2->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($cases->ClientNameConvFiles->Visible) { // ClientNameConvFiles ?>
		<td<?php echo $cases->ClientNameConvFiles->cellAttributes() ?>>
<span id="el<?php echo $cases_delete->RowCnt ?>_cases_ClientNameConvFiles" class="cases_ClientNameConvFiles">
<span<?php echo $cases->ClientNameConvFiles->viewAttributes() ?>>
<?php echo $cases->ClientNameConvFiles->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($cases->LitigantNameConvFiles->Visible) { // LitigantNameConvFiles ?>
		<td<?php echo $cases->LitigantNameConvFiles->cellAttributes() ?>>
<span id="el<?php echo $cases_delete->RowCnt ?>_cases_LitigantNameConvFiles" class="cases_LitigantNameConvFiles">
<span<?php echo $cases->LitigantNameConvFiles->viewAttributes() ?>>
<?php echo $cases->LitigantNameConvFiles->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($cases->CaseTypeConvFiles->Visible) { // CaseTypeConvFiles ?>
		<td<?php echo $cases->CaseTypeConvFiles->cellAttributes() ?>>
<span id="el<?php echo $cases_delete->RowCnt ?>_cases_CaseTypeConvFiles" class="cases_CaseTypeConvFiles">
<span<?php echo $cases->CaseTypeConvFiles->viewAttributes() ?>>
<?php echo $cases->CaseTypeConvFiles->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$cases_delete->Recordset->moveNext();
}
$cases_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 $cases_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$cases_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
$cases_delete->terminate();
?>
