-
Notifications
You must be signed in to change notification settings - Fork 3
/
informe.php
353 lines (299 loc) · 17.4 KB
/
informe.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
<?php
//include("codigo.php");
include("verificar.php");
include("conexion.php");
?>
<!DOCTYPE html>
<html lang="es">
<head>
<title>Sun Side🌞 Agencia de Viajes ✈</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Abril+Fatface" rel="stylesheet">
<link rel="stylesheet" href="css/open-iconic-bootstrap.min.css">
<link rel="stylesheet" href="css/animate.css">
<link rel="stylesheet" href="css/owl.carousel.min.css">
<link rel="stylesheet" href="css/owl.theme.default.min.css">
<link rel="stylesheet" href="css/magnific-popup.css">
<link rel="stylesheet" href="css/aos.css">
<link rel="stylesheet" href="css/ionicons.min.css">
<link rel="stylesheet" href="css/bootstrap-datepicker.css">
<link rel="stylesheet" href="css/jquery.timepicker.css">
<link rel="stylesheet" href="css/flaticon.css">
<link rel="stylesheet" href="css/icomoon.css">
<link rel="stylesheet" href="css/style.css">
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> -->
<script src="https://unpkg.com/[email protected]/js/gijgo.min.js" type="text/javascript"></script>
<link href="https://unpkg.com/[email protected]/css/gijgo.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark ftco_navbar bg-dark ftco-navbar-light" id="ftco-navbar">
<div class="container">
<a class="navbar-brand" href="index.php">Sun Side 🌞</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#ftco-nav"
aria-controls="ftco-nav" aria-expanded="false" aria-label="Toggle navigation">
<span class="oi oi-menu"></span> Menu
</button>
<div class="collapse navbar-collapse" id="ftco-nav">
<ul class="navbar-nav ml-auto">
<li class="nav-item active"><a href="perfilUser.php" class="nav-link text-dark"><b><?php echo "$nombreUser";?></b></a>
</li>
<li class="nav-item active">
<a class="nav-link text-danger" href="#" data-toggle="modal" data-target="#logoutModal">
Cerrar sesión
</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- END nav -->
<!-- Logout Modal-->
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">¿Preparado para irte?</h5>
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">Seleccione "Cerrar sesión" a continuación si está listo para finalizar su sesión
actual.</div>
<div class="modal-footer">
<button class="btn btn-secondary" type="button" data-dismiss="modal">Cancelar</button>
<a class="btn btn-primary" href="cerrar.php">Cerrar sesión</a>
</div>
</div>
</div>
</div>
<div class="hero-wrap" style="background-image: url('images/bg_1.jpg');">
<div class="overlay"></div>
<div class="container">
<div class="row no-gutters slider-text align-items-center justify-content-center" data-scrollax-parent="true">
<div class="col-md-9 text-center ftco-animate" data-scrollax=" properties: { translateY: '70%' }">
<h1 class="mb-3 bread pt-5" data-scrollax="properties: { translateY: '30%', opacity: 1.6 }">Informe viajes</h1>
</div>
</div>
</div>
</div>
<div class="container m-0 ">
<div class="row">
<div class="col-3 bg-dark">
<div class=" nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
<a class=" nav-link" id="v-pills-home-tab" href="registro.php" role="tab" aria-controls="v-pills-home" aria-selected="true"><strong>Registrar Datos 📌</strong></a>
<a class=" nav-link" href="reservacion.php" role="tab" aria-controls="v-pills-messages" aria-selected="false"><strong>Reservación 🧳</strong></a>
<a class=" nav-link active" href="informe.php" role="tab" aria-controls="v-pills-settings" aria-selected="false"><strong>Informes 📊</strong></a>
<a class=" nav-link" id="v-pills-messages-tab" href="perfilUser.php" role="tab" aria-controls="v-pills-messages" aria-selected="false"><strong>Perfil 😎</strong></a>
</div>
</div>
<div class="col-9">
<div class="tab-content" id="v-pills-tabContent container">
<!-- Registrar Datos del Viajero -->
<div class="tab-pane fade show active" id="v-pills-home" role="tabpanel"
aria-labelledby="v-pills-home-tab ">
<div class="p-4">
<h2>Informe de sus viajes ✈</h2> <hr>
<!-- Tabla -->
<!-- viaje2 -->
<?php
$sql = "SELECT * FROM viaje2 WHERE ced_Viajero ='$IDUser'";
$consulta = mysqli_query($conn, $sql);
$linea = mysqli_num_rows($consulta);
echo "<table class=table-bordered>";
echo"<thead class=bg-dark>";
echo "<tr class=text-white>";
echo "<td class=p-1 align=center> Código Viaje</td>";
echo "<td align=center> Cantidad Asientos </td>";
echo "<td class=p-1 align=center> Costo </td>";
echo "<td class=p-1 align=center> Fecha Salida</td>";
echo "<td class=p-1 align=center> Fecha Regreso</td>";
echo "<td class=p-1 align=center> Hora Viaje</td>";
echo "<td class=p-1 align=center> Código Origen </td>";
echo "<td class=p-1 align=center> Código Destino </td>";
echo "</tr>";
echo"</thead>";
if ($linea) {
while ($registro = mysqli_fetch_assoc($consulta)) {
echo"<tr>";
$codigoxX = $registro["codigo_Viaje"];
echo"<td>";
echo $codigoxX;
echo"</td>";
echo"<td>";
echo $registro['num_Asientos'];
echo"</td>";
echo"<td>";
echo "$ ".$registro['costo_Viaje'];
echo"</td>";
echo"<td>";
echo $registro['fecha_Salida'];
echo"</td>";
echo"<td>";
echo $registro['fecha_Regreso'];
echo"</td>";
echo"<td>";
echo $registro['hora_Viaje'];
echo"</td>";
echo"<td>";
echo $registro['cod_Origen'];
echo"</td>";
echo"<td>";
echo $registro['cod_Destino'];
echo"</td>";
echo"</tr>";
}
}
?>
<!-- tabla -->
<?php
$sql = "SELECT * FROM viajes where codigoViaje = '$cod_v'";
$consulta = mysqli_query($conn, $sql);
echo "<table class=table-bordered>";
echo"<thead class=bg-white>";
echo "<tr class=text-white>";
echo "<td class=p-1 align=center> Código Viaje</td>";
echo "<td align=center> Cantidad Asientos </td>";
echo "<td class=p-1 align=center> Costo </td>";
echo "<td class=p-1 align=center> Fecha Salida</td>";
echo "<td class=p-1 align=center> Fecha Regreso</td>";
echo "<td class=p-1 align=center> Hora Viaje</td>";
echo "<td class=p-1 align=center> Código Origen </td>";
echo "<td class=p-1 align=center> Código Destino </td>";
echo "</tr>";
echo"</thead>";
$linea = mysqli_num_rows($consulta);
if ($linea) {
while ($registro = mysqli_fetch_assoc($consulta)) {
echo"<tr>";
$codigox = $registro["codigoViaje"];
echo"<td>";
echo $codigox;
echo"</td>";
echo"<td>";
echo $registro['numAsientos'];
echo"</td>";
echo"<td>";
echo "$ ".$registro['costoViaje'];
echo"</td>";
echo"<td>";
echo $registro['fechaSalida'];
echo"</td>";
echo"<td>";
echo $registro['fechaRegreso'];
echo"</td>";
echo"<td>";
echo $registro['horaViaje'];
echo"</td>";
echo"<td>";
echo $registro['codigo_Origen'];
echo"</td>";
echo"<td>";
echo $registro['codigo_Destino'];
echo"</td>";
echo"</tr>";
}
}
echo "</table>";
?>
<!-- fin TABLA -->
</div>
<hr>
<div class="p-4">
<h2>Informe de la Reservación 🏢</h2> <hr>
<!-- Tabla de reservacion -->
<div class="container">
<table class="table table-bordered">
<thead class="thead-dark">
<tr>
<th scope="col">codigo Reservación</th>
<th scope="col">Fecha de Reservación</th>
<th scope="col">Estado de la Reservación</th>
</tr>
</thead>
<tbody>
<?Php
$conn = mysqli_connect("localhost", "root", "", "bd_agenciaViaje");
$sql = "SELECT * FROM reservacion where cedula_viajero ='$IDUser' ";
$consulta = mysqli_query($conn, $sql);
$fila = mysqli_num_rows($consulta);
if ($fila) {
while ($registro = mysqli_fetch_assoc($consulta)) {
$codigoReservacion = $registro["codigoReservacion"];
$fechaReservacion = $registro["fechaReservacion"];
$estadoReservacion = $registro["estadoReservacion"];
?>
<tr>
<td><?php echo $codigoReservacion;?></td>
<td><?php echo $fechaReservacion;?></td>
<td><?php echo $estadoReservacion;?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div> <!--Fin de la ventana principal -->
</div>
</div>
</div>
</div>
<footer class="ftco-footer ftco-bg-dark ftco-section p-4" id="contact">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<p>
Copyright ©
<script>
document.write(new Date().getFullYear());
</script>
All rights reserved Sun Side🌞 | The Project made <i class="icon-heart"
aria-hidden="true"></i> by <a href="https://github.com/Guille0197/AgenciaViajes-php" target="_blank">Guillermo Navarro</a>
</p>
</div>
</div>
</div>
</footer>
<!-- loader -->
<div id="ftco-loader" class="show fullscreen"><svg class="circular" width="48px" height="48px">
<circle class="path-bg" cx="24" cy="24" r="22" fill="none" stroke-width="4" stroke="#eeeeee" />
<circle class="path" cx="24" cy="24" r="22" fill="none" stroke-width="4" stroke-miterlimit="10"
stroke="#F96D00" /></svg></div>
<!-- DatePicker Time -->
<script>
$('#timepicker').timepicker({
uiLibrary: 'bootstrap4'
});
</script>
<!-- Alert -->
<script>
function alertSave() {
alert("¡Los Datos se han guardado satisfactoriamente 👍🏽!");
}
</script>
<script src="js/jquery.min.js"></script>
<script src="js/jquery-migrate-3.0.1.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/jquery.waypoints.min.js"></script>
<script src="js/jquery.stellar.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/aos.js"></script>
<script src="js/jquery.animateNumber.min.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script src="js/jquery.timepicker.min.js"></script>
<script src="js/scrollax.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBVWaKrjvy3MaE7SQ74_uJiULgl1JY0H2s&sensor=false">
</script>
<script src="js/google-map.js"></script>
<script src="js/main.js"></script>
</body>
</html>