forked from pacohunterdev/ventas-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclientes.php
More file actions
53 lines (51 loc) · 1.58 KB
/
clientes.php
File metadata and controls
53 lines (51 loc) · 1.58 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
<?php
include_once "encabezado.php";
include_once "navbar.php";
include_once "funciones.php";
session_start();
if(empty($_SESSION['usuario'])) header("location: login.php");
$clientes = obtenerClientes();
?>
<div class="container">
<h1>
<a class="btn btn-success btn-lg" href="agregar_cliente.php">
<i class="fa fa-plus"></i>
Agregar
</a>
Clientes
</h1>
<table class="table">
<thead>
<tr>
<th>Nombre</th>
<th>Teléfono</th>
<th>Dirección</th>
<th>Editar</th>
<th>Eliminar</th>
</tr>
</thead>
<tbody>
<?php
foreach($clientes as $cliente){
?>
<tr>
<td><?php echo $cliente->nombre; ?></td>
<td><?php echo $cliente->telefono; ?></td>
<td><?php echo $cliente->direccion; ?></td>
<td>
<a class="btn btn-info" href="editar_cliente.php?id=<?php echo $cliente->id;?>">
<i class="fa fa-edit"></i>
Editar
</a>
</td>
<td>
<a class="btn btn-danger" href="eliminar_cliente.php?id=<?php echo $cliente->id;?>">
<i class="fa fa-trash"></i>
Eliminar
</a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>