source: admin/WebConsole/barramenu.php @ 904be96

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 904be96 was 0df4af0c, checked in by irina <irinagomez@…>, 12 years ago

#549 correccion error javascript

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

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