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
|
<?php
// ********************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
// Fecha Creación: Agosto-2010
// Fecha Última modificación: Agosto-2010
// Nombre del fichero: barramenu.php
// Descripción :Este fichero implementa el menu general de la Aplicación
// ********************************************************************************************************
// Compatibilidad
$device="";$device = strtolower($_SERVER['HTTP_USER_AGENT']);
if(stripos($device,'iphone') !== false ){$device="iphone";}
elseif (stripos($device,'ipad') !== false) {$device="ipad";}
elseif (stripos($device,'android') !== false){$device="android";}
else{$device=0;}
$version=exec("cat /opt/opengnsys/doc/VERSION.txt");
if(ereg("1.0.4",$version) == TRUE ){$version=4;}
// ********************************************************************************************************
include_once("./includes/ctrlacc.php");
include_once("./includes/constantes.php");
include_once("./includes/CreaComando.php");
include_once("./clases/AdoPhp.php");
include_once("./idiomas/php/".$idioma."/barramenu_".$idioma.".php");
//________________________________________________________________________________________________________
//________________________________________________________________________________________________________
$cmd=CreaComando($cadenaconexion);
if (!$cmd)
Header('Location: '.$pagerror.'?herror=2'); // Error de conexi�n con servidor B.D.
//___________________________________________________________________________________________________
?>
<HTML>
<HEAD>
<TITLE>Administración web de aulas</TITLE>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<LINK rel="stylesheet" type="text/css" href="estilos.css">
<SCRIPT language="javascript">
var currentOp=null;
//________________________________________________________________________________________________________
function resaltar(o){
if (o==currentOp) return
o.style.borderBottomColor="#808080"
o.style.borderRightColor="#808080"
o.style.borderTopColor="#ffffff"
o.style.borderLeftColor="#ffffff"
}
//________________________________________________________________________________________________________
function desresaltar(o){
if (o==currentOp) return
o.style.borderBottomColor="#d4d0c8"
o.style.borderRightColor="#d4d0c8"
o.style.borderTopColor="#d4d0c8"
o.style.borderLeftColor="#d4d0c8"
}
//________________________________________________________________________________________________________
function eleccion(o,op){
var opadre=window.parent // Toma frame padre
opadre.frames["frame_contenidos"].document.location.href="nada.php"
var href;
var href2="nada.php"
var href3="./api/tree.html"
var href4="./api/main.html"
var href5="./api/index.html"
var device="<?php echo $device;?>";
var version="<?php echo $version;?>";
switch(op){
case 1:
if (device!="0"){
href="./principal/aulas.device.php"
break;}
else{href="./principal/aulas.php"
break;}
case 2:
if (device!="0"){
href="./principal/acciones.device.php"
break;}
else{href="./principal/acciones.php"
break;}
case 3:
if (device!="0"){
if (version=="4"){
href="./principal/imagenes.device4.php"
break;}
else{href="./principal/imagenes.device.php"
break;}
}else{href="./principal/imagenes.php"
break;}
case 4:
if (device!="0"){
href="./principal/hardwares.device.php"
break;}
else{href="./principal/hardwares.php"
break;}
case 5:
if (device!="0"){
href="./principal/softwares.device.php"
break;}
else{href="./principal/softwares.php"
break;}
case 6:
if (device!="0"){
href="./principal/repositorios.device.php"
break;}
else{href="./principal/repositorios.php"
break;}
case 7:
if (device!="0"){
href="./principal/menus.device.php"
break;}
else{href="./principal/menus.php"
break;}
case 8:
href="./principal/reservas.php"
break;
case 9:
if (device!="0"){
href="./principal/administracion.device.php"
break;}
else{href="./principal/administracion.php"
break;}
case 10:
href="./images/L_Iconos.php"
href2="./images/M_Iconos.php"
break;
case 11:
if (device!="0"){
href="./principal/administracion.device.php"
href2="./principal/boot_grub4dos.php"
break;}
else{href="./principal/administracion.php"
href2="./principal/boot_grub4dos.php"
break;}
case 13:
href="./principal/usuarios.php"
break;
case 14:
href="./principal/aulas.php"
href2="./varios/buscar.php"
break;
}
var oldOp=currentOp
currentOp=o;
if (oldOp) desresaltar(oldOp);
currentOp.style.borderBottomColor="#ffffff"
currentOp.style.borderRightColor="#ffffff"
currentOp.style.borderTopColor="#808080"
currentOp.style.borderLeftColor="#808080"
if(op<20){
opadre.frames["frame_arbol"].document.location.href=href
opadre.frames["frame_contenidos"].document.location.href=href2
}
else{
switch(op){
case 21:
window.top.location.href="acceso.php";
break;
case 22:
opadre.frames["frame_contenidos"].document.location.href=href5
break;
case 23:
opadre.frames["frame_contenidos"].document.location.href="./principal/acercade.php"
break;
}
}
}
//________________________________________________________________________________________________________
</SCRIPT>
</HEAD>
<BODY style="background-color: #d4d0c8;">
<FORM name=fdatos>
<TABLE border=0 width=100% style="POSITION:absolute;LEFT:0px;TOP:0px" cellPadding=2 cellSpacing=0>
<TR>
<TD align=left>
<TABLE class=menupral align=left cellPadding=1 cellSpacing=0 >
<TR valign=baseline>
<TD width=10><IMG src="./images/iconos/pomo.gif"></TD>
<?php if($idtipousuario!=$SUPERADMINISTRADOR){?>
<TD onclick=eleccion(this,1) onmouseout=desresaltar(this) onmouseover=resaltar(this) >
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/centros.gif"> <SPAN class="menupral"><?php echo $TbMsg[0]?></SPAN></A> </TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,2) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/acciones.gif"> <SPAN class=menupral ><?php echo $TbMsg[1]?></SPAN></A> </TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,3) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/imagenes.gif"> <SPAN class=menupral ><?php echo $TbMsg[2]?></SPAN></A> </TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,4) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/confihard.gif"> <SPAN class=menupral ><?php echo $TbMsg[3] ?></SPAN></A> </TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,5) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/confisoft.gif"> <SPAN class=menupral ><?php echo $TbMsg[4] ?></SPAN></A> </TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,6) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/repositorio.gif"> <SPAN class=menupral ><?php echo $TbMsg[5] ?></SPAN></A> </TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,7) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/menus.gif"> <SPAN class=menupral ><?php echo $TbMsg[6] ?></SPAN></A> </TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<td onclick="eleccion(this,14)" onmouseout="desresaltar(this)" onmouseover="resaltar(this)" align="middle">
<a href="#" style="text-decoration: none"><img border="0" src="./images/iconos/busquedas.gif"> <span class="menupral"><?php echo $TbMsg[14] ?></span></a> </td>
<td width="4" align="middle"><img src="./images/iconos/separitem.gif"></td>
<!--TD onclick=eleccion(this,8) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/reservas.gif"> <SPAN class=menupral ><?php echo $TbMsg[7] ?></SPAN></A> </TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD-->
<?php }
else{
if($idtipousuario==$SUPERADMINISTRADOR){?>
<TD onclick=eleccion(this,9) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/administracion.gif">
<SPAN class=menupral ><?php echo $TbMsg[8] ?></SPAN></A> </TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,10) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/iconos.gif">
<SPAN class=menupral ><?php echo $TbMsg[9] ?></SPAN></A> </TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,11) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/tablas.gif">
<SPAN class=menupral ><?php echo $TbMsg[15] ?></SPAN></A> </TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<?php }?>
<?php }?>
<TD onclick=eleccion(this,22) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/ayuda.gif"> <SPAN class=menupral ><?php echo $TbMsg[11] ?></SPAN></A> </TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,23) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/logocirculos.png"> <SPAN class=menupral ><?php echo $TbMsg[17] ?></SPAN></A> </TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,21) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/usuarioslog.gif"> <SPAN class=menupral ><?php echo $TbMsg[10] ?></SPAN></A> </TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<?php if($idtipousuario!=$SUPERADMINISTRADOR){ ?>
<TD>
<?php
$usuarioactual=$_SESSION["wusuario"];
$cmd->texto="SELECT * FROM centros
INNER JOIN administradores_centros ON administradores_centros.idcentro=centros.idcentro
INNER JOIN usuarios ON usuarios.idusuario=administradores_centros.idusuario
WHERE usuarios.usuario='".$usuarioactual."'
AND centros.identidad=".$_SESSION["widentidad"];
$rs=new Recordset;
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return(true); // Error al abrir recordset
$rs->Primero();
while (!$rs->EOF){
$identidad=$rs->campos["identidad"];
$idcentro=$rs->campos["idcentro"];
$nombrecentro=$rs->campos["nombrecentro"];
$numidcentro[]=$idcentro;$numnombrecentro[]=$nombrecentro;
$rs->Siguiente();
}//Cierre
$rs->Cerrar();
echo '<form></form>';
if (count($numidcentro) > 1)
{
?>
<form name="fcentros" action="frames.php" target="_parent" method="POST">
<select name="idmicentro" id="idmicentro" >
<option value=""> -- <?php echo $_SESSION["wnombrecentro"] ;?> -- </option>
<?php
for ($i=0;$i<count($numidcentro);$i++)
{
if ($_SESSION["wnombrecentro"] == $numnombrecentro[$i])
{}else{
echo '<option value="'.$numidcentro[$i].','.$numnombrecentro[$i].'"># - '.$numnombrecentro[$i].'</option>';
}
}
?>
</select>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD width=4 align=middle><input name="submit" type="submit" value="Cambiar" ></input></TD>
</form>
<TD width=0 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD><?php echo "Usuario.:.".ucwords($_SESSION["wusuario"]); ?></TD>
</TD>
<?php } }?>
</TR>
</TABLE>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
|