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

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

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

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

// Page Rendering event
$kp_modulos_list->Page_Render();
?>
<?php include_once "header.php"; ?>
<?php if (!$kp_modulos_list->isExport()) { ?>
<script>
var fkp_moduloslist, currentPageID;
loadjs.ready("head", function() {

	// Form object
	currentPageID = ew.PAGE_ID = "list";
	fkp_moduloslist = currentForm = new ew.Form("fkp_moduloslist", "list");
	fkp_moduloslist.formKeyCountName = '<?php echo $kp_modulos_list->FormKeyCountName ?>';
	loadjs.done("fkp_moduloslist");
});
var fkp_moduloslistsrch;
loadjs.ready("head", function() {

	// Form object for search
	fkp_moduloslistsrch = currentSearchForm = new ew.Form("fkp_moduloslistsrch");

	// Dynamic selection lists
	// Filters

	fkp_moduloslistsrch.filterList = <?php echo $kp_modulos_list->getFilterList() ?>;
	loadjs.done("fkp_moduloslistsrch");
});
</script>
<script>
loadjs.ready("head", function() {

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

});
</script>
<?php } ?>
<?php if (!$kp_modulos_list->isExport()) { ?>
<div class="btn-toolbar ew-toolbar">
<?php if ($kp_modulos_list->TotalRecords > 0 && $kp_modulos_list->ExportOptions->visible()) { ?>
<?php $kp_modulos_list->ExportOptions->render("body") ?>
<?php } ?>
<?php if ($kp_modulos_list->ImportOptions->visible()) { ?>
<?php $kp_modulos_list->ImportOptions->render("body") ?>
<?php } ?>
<?php if ($kp_modulos_list->SearchOptions->visible()) { ?>
<?php $kp_modulos_list->SearchOptions->render("body") ?>
<?php } ?>
<?php if ($kp_modulos_list->FilterOptions->visible()) { ?>
<?php $kp_modulos_list->FilterOptions->render("body") ?>
<?php } ?>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php
$kp_modulos_list->renderOtherOptions();
?>
<?php if ($Security->CanSearch()) { ?>
<?php if (!$kp_modulos_list->isExport() && !$kp_modulos->CurrentAction) { ?>
<form name="fkp_moduloslistsrch" id="fkp_moduloslistsrch" class="form-inline ew-form ew-ext-search-form" action="<?php echo CurrentPageName() ?>">
<div id="fkp_moduloslistsrch-search-panel" class="<?php echo $kp_modulos_list->SearchPanelClass ?>">
<input type="hidden" name="cmd" value="search">
<input type="hidden" name="t" value="kp_modulos">
	<div class="ew-extended-search">
<div id="xsr_<?php echo $kp_modulos_list->SearchRowCount + 1 ?>" class="ew-row d-sm-flex">
	<div class="ew-quick-search input-group">
		<input type="text" name="<?php echo Config("TABLE_BASIC_SEARCH") ?>" id="<?php echo Config("TABLE_BASIC_SEARCH") ?>" class="form-control" value="<?php echo HtmlEncode($kp_modulos_list->BasicSearch->getKeyword()) ?>" placeholder="<?php echo HtmlEncode($Language->phrase("Search")) ?>">
		<input type="hidden" name="<?php echo Config("TABLE_BASIC_SEARCH_TYPE") ?>" id="<?php echo Config("TABLE_BASIC_SEARCH_TYPE") ?>" value="<?php echo HtmlEncode($kp_modulos_list->BasicSearch->getType()) ?>">
		<div class="input-group-append">
			<button class="btn btn-primary" name="btn-submit" id="btn-submit" type="submit"><?php echo $Language->phrase("SearchBtn") ?></button>
			<button type="button" data-toggle="dropdown" class="btn btn-primary dropdown-toggle dropdown-toggle-split" aria-haspopup="true" aria-expanded="false"><span id="searchtype"><?php echo $kp_modulos_list->BasicSearch->getTypeNameShort() ?></span></button>
			<div class="dropdown-menu dropdown-menu-right">
				<a class="dropdown-item<?php if ($kp_modulos_list->BasicSearch->getType() == "") { ?> active<?php } ?>" href="#" onclick="return ew.setSearchType(this);"><?php echo $Language->phrase("QuickSearchAuto") ?></a>
				<a class="dropdown-item<?php if ($kp_modulos_list->BasicSearch->getType() == "=") { ?> active<?php } ?>" href="#" onclick="return ew.setSearchType(this, '=');"><?php echo $Language->phrase("QuickSearchExact") ?></a>
				<a class="dropdown-item<?php if ($kp_modulos_list->BasicSearch->getType() == "AND") { ?> active<?php } ?>" href="#" onclick="return ew.setSearchType(this, 'AND');"><?php echo $Language->phrase("QuickSearchAll") ?></a>
				<a class="dropdown-item<?php if ($kp_modulos_list->BasicSearch->getType() == "OR") { ?> active<?php } ?>" href="#" onclick="return ew.setSearchType(this, 'OR');"><?php echo $Language->phrase("QuickSearchAny") ?></a>
			</div>
		</div>
	</div>
</div>
	</div><!-- /.ew-extended-search -->
</div><!-- /.ew-search-panel -->
</form>
<?php } ?>
<?php } ?>
<?php $kp_modulos_list->showPageHeader(); ?>
<?php
$kp_modulos_list->showMessage();
?>
<?php if ($kp_modulos_list->TotalRecords > 0 || $kp_modulos->CurrentAction) { ?>
<div class="card ew-card ew-grid<?php if ($kp_modulos_list->isAddOrEdit()) { ?> ew-grid-add-edit<?php } ?> kp_modulos">
<form name="fkp_moduloslist" id="fkp_moduloslist" class="form-inline ew-form ew-list-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="kp_modulos">
<div id="gmp_kp_modulos" class="<?php echo ResponsiveTableClass() ?>card-body ew-grid-middle-panel">
<?php if ($kp_modulos_list->TotalRecords > 0 || $kp_modulos_list->isGridEdit()) { ?>
<table id="tbl_kp_moduloslist" class="table ew-table"><!-- .ew-table -->
<thead>
	<tr class="ew-table-header">
<?php

// Header row
$kp_modulos->RowType = ROWTYPE_HEADER;

// Render list options
$kp_modulos_list->renderListOptions();

// Render list options (header, left)
$kp_modulos_list->ListOptions->render("header", "left");
?>
<?php if ($kp_modulos_list->idmodulo->Visible) { // idmodulo ?>
	<?php if ($kp_modulos_list->SortUrl($kp_modulos_list->idmodulo) == "") { ?>
		<th data-name="idmodulo" class="<?php echo $kp_modulos_list->idmodulo->headerCellClass() ?>"><div id="elh_kp_modulos_idmodulo" class="kp_modulos_idmodulo"><div class="ew-table-header-caption"><?php echo $kp_modulos_list->idmodulo->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="idmodulo" class="<?php echo $kp_modulos_list->idmodulo->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event, '<?php echo $kp_modulos_list->SortUrl($kp_modulos_list->idmodulo) ?>', 1);"><div id="elh_kp_modulos_idmodulo" class="kp_modulos_idmodulo">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $kp_modulos_list->idmodulo->caption() ?></span><span class="ew-table-header-sort"><?php if ($kp_modulos_list->idmodulo->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($kp_modulos_list->idmodulo->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($kp_modulos_list->nommodulo->Visible) { // nommodulo ?>
	<?php if ($kp_modulos_list->SortUrl($kp_modulos_list->nommodulo) == "") { ?>
		<th data-name="nommodulo" class="<?php echo $kp_modulos_list->nommodulo->headerCellClass() ?>"><div id="elh_kp_modulos_nommodulo" class="kp_modulos_nommodulo"><div class="ew-table-header-caption"><?php echo $kp_modulos_list->nommodulo->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="nommodulo" class="<?php echo $kp_modulos_list->nommodulo->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event, '<?php echo $kp_modulos_list->SortUrl($kp_modulos_list->nommodulo) ?>', 1);"><div id="elh_kp_modulos_nommodulo" class="kp_modulos_nommodulo">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $kp_modulos_list->nommodulo->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($kp_modulos_list->nommodulo->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($kp_modulos_list->nommodulo->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($kp_modulos_list->modulo->Visible) { // modulo ?>
	<?php if ($kp_modulos_list->SortUrl($kp_modulos_list->modulo) == "") { ?>
		<th data-name="modulo" class="<?php echo $kp_modulos_list->modulo->headerCellClass() ?>"><div id="elh_kp_modulos_modulo" class="kp_modulos_modulo"><div class="ew-table-header-caption"><?php echo $kp_modulos_list->modulo->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="modulo" class="<?php echo $kp_modulos_list->modulo->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event, '<?php echo $kp_modulos_list->SortUrl($kp_modulos_list->modulo) ?>', 1);"><div id="elh_kp_modulos_modulo" class="kp_modulos_modulo">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $kp_modulos_list->modulo->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($kp_modulos_list->modulo->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($kp_modulos_list->modulo->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($kp_modulos_list->estado->Visible) { // estado ?>
	<?php if ($kp_modulos_list->SortUrl($kp_modulos_list->estado) == "") { ?>
		<th data-name="estado" class="<?php echo $kp_modulos_list->estado->headerCellClass() ?>"><div id="elh_kp_modulos_estado" class="kp_modulos_estado"><div class="ew-table-header-caption"><?php echo $kp_modulos_list->estado->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="estado" class="<?php echo $kp_modulos_list->estado->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event, '<?php echo $kp_modulos_list->SortUrl($kp_modulos_list->estado) ?>', 1);"><div id="elh_kp_modulos_estado" class="kp_modulos_estado">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $kp_modulos_list->estado->caption() ?></span><span class="ew-table-header-sort"><?php if ($kp_modulos_list->estado->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($kp_modulos_list->estado->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($kp_modulos_list->idmodulog->Visible) { // idmodulog ?>
	<?php if ($kp_modulos_list->SortUrl($kp_modulos_list->idmodulog) == "") { ?>
		<th data-name="idmodulog" class="<?php echo $kp_modulos_list->idmodulog->headerCellClass() ?>"><div id="elh_kp_modulos_idmodulog" class="kp_modulos_idmodulog"><div class="ew-table-header-caption"><?php echo $kp_modulos_list->idmodulog->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="idmodulog" class="<?php echo $kp_modulos_list->idmodulog->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event, '<?php echo $kp_modulos_list->SortUrl($kp_modulos_list->idmodulog) ?>', 1);"><div id="elh_kp_modulos_idmodulog" class="kp_modulos_idmodulog">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $kp_modulos_list->idmodulog->caption() ?></span><span class="ew-table-header-sort"><?php if ($kp_modulos_list->idmodulog->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($kp_modulos_list->idmodulog->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($kp_modulos_list->icon->Visible) { // icon ?>
	<?php if ($kp_modulos_list->SortUrl($kp_modulos_list->icon) == "") { ?>
		<th data-name="icon" class="<?php echo $kp_modulos_list->icon->headerCellClass() ?>"><div id="elh_kp_modulos_icon" class="kp_modulos_icon"><div class="ew-table-header-caption"><?php echo $kp_modulos_list->icon->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="icon" class="<?php echo $kp_modulos_list->icon->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event, '<?php echo $kp_modulos_list->SortUrl($kp_modulos_list->icon) ?>', 1);"><div id="elh_kp_modulos_icon" class="kp_modulos_icon">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $kp_modulos_list->icon->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($kp_modulos_list->icon->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($kp_modulos_list->icon->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php

// Render list options (header, right)
$kp_modulos_list->ListOptions->render("header", "right");
?>
	</tr>
</thead>
<tbody>
<?php
if ($kp_modulos_list->ExportAll && $kp_modulos_list->isExport()) {
	$kp_modulos_list->StopRecord = $kp_modulos_list->TotalRecords;
} else {

	// Set the last record to display
	if ($kp_modulos_list->TotalRecords > $kp_modulos_list->StartRecord + $kp_modulos_list->DisplayRecords - 1)
		$kp_modulos_list->StopRecord = $kp_modulos_list->StartRecord + $kp_modulos_list->DisplayRecords - 1;
	else
		$kp_modulos_list->StopRecord = $kp_modulos_list->TotalRecords;
}
$kp_modulos_list->RecordCount = $kp_modulos_list->StartRecord - 1;
if ($kp_modulos_list->Recordset && !$kp_modulos_list->Recordset->EOF) {
	$kp_modulos_list->Recordset->moveFirst();
	$selectLimit = $kp_modulos_list->UseSelectLimit;
	if (!$selectLimit && $kp_modulos_list->StartRecord > 1)
		$kp_modulos_list->Recordset->move($kp_modulos_list->StartRecord - 1);
} elseif (!$kp_modulos->AllowAddDeleteRow && $kp_modulos_list->StopRecord == 0) {
	$kp_modulos_list->StopRecord = $kp_modulos->GridAddRowCount;
}

// Initialize aggregate
$kp_modulos->RowType = ROWTYPE_AGGREGATEINIT;
$kp_modulos->resetAttributes();
$kp_modulos_list->renderRow();
while ($kp_modulos_list->RecordCount < $kp_modulos_list->StopRecord) {
	$kp_modulos_list->RecordCount++;
	if ($kp_modulos_list->RecordCount >= $kp_modulos_list->StartRecord) {
		$kp_modulos_list->RowCount++;

		// Set up key count
		$kp_modulos_list->KeyCount = $kp_modulos_list->RowIndex;

		// Init row class and style
		$kp_modulos->resetAttributes();
		$kp_modulos->CssClass = "";
		if ($kp_modulos_list->isGridAdd()) {
		} else {
			$kp_modulos_list->loadRowValues($kp_modulos_list->Recordset); // Load row values
		}
		$kp_modulos->RowType = ROWTYPE_VIEW; // Render view

		// Set up row id / data-rowindex
		$kp_modulos->RowAttrs->merge(["data-rowindex" => $kp_modulos_list->RowCount, "id" => "r" . $kp_modulos_list->RowCount . "_kp_modulos", "data-rowtype" => $kp_modulos->RowType]);

		// Render row
		$kp_modulos_list->renderRow();

		// Render list options
		$kp_modulos_list->renderListOptions();
?>
	<tr <?php echo $kp_modulos->rowAttributes() ?>>
<?php

// Render list options (body, left)
$kp_modulos_list->ListOptions->render("body", "left", $kp_modulos_list->RowCount);
?>
	<?php if ($kp_modulos_list->idmodulo->Visible) { // idmodulo ?>
		<td data-name="idmodulo" <?php echo $kp_modulos_list->idmodulo->cellAttributes() ?>>
<span id="el<?php echo $kp_modulos_list->RowCount ?>_kp_modulos_idmodulo" class="kp_modulos_idmodulo">
<span<?php echo $kp_modulos_list->idmodulo->viewAttributes() ?>><?php echo $kp_modulos_list->idmodulo->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($kp_modulos_list->nommodulo->Visible) { // nommodulo ?>
		<td data-name="nommodulo" <?php echo $kp_modulos_list->nommodulo->cellAttributes() ?>>
<span id="el<?php echo $kp_modulos_list->RowCount ?>_kp_modulos_nommodulo" class="kp_modulos_nommodulo">
<span<?php echo $kp_modulos_list->nommodulo->viewAttributes() ?>><?php echo $kp_modulos_list->nommodulo->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($kp_modulos_list->modulo->Visible) { // modulo ?>
		<td data-name="modulo" <?php echo $kp_modulos_list->modulo->cellAttributes() ?>>
<span id="el<?php echo $kp_modulos_list->RowCount ?>_kp_modulos_modulo" class="kp_modulos_modulo">
<span<?php echo $kp_modulos_list->modulo->viewAttributes() ?>><?php echo $kp_modulos_list->modulo->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($kp_modulos_list->estado->Visible) { // estado ?>
		<td data-name="estado" <?php echo $kp_modulos_list->estado->cellAttributes() ?>>
<span id="el<?php echo $kp_modulos_list->RowCount ?>_kp_modulos_estado" class="kp_modulos_estado">
<span<?php echo $kp_modulos_list->estado->viewAttributes() ?>><?php echo $kp_modulos_list->estado->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($kp_modulos_list->idmodulog->Visible) { // idmodulog ?>
		<td data-name="idmodulog" <?php echo $kp_modulos_list->idmodulog->cellAttributes() ?>>
<span id="el<?php echo $kp_modulos_list->RowCount ?>_kp_modulos_idmodulog" class="kp_modulos_idmodulog">
<span<?php echo $kp_modulos_list->idmodulog->viewAttributes() ?>><?php echo $kp_modulos_list->idmodulog->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($kp_modulos_list->icon->Visible) { // icon ?>
		<td data-name="icon" <?php echo $kp_modulos_list->icon->cellAttributes() ?>>
<span id="el<?php echo $kp_modulos_list->RowCount ?>_kp_modulos_icon" class="kp_modulos_icon">
<span<?php echo $kp_modulos_list->icon->viewAttributes() ?>><?php echo $kp_modulos_list->icon->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
<?php

// Render list options (body, right)
$kp_modulos_list->ListOptions->render("body", "right", $kp_modulos_list->RowCount);
?>
	</tr>
<?php
	}
	if (!$kp_modulos_list->isGridAdd())
		$kp_modulos_list->Recordset->moveNext();
}
?>
</tbody>
</table><!-- /.ew-table -->
<?php } ?>
</div><!-- /.ew-grid-middle-panel -->
<?php if (!$kp_modulos->CurrentAction) { ?>
<input type="hidden" name="action" id="action" value="">
<?php } ?>
</form><!-- /.ew-list-form -->
<?php

// Close recordset
if ($kp_modulos_list->Recordset)
	$kp_modulos_list->Recordset->Close();
?>
<?php if (!$kp_modulos_list->isExport()) { ?>
<div class="card-footer ew-grid-lower-panel">
<?php if (!$kp_modulos_list->isGridAdd()) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?php echo CurrentPageName() ?>">
<?php echo $kp_modulos_list->Pager->render() ?>
</form>
<?php } ?>
<div class="ew-list-other-options">
<?php $kp_modulos_list->OtherOptions->render("body", "bottom") ?>
</div>
<div class="clearfix"></div>
</div>
<?php } ?>
</div><!-- /.ew-grid -->
<?php } ?>
<?php if ($kp_modulos_list->TotalRecords == 0 && !$kp_modulos->CurrentAction) { // Show other options ?>
<div class="ew-list-other-options">
<?php $kp_modulos_list->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
<?php
$kp_modulos_list->showPageFooter();
if (Config("DEBUG"))
	echo GetDebugMessage();
?>
<?php if (!$kp_modulos_list->isExport()) { ?>
<script>
loadjs.ready("load", function() {

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

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