-
Notifications
You must be signed in to change notification settings - Fork 0
/
filtro.php
executable file
·255 lines (234 loc) · 10.6 KB
/
filtro.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
<?php require_once('db/conexion.php'); session_start(); include('inc_fechas.php'); ?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Listados</title>
<link href="styles.css" rel="stylesheet" type="text/css">
<?php include('validateform.php'); ?>
<!-- CALENDARIO -->
<!-- calendar stylesheet -->
<link rel="stylesheet" type="text/css" media="all" href="calendar/calendar-system.css" title="System" />
<!-- main calendar program -->
<script type="text/javascript" src="calendar/calendar.js"></script>
<!-- language for the calendar --><!-- NO ME FUNCIONA EN ESPA�OL. Mich-->
<script type="text/javascript" src="calendar/lang/calendar-en.js"></script>
<!-- the following script defines the Calendar.setup helper function, which makes
adding a calendar a matter of 1 or 2 lines of code. -->
<script type="text/javascript" src="calendar/calendar-setup.js"></script>
<!-- CALENDARIO FIN-->
<!-- MOSTRAR ELEMENTOS DEL FORM (solo muestra Inputs y Botones -->
<script language="JavaScript" type="text/JavaScript">
function mOvr(src,clrOver) {
if (!src.contains(event.fromElement)) {
src.bgColor = clrOver;
src.borderColor = '';
}
}
function mOut(src,clrIn) {
if (!src.contains(event.toElement)) {
src.style.cursor = 'default';
src.bgColor = clrIn;
src.borderColor = '';
}
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
</script>
<script language="JavaScript" type="text/javascript">
function bloquea() {
document.forms.form1.desde.disabled=true;
document.forms.form1.hasta.disabled=true;
}
function desbloquea() {
document.forms.form1.desde.disabled=false;
document.forms.form1.hasta.disabled=false;
}
</script>
</head>
<body>
<?php
if ( isset($_SESSION['valid_admin']) ) { ?>
<?php include('menu.php'); ?>
<br>
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#195089">
<tr>
<td height="25" class="tdBordeCelesteInfBG"> Formulario De Impresión</td>
</tr>
<tr>
<td><table width="600" align="center" cellpadding="0" cellspacing="4">
<tr>
<td width="249" align="center" valign="top"><br>
<form action="listado.php" method="Post" enctype="multipart/form-data" name="tipo" target="_blank" id="tipo">
<table width="85%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#195089">
<tr>
<td height="129"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="textazul">
<tr>
<td height="35" colspan="2"><u>Seleccion de Tipo de Listado</u>: </td>
</tr>
<tr>
<td width="16%" height="22"><input name="tipo" type="radio" value="empleados"></td>
<td width="84%" height="22">Empleados</td>
</tr>
<tr>
<td height="22"><input name="tipo" type="radio" value="autos"></td>
<td height="22">Autos</td>
</tr>
<tr>
<td height="22"><input name="tipo" type="radio" value="operaciones"></td>
<td height="22">Operaciones</td>
</tr>
<tr>
<td height="22"><input name="tipo" type="radio" value="acciones"></td>
<td height="22">Acciones</td>
</tr>
<tr>
<td height="40" colspan="2" align="center">
<input name="generarTipo" type="submit" id="generarTipo" value="Generar"></td>
</tr>
</table></td>
</tr>
</table>
</form>
</td>
<td width="337" align="center" valign="top"><br>
<form action="listado_procesos.php" method="Post" enctype="multipart/form-data" name="proc_emp" target="_blank" id="proc_emp">
<table width="311" border="1" cellpadding="0" cellspacing="0" bordercolor="#195089">
<tr>
<td width="307"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="textazul">
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><u>Listado de Procesos</u>: </td>
</tr>
<tr>
<td height="30" colspan="2">
<select name="ord_b" id="ord_b">
<option value="0">Todas</option>
<?php
$sql = "SELECT * FROM altas ORDER BY orden ASC, asistencia_t ASC ";
$result = $conn->query($sql);
while( $row = mysqli_fetch_array($result) ){ ?>
<option value="<?= $row['alta_id'] ?>" >
<?=($row['orden']?'OB '.$row['orden']:'')?> <?=($row['asistencia_t']?'ATO '.$row['asistencia_t']:'')?>
</option><?php
} ?>
</select>
Orden de Blindaje</td>
</tr>
<tr>
<td width="26%"> </td>
<td width="74%"> </td>
</tr>
<tr>
<td colspan="2"><u>Listado de Empleados</u>: </td>
</tr>
<tr>
<td height="30" colspan="2">
<select name="empleado" class="" id="empleado" >
<option value="0" selected>Todos</option>
<?php
// TIPO DE PROPIEDAD
$sql = " SELECT * FROM empleados ORDER BY apellido_e ASC, nombre_e ASC ";
$result = $conn->query($sql);
while( $row = mysqli_fetch_array($result) ){ ?>
<option value="<?=$row['empleado_id'] ?>" ><?=strtoupper($row['apellido_e'])?>
<?=strtoupper($row['nombre_e']);?></option>
<?php
} ?>
</select> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="34" colspan="2"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="45%" class="textazul"><u>Desde</u>:</td>
<td colspan="2" class="textazul"><u>Hasta</u>:</td>
</tr>
<tr>
<td height="30">
<input name="desde" type="text" id="desde" size="10" readonly />
<button type="reset" id="f_trigger_a">...</button>
<script type="text/javascript">
Calendar.setup({
inputField : "desde", // id of the input field
ifFormat : "%Y-%m-%d", // format of the input field
button : "f_trigger_a", // trigger for the calendar (button ID)
align : "Tl", // alignment (defaults to "Bl")
singleClick : true
});
</script>
</td>
<td width="43%" valign="middle">
<input name="hasta" type="text" id="hasta" size="10" readonly />
<button type="reset" id="f_trigger_b">...</button>
<script type="text/javascript">
Calendar.setup({
inputField : "hasta", // id of the input field
ifFormat : "%Y-%m-%d", // format of the input field
button : "f_trigger_b", // trigger for the calendar (button ID)
align : "Tl", // alignment (defaults to "Bl")
singleClick : true
});
</script></td>
<td width="12%" valign="middle">
<img src="images/button_cancel.jpg" alt="Borrar fechas" width="16" height="16" style="cursor:hand"
onClick="document.proc_emp.desde.value=''; document.proc_emp.hasta.value=''">
</td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="40" colspan="2" align="center">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="textazul">
<tr>
<td height="25" colspan="2"><u>Ordenado por</u>:</td>
</tr>
<tr>
<td width="9%" height="22"><input name="ordenar_por" type="radio" value="ob"></td>
<td width="91%" height="22">OB y Operación</td>
</tr>
<tr>
<td height="22"><input name="ordenar_por" type="radio" value="empleado"></td>
<td height="22">Empleados</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
<input name="generar" type="submit" id="generar" value="Generar">
<br><br></td>
</tr>
</table></td>
</tr>
</table>
</form>
<br></td>
</tr>
<tr>
<td height="18" colspan="2" align="center"> </td>
</tr>
</table></td>
</tr>
</table>
<p> </p>
<?php
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
} else { // fin valid_admin
echo '<meta http-equiv="refresh" content="0;URL=admin.php">';
} ?>
</body>
</html>