| 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 | // ******************************************************************************************************** | 
|---|
| 10 | include_once("./includes/ctrlacc.php"); | 
|---|
| 11 | include_once("./includes/constantes.php"); | 
|---|
| 12 | include_once("./includes/CreaComando.php"); | 
|---|
| 13 | include_once("./clases/AdoPhp.php"); | 
|---|
| 14 | include_once("./idiomas/php/".$idioma."/barramenu_".$idioma.".php"); | 
|---|
| 15 | //________________________________________________________________________________________________________ | 
|---|
| 16 |  | 
|---|
| 17 | //________________________________________________________________________________________________________ | 
|---|
| 18 | $cmd=CreaComando($cadenaconexion); | 
|---|
| 19 | if (!$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 | } | 
|---|
| 121 | } | 
|---|
| 122 | } | 
|---|
| 123 | //________________________________________________________________________________________________________ | 
|---|
| 124 | </SCRIPT> | 
|---|
| 125 | </HEAD> | 
|---|
| 126 | <BODY bgcolor="#d4d0c8"> | 
|---|
| 127 | <FORM name=fdatos> | 
|---|
| 128 | <TABLE border=0 width=100% style="POSITION:absolute;LEFT:0px;TOP:0px" cellPadding=2 cellSpacing=0> | 
|---|
| 129 | <TR> | 
|---|
| 130 | <TD align=left> | 
|---|
| 131 | <TABLE  class=menupral align=left cellPadding=1 cellSpacing=0 > | 
|---|
| 132 | <TR valign=baseline> | 
|---|
| 133 | <TD width=10><IMG src="./images/iconos/pomo.gif"></TD> | 
|---|
| 134 | <? if($idtipousuario!=$SUPERADMINISTRADOR){?> | 
|---|
| 135 | <TD  onclick=eleccion(this,1)  onmouseout=desresaltar(this) onmouseover=resaltar(this) > | 
|---|
| 136 |  <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/centros.gif"> <SPAN class="menupral"><?echo $TbMsg[0]?></SPAN></A> </TD> | 
|---|
| 137 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> | 
|---|
| 138 | <TD  onclick=eleccion(this,2) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle> | 
|---|
| 139 |  <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/acciones.gif"> <SPAN class=menupral ><?echo $TbMsg[1]?></SPAN></A> </TD> | 
|---|
| 140 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> | 
|---|
| 141 | <TD   onclick=eleccion(this,3) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle> | 
|---|
| 142 |  <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/imagenes.gif"> <SPAN class=menupral ><?echo $TbMsg[2]?></SPAN></A> </TD> | 
|---|
| 143 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> | 
|---|
| 144 | <TD  onclick=eleccion(this,4) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle> | 
|---|
| 145 |  <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/confihard.gif"> <SPAN class=menupral ><?echo  $TbMsg[3] ?></SPAN></A> </TD> | 
|---|
| 146 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> | 
|---|
| 147 | <TD  onclick=eleccion(this,5) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle> | 
|---|
| 148 |  <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/confisoft.gif"> <SPAN class=menupral ><?echo  $TbMsg[4] ?></SPAN></A> </TD> | 
|---|
| 149 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> | 
|---|
| 150 | <TD  onclick=eleccion(this,6) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle> | 
|---|
| 151 |  <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/repositorio.gif"> <SPAN class=menupral ><?echo  $TbMsg[5] ?></SPAN></A> </TD> | 
|---|
| 152 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> | 
|---|
| 153 | <TD  onclick=eleccion(this,7) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle> | 
|---|
| 154 |  <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/menus.gif"> <SPAN class=menupral ><?echo  $TbMsg[6] ?></SPAN></A> </TD> | 
|---|
| 155 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> | 
|---|
| 156 | <td onclick="eleccion(this,14)" onmouseout="desresaltar(this)" onmouseover="resaltar(this)" align="middle"> | 
|---|
| 157 |  <a href="#" style="text-decoration: none"><img border="0" src="./images/iconos/busquedas.gif"> <span class="menupral"><?echo  $TbMsg[14] ?></span></a> </td> | 
|---|
| 158 | <td width="4" align="middle"><img src="./images/iconos/separitem.gif"></td> | 
|---|
| 159 |  | 
|---|
| 160 | <!--TD  onclick=eleccion(this,8) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle> | 
|---|
| 161 |  <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/reservas.gif"> <SPAN class=menupral ><?echo  $TbMsg[7] ?></SPAN></A> </TD> | 
|---|
| 162 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD--> | 
|---|
| 163 |  | 
|---|
| 164 | <? } | 
|---|
| 165 | else{ | 
|---|
| 166 | if($idtipousuario==$SUPERADMINISTRADOR){?> | 
|---|
| 167 | <TD  onclick=eleccion(this,9) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>  | 
|---|
| 168 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/administracion.gif"> | 
|---|
| 169 | <SPAN class=menupral ><?echo  $TbMsg[8] ?></SPAN></A> </TD> | 
|---|
| 170 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> | 
|---|
| 171 |  | 
|---|
| 172 | <TD  onclick=eleccion(this,10) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>  | 
|---|
| 173 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/iconos.gif"> | 
|---|
| 174 | <SPAN class=menupral ><?echo  $TbMsg[9] ?></SPAN></A> </TD> | 
|---|
| 175 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> | 
|---|
| 176 |  | 
|---|
| 177 | <TD  onclick=eleccion(this,11) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>  | 
|---|
| 178 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/tablas.gif"> | 
|---|
| 179 | <SPAN class=menupral ><?echo  $TbMsg[15] ?></SPAN></A> </TD> | 
|---|
| 180 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> | 
|---|
| 181 |  | 
|---|
| 182 |  | 
|---|
| 183 |  | 
|---|
| 184 | <?}?> | 
|---|
| 185 | <?}?> | 
|---|
| 186 |  | 
|---|
| 187 | <TD  onclick=eleccion(this,22) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>  | 
|---|
| 188 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/ayuda.gif">  | 
|---|
| 189 | <SPAN class=menupral ><?echo  $TbMsg[11] ?></SPAN></A> </TD> | 
|---|
| 190 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> | 
|---|
| 191 | <TD  onclick=eleccion(this,21) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>  | 
|---|
| 192 | <A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/usuarioslog.gif">  | 
|---|
| 193 | <SPAN class=menupral ><?echo  $TbMsg[10] ?></SPAN></A> </TD> | 
|---|
| 194 |  | 
|---|
| 195 |  | 
|---|
| 196 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> | 
|---|
| 197 |  | 
|---|
| 198 |  | 
|---|
| 199 | <?php if($idtipousuario!=$SUPERADMINISTRADOR){ ?> | 
|---|
| 200 | <TD> | 
|---|
| 201 | <?php | 
|---|
| 202 | $usuarioactual=$_SESSION["wusuario"]; | 
|---|
| 203 | $cmd->texto="SELECT * FROM centros | 
|---|
| 204 | INNER JOIN administradores_centros ON administradores_centros.idcentro=centros.idcentro | 
|---|
| 205 | INNER JOIN usuarios ON usuarios.idusuario=administradores_centros.idusuario | 
|---|
| 206 | WHERE usuarios.usuario='".$usuarioactual."' | 
|---|
| 207 | AND centros.identidad=".$_SESSION["widentidad"]; | 
|---|
| 208 | $rs=new Recordset; | 
|---|
| 209 | $rs->Comando=&$cmd; | 
|---|
| 210 | if (!$rs->Abrir()) return(true); // Error al abrir recordset | 
|---|
| 211 | $rs->Primero(); | 
|---|
| 212 | while (!$rs->EOF){ | 
|---|
| 213 | $identidad=$rs->campos["identidad"]; | 
|---|
| 214 | $idcentro=$rs->campos["idcentro"]; | 
|---|
| 215 | $nombrecentro=$rs->campos["nombrecentro"]; | 
|---|
| 216 | $numidcentro[]=$idcentro;$numnombrecentro[]=$nombrecentro; | 
|---|
| 217 | $rs->Siguiente(); | 
|---|
| 218 | }//Cierre | 
|---|
| 219 | $rs->Cerrar(); | 
|---|
| 220 | echo '<form></form>'; | 
|---|
| 221 | if (count($numidcentro) > 1) | 
|---|
| 222 | { | 
|---|
| 223 | ?> | 
|---|
| 224 | <form name="fcentros" action="frames.php" target="_parent" method="POST"> | 
|---|
| 225 | <select name="idmicentro" id="idmicentro" > | 
|---|
| 226 | <option value=""> -- <?php echo $_SESSION["wnombrecentro"] ;?> -- </option> | 
|---|
| 227 | <?php | 
|---|
| 228 | for ($i=0;$i<count($numidcentro);$i++) | 
|---|
| 229 | { | 
|---|
| 230 | if ($_SESSION["wnombrecentro"] == $numnombrecentro[$i]) | 
|---|
| 231 | {}else{ | 
|---|
| 232 | echo '<option value="'.$numidcentro[$i].','.$numnombrecentro[$i].'"># - '.$numnombrecentro[$i].'</option>'; | 
|---|
| 233 | } | 
|---|
| 234 | } | 
|---|
| 235 | ?> | 
|---|
| 236 |  | 
|---|
| 237 | </select> | 
|---|
| 238 | <TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD> | 
|---|
| 239 | <TD width=4 align=middle><input name="submit" type="submit" value="Cambiar" ></input></TD> | 
|---|
| 240 |  | 
|---|
| 241 | </form> | 
|---|
| 242 | <TD width=0 align=middle><IMG src="./images/iconos/separitem.gif"></TD> | 
|---|
| 243 | <TD><?php echo "Usuario : ".ucwords($_SESSION["wusuario"]); ?></TD> | 
|---|
| 244 |  | 
|---|
| 245 | </TD> | 
|---|
| 246 | <?php } }?> | 
|---|
| 247 |  | 
|---|
| 248 |  | 
|---|
| 249 |  | 
|---|
| 250 |  | 
|---|
| 251 |  | 
|---|
| 252 |  | 
|---|
| 253 | </TR> | 
|---|
| 254 | </TABLE> | 
|---|
| 255 | </TR> | 
|---|
| 256 | </TABLE> | 
|---|
| 257 | </FORM> | 
|---|
| 258 | </BODY> | 
|---|
| 259 | </HTML> | 
|---|