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

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

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

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

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

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

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

// Dynamic selection lists
fhearingsdelete.lists["x_CaseID"] = <?php echo $hearings_delete->CaseID->Lookup->toClientList() ?>;
fhearingsdelete.lists["x_CaseID"].options = <?php echo JsonEncode($hearings_delete->CaseID->lookupOptions()) ?>;
fhearingsdelete.autoSuggests["x_CaseID"] = <?php echo json_encode(["data" => "ajax=autosuggest"]) ?>;
fhearingsdelete.lists["x_LawyerID"] = <?php echo $hearings_delete->LawyerID->Lookup->toClientList() ?>;
fhearingsdelete.lists["x_LawyerID"].options = <?php echo JsonEncode($hearings_delete->LawyerID->lookupOptions()) ?>;
fhearingsdelete.lists["x_JudgeID"] = <?php echo $hearings_delete->JudgeID->Lookup->toClientList() ?>;
fhearingsdelete.lists["x_JudgeID"].options = <?php echo JsonEncode($hearings_delete->JudgeID->lookupOptions()) ?>;
fhearingsdelete.lists["x_CourtID"] = <?php echo $hearings_delete->CourtID->Lookup->toClientList() ?>;
fhearingsdelete.lists["x_CourtID"].options = <?php echo JsonEncode($hearings_delete->CourtID->lookupOptions()) ?>;
fhearingsdelete.autoSuggests["x_CourtID"] = <?php echo json_encode(["data" => "ajax=autosuggest"]) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $hearings_delete->showPageHeader(); ?>
<?php
$hearings_delete->showMessage();
?>
<form name="fhearingsdelete" id="fhearingsdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($hearings_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $hearings_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="hearings">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($hearings_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 ($hearings->CaseID->Visible) { // CaseID ?>
		<th class="<?php echo $hearings->CaseID->headerCellClass() ?>"><span id="elh_hearings_CaseID" class="hearings_CaseID"><?php echo $hearings->CaseID->caption() ?></span></th>
<?php } ?>
<?php if ($hearings->HearingDate->Visible) { // HearingDate ?>
		<th class="<?php echo $hearings->HearingDate->headerCellClass() ?>"><span id="elh_hearings_HearingDate" class="hearings_HearingDate"><?php echo $hearings->HearingDate->caption() ?></span></th>
<?php } ?>
<?php if ($hearings->HearingTime->Visible) { // HearingTime ?>
		<th class="<?php echo $hearings->HearingTime->headerCellClass() ?>"><span id="elh_hearings_HearingTime" class="hearings_HearingTime"><?php echo $hearings->HearingTime->caption() ?></span></th>
<?php } ?>
<?php if ($hearings->NextHearingDate->Visible) { // NextHearingDate ?>
		<th class="<?php echo $hearings->NextHearingDate->headerCellClass() ?>"><span id="elh_hearings_NextHearingDate" class="hearings_NextHearingDate"><?php echo $hearings->NextHearingDate->caption() ?></span></th>
<?php } ?>
<?php if ($hearings->NextHearingTime->Visible) { // NextHearingTime ?>
		<th class="<?php echo $hearings->NextHearingTime->headerCellClass() ?>"><span id="elh_hearings_NextHearingTime" class="hearings_NextHearingTime"><?php echo $hearings->NextHearingTime->caption() ?></span></th>
<?php } ?>
<?php if ($hearings->Hearing->Visible) { // Hearing ?>
		<th class="<?php echo $hearings->Hearing->headerCellClass() ?>"><span id="elh_hearings_Hearing" class="hearings_Hearing"><?php echo $hearings->Hearing->caption() ?></span></th>
<?php } ?>
<?php if ($hearings->Notes->Visible) { // Notes ?>
		<th class="<?php echo $hearings->Notes->headerCellClass() ?>"><span id="elh_hearings_Notes" class="hearings_Notes"><?php echo $hearings->Notes->caption() ?></span></th>
<?php } ?>
<?php if ($hearings->LawyerID->Visible) { // LawyerID ?>
		<th class="<?php echo $hearings->LawyerID->headerCellClass() ?>"><span id="elh_hearings_LawyerID" class="hearings_LawyerID"><?php echo $hearings->LawyerID->caption() ?></span></th>
<?php } ?>
<?php if ($hearings->JudgeID->Visible) { // JudgeID ?>
		<th class="<?php echo $hearings->JudgeID->headerCellClass() ?>"><span id="elh_hearings_JudgeID" class="hearings_JudgeID"><?php echo $hearings->JudgeID->caption() ?></span></th>
<?php } ?>
<?php if ($hearings->CaseNumber->Visible) { // CaseNumber ?>
		<th class="<?php echo $hearings->CaseNumber->headerCellClass() ?>"><span id="elh_hearings_CaseNumber" class="hearings_CaseNumber"><?php echo $hearings->CaseNumber->caption() ?></span></th>
<?php } ?>
<?php if ($hearings->CourtID->Visible) { // CourtID ?>
		<th class="<?php echo $hearings->CourtID->headerCellClass() ?>"><span id="elh_hearings_CourtID" class="hearings_CourtID"><?php echo $hearings->CourtID->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$hearings_delete->RecCnt = 0;
$i = 0;
while (!$hearings_delete->Recordset->EOF) {
	$hearings_delete->RecCnt++;
	$hearings_delete->RowCnt++;

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

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

	// Render row
	$hearings_delete->renderRow();
?>
	<tr<?php echo $hearings->rowAttributes() ?>>
<?php if ($hearings->CaseID->Visible) { // CaseID ?>
		<td<?php echo $hearings->CaseID->cellAttributes() ?>>
<span id="el<?php echo $hearings_delete->RowCnt ?>_hearings_CaseID" class="hearings_CaseID">
<span<?php echo $hearings->CaseID->viewAttributes() ?>>
<?php echo $hearings->CaseID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($hearings->HearingDate->Visible) { // HearingDate ?>
		<td<?php echo $hearings->HearingDate->cellAttributes() ?>>
<span id="el<?php echo $hearings_delete->RowCnt ?>_hearings_HearingDate" class="hearings_HearingDate">
<span<?php echo $hearings->HearingDate->viewAttributes() ?>>
<?php echo $hearings->HearingDate->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($hearings->HearingTime->Visible) { // HearingTime ?>
		<td<?php echo $hearings->HearingTime->cellAttributes() ?>>
<span id="el<?php echo $hearings_delete->RowCnt ?>_hearings_HearingTime" class="hearings_HearingTime">
<span<?php echo $hearings->HearingTime->viewAttributes() ?>>
<?php echo $hearings->HearingTime->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($hearings->NextHearingDate->Visible) { // NextHearingDate ?>
		<td<?php echo $hearings->NextHearingDate->cellAttributes() ?>>
<span id="el<?php echo $hearings_delete->RowCnt ?>_hearings_NextHearingDate" class="hearings_NextHearingDate">
<span<?php echo $hearings->NextHearingDate->viewAttributes() ?>>
<?php echo $hearings->NextHearingDate->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($hearings->NextHearingTime->Visible) { // NextHearingTime ?>
		<td<?php echo $hearings->NextHearingTime->cellAttributes() ?>>
<span id="el<?php echo $hearings_delete->RowCnt ?>_hearings_NextHearingTime" class="hearings_NextHearingTime">
<span<?php echo $hearings->NextHearingTime->viewAttributes() ?>>
<?php echo $hearings->NextHearingTime->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($hearings->Hearing->Visible) { // Hearing ?>
		<td<?php echo $hearings->Hearing->cellAttributes() ?>>
<span id="el<?php echo $hearings_delete->RowCnt ?>_hearings_Hearing" class="hearings_Hearing">
<span<?php echo $hearings->Hearing->viewAttributes() ?>>
<?php echo $hearings->Hearing->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($hearings->Notes->Visible) { // Notes ?>
		<td<?php echo $hearings->Notes->cellAttributes() ?>>
<span id="el<?php echo $hearings_delete->RowCnt ?>_hearings_Notes" class="hearings_Notes">
<span<?php echo $hearings->Notes->viewAttributes() ?>>
<?php echo $hearings->Notes->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($hearings->LawyerID->Visible) { // LawyerID ?>
		<td<?php echo $hearings->LawyerID->cellAttributes() ?>>
<span id="el<?php echo $hearings_delete->RowCnt ?>_hearings_LawyerID" class="hearings_LawyerID">
<span<?php echo $hearings->LawyerID->viewAttributes() ?>>
<?php echo $hearings->LawyerID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($hearings->JudgeID->Visible) { // JudgeID ?>
		<td<?php echo $hearings->JudgeID->cellAttributes() ?>>
<span id="el<?php echo $hearings_delete->RowCnt ?>_hearings_JudgeID" class="hearings_JudgeID">
<span<?php echo $hearings->JudgeID->viewAttributes() ?>>
<?php echo $hearings->JudgeID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($hearings->CaseNumber->Visible) { // CaseNumber ?>
		<td<?php echo $hearings->CaseNumber->cellAttributes() ?>>
<span id="el<?php echo $hearings_delete->RowCnt ?>_hearings_CaseNumber" class="hearings_CaseNumber">
<span<?php echo $hearings->CaseNumber->viewAttributes() ?>>
<?php echo $hearings->CaseNumber->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($hearings->CourtID->Visible) { // CourtID ?>
		<td<?php echo $hearings->CourtID->cellAttributes() ?>>
<span id="el<?php echo $hearings_delete->RowCnt ?>_hearings_CourtID" class="hearings_CourtID">
<span<?php echo $hearings->CourtID->viewAttributes() ?>>
<?php echo $hearings->CourtID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$hearings_delete->Recordset->moveNext();
}
$hearings_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 $hearings_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$hearings_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
$hearings_delete->terminate();
?>
