51 lines
1.8 KiB
PHP
51 lines
1.8 KiB
PHP
<!doctype html>
|
|
<html class="no-js" lang="es">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
<title>Gestión de usuarios</title>
|
|
<meta name="description" content="">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="../static/style.css" type="text/css" media="screen" />
|
|
</head>
|
|
<body>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Nombre</th>
|
|
<th>Usuario</th>
|
|
<th>Rol</th>
|
|
<th>Correo</th>
|
|
<th colspan="2">Acciones</th>
|
|
</tr>
|
|
</thead>
|
|
<?php
|
|
include 'database.php';
|
|
|
|
$pdo = connectDatabase("practica", "practica", "practica");
|
|
$list = listUsers($pdo);
|
|
foreach($list as $row) :
|
|
if(!$row[5]):
|
|
?>
|
|
<tr>
|
|
<td><?php echo $row[0]; ?></td>
|
|
<td><?php echo $row[1]; ?></td>
|
|
<td><?php echo $row[2]; ?></td>
|
|
<td><?php echo $row[3]; ?></td>
|
|
<td>
|
|
<a href="forms/user_edit_form.php?edit=<?php echo $row[4]; ?>" class="edit_btn">Editar</a>
|
|
</td>
|
|
<td>
|
|
<a href="user_management.php?delete=<?php echo $row[4]; ?>" class="del_btn">Borrar</a>
|
|
</td>
|
|
</tr>
|
|
<?php endif ?>
|
|
<?php endforeach ?>
|
|
<?php closeDatabase($pdo); ?>
|
|
</table>
|
|
<div style="text-align: right;">
|
|
<a href="forms/user_create_form.html" class="create_btn" >Crear</a>
|
|
</div>
|
|
</body>
|
|
</html>
|