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

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

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

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

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

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

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

// Dynamic selection lists
// Form object for search

</script>
<script>

// Write your client script here, no need to add script tags.
</script>
<?php $agenda_delete->showPageHeader(); ?>
<?php
$agenda_delete->showMessage();
?>
<form name="fagendadelete" id="fagendadelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($agenda_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $agenda_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="agenda">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($agenda_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 ($agenda->CaseNumber->Visible) { // CaseNumber ?>
		<th class="<?php echo $agenda->CaseNumber->headerCellClass() ?>"><span id="elh_agenda_CaseNumber" class="agenda_CaseNumber"><?php echo $agenda->CaseNumber->caption() ?></span></th>
<?php } ?>
<?php if ($agenda->FileNumber->Visible) { // FileNumber ?>
		<th class="<?php echo $agenda->FileNumber->headerCellClass() ?>"><span id="elh_agenda_FileNumber" class="agenda_FileNumber"><?php echo $agenda->FileNumber->caption() ?></span></th>
<?php } ?>
<?php if ($agenda->EnvelopeNumber->Visible) { // EnvelopeNumber ?>
		<th class="<?php echo $agenda->EnvelopeNumber->headerCellClass() ?>"><span id="elh_agenda_EnvelopeNumber" class="agenda_EnvelopeNumber"><?php echo $agenda->EnvelopeNumber->caption() ?></span></th>
<?php } ?>
<?php if ($agenda->FileLocation->Visible) { // FileLocation ?>
		<th class="<?php echo $agenda->FileLocation->headerCellClass() ?>"><span id="elh_agenda_FileLocation" class="agenda_FileLocation"><?php echo $agenda->FileLocation->caption() ?></span></th>
<?php } ?>
<?php if ($agenda->_Case->Visible) { // Case ?>
		<th class="<?php echo $agenda->_Case->headerCellClass() ?>"><span id="elh_agenda__Case" class="agenda__Case"><?php echo $agenda->_Case->caption() ?></span></th>
<?php } ?>
<?php if ($agenda->CaseEn->Visible) { // CaseEn ?>
		<th class="<?php echo $agenda->CaseEn->headerCellClass() ?>"><span id="elh_agenda_CaseEn" class="agenda_CaseEn"><?php echo $agenda->CaseEn->caption() ?></span></th>
<?php } ?>
<?php if ($agenda->CaseType->Visible) { // CaseType ?>
		<th class="<?php echo $agenda->CaseType->headerCellClass() ?>"><span id="elh_agenda_CaseType" class="agenda_CaseType"><?php echo $agenda->CaseType->caption() ?></span></th>
<?php } ?>
<?php if ($agenda->ClientName->Visible) { // ClientName ?>
		<th class="<?php echo $agenda->ClientName->headerCellClass() ?>"><span id="elh_agenda_ClientName" class="agenda_ClientName"><?php echo $agenda->ClientName->caption() ?></span></th>
<?php } ?>
<?php if ($agenda->LitigantName->Visible) { // LitigantName ?>
		<th class="<?php echo $agenda->LitigantName->headerCellClass() ?>"><span id="elh_agenda_LitigantName" class="agenda_LitigantName"><?php echo $agenda->LitigantName->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$agenda_delete->RecCnt = 0;
$i = 0;
while (!$agenda_delete->Recordset->EOF) {
	$agenda_delete->RecCnt++;
	$agenda_delete->RowCnt++;

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

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

	// Render row
	$agenda_delete->renderRow();
?>
	<tr<?php echo $agenda->rowAttributes() ?>>
<?php if ($agenda->CaseNumber->Visible) { // CaseNumber ?>
		<td<?php echo $agenda->CaseNumber->cellAttributes() ?>>
<span id="el<?php echo $agenda_delete->RowCnt ?>_agenda_CaseNumber" class="agenda_CaseNumber">
<span<?php echo $agenda->CaseNumber->viewAttributes() ?>>
<?php echo $agenda->CaseNumber->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($agenda->FileNumber->Visible) { // FileNumber ?>
		<td<?php echo $agenda->FileNumber->cellAttributes() ?>>
<span id="el<?php echo $agenda_delete->RowCnt ?>_agenda_FileNumber" class="agenda_FileNumber">
<span<?php echo $agenda->FileNumber->viewAttributes() ?>>
<?php echo $agenda->FileNumber->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($agenda->EnvelopeNumber->Visible) { // EnvelopeNumber ?>
		<td<?php echo $agenda->EnvelopeNumber->cellAttributes() ?>>
<span id="el<?php echo $agenda_delete->RowCnt ?>_agenda_EnvelopeNumber" class="agenda_EnvelopeNumber">
<span<?php echo $agenda->EnvelopeNumber->viewAttributes() ?>>
<?php echo $agenda->EnvelopeNumber->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($agenda->FileLocation->Visible) { // FileLocation ?>
		<td<?php echo $agenda->FileLocation->cellAttributes() ?>>
<span id="el<?php echo $agenda_delete->RowCnt ?>_agenda_FileLocation" class="agenda_FileLocation">
<span<?php echo $agenda->FileLocation->viewAttributes() ?>>
<?php echo $agenda->FileLocation->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($agenda->_Case->Visible) { // Case ?>
		<td<?php echo $agenda->_Case->cellAttributes() ?>>
<span id="el<?php echo $agenda_delete->RowCnt ?>_agenda__Case" class="agenda__Case">
<span<?php echo $agenda->_Case->viewAttributes() ?>>
<?php echo $agenda->_Case->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($agenda->CaseEn->Visible) { // CaseEn ?>
		<td<?php echo $agenda->CaseEn->cellAttributes() ?>>
<span id="el<?php echo $agenda_delete->RowCnt ?>_agenda_CaseEn" class="agenda_CaseEn">
<span<?php echo $agenda->CaseEn->viewAttributes() ?>>
<?php echo $agenda->CaseEn->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($agenda->CaseType->Visible) { // CaseType ?>
		<td<?php echo $agenda->CaseType->cellAttributes() ?>>
<span id="el<?php echo $agenda_delete->RowCnt ?>_agenda_CaseType" class="agenda_CaseType">
<span<?php echo $agenda->CaseType->viewAttributes() ?>>
<?php echo $agenda->CaseType->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($agenda->ClientName->Visible) { // ClientName ?>
		<td<?php echo $agenda->ClientName->cellAttributes() ?>>
<span id="el<?php echo $agenda_delete->RowCnt ?>_agenda_ClientName" class="agenda_ClientName">
<span<?php echo $agenda->ClientName->viewAttributes() ?>>
<?php echo $agenda->ClientName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($agenda->LitigantName->Visible) { // LitigantName ?>
		<td<?php echo $agenda->LitigantName->cellAttributes() ?>>
<span id="el<?php echo $agenda_delete->RowCnt ?>_agenda_LitigantName" class="agenda_LitigantName">
<span<?php echo $agenda->LitigantName->viewAttributes() ?>>
<?php echo $agenda->LitigantName->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$agenda_delete->Recordset->moveNext();
}
$agenda_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 $agenda_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$agenda_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
$agenda_delete->terminate();
?>
