-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinterfazReporteCurso.php
More file actions
155 lines (140 loc) · 5.94 KB
/
interfazReporteCurso.php
File metadata and controls
155 lines (140 loc) · 5.94 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
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
<?php
//Codigo para validar que esta pagina pueda ser visualizada solamente si existe una sesión previamente iniciada!
//Codigo para validar que esta pagina pueda ser visualizada solamente si existe una sesión previamente iniciada!
session_start();
error_reporting(0);
$varSesion = $_SESSION['usuario'];
//Habilitar la siguiente linea cuando se de por concluido el desarrollo de esta pagina, esto con el fin de que no se muestren errores de php
if($varSesion == null || $varSesion = ''){
header("Location: errorInicioSesion.php");
die();
}
if ($_SESSION['tipoUsuario'] == '1') {
header("Location: errorAcceso.php");
die();
}
require_once "php/conexion.php";
require_once "php/crud_reportes.php";
$objRepo = new consultasReportes();
$result = $objRepo -> reporteCurso($_GET['nombreCurso']);
?>
<!DOCTYPE html>
<html>
<head>
<title>Reporte por curso</title>
<meta charset="utf-8">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.5.2/css/buttons.dataTables.min.css">
<link rel="stylesheet" href="librerias/bootstrap/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="librerias/fontawesome/css/font-awesome.css">
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.flash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.print.min.js"></script>
</script>
<script type="text/javascript">
$(document).ready(function() {
$('#tabla').DataTable( {
"language": {
"sProcessing": "Procesando...",
"sLengthMenu": "Mostrar _MENU_ registros",
"sZeroRecords": "No se encontraron resultados",
"sEmptyTable": "Ningún dato disponible en esta tabla",
"sInfo": "Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros",
"sInfoEmpty": "Mostrando registros del 0 al 0 de un total de 0 registros",
"sInfoFiltered": "(filtrado de un total de _MAX_ registros)",
"sInfoPostFix": "",
"sSearch": "Buscar:",
"sUrl": "",
"sInfoThousands": ",",
"sLoadingRecords": "Cargando...",
"oPaginate": {
"sFirst": "Primero",
"sLast": "Último",
"sNext": "Siguiente",
"sPrevious": "Anterior"
},
"oAria": {
"sSortAscending": ": Activar para ordenar la columna de manera ascendente",
"sSortDescending": ": Activar para ordenar la columna de manera descendente"
}
},
dom: 'Bfrtip',
buttons: [
'excel', 'pdf'
]
} );
} );
</script>
</head>
<body>
<div class="container">
<div class="row">
<img src="img/logo.jpg" alt="CUSur" class="mb-5">
</div>
<a href="adminIndex.php" class="btn btn btn-link">
<span class="fa fa-arrow-circle-left" style="margin-right: 5px;"></span>
Volver al Panel del Administrador
</a>
<div class="row">
<div class="col-lg">
<div class="card">
<div class="card-header">
<h2 class="card-title">Reporte por curso <small>(<?php echo $_GET['nombre'];?>)</small></h2>
<div class="card-body">
<table id="tabla" class="display nowrap">
<thead>
<tr>
<th>Folio</th>
<th>Capacitación</th>
<th>Instancia</th>
<th>Número de horas</th>
<th>Cursante</th>
<th>Fecha de inicio</th>
<th>Fecha final</th>
</tr>
</thead>
<tbody>
<?php
while ($mostrar=mysqli_fetch_row($result)) {
?>
<tr>
<td><?php
while(strlen($mostrar[0]) < 8) $mostrar[0] = "0" . $mostrar[0];
echo $mostrar[0]
?></td>
<td><?php echo $mostrar[1]; ?></td>
<td><?php echo $mostrar[2]; ?></td>
<td><?php echo $mostrar[3]; ?></td>
<td><?php echo $mostrar[4]; ?></td>
<td><?php echo $mostrar[5]; ?></td>
<td><?php echo $mostrar[6]; ?></td>
</tr>
<?php } ?>
</tbody>
<tfoot>
<tr>
<th>Folio</th>
<th>Capacitación</th>
<th>Instancia</th>
<th>Número de horas</th>
<th>Cursante</th>
<th>Fecha de inicio</th>
<th>Fecha final</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>