<?php
namespace PHPMaker2020\project2;

// 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
$pais_delete = new pais_delete();

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

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

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

// Page Rendering event
$pais_delete->Page_Render();
?>
<?php include_once "header.php"; ?>
<script>
var fpaisdelete, currentPageID;
loadjs.ready("head", function() {

	// Form object
	currentPageID = ew.PAGE_ID = "delete";
	fpaisdelete = currentForm = new ew.Form("fpaisdelete", "delete");
	loadjs.done("fpaisdelete");
});
</script>
<script>
loadjs.ready("head", function() {

	// Client script
	// Write your client script here, no need to add script tags.

});
</script>
<?php $pais_delete->showPageHeader(); ?>
<?php
$pais_delete->showMessage();
?>
<form name="fpaisdelete" id="fpaisdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($Page->CheckToken) { ?>
<input type="hidden" name="<?php echo Config("TOKEN_NAME") ?>" value="<?php echo $Page->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="pais">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($pais_delete->RecKeys as $key) { ?>
<?php $keyvalue = is_array($key) ? implode(Config("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 echo ResponsiveTableClass() ?>card-body ew-grid-middle-panel">
<table class="table ew-table">
	<thead>
	<tr class="ew-table-header">
<?php if ($pais_delete->id->Visible) { // id ?>
		<th class="<?php echo $pais_delete->id->headerCellClass() ?>"><span id="elh_pais_id" class="pais_id"><?php echo $pais_delete->id->caption() ?></span></th>
<?php } ?>
<?php if ($pais_delete->iso->Visible) { // iso ?>
		<th class="<?php echo $pais_delete->iso->headerCellClass() ?>"><span id="elh_pais_iso" class="pais_iso"><?php echo $pais_delete->iso->caption() ?></span></th>
<?php } ?>
<?php if ($pais_delete->nombre->Visible) { // nombre ?>
		<th class="<?php echo $pais_delete->nombre->headerCellClass() ?>"><span id="elh_pais_nombre" class="pais_nombre"><?php echo $pais_delete->nombre->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$pais_delete->RecordCount = 0;
$i = 0;
while (!$pais_delete->Recordset->EOF) {
	$pais_delete->RecordCount++;
	$pais_delete->RowCount++;

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

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

	// Render row
	$pais_delete->renderRow();
?>
	<tr <?php echo $pais->rowAttributes() ?>>
<?php if ($pais_delete->id->Visible) { // id ?>
		<td <?php echo $pais_delete->id->cellAttributes() ?>>
<span id="el<?php echo $pais_delete->RowCount ?>_pais_id" class="pais_id">
<span<?php echo $pais_delete->id->viewAttributes() ?>><?php echo $pais_delete->id->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($pais_delete->iso->Visible) { // iso ?>
		<td <?php echo $pais_delete->iso->cellAttributes() ?>>
<span id="el<?php echo $pais_delete->RowCount ?>_pais_iso" class="pais_iso">
<span<?php echo $pais_delete->iso->viewAttributes() ?>><?php echo $pais_delete->iso->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($pais_delete->nombre->Visible) { // nombre ?>
		<td <?php echo $pais_delete->nombre->cellAttributes() ?>>
<span id="el<?php echo $pais_delete->RowCount ?>_pais_nombre" class="pais_nombre">
<span<?php echo $pais_delete->nombre->viewAttributes() ?>><?php echo $pais_delete->nombre->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$pais_delete->Recordset->moveNext();
}
$pais_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 $pais_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$pais_delete->showPageFooter();
if (Config("DEBUG"))
	echo GetDebugMessage();
?>
<script>
loadjs.ready("load", function() {

	// Startup script
	// Write your table-specific startup script here
	// console.log("page loaded");

});
</script>
<?php include_once "footer.php"; ?>
<?php
$pais_delete->terminate();
?>