source: admin/WebConsole/barramenu.php @ 3806a31

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since 3806a31 was 3806a31, checked in by ramon <ramongomez@…>, 7 years ago

#834: Limpiar código JavaScript?: terminar instrucciones con ";" y evitar asignaciones duplicadas.

git-svn-id: https://opengnsys.es/svn/branches/version1.1@5630 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100644
File size: 13.9 KB
RevLine 
[19fb068]1<?php
[3ec149c]2// ********************************************************************************************************
3// Aplicación WEB: ogAdmWebCon
4// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
5// Fecha Creación: Agosto-2010
6// Fecha Última modificación: Agosto-2010
7// Nombre del fichero: barramenu.php
8// Descripción :Este fichero implementa el menu general de la Aplicación
9// ********************************************************************************************************
[c4252df]10// Compatibilidad
11$device="";$device = strtolower($_SERVER['HTTP_USER_AGENT']);
12if(stripos($device,'iphone') !== false ){$device="iphone";}
13elseif  (stripos($device,'ipad') !== false) {$device="ipad";}
14elseif (stripos($device,'android') !== false){$device="android";}
15else{$device=0;}
16$version=exec("cat /opt/opengnsys/doc/VERSION.txt");
[9f1274e]17if(preg_match("/1.0.4/",$version) == TRUE ){$version=4;}
[c4252df]18// ********************************************************************************************************
[3ec149c]19include_once("./includes/ctrlacc.php");
20include_once("./includes/constantes.php");
[4573cbd]21include_once("./includes/CreaComando.php");
22include_once("./clases/AdoPhp.php");
[3ec149c]23include_once("./idiomas/php/".$idioma."/barramenu_".$idioma.".php");
24//________________________________________________________________________________________________________
[4573cbd]25
26//________________________________________________________________________________________________________
27$cmd=CreaComando($cadenaconexion);
28if (!$cmd)
29        Header('Location: '.$pagerror.'?herror=2'); // Error de conexi�n con servidor B.D.
30//___________________________________________________________________________________________________
[3ec149c]31?>
32<HTML>
33        <HEAD>
[01cf0ab]34                <TITLE>Administración web de aulas</TITLE>
35                <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
[3ec149c]36                <LINK rel="stylesheet" type="text/css" href="estilos.css">
37                <SCRIPT language="javascript">
38                        var currentOp=null;
39                //________________________________________________________________________________________________________
40                function resaltar(o){
[3806a31]41                                if (o==currentOp) return;
42                                o.style.borderBottomColor="#808080";
43                                o.style.borderRightColor="#808080";
44                                o.style.borderTopColor="#ffffff";
[3ec149c]45                                o.style.borderLeftColor="#ffffff"
46                }
47                //________________________________________________________________________________________________________
48                function desresaltar(o){
[3806a31]49                                if (o==currentOp) return;
50                                o.style.borderBottomColor="#d4d0c8";
51                                o.style.borderRightColor="#d4d0c8";
52                                o.style.borderTopColor="#d4d0c8";
[3ec149c]53                                o.style.borderLeftColor="#d4d0c8"
54                }
55                //________________________________________________________________________________________________________
56                function eleccion(o,op){
[3806a31]57                                var opadre=window.parent; // Toma frame padre
58                                opadre.frames["frame_contenidos"].document.location.href="nada.php";
[3ec149c]59                                var href;
[3806a31]60                                var     href2="nada.php";
61                                var     href3="./api/tree.html";
62                                var     href4="./api/main.html";
63                                var     href5="./api/index.html";
[c4252df]64                                var     device="<?php echo $device;?>";
65                                var     version="<?php echo $version;?>";
66
[3ec149c]67
68                                switch(op){
69                                        case 1:
[c4252df]70                                                        if (device!="0"){
[3806a31]71                                                        href="./principal/aulas.device.php";
[c4252df]72                                                        break;}
[3806a31]73                                                        else{href="./principal/aulas.php";
[c4252df]74                                                        break;}
75                                                       
[3ec149c]76                                        case 2:
[c4252df]77                                                        if (device!="0"){
[3806a31]78                                                        href="./principal/acciones.device.php";
[c4252df]79                                                        break;}
[3806a31]80                                                        else{href="./principal/acciones.php";
[c4252df]81                                                        break;}
[3ec149c]82                                        case 3:
[c4252df]83                                                        if (device!="0"){
84                                                                if (version=="4"){
[3806a31]85                                                                href="./principal/imagenes.device4.php";
[c4252df]86                                                                break;}
[3806a31]87                                                                else{href="./principal/imagenes.device.php";
[c4252df]88                                                                break;}
[3806a31]89                                                        }else{href="./principal/imagenes.php";
[c4252df]90                                                        break;}
[3ec149c]91                                        case 4:
[c4252df]92                                                        if (device!="0"){
[3806a31]93                                                        href="./principal/hardwares.device.php";
[c4252df]94                                                        break;}
[3806a31]95                                                        else{href="./principal/hardwares.php";
[c4252df]96                                                        break;}
[3ec149c]97                                        case 5:
[c4252df]98                                                        if (device!="0"){
[3806a31]99                                                        href="./principal/softwares.device.php";
[c4252df]100                                                        break;}
[3806a31]101                                                        else{href="./principal/softwares.php";
[c4252df]102                                                        break;}
[3ec149c]103                                        case 6:
[c4252df]104                                                        if (device!="0"){
[3806a31]105                                                        href="./principal/repositorios.device.php";
[c4252df]106                                                        break;}
[3806a31]107                                                        else{href="./principal/repositorios.php";
[c4252df]108                                                        break;}
[3ec149c]109                                        case 7:
[c4252df]110                                                        if (device!="0"){
[3806a31]111                                                        href="./principal/menus.device.php";
[c4252df]112                                                        break;}
[3806a31]113                                                        else{href="./principal/menus.php";
[c4252df]114                                                        break;}
[3ec149c]115                                        case 8:
[3806a31]116                                                        href="./principal/reservas.php";
[3ec149c]117                                                        break;
118                                        case 9:
[c4252df]119                                                        if (device!="0"){
[3806a31]120                                                        href="./principal/administracion.device.php";
[c4252df]121                                                        break;}
[3806a31]122                                                        else{href="./principal/administracion.php";
[c4252df]123                                                        break;}
[3ec149c]124                                        case 10:
[3806a31]125                                                        href="./images/L_Iconos.php";
126                                                        href2="./images/M_Iconos.php";
[3ec149c]127                                                        break;
[4573cbd]128                                        case 11:
[c4252df]129                                                        if (device!="0"){
[3806a31]130                                                        href="./principal/administracion.device.php";
131                                                        href2="./principal/boot_grub4dos.php";
[c4252df]132                                                        break;}
[3806a31]133                                                        else{href="./principal/administracion.php";
134                                                        href2="./principal/boot_grub4dos.php";
[c4252df]135                                                        break;}
[3ec149c]136                                        case 13:
[3806a31]137                                                        href="./principal/usuarios.php";
[3ec149c]138                                                        break;
[cd3ebe2]139                                        case 14:
[3806a31]140                                                href="./principal/aulas.php";
141                                                href2="./varios/buscar.php";
[cd3ebe2]142                                                break;
[3ec149c]143                                }
[3806a31]144                                var oldOp=currentOp;
[3ec149c]145                                currentOp=o;
146                                if (oldOp) desresaltar(oldOp);
[3806a31]147                                currentOp.style.borderBottomColor="#ffffff";
148                                currentOp.style.borderRightColor="#ffffff";
149                                currentOp.style.borderTopColor="#808080";
150                                currentOp.style.borderLeftColor="#808080";
[3ec149c]151                                if(op<20){
[3806a31]152                                        opadre.frames["frame_arbol"].document.location.href=href;
[3ec149c]153                                        opadre.frames["frame_contenidos"].document.location.href=href2
154                                }
155                                else{
156                                                switch(op){
157                                                        case 21:                               
158                                                                        window.top.location.href="acceso.php";
159                                                                        break;
160                                                        case 22:               
[3806a31]161                                                                        opadre.frames["frame_contenidos"].document.location.href=href5;
[3ec149c]162                                                                        break;
[13584f9]163                                                        case 23:               
[3806a31]164                                                                        opadre.frames["frame_contenidos"].document.location.href="./principal/acercade.php";
[13584f9]165                                                                        break;
[3ec149c]166                                                }
167                                }
168                }
169        //________________________________________________________________________________________________________
170                </SCRIPT>
171        </HEAD>
[01cf0ab]172        <BODY style="background-color: #d4d0c8;">
[3ec149c]173                <FORM name=fdatos>
174                        <TABLE border=0 width=100% style="POSITION:absolute;LEFT:0px;TOP:0px" cellPadding=2 cellSpacing=0>
175                                <TR>
176                                        <TD align=left>
177                                                <TABLE  class=menupral align=left cellPadding=1 cellSpacing=0 >
178                                                  <TR valign=baseline>
179                                                        <TD width=10><IMG src="./images/iconos/pomo.gif"></TD>
[043e67d]180                                                        <?php if($idtipousuario!=$SUPERADMINISTRADOR){?>
[3806a31]181                                                                <TD onclick=eleccion(this,1); onmouseout=desresaltar(this); onmouseover=resaltar(this) >
[043e67d]182                                                                        &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/centros.gif">&nbsp;<SPAN class="menupral"><?php echo $TbMsg[0]?></SPAN></A>&nbsp;</TD>
[3ec149c]183                                                                <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
[3806a31]184                                                                <TD onclick=eleccion(this,2); onmouseout=desresaltar(this); onmouseover=resaltar(this); align=middle>           
[043e67d]185                                                                        &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/acciones.gif">&nbsp;<SPAN class=menupral ><?php echo $TbMsg[1]?></SPAN></A>&nbsp;</TD>
[3ec149c]186                                                                <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
[3806a31]187                                                                <TD onclick=eleccion(this,3); onmouseout=desresaltar(this); onmouseover=resaltar(this); align=middle>
[043e67d]188                                                                        &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/imagenes.gif">&nbsp;<SPAN class=menupral ><?php echo $TbMsg[2]?></SPAN></A>&nbsp;</TD>
[3ec149c]189                                                                <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
[3806a31]190                                                                <TD onclick=eleccion(this,4); onmouseout=desresaltar(this); onmouseover=resaltar(this); align=middle>
[043e67d]191                                                                        &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/confihard.gif">&nbsp;<SPAN class=menupral ><?php echo  $TbMsg[3] ?></SPAN></A>&nbsp;</TD>
[3ec149c]192                                                                <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
[3806a31]193                                                                <TD onclick=eleccion(this,5); onmouseout=desresaltar(this); onmouseover=resaltar(this); align=middle>
[043e67d]194                                                                        &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/confisoft.gif">&nbsp;<SPAN class=menupral ><?php echo  $TbMsg[4] ?></SPAN></A>&nbsp;</TD>
[3ec149c]195                                                                <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
[3806a31]196                                                                <TD onclick=eleccion(this,6); onmouseout=desresaltar(this); onmouseover=resaltar(this); align=middle>
[043e67d]197                                                                        &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/repositorio.gif">&nbsp;<SPAN class=menupral ><?php echo  $TbMsg[5] ?></SPAN></A>&nbsp;</TD>
[3ec149c]198                                                                <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
[3806a31]199                                                                <TD onclick=eleccion(this,7); onmouseout=desresaltar(this); onmouseover=resaltar(this); align=middle>
[043e67d]200                                                                        &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/menus.gif">&nbsp;<SPAN class=menupral ><?php echo  $TbMsg[6] ?></SPAN></A>&nbsp;</TD>
[3ec149c]201                                                                <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
[cd3ebe2]202                                                                <td onclick="eleccion(this,14)" onmouseout="desresaltar(this)" onmouseover="resaltar(this)" align="middle">
[043e67d]203                                                                        &nbsp;<a href="#" style="text-decoration: none"><img border="0" src="./images/iconos/busquedas.gif">&nbsp;<span class="menupral"><?php echo  $TbMsg[14] ?></span></a>&nbsp;</td>
[cd3ebe2]204                                                                <td width="4" align="middle"><img src="./images/iconos/separitem.gif"></td>
[3ec149c]205                                                               
206                                                                <!--TD  onclick=eleccion(this,8) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
[043e67d]207                                                                        &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/reservas.gif">&nbsp;<SPAN class=menupral ><?php echo  $TbMsg[7] ?></SPAN></A>&nbsp;</TD>
[3ec149c]208                                                                <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD-->
209                                                               
[043e67d]210                                                        <?php }
[3ec149c]211                                                        else{
212                                                                        if($idtipousuario==$SUPERADMINISTRADOR){?>
[3806a31]213                                                                                        <TD onclick=eleccion(this,9); onmouseout=desresaltar(this); onmouseover=resaltar(this); align=middle>&nbsp;
[3ec149c]214                                                                                        <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/administracion.gif">
[043e67d]215                                                                                        <SPAN class=menupral ><?php echo  $TbMsg[8] ?></SPAN></A>&nbsp;</TD>
[3ec149c]216                                                                                        <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
217
[3806a31]218                                                                                        <TD onclick=eleccion(this,10); onmouseout=desresaltar(this); onmouseover=resaltar(this); align=middle>&nbsp;
[3ec149c]219                                                                                        <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/iconos.gif">
[043e67d]220                                                                                        <SPAN class=menupral ><?php echo  $TbMsg[9] ?></SPAN></A>&nbsp;</TD>
[3ec149c]221                                                                                        <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
[4573cbd]222
[3806a31]223                                            <TD onclick=eleccion(this,11); onmouseout=desresaltar(this); onmouseover=resaltar(this); align=middle>&nbsp;
[ddd91fb]224                                            <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/tablas.gif">
[043e67d]225                                            <SPAN class=menupral ><?php echo  $TbMsg[15] ?></SPAN></A>&nbsp;</TD>
[ddd91fb]226                                            <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
227
[4573cbd]228
229                                                                       
[043e67d]230                                                                        <?php }?>
231                                                        <?php }?>
[3ec149c]232
[3806a31]233                                                                                        <TD onclick=eleccion(this,22); onmouseout=desresaltar(this); onmouseover=resaltar(this); align=middle>
[043e67d]234                                                                                        &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/ayuda.gif">&nbsp;<SPAN class=menupral ><?php echo  $TbMsg[11] ?></SPAN></A>&nbsp;</TD>
[c4252df]235                                                                                        <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
[13584f9]236
237
[3806a31]238                                                                                        <TD onclick=eleccion(this,23); onmouseout=desresaltar(this); onmouseover=resaltar(this); align=middle>
[043e67d]239                                                                                        &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/logocirculos.png">&nbsp;<SPAN class=menupral ><?php echo  $TbMsg[17] ?></SPAN></A>&nbsp;</TD>
[c4252df]240                                                                                        <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
[13584f9]241
[3ec149c]242
[3806a31]243                                                                                        <TD onclick=eleccion(this,21); onmouseout=desresaltar(this); onmouseover=resaltar(this); align=middle>
[043e67d]244                                                                                        &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/usuarioslog.gif">&nbsp;<SPAN class=menupral ><?php echo  $TbMsg[10] ?></SPAN></A>&nbsp;</TD>
[c4252df]245                                                                                        <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
[4573cbd]246
247
248<?php if($idtipousuario!=$SUPERADMINISTRADOR){ ?>
249<TD>
250<?php
251        $usuarioactual=$_SESSION["wusuario"];
252        $cmd->texto="SELECT * FROM centros
253                                INNER JOIN administradores_centros ON administradores_centros.idcentro=centros.idcentro
254                                INNER JOIN usuarios ON usuarios.idusuario=administradores_centros.idusuario
255                                WHERE usuarios.usuario='".$usuarioactual."'
256                                AND centros.identidad=".$_SESSION["widentidad"];
257        $rs=new Recordset;
258        $rs->Comando=&$cmd;
259        if (!$rs->Abrir()) return(true); // Error al abrir recordset
260        $rs->Primero();
261        while (!$rs->EOF){
262                $identidad=$rs->campos["identidad"];
263                $idcentro=$rs->campos["idcentro"];
264                $nombrecentro=$rs->campos["nombrecentro"];
265                $numidcentro[]=$idcentro;$numnombrecentro[]=$nombrecentro;
266        $rs->Siguiente();
267                                          }//Cierre
268        $rs->Cerrar();
269echo '<form></form>';
270if (count($numidcentro) > 1)
271{
272?>
273<form name="fcentros" action="frames.php" target="_parent" method="POST">
274<select name="idmicentro" id="idmicentro" >
275<option value=""> -- <?php echo $_SESSION["wnombrecentro"] ;?> -- </option>
276<?php
277for ($i=0;$i<count($numidcentro);$i++)
278        {
279                if ($_SESSION["wnombrecentro"] == $numnombrecentro[$i])
280                {}else{
281                echo '<option value="'.$numidcentro[$i].','.$numnombrecentro[$i].'"># - '.$numnombrecentro[$i].'</option>';
282                        }
283        }
284?>
285
286</select>
287<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
288<TD width=4 align=middle><input name="submit" type="submit" value="Cambiar" ></input></TD>
289
290</form>
291<TD width=0 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
[c4252df]292<TD><?php echo "Usuario.:.".ucwords($_SESSION["wusuario"]); ?></TD>
[4573cbd]293
294</TD>
295<?php } }?>
296
297
298
299
300
301
[3ec149c]302                                                   </TR>
303                                                 </TABLE>
304                                </TR>
305                         </TABLE>
306                </FORM>
307        </BODY>
308</HTML>
Note: See TracBrowser for help on using the repository browser.