-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathusuarios.php
More file actions
54 lines (53 loc) · 1.67 KB
/
usuarios.php
File metadata and controls
54 lines (53 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
include_once "encabezado.php";
include_once "navbar.php";
include_once "funciones.php";
session_start();
if(empty($_SESSION['idUsuario'])) header("location: login.php");
$usuarios = obtenerUsuarios();
?>
<div class="container">
<h1>
<a class="btn btn-success btn-lg" href="agregar_usuario.php">
<i class="fa fa-plus"></i>
Agregar
</a>
Usuarios
</h1>
<table class="table">
<thead>
<tr>
<th>Usuario</th>
<th>Nombre</th>
<th>Teléfono</th>
<th>Dirección</th>
<th>Editar</th>
<th>Eliminar</th>
</tr>
</thead>
<tbody>
<?php
foreach($usuarios as $usuario){
?>
<tr>
<td><?php echo $usuario->usuario; ?></td>
<td><?php echo $usuario->nombre; ?></td>
<td><?php echo $usuario->telefono; ?></td>
<td><?php echo $usuario->direccion; ?></td>
<td>
<a class="btn btn-info" href="editar_usuario.php?id=<?php echo $usuario->id; ?>">
<i class="fa fa-edit"></i>
Editar
</a>
</td>
<td>
<a class="btn btn-danger" href="eliminar_usuario.php?id=<?php echo $usuario->id; ?>">
<i class="fa fa-trash"></i>
Eliminar
</a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>