<?php
include('../../../configuracion.php');
include('../../inc/formulario.php');
include('config.php');
?>
<?php $resultados = $db->results(TABLA,"*","id!=1");?>
<!doctype html>
<html class="fixed">
	<head>
		<?php include("../../inc/head.php")?>
		<!-- ESPACIO HEAD ADICIONALES -->

		<!-- FIN ESPACIO HEAD ADICIONALES -->
	</head>
	<body>
		<section class="body">
			<!-- start: header -->
			<?php include("../../inc/header.php")?>
			<!-- end: header -->
			<div class="inner-wrapper">
				<!-- start: sidebar -->
				<?php include("../../inc/side-left.php")?>
				<!-- end: sidebar -->
				
                    




				<div class="row">
							<div class="col text-right">
								<a href="<?php echo MODULO?>/agregar" class="btn btn-primary"><i class="fas fa-plus mr-3"></i>Agregar</a>
							</div>
				</div>



					<!-- start: page -->
					<div class="row">
							<div class="col">
								<section class="card">
									<div class="card-body">
										<table class="table table-bordered table-striped mb-0" id="datatable-default">
											
										<thead>
											<tr>
												<th>Nombre</th>
												<th>Username</th>
												<th>E-mail</th>
												<th>Nivel</th>
												<th class="center">Acciones</th>
											</tr>
										</thead>
										<tbody>
											<?php foreach($resultados as $row){?>
											<tr class="gradeX ">
												<td><?php echo $row->nombre ?></td>
												<td><?php echo $row->usuario ?></td>
												<td><?php echo $row->email ?></td>
												<td>
												<?php if($row->nivel==1){ echo "Administrador";}?>
													<?php if($row->nivel==2){ echo "Comercial";}?>
													<?php if($row->nivel==3){ echo "Prensa";}?>
												</td>
												<td class="center"><?php include("../../inc/action.php")?></td>
											</tr>
											<?php }?>
											
										</tbody>	

										</table>
									</div>
								</section>
							</div>
						</div>







		
					

		<!-- NO TOCAR -->
		<?php include("../../inc/side-right.php")?>
		<?php include("../../inc/bottom.php")?>
		<!-- NO TOCAR -->

		
		<!-- ESPACIO JS ADICIONALES -->

	

    </body>
</html>