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

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

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

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

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

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

// Form_CustomValidate event
fsectionsdelete.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
fsectionsdelete.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 $sections_delete->showPageHeader(); ?>
<?php
$sections_delete->showMessage();
?>
<form name="fsectionsdelete" id="fsectionsdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($sections_delete->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $sections_delete->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="sections">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($sections_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 ($sections->Section->Visible) { // Section ?>
		<th class="<?php echo $sections->Section->headerCellClass() ?>"><span id="elh_sections_Section" class="sections_Section"><?php echo $sections->Section->caption() ?></span></th>
<?php } ?>
<?php if ($sections->SectionEn->Visible) { // SectionEn ?>
		<th class="<?php echo $sections->SectionEn->headerCellClass() ?>"><span id="elh_sections_SectionEn" class="sections_SectionEn"><?php echo $sections->SectionEn->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$sections_delete->RecCnt = 0;
$i = 0;
while (!$sections_delete->Recordset->EOF) {
	$sections_delete->RecCnt++;
	$sections_delete->RowCnt++;

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

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

	// Render row
	$sections_delete->renderRow();
?>
	<tr<?php echo $sections->rowAttributes() ?>>
<?php if ($sections->Section->Visible) { // Section ?>
		<td<?php echo $sections->Section->cellAttributes() ?>>
<span id="el<?php echo $sections_delete->RowCnt ?>_sections_Section" class="sections_Section">
<span<?php echo $sections->Section->viewAttributes() ?>>
<?php echo $sections->Section->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($sections->SectionEn->Visible) { // SectionEn ?>
		<td<?php echo $sections->SectionEn->cellAttributes() ?>>
<span id="el<?php echo $sections_delete->RowCnt ?>_sections_SectionEn" class="sections_SectionEn">
<span<?php echo $sections->SectionEn->viewAttributes() ?>>
<?php echo $sections->SectionEn->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$sections_delete->Recordset->moveNext();
}
$sections_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 $sections_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$sections_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
$sections_delete->terminate();
?>
