<?php
namespace PHPMaker2020\recetarios_2021;

// Autoload
include_once "autoload.php";

// Session
if (session_status() !== PHP_SESSION_ACTIVE)
	\Delight\Cookie\Session::start(Config("COOKIE_SAMESITE")); // Init session data

// Output buffering
ob_start();
?>
<?php

// Write header
WriteHeader(FALSE);

// Create page object
$afiliadosr_list = new afiliadosr_list();

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

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

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

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

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

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

	// Dynamic selection lists
	// Filters

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

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

});
</script>
<?php } ?>
<?php if (!$afiliadosr_list->isExport()) { ?>
<div class="btn-toolbar ew-toolbar">
<?php if ($afiliadosr_list->TotalRecords > 0 && $afiliadosr_list->ExportOptions->visible()) { ?>
<?php $afiliadosr_list->ExportOptions->render("body") ?>
<?php } ?>
<?php if ($afiliadosr_list->ImportOptions->visible()) { ?>
<?php $afiliadosr_list->ImportOptions->render("body") ?>
<?php } ?>
<?php if ($afiliadosr_list->SearchOptions->visible()) { ?>
<?php $afiliadosr_list->SearchOptions->render("body") ?>
<?php } ?>
<?php if ($afiliadosr_list->FilterOptions->visible()) { ?>
<?php $afiliadosr_list->FilterOptions->render("body") ?>
<?php } ?>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php
$afiliadosr_list->renderOtherOptions();
?>
<?php if ($Security->CanSearch()) { ?>
<?php if (!$afiliadosr_list->isExport() && !$afiliadosr->CurrentAction) { ?>
<form name="fafiliadosrlistsrch" id="fafiliadosrlistsrch" class="form-inline ew-form ew-ext-search-form" action="<?php echo CurrentPageName() ?>">
<div id="fafiliadosrlistsrch-search-panel" class="<?php echo $afiliadosr_list->SearchPanelClass ?>">
<input type="hidden" name="cmd" value="search">
<input type="hidden" name="t" value="afiliadosr">
	<div class="ew-extended-search">
<div id="xsr_<?php echo $afiliadosr_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($afiliadosr_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($afiliadosr_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 $afiliadosr_list->BasicSearch->getTypeNameShort() ?></span></button>
			<div class="dropdown-menu dropdown-menu-right">
				<a class="dropdown-item<?php if ($afiliadosr_list->BasicSearch->getType() == "") { ?> active<?php } ?>" href="#" onclick="return ew.setSearchType(this);"><?php echo $Language->phrase("QuickSearchAuto") ?></a>
				<a class="dropdown-item<?php if ($afiliadosr_list->BasicSearch->getType() == "=") { ?> active<?php } ?>" href="#" onclick="return ew.setSearchType(this, '=');"><?php echo $Language->phrase("QuickSearchExact") ?></a>
				<a class="dropdown-item<?php if ($afiliadosr_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 ($afiliadosr_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 $afiliadosr_list->showPageHeader(); ?>
<?php
$afiliadosr_list->showMessage();
?>
<?php if ($afiliadosr_list->TotalRecords > 0 || $afiliadosr->CurrentAction) { ?>
<div class="card ew-card ew-grid<?php if ($afiliadosr_list->isAddOrEdit()) { ?> ew-grid-add-edit<?php } ?> afiliadosr">
<?php if (!$afiliadosr_list->isExport()) { ?>
<div class="card-header ew-grid-upper-panel">
<?php if (!$afiliadosr_list->isGridAdd()) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?php echo CurrentPageName() ?>">
<?php echo $afiliadosr_list->Pager->render() ?>
</form>
<?php } ?>
<div class="ew-list-other-options">
<?php $afiliadosr_list->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
</div>
<?php } ?>
<form name="fafiliadosrlist" id="fafiliadosrlist" 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="afiliadosr">
<div id="gmp_afiliadosr" class="<?php echo ResponsiveTableClass() ?>card-body ew-grid-middle-panel">
<?php if ($afiliadosr_list->TotalRecords > 0 || $afiliadosr_list->isGridEdit()) { ?>
<table id="tbl_afiliadosrlist" class="table ew-table"><!-- .ew-table -->
<thead>
	<tr class="ew-table-header">
<?php

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

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

// Render list options (header, left)
$afiliadosr_list->ListOptions->render("header", "left");
?>
<?php if ($afiliadosr_list->I_R->Visible) { // I_R ?>
	<?php if ($afiliadosr_list->SortUrl($afiliadosr_list->I_R) == "") { ?>
		<th data-name="I_R" class="<?php echo $afiliadosr_list->I_R->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_afiliadosr_I_R" class="afiliadosr_I_R"><div class="ew-table-header-caption"><?php echo $afiliadosr_list->I_R->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="I_R" class="<?php echo $afiliadosr_list->I_R->headerCellClass() ?>" style="white-space: nowrap;"><div class="ew-pointer" onclick="ew.sort(event, '<?php echo $afiliadosr_list->SortUrl($afiliadosr_list->I_R) ?>', 1);"><div id="elh_afiliadosr_I_R" class="afiliadosr_I_R">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $afiliadosr_list->I_R->caption() ?></span><span class="ew-table-header-sort"><?php if ($afiliadosr_list->I_R->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($afiliadosr_list->I_R->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($afiliadosr_list->Apellido->Visible) { // Apellido ?>
	<?php if ($afiliadosr_list->SortUrl($afiliadosr_list->Apellido) == "") { ?>
		<th data-name="Apellido" class="<?php echo $afiliadosr_list->Apellido->headerCellClass() ?>"><div id="elh_afiliadosr_Apellido" class="afiliadosr_Apellido"><div class="ew-table-header-caption"><?php echo $afiliadosr_list->Apellido->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Apellido" class="<?php echo $afiliadosr_list->Apellido->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event, '<?php echo $afiliadosr_list->SortUrl($afiliadosr_list->Apellido) ?>', 1);"><div id="elh_afiliadosr_Apellido" class="afiliadosr_Apellido">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $afiliadosr_list->Apellido->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($afiliadosr_list->Apellido->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($afiliadosr_list->Apellido->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($afiliadosr_list->Nombres->Visible) { // Nombres ?>
	<?php if ($afiliadosr_list->SortUrl($afiliadosr_list->Nombres) == "") { ?>
		<th data-name="Nombres" class="<?php echo $afiliadosr_list->Nombres->headerCellClass() ?>"><div id="elh_afiliadosr_Nombres" class="afiliadosr_Nombres"><div class="ew-table-header-caption"><?php echo $afiliadosr_list->Nombres->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Nombres" class="<?php echo $afiliadosr_list->Nombres->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event, '<?php echo $afiliadosr_list->SortUrl($afiliadosr_list->Nombres) ?>', 1);"><div id="elh_afiliadosr_Nombres" class="afiliadosr_Nombres">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $afiliadosr_list->Nombres->caption() ?><?php echo $Language->phrase("SrchLegend") ?></span><span class="ew-table-header-sort"><?php if ($afiliadosr_list->Nombres->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($afiliadosr_list->Nombres->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($afiliadosr_list->Nro_Afiliado->Visible) { // Nro_Afiliado ?>
	<?php if ($afiliadosr_list->SortUrl($afiliadosr_list->Nro_Afiliado) == "") { ?>
		<th data-name="Nro_Afiliado" class="<?php echo $afiliadosr_list->Nro_Afiliado->headerCellClass() ?>"><div id="elh_afiliadosr_Nro_Afiliado" class="afiliadosr_Nro_Afiliado"><div class="ew-table-header-caption"><?php echo $afiliadosr_list->Nro_Afiliado->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Nro_Afiliado" class="<?php echo $afiliadosr_list->Nro_Afiliado->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event, '<?php echo $afiliadosr_list->SortUrl($afiliadosr_list->Nro_Afiliado) ?>', 1);"><div id="elh_afiliadosr_Nro_Afiliado" class="afiliadosr_Nro_Afiliado">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $afiliadosr_list->Nro_Afiliado->caption() ?></span><span class="ew-table-header-sort"><?php if ($afiliadosr_list->Nro_Afiliado->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($afiliadosr_list->Nro_Afiliado->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($afiliadosr_list->Fecha_Insercion->Visible) { // Fecha_Insercion ?>
	<?php if ($afiliadosr_list->SortUrl($afiliadosr_list->Fecha_Insercion) == "") { ?>
		<th data-name="Fecha_Insercion" class="<?php echo $afiliadosr_list->Fecha_Insercion->headerCellClass() ?>"><div id="elh_afiliadosr_Fecha_Insercion" class="afiliadosr_Fecha_Insercion"><div class="ew-table-header-caption"><?php echo $afiliadosr_list->Fecha_Insercion->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Fecha_Insercion" class="<?php echo $afiliadosr_list->Fecha_Insercion->headerCellClass() ?>"><div class="ew-pointer" onclick="ew.sort(event, '<?php echo $afiliadosr_list->SortUrl($afiliadosr_list->Fecha_Insercion) ?>', 1);"><div id="elh_afiliadosr_Fecha_Insercion" class="afiliadosr_Fecha_Insercion">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $afiliadosr_list->Fecha_Insercion->caption() ?></span><span class="ew-table-header-sort"><?php if ($afiliadosr_list->Fecha_Insercion->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($afiliadosr_list->Fecha_Insercion->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php

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

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

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

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

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

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

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

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

// Render list options (body, left)
$afiliadosr_list->ListOptions->render("body", "left", $afiliadosr_list->RowCount);
?>
	<?php if ($afiliadosr_list->I_R->Visible) { // I_R ?>
		<td data-name="I_R" <?php echo $afiliadosr_list->I_R->cellAttributes() ?>>
<span id="el<?php echo $afiliadosr_list->RowCount ?>_afiliadosr_I_R">
<span<?php echo $afiliadosr_list->I_R->viewAttributes() ?>><?php if (!EmptyString($afiliadosr_list->I_R->getViewValue()) && $afiliadosr_list->I_R->linkAttributes() != "") { ?>
<a<?php echo $afiliadosr_list->I_R->linkAttributes() ?>><?php echo $afiliadosr_list->I_R->getViewValue() ?></a>
<?php } else { ?>
<?php echo $afiliadosr_list->I_R->getViewValue() ?>
<?php } ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($afiliadosr_list->Apellido->Visible) { // Apellido ?>
		<td data-name="Apellido" <?php echo $afiliadosr_list->Apellido->cellAttributes() ?>>
<span id="el<?php echo $afiliadosr_list->RowCount ?>_afiliadosr_Apellido">
<span<?php echo $afiliadosr_list->Apellido->viewAttributes() ?>><?php echo $afiliadosr_list->Apellido->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($afiliadosr_list->Nombres->Visible) { // Nombres ?>
		<td data-name="Nombres" <?php echo $afiliadosr_list->Nombres->cellAttributes() ?>>
<span id="el<?php echo $afiliadosr_list->RowCount ?>_afiliadosr_Nombres">
<span<?php echo $afiliadosr_list->Nombres->viewAttributes() ?>><?php echo $afiliadosr_list->Nombres->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($afiliadosr_list->Nro_Afiliado->Visible) { // Nro_Afiliado ?>
		<td data-name="Nro_Afiliado" <?php echo $afiliadosr_list->Nro_Afiliado->cellAttributes() ?>>
<span id="el<?php echo $afiliadosr_list->RowCount ?>_afiliadosr_Nro_Afiliado">
<span<?php echo $afiliadosr_list->Nro_Afiliado->viewAttributes() ?>><?php echo $afiliadosr_list->Nro_Afiliado->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
	<?php if ($afiliadosr_list->Fecha_Insercion->Visible) { // Fecha_Insercion ?>
		<td data-name="Fecha_Insercion" <?php echo $afiliadosr_list->Fecha_Insercion->cellAttributes() ?>>
<span id="el<?php echo $afiliadosr_list->RowCount ?>_afiliadosr_Fecha_Insercion">
<span<?php echo $afiliadosr_list->Fecha_Insercion->viewAttributes() ?>><?php echo $afiliadosr_list->Fecha_Insercion->getViewValue() ?></span>
</span>
</td>
	<?php } ?>
<?php

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

// Close recordset
if ($afiliadosr_list->Recordset)
	$afiliadosr_list->Recordset->Close();
?>
<?php if (!$afiliadosr_list->isExport()) { ?>
<div class="card-footer ew-grid-lower-panel">
<?php if (!$afiliadosr_list->isGridAdd()) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?php echo CurrentPageName() ?>">
<?php echo $afiliadosr_list->Pager->render() ?>
</form>
<?php } ?>
<div class="ew-list-other-options">
<?php $afiliadosr_list->OtherOptions->render("body", "bottom") ?>
</div>
<div class="clearfix"></div>
</div>
<?php } ?>
</div><!-- /.ew-grid -->
<?php } ?>
<?php if ($afiliadosr_list->TotalRecords == 0 && !$afiliadosr->CurrentAction) { // Show other options ?>
<div class="ew-list-other-options">
<?php $afiliadosr_list->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
<?php
$afiliadosr_list->showPageFooter();
if (Config("DEBUG"))
	echo GetDebugMessage();
?>
<?php if (!$afiliadosr_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
$afiliadosr_list->terminate();
?>