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

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

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

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

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

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

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

// Dynamic selection lists
fjudgecontactdelete.lists["x_JudgeID"] = <?php echo $judgecontact_delete->JudgeID->Lookup->toClientList() ?>;
fjudgecontactdelete.lists["x_JudgeID"].options = <?php echo JsonEncode($judgecontact_delete->JudgeID->lookupOptions()) ?>;
fjudgecontactdelete.lists["x_ContactTypeID"] = <?php echo $judgecontact_delete->ContactTypeID->Lookup->toClientList() ?>;
fjudgecontactdelete.lists["x_ContactTypeID"].options = <?php echo JsonEncode($judgecontact_delete->ContactTypeID->lookupOptions()) ?>;
fjudgecontactdelete.lists["x_Primary[]"] = <?php echo $judgecontact_delete->Primary->Lookup->toClientList() ?>;
fjudgecontactdelete.lists["x_Primary[]"].options = <?php echo JsonEncode($judgecontact_delete->Primary->options(FALSE, TRUE)) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $judgecontact_delete->showPageHeader(); ?>
<?php
$judgecontact_delete->showMessage();
?>
<form name="fjudgecontactdelete" id="fjudgecontactdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($judgecontact_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $judgecontact_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="judgecontact">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($judgecontact_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 ($judgecontact->JudgeID->Visible) { // JudgeID ?>
		<th class="<?php echo $judgecontact->JudgeID->headerCellClass() ?>"><span id="elh_judgecontact_JudgeID" class="judgecontact_JudgeID"><?php echo $judgecontact->JudgeID->caption() ?></span></th>
<?php } ?>
<?php if ($judgecontact->ContactTypeID->Visible) { // ContactTypeID ?>
		<th class="<?php echo $judgecontact->ContactTypeID->headerCellClass() ?>"><span id="elh_judgecontact_ContactTypeID" class="judgecontact_ContactTypeID"><?php echo $judgecontact->ContactTypeID->caption() ?></span></th>
<?php } ?>
<?php if ($judgecontact->Contact->Visible) { // Contact ?>
		<th class="<?php echo $judgecontact->Contact->headerCellClass() ?>"><span id="elh_judgecontact_Contact" class="judgecontact_Contact"><?php echo $judgecontact->Contact->caption() ?></span></th>
<?php } ?>
<?php if ($judgecontact->Notes->Visible) { // Notes ?>
		<th class="<?php echo $judgecontact->Notes->headerCellClass() ?>"><span id="elh_judgecontact_Notes" class="judgecontact_Notes"><?php echo $judgecontact->Notes->caption() ?></span></th>
<?php } ?>
<?php if ($judgecontact->Primary->Visible) { // Primary ?>
		<th class="<?php echo $judgecontact->Primary->headerCellClass() ?>"><span id="elh_judgecontact_Primary" class="judgecontact_Primary"><?php echo $judgecontact->Primary->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$judgecontact_delete->RecCnt = 0;
$i = 0;
while (!$judgecontact_delete->Recordset->EOF) {
	$judgecontact_delete->RecCnt++;
	$judgecontact_delete->RowCnt++;

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

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

	// Render row
	$judgecontact_delete->renderRow();
?>
	<tr<?php echo $judgecontact->rowAttributes() ?>>
<?php if ($judgecontact->JudgeID->Visible) { // JudgeID ?>
		<td<?php echo $judgecontact->JudgeID->cellAttributes() ?>>
<span id="el<?php echo $judgecontact_delete->RowCnt ?>_judgecontact_JudgeID" class="judgecontact_JudgeID">
<span<?php echo $judgecontact->JudgeID->viewAttributes() ?>>
<?php echo $judgecontact->JudgeID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($judgecontact->ContactTypeID->Visible) { // ContactTypeID ?>
		<td<?php echo $judgecontact->ContactTypeID->cellAttributes() ?>>
<span id="el<?php echo $judgecontact_delete->RowCnt ?>_judgecontact_ContactTypeID" class="judgecontact_ContactTypeID">
<span<?php echo $judgecontact->ContactTypeID->viewAttributes() ?>>
<?php echo $judgecontact->ContactTypeID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($judgecontact->Contact->Visible) { // Contact ?>
		<td<?php echo $judgecontact->Contact->cellAttributes() ?>>
<span id="el<?php echo $judgecontact_delete->RowCnt ?>_judgecontact_Contact" class="judgecontact_Contact">
<span<?php echo $judgecontact->Contact->viewAttributes() ?>>
<?php echo $judgecontact->Contact->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($judgecontact->Notes->Visible) { // Notes ?>
		<td<?php echo $judgecontact->Notes->cellAttributes() ?>>
<span id="el<?php echo $judgecontact_delete->RowCnt ?>_judgecontact_Notes" class="judgecontact_Notes">
<span<?php echo $judgecontact->Notes->viewAttributes() ?>>
<?php echo $judgecontact->Notes->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($judgecontact->Primary->Visible) { // Primary ?>
		<td<?php echo $judgecontact->Primary->cellAttributes() ?>>
<span id="el<?php echo $judgecontact_delete->RowCnt ?>_judgecontact_Primary" class="judgecontact_Primary">
<span<?php echo $judgecontact->Primary->viewAttributes() ?>>
<?php if (ConvertToBool($judgecontact->Primary->CurrentValue)) { ?>
<input type="checkbox" value="<?php echo $judgecontact->Primary->getViewValue() ?>" disabled checked>
<?php } else { ?>
<input type="checkbox" value="<?php echo $judgecontact->Primary->getViewValue() ?>" disabled>
<?php } ?>
</span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$judgecontact_delete->Recordset->moveNext();
}
$judgecontact_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 $judgecontact_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$judgecontact_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
$judgecontact_delete->terminate();
?>
