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

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

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

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

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

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

// Form_CustomValidate event
freferredbydelete.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
freferredbydelete.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 $referredby_delete->showPageHeader(); ?>
<?php
$referredby_delete->showMessage();
?>
<form name="freferredbydelete" id="freferredbydelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($referredby_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $referredby_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="referredby">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($referredby_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 ($referredby->ReferredBy->Visible) { // ReferredBy ?>
		<th class="<?php echo $referredby->ReferredBy->headerCellClass() ?>"><span id="elh_referredby_ReferredBy" class="referredby_ReferredBy"><?php echo $referredby->ReferredBy->caption() ?></span></th>
<?php } ?>
<?php if ($referredby->ReferredByEn->Visible) { // ReferredByEn ?>
		<th class="<?php echo $referredby->ReferredByEn->headerCellClass() ?>"><span id="elh_referredby_ReferredByEn" class="referredby_ReferredByEn"><?php echo $referredby->ReferredByEn->caption() ?></span></th>
<?php } ?>
<?php if ($referredby->Notes->Visible) { // Notes ?>
		<th class="<?php echo $referredby->Notes->headerCellClass() ?>"><span id="elh_referredby_Notes" class="referredby_Notes"><?php echo $referredby->Notes->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$referredby_delete->RecCnt = 0;
$i = 0;
while (!$referredby_delete->Recordset->EOF) {
	$referredby_delete->RecCnt++;
	$referredby_delete->RowCnt++;

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

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

	// Render row
	$referredby_delete->renderRow();
?>
	<tr<?php echo $referredby->rowAttributes() ?>>
<?php if ($referredby->ReferredBy->Visible) { // ReferredBy ?>
		<td<?php echo $referredby->ReferredBy->cellAttributes() ?>>
<span id="el<?php echo $referredby_delete->RowCnt ?>_referredby_ReferredBy" class="referredby_ReferredBy">
<span<?php echo $referredby->ReferredBy->viewAttributes() ?>>
<?php echo $referredby->ReferredBy->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($referredby->ReferredByEn->Visible) { // ReferredByEn ?>
		<td<?php echo $referredby->ReferredByEn->cellAttributes() ?>>
<span id="el<?php echo $referredby_delete->RowCnt ?>_referredby_ReferredByEn" class="referredby_ReferredByEn">
<span<?php echo $referredby->ReferredByEn->viewAttributes() ?>>
<?php echo $referredby->ReferredByEn->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($referredby->Notes->Visible) { // Notes ?>
		<td<?php echo $referredby->Notes->cellAttributes() ?>>
<span id="el<?php echo $referredby_delete->RowCnt ?>_referredby_Notes" class="referredby_Notes">
<span<?php echo $referredby->Notes->viewAttributes() ?>>
<?php echo $referredby->Notes->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$referredby_delete->Recordset->moveNext();
}
$referredby_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 $referredby_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$referredby_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
$referredby_delete->terminate();
?>
