[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 | // ******************************************************************************************************** |
---|
| 10 | include_once("./includes/ctrlacc.php"); |
---|
| 11 | include_once("./includes/constantes.php"); |
---|
[4573cbd] | 12 | include_once("./includes/CreaComando.php"); |
---|
| 13 | include_once("./clases/AdoPhp.php"); |
---|
[3ec149c] | 14 | include_once("./idiomas/php/".$idioma."/barramenu_".$idioma.".php"); |
---|
| 15 | //________________________________________________________________________________________________________ |
---|
[4573cbd] | 16 | |
---|
| 17 | //________________________________________________________________________________________________________ |
---|
| 18 | $cmd=CreaComando($cadenaconexion); |
---|
| 19 | if (!$cmd) |
---|
| 20 | Header('Location: '.$pagerror.'?herror=2'); // Error de conexi�n con servidor B.D. |
---|
| 21 | //___________________________________________________________________________________________________ |
---|
[3ec149c] | 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){ |
---|
[19fb068] | 49 | var opadre=window.parent // Toma frame padre |
---|
[3ec149c] | 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; |
---|
[4573cbd] | 89 | case 11: |
---|
| 90 | href="./principal/administracion.php" |
---|
| 91 | href2="./principal/boot_grub4dos.php" |
---|
| 92 | break; |
---|
[3ec149c] | 93 | case 13: |
---|
| 94 | href="./principal/usuarios.php" |
---|
| 95 | break; |
---|
[cd3ebe2] | 96 | case 14: |
---|
| 97 | href="./principal/aulas.php" |
---|
| 98 | href2="./varios/buscar.php" |
---|
| 99 | break; |
---|
[3ec149c] | 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: |
---|
[634c5ec] | 118 | opadre.frames["frame_contenidos"].document.location.href=href5 |
---|
[3ec149c] | 119 | break; |
---|
[13584f9] | 120 | case 23: |
---|
[0df4af0c] | 121 | opadre.frames["frame_contenidos"].document.location.href="./principal/acercade.php" |
---|
[13584f9] | 122 | break; |
---|
[3ec149c] | 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 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/centros.gif"> <SPAN class="menupral"><?echo $TbMsg[0]?></SPAN></A> </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 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/acciones.gif"> <SPAN class=menupral ><?echo $TbMsg[1]?></SPAN></A> </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 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/imagenes.gif"> <SPAN class=menupral ><?echo $TbMsg[2]?></SPAN></A> </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 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/confihard.gif"> <SPAN class=menupral ><?echo $TbMsg[3] ?></SPAN></A> </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 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/confisoft.gif"> <SPAN class=menupral ><?echo $TbMsg[4] ?></SPAN></A> </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 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/repositorio.gif"> <SPAN class=menupral ><?echo $TbMsg[5] ?></SPAN></A> </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 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/menus.gif"> <SPAN class=menupral ><?echo $TbMsg[6] ?></SPAN></A> </TD> |
---|
| 158 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> |
---|
[cd3ebe2] | 159 | <td onclick="eleccion(this,14)" onmouseout="desresaltar(this)" onmouseover="resaltar(this)" align="middle"> |
---|
| 160 | <a href="#" style="text-decoration: none"><img border="0" src="./images/iconos/busquedas.gif"> <span class="menupral"><?echo $TbMsg[14] ?></span></a> </td> |
---|
| 161 | <td width="4" align="middle"><img src="./images/iconos/separitem.gif"></td> |
---|
[3ec149c] | 162 | |
---|
| 163 | <!--TD onclick=eleccion(this,8) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle> |
---|
| 164 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/reservas.gif"> <SPAN class=menupral ><?echo $TbMsg[7] ?></SPAN></A> </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> |
---|
| 171 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/administracion.gif"> |
---|
| 172 | <SPAN class=menupral ><?echo $TbMsg[8] ?></SPAN></A> </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> |
---|
| 176 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/iconos.gif"> |
---|
| 177 | <SPAN class=menupral ><?echo $TbMsg[9] ?></SPAN></A> </TD> |
---|
| 178 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> |
---|
[4573cbd] | 179 | |
---|
[ddd91fb] | 180 | <TD onclick=eleccion(this,11) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle> |
---|
| 181 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/tablas.gif"> |
---|
| 182 | <SPAN class=menupral ><?echo $TbMsg[15] ?></SPAN></A> </TD> |
---|
| 183 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> |
---|
| 184 | |
---|
[4573cbd] | 185 | |
---|
| 186 | |
---|
[3ec149c] | 187 | <?}?> |
---|
| 188 | <?}?> |
---|
| 189 | |
---|
| 190 | <TD onclick=eleccion(this,22) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle> |
---|
| 191 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/ayuda.gif"> |
---|
| 192 | <SPAN class=menupral ><?echo $TbMsg[11] ?></SPAN></A> </TD> |
---|
| 193 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> |
---|
[13584f9] | 194 | |
---|
| 195 | <TD onclick=eleccion(this,23) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle> |
---|
| 196 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/logocirculos.png"> |
---|
| 197 | <SPAN class=menupral ><?echo $TbMsg[17] ?></SPAN></A> </TD> |
---|
| 198 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> |
---|
| 199 | |
---|
| 200 | |
---|
| 201 | |
---|
| 202 | |
---|
[3ec149c] | 203 | <TD onclick=eleccion(this,21) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle> |
---|
| 204 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/usuarioslog.gif"> |
---|
| 205 | <SPAN class=menupral ><?echo $TbMsg[10] ?></SPAN></A> </TD> |
---|
| 206 | |
---|
| 207 | |
---|
[4573cbd] | 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(); |
---|
| 232 | echo '<form></form>'; |
---|
| 233 | if (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 |
---|
| 240 | for ($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 | |
---|
[3ec149c] | 265 | </TR> |
---|
| 266 | </TABLE> |
---|
| 267 | </TR> |
---|
| 268 | </TABLE> |
---|
| 269 | </FORM> |
---|
| 270 | </BODY> |
---|
| 271 | </HTML> |
---|