-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlistado.php
executable file
·145 lines (128 loc) · 4.97 KB
/
listado.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
<?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">
<style type="text/css">
<!--
.Estilo1 {font-size: 24px}
.border {
border-bottom-width: thin;
border-bottom-style: solid;
border-bottom-color: #000000;
}
.Estilo3 {
font-size: 18;
font-weight: bold;
border-bottom-width: thin;
border-bottom-style: solid;
border-bottom-color: #000000;
}
.Estilo5 {font-size: 24px; font-weight: bold; }
-->
</style>
</head>
<body>
<?php
if ( isset($_SESSION['valid_admin']) ) {
if($_POST['tipo'] =='operaciones' ){ ?>
<?php
$sql = "SELECT * FROM operaciones WHERE publico_o=1 ORDER BY nombre_o ASC";
$result = $conn->query($sql);
?>
<table width="770" border="0" cellpadding="0" cellspacing="0">
<tr class="border">
<td width="250" height="30" valign="middle" class="Estilo3"> </td>
<td width="520" height="30" valign="middle" class="Estilo3"><font> Operación</font></td>
</tr><?php
while($row = mysqli_fetch_array($result)) { ?>
<tr>
<td class="Estilo3">
<img src='barcode/image.php?code=<?=$row['operaciones_id']?>.&style=196&type=C128B&width=200&height=100&xres=2&font=5'>
</td>
<td class="Estilo3"><?=strtoupper($row['nombre_o']);?> </td>
</tr><?php
} ?>
</table><?php
}
if($_POST['tipo'] =='empleados' ){
$sql = "SELECT * FROM empleados WHERE publico_e=1 ORDER BY apellido_e ASC";
$result = $conn->query($sql);
//$i = 1; ?>
<table width="770" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="40" valign="middle" class="Estilo3"> </td>
<td colspan="3" valign="middle" class="Estilo3"><font>Empleados</font></td>
</tr>
<tr class="border">
<td width="250" height="30" valign="middle" class="Estilo3"> </td>
<td width="200" height="30" valign="middle" class="Estilo3"><font> Apellido </font></td>
<td width="200" valign="middle" class="Estilo3"><font>Nombre</font></td>
<td width="120" valign="middle" class="Estilo3"><font>DNI</font></td>
</tr><?php
while($row = mysqli_fetch_array($result)) { ?>
<tr>
<td valign="middle" class="Estilo3">
<img src="./barcode/image.php?code=<?=$row['empleado_id']?>.&style=196&type=C128B&width=200&height=100&xres=2&font=5" border="0">
</td>
<td valign="middle" class="Estilo3"><?=strtoupper($row['apellido_e']);?> </td>
<td valign="middle" class="Estilo3"><?=strtoupper($row['nombre_e']);?> </td>
<td valign="middle" class="Estilo3"><?=$row['dni_e'];?> </td>
</tr><?php
} ?>
</table><?php
}
if($_POST['tipo'] =='autos' ){
$sql = "SELECT * FROM altas where publico_a=1 order by marca asc";
$result = $conn->query($sql);
//debug echo $sql;
?>
<table width="770" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="40" colspan="4" align="center" valign="middle" class="Estilo3"><font>Vehículos</font></td>
</tr>
<tr>
<td width="455" height="30" align="center" valign="middle" class="Estilo3"> </td>
<td width="105" height="30" valign="middle" class="Estilo3">Marca</td>
<td width="105" valign="middle" class="Estilo3">Modelo</td>
<td width="105" valign="middle" class="Estilo3">Dominio</td>
</tr><?php
while($row = mysqli_fetch_array($result)) { ?>
<tr>
<td valign="middle" class="Estilo3">
<img src="barcode/image.php?code=<?=$row['code_a']?>.&style=196&type=C128B&width=460&height=100&xres=2&font=5" border="0">
</td>
<td valign="middle" class="Estilo3"><?=strtoupper($row['marca']);?></td>
<td valign="middle" class="Estilo3"><?=strtoupper($row['modelo']);?></td>
<td valign="middle" class="Estilo3"><?=strtoupper($row['matricula']);?></td>
</tr><?php
} ?>
</table><?php
}
if($_POST['tipo'] =='acciones' ){ ?>
<table width="770" border="0" cellpadding="0" cellspacing="0">
<tr class="border">
<td width="250" height="30" valign="middle" class="Estilo3"> </td>
<td width="520" height="30" valign="middle" class="Estilo3"><font> Acción</font></td>
</tr>
<tr>
<td height="200" class="Estilo3">
<img src='barcode/image.php?code=GUARDAR .&style=196&type=C128B&width=460&height=100&xres=2&font=5'> </td>
<td class="Estilo3">GUARDAR</td>
</tr>
<tr>
<td height="200" class="Estilo3">
<img src='barcode/image.php?code=BORRAR .&style=196&type=C128B&width=460&height=100&xres=2&font=5'> </td>
<td class="Estilo3">BORRAR</td>
</tr>
</table><?php
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
} else { // fin valid_admin
echo '<meta http-equiv="refresh" content="0;URL=admin.php">';
} ?>
</body>
</html>