-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditUserConfirm.php
122 lines (106 loc) · 4.63 KB
/
editUserConfirm.php
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?php
require "./ConnectDB.php";
session_start();
$clients = $conn->query("SELECT * FROM users");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./styles/styleHeaderUL.css">
<link rel="stylesheet" href="./styles/styleCrud.css">
<link rel="stylesheet" href="./styles/styleConfirm.css">
<script src="https://code.jquery.com/jquery-3.4.1.js"></script>
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<title>Pagina de clientes</title>
</head>
<body>
<header class="header">
<div class="container-head logo-nav-container">
<a href="#" class="logo">DREAMBUCKS</a>
<div class="menu-icon">Menú</div>
<nav class="navigation">
<ul>
<li><a href="admin.php">Volver</a></li>
<li><a href="CreateLoan.php">Crear prestamo</a></li>
<li><a href="Register_U.php">Crear usuario</a></li>
<li><a href="Credit_Recharge.php">Abonar saldo</a></li>
<li><a href="Logout.php">Cerrar sesión</a></li>
</ul>
</nav>
</div>
</header>
<main>
<div class="crud-container">
<?php if ($clients->rowCount() == 0): ?>
<div class="col-md-4 mx-auto">
<div class="card card-body text-center">
<p>Todavia no tienes ningun cliente</p>
<a href="CreateUser.php">Agrega a tu primer cliente</a>
</div>
</div>
<?php endif?>
<!-- Se iteran todos los clientes existentes en la base de datos -->
<table class="content-table">
<thead>
<tr>
<th>ID</th>
<th>Nombre</th>
<th>Apellido Paterno</th>
<th>Apellido Materno</th>
<th>Email</th>
<th>Debitado</th>
<th>Direccion</th>
<th>Telefono</th>
<th>Saldo</th>
<th></th>
<th></th>
</tr>
</thead>
<?php foreach ($clients as $client) { ?>
<tbody>
<tr>
<td><p><?= $client["id_U"] ?></p></td>
<td><p class="card-title text-capitalize"><?= htmlspecialchars($client["name_U"]) ?></p></td>
<td><p class="card-title text-capitalize"><?= htmlspecialchars($client["lastname1_U"]) ?></p></td>
<td><p class="card-title text-capitalize"><?= htmlspecialchars($client["lastname2_U"]) ?></p></td>
<td><p><?= htmlspecialchars($client["email_U"]) ?></p></td>
<td><p><?= htmlspecialchars($client["debited"]) ?></p></td>
<td><p><?= htmlspecialchars($client["address_U"]) ?></p></td>
<td><p><?= htmlspecialchars($client["phone"]) ?></p></td>
<td><p><?= htmlspecialchars($client["balance"]) ?></p></td>
<td><a href="editUser.php?id_U=<?= $client["id_U"] ?>" class="btn-edit">Editar</a></td>
<td><a href="deleteUser.php?id_U=<?= $client["id_U"] ?>" class="btn-delete">Eliminar</a></td>
</tr>
</tbody>
<?php } ?>
</table>
</div>
</main>
<div class="confirmation show">
<span class="fas fa-exclamation-circle"></span>
<span class="msg">Usuario editado con éxito</span>
<span class="close-btn">
<span class="fas fa-times"></span>
<span>
</div>
<?php
require "footer.html"
?>
<script>
$('.close-btn').click(function(){
$('.confirmation').addClass("hide");
$('.confirmation').removerClass("show");
});
</script>
<!-- bootstrap -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3"
crossorigin="anonymous"></script>
<!-- bootstrap -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="./scriptHUL.js"></script>
</body>
</html>