[70ed85d] | 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ónn: Año 2009-2010 |
---|
| 6 | // Fecha Última modificación: Agosto-2010 |
---|
| 7 | // Nombre del fichero: propiedades_menus.php |
---|
| 8 | // Descripción : |
---|
| 9 | // Presenta el formulario de captura de datos de un menu para insertar,modificar y eliminar |
---|
| 10 | // ************************************************************************************************** |
---|
| 11 | include_once("../includes/ctrlacc.php"); |
---|
| 12 | include_once("../includes/opciones.php"); |
---|
| 13 | include_once("../includes/CreaComando.php"); |
---|
| 14 | include_once("../includes/TomaDato.php"); |
---|
| 15 | include_once("../includes/HTMLSELECT.php"); |
---|
| 16 | include_once("../includes/HTMLCTESELECT.php"); |
---|
[6102bcc] | 17 | include_once("../includes/tftputils.php"); |
---|
[3ec149c] | 18 | include_once("../clases/AdoPhp.php"); |
---|
| 19 | include_once("../idiomas/php/".$idioma."/propiedades_menus_".$idioma.".php"); |
---|
[70ed85d] | 20 | include_once("../idiomas/php/".$idioma."/avisos_".$idioma.".php"); |
---|
[3ec149c] | 21 | //________________________________________________________________________________________________________ |
---|
| 22 | $opcion=0; |
---|
| 23 | $opciones=array($TbMsg[0],$TbMsg[1],$TbMsg[2],$TbMsg[3]); |
---|
| 24 | //________________________________________________________________________________________________________ |
---|
| 25 | $idmenu=0; |
---|
| 26 | $descripcion=""; |
---|
| 27 | $titulo=""; |
---|
| 28 | $modalidad=0; |
---|
| 29 | $smodalidad=0; |
---|
| 30 | $comentarios=""; |
---|
| 31 | $grupoid=0; |
---|
| 32 | $htmlmenupub=""; |
---|
| 33 | $htmlmenupri=""; |
---|
| 34 | $resolucion=""; |
---|
| 35 | $idurlimg=0; |
---|
| 36 | |
---|
| 37 | if (isset($_GET["opcion"])) $opcion=$_GET["opcion"]; // Recoge parametros |
---|
| 38 | if (isset($_GET["idmenu"])) $idmenu=$_GET["idmenu"]; |
---|
| 39 | if (isset($_GET["grupoid"])) $grupoid=$_GET["grupoid"]; |
---|
| 40 | if (isset($_GET["identificador"])) $idmenu=$_GET["identificador"]; |
---|
| 41 | //________________________________________________________________________________________________________ |
---|
| 42 | $cmd=CreaComando($cadenaconexion); // Crea objeto comando |
---|
| 43 | if (!$cmd) |
---|
| 44 | Header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D. |
---|
| 45 | if ($opcion!=$op_alta){ |
---|
| 46 | $resul=TomaPropiedades($cmd,$idmenu); |
---|
| 47 | if (!$resul) |
---|
| 48 | Header('Location: '.$pagerror.'?herror=3'); // Error de recuperaci�n de datos. |
---|
| 49 | } |
---|
| 50 | //________________________________________________________________________________________________________ |
---|
| 51 | ?> |
---|
| 52 | <HTML> |
---|
[70ed85d] | 53 | <TITLE>Administración web de aulas</TITLE> |
---|
[3ec149c] | 54 | <HEAD> |
---|
| 55 | <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
| 56 | <LINK rel="stylesheet" type="text/css" href="../estilos.css"> |
---|
| 57 | <SCRIPT language="javascript" src="../jscripts/propiedades_menus.js"></SCRIPT> |
---|
| 58 | <SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT> |
---|
| 59 | <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_menus_'.$idioma.'.js"></SCRIPT>'?> |
---|
| 60 | </HEAD> |
---|
| 61 | <BODY> |
---|
| 62 | <FORM name="fdatos" action="../gestores/gestor_menus.php" method="post"> |
---|
| 63 | <INPUT type=hidden name=opcion value=<?=$opcion?>> |
---|
| 64 | <INPUT type=hidden name=idmenu value=<?=$idmenu?>> |
---|
| 65 | <INPUT type=hidden name=grupoid value=<?=$grupoid?>> |
---|
[b657326] | 66 | <P align=center class=cabeceras><?php echo $TbMsg[4]?><BR> |
---|
| 67 | <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P> |
---|
| 68 | <table align="center" border="0" cellPadding="1" cellSpacing="1" class="tabla_datos"> |
---|
[3ec149c] | 69 | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
---|
[b657326] | 70 | <tr> |
---|
| 71 | <th align="center"> <?echo $TbMsg[5]?> </th> |
---|
[c31a439] | 72 | <?php if ($opcion==$op_eliminacion) |
---|
[b657326] | 73 | echo '<td style="width:300">'.$descripcion.'</td>'; |
---|
[3ec149c] | 74 | else |
---|
[b657326] | 75 | echo '<td><input class="formulariodatos" name="descripcion" style="width:300" type="text" value="'.$descripcion.'" /></td>';?> |
---|
| 76 | </tr> |
---|
[3ec149c] | 77 | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
---|
[b657326] | 78 | <tr> |
---|
[c31a439] | 79 | <th align=center> <?echo $TbMsg[6]?> </th> |
---|
| 80 | <?php if ($opcion==$op_eliminacion) |
---|
[b657326] | 81 | echo '<td style="width:300">'.$titulo.'</td>'; |
---|
[3ec149c] | 82 | else |
---|
[b657326] | 83 | echo '<td ><input class="formulariodatos" name="titulo" style="width:300" type="text" value="'.$titulo.'" /></td>';?> |
---|
| 84 | </tr> |
---|
[3ec149c] | 85 | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
---|
[b657326] | 86 | <tr> |
---|
| 87 | <th align="center"> <?echo $TbMsg[18]?> </th> |
---|
| 88 | <?php if ($opcion==$op_eliminacion) |
---|
| 89 | echo '<td colspan="3">'.TomaDato($cmd,0,'iconos',$idurlimg,'idicono','descripcion').' </td>'; |
---|
[3ec149c] | 90 | else |
---|
[b657326] | 91 | echo '<td colspan="3">'.HTMLSELECT($cmd,0,'iconos',$idurlimg,'idicono','descripcion',150,"","","idtipoicono=3").'</td>'; |
---|
[3ec149c] | 92 | ?> |
---|
[b657326] | 93 | </tr> |
---|
[3ec149c] | 94 | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
---|
[5bac736] | 95 | <!--<php--> |
---|
| 96 | |
---|
[6102bcc] | 97 | <tr> |
---|
[b657326] | 98 | <th align="center"> <?php echo $TbMsg[17]?> </th> |
---|
[6102bcc] | 99 | <?php if ($opcion==$op_eliminacion){ |
---|
[5bac736] | 100 | $tbresolucion[788]="800x600 16bits"; |
---|
| 101 | $tbresolucion[791]="1024x768 16bits"; |
---|
| 102 | $tbresolucion[355]="1152x864 16bits"; |
---|
| 103 | $tbresolucion[794]="1280x1024 16bits"; |
---|
| 104 | $tbresolucion[798]="1600x1200 16bits"; |
---|
[dc5e48a] | 105 | $tbresolucion[789]="800x600 24bits"; |
---|
| 106 | $tbresolucion[792]="1024x768 24bits"; |
---|
| 107 | $tbresolucion[795]="1280x1024 24bits"; |
---|
[5bac736] | 108 | $tbresolucion[799]="1600x1200 24bits"; |
---|
[489ff9e] | 109 | $tbresolucion[814]="800x600 32bits"; |
---|
| 110 | $tbresolucion[824]="1024x768 32bits"; |
---|
| 111 | $tbresolucion[829]="1280x1024 32bits"; |
---|
| 112 | $tbresolucion[834]="1600x1200 32bits"; |
---|
[6102bcc] | 113 | if (empty ($tbresolucion[$resolucion])) { |
---|
| 114 | $res = $resolucion; |
---|
| 115 | } else { |
---|
| 116 | $res = $tbresolucion[$resolucion]; |
---|
| 117 | } |
---|
| 118 | echo '<td>'.$res.'</td>'; |
---|
[3ec149c] | 119 | } |
---|
| 120 | else{ |
---|
[7894c0a] | 121 | if (clientKernelVersion() < "3.07") { |
---|
[6102bcc] | 122 | // Kernel anterior a 3.7 usa parámetro "vga". |
---|
[b657326] | 123 | $parametros ="788=800x600 16bits".chr(13); |
---|
[6102bcc] | 124 | $parametros.="791=1024x768 16bits".chr(13); |
---|
| 125 | $parametros.="355=1152x864 16bits".chr(13); |
---|
| 126 | $parametros.="794=1280x1024 16bits".chr(13); |
---|
| 127 | $parametros.="798=1600x1200 16bits".chr(13); |
---|
| 128 | $parametros.="789=800x600 24bits".chr(13); |
---|
| 129 | $parametros.="792=1024x768 24bits".chr(13); |
---|
| 130 | $parametros.="795=1280x1024 24bits".chr(13); |
---|
[489ff9e] | 131 | $parametros.="799=1600x1200 24bits".chr(13); |
---|
| 132 | $parametros.="814=800x600 32bits".chr(13); |
---|
| 133 | $parametros.="824=1024x768 32bits".chr(13); |
---|
| 134 | $parametros.="829=1280x1024 32bits".chr(13); |
---|
| 135 | $parametros.="834=1600x1200 32bits"; |
---|
[6102bcc] | 136 | } else { |
---|
| 137 | // Kernel 3.7 y superior usa parámetro "video". |
---|
[489ff9e] | 138 | $parametros ="uvesafb:D=".$TbMsg["PROP_DEFAULT"].chr(13); |
---|
| 139 | $parametros.="uvesafb:800x600-16=800x600, 16bit".chr(13); |
---|
[b657326] | 140 | $parametros.="uvesafb:800x600-24=800x600, 24bit".chr(13); |
---|
[489ff9e] | 141 | $parametros.="uvesafb:800x600-32=800x600, 32bit".chr(13); |
---|
[b657326] | 142 | $parametros.="uvesafb:1024x768-16=1024x768, 16bit".chr(13); |
---|
| 143 | $parametros.="uvesafb:1024x768-24=1024x768, 24bit".chr(13); |
---|
[489ff9e] | 144 | $parametros.="uvesafb:1024x768-32=1024x768, 32bit".chr(13); |
---|
[b657326] | 145 | $parametros.="uvesafb:1152x864-16=1152x864, 16bit".chr(13); |
---|
| 146 | $parametros.="uvesafb:1280x1024,16=1280x1024, 16bit".chr(13); |
---|
| 147 | $parametros.="uvesafb:1280x1024,24=1280x1024, 24bit".chr(13); |
---|
[489ff9e] | 148 | $parametros.="uvesafb:1280x1024,32=1280x1024, 32bit".chr(13); |
---|
| 149 | $parametros.="uvesafb:1600x1200,16=1600x1200, 16bit".chr(13); |
---|
[b657326] | 150 | $parametros.="uvesafb:1600x1200,24=1600x1200, 24bit".chr(13); |
---|
[489ff9e] | 151 | $parametros.="uvesafb:1600x1200,32=1600x1200, 32bit"; |
---|
[6102bcc] | 152 | } |
---|
[b657326] | 153 | echo '<td>'.HTMLCTESELECT($parametros,"resolucion","estilodesple","",$resolucion,150).'</td>'; |
---|
[3ec149c] | 154 | } |
---|
| 155 | ?> |
---|
[6102bcc] | 156 | </tr> |
---|
[3ec149c] | 157 | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
---|
[6102bcc] | 158 | <tr> |
---|
| 159 | <th align="center"> <?echo $TbMsg[7]?> </th> |
---|
[c31a439] | 160 | <?php if ($opcion==$op_eliminacion) |
---|
[6102bcc] | 161 | echo '<td>'.$comentarios.' </TD>'; |
---|
[3ec149c] | 162 | else |
---|
[b657326] | 163 | echo '<td><textarea class="formulariodatos" name="comentarios" rows="3" cols="55">'.$comentarios.'</textarea></td>'; |
---|
[3ec149c] | 164 | ?> |
---|
[6102bcc] | 165 | </tr> |
---|
[b657326] | 166 | </table> |
---|
[3ec149c] | 167 | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
---|
| 168 | <BR> |
---|
| 169 | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
---|
| 170 | <TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos> |
---|
| 171 | <TR> |
---|
[1a2fa9d8] | 172 | <TD align=center colspan=2> <b><?echo $TbMsg[8]?></b> </TD> |
---|
[3ec149c] | 173 | </TR> |
---|
| 174 | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
---|
| 175 | <TR> |
---|
[1a2fa9d8] | 176 | <TH align=center> <?php echo $TbMsg[11]?> </TH> |
---|
| 177 | <?php if ($opcion==$op_eliminacion){ |
---|
[3ec149c] | 178 | $tbmodalidad[1]=$TbMsg[13]; |
---|
| 179 | $tbmodalidad[2]=$TbMsg[14]; |
---|
| 180 | echo '<TD style="width:100">'.$tbmodalidad[$modalidad].'</TD>'; |
---|
| 181 | } |
---|
| 182 | else{ |
---|
| 183 | $parametros="1=1".chr(13); |
---|
| 184 | $parametros.="2=2".chr(13); |
---|
| 185 | $parametros.="3=3".chr(13); |
---|
| 186 | $parametros.="4=4".chr(13); |
---|
| 187 | $parametros.="5=5"; |
---|
| 188 | echo '<TD>'.HTMLCTESELECT($parametros,"modalidad","estilodesple","",$modalidad,100).'</TD>'; |
---|
| 189 | } |
---|
| 190 | ?> |
---|
| 191 | </TR> |
---|
| 192 | |
---|
| 193 | <TR> |
---|
| 194 | <TH align=center> <?echo $TbMsg[15]?> </TH> |
---|
| 195 | <?if ($opcion==$op_eliminacion) |
---|
| 196 | echo '<TD colspan=5>'.$htmlmenupub.'</TD>'; |
---|
| 197 | else |
---|
| 198 | echo '<TD colspan=5><INPUT class="formulariodatos" name=htmlmenupub style="width:350" type=text value="'.$htmlmenupub.'"></TD>'; |
---|
| 199 | ?> |
---|
| 200 | </TR> |
---|
| 201 | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
---|
| 202 | <TR> |
---|
| 203 | <TD align=center colspan=6> <b><?echo $TbMsg[12]?></b> </TD> |
---|
| 204 | </TR> |
---|
| 205 | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
---|
| 206 | <TR> |
---|
[1a2fa9d8] | 207 | <TH align=center> <?php echo $TbMsg[11]?> </TH> |
---|
| 208 | <?php if ($opcion==$op_eliminacion){ |
---|
[3ec149c] | 209 | $tbmodalidad[1]=$TbMsg[13]; |
---|
| 210 | $tbmodalidad[2]=$TbMsg[14]; |
---|
| 211 | echo '<TD style="width:100">'.$tbmodalidad[$smodalidad].'</TD>'; |
---|
| 212 | } |
---|
| 213 | else{ |
---|
| 214 | $parametros="1=1".chr(13); |
---|
| 215 | $parametros.="2=2".chr(13); |
---|
| 216 | $parametros.="3=3".chr(13); |
---|
| 217 | $parametros.="4=4".chr(13); |
---|
| 218 | $parametros.="5=5"; |
---|
| 219 | echo '<TD>'.HTMLCTESELECT($parametros,"smodalidad","estilodesple","",$smodalidad,100).'</TD>'; |
---|
| 220 | } |
---|
| 221 | ?> |
---|
| 222 | </TR> |
---|
| 223 | <TR> |
---|
[1a2fa9d8] | 224 | <TH align=center> <?echo $TbMsg[15]?> </TH> |
---|
[3ec149c] | 225 | <?if ($opcion==$op_eliminacion) |
---|
| 226 | echo '<TD colspan=5">'.$htmlmenupri.'</TD>'; |
---|
| 227 | else |
---|
| 228 | echo '<TD colspan=5><INPUT class="formulariodatos" name=htmlmenupri style="width:350" type=text value="'.$htmlmenupri.'"></TD>'; |
---|
| 229 | ?> |
---|
| 230 | </TR> |
---|
| 231 | </TABLE> |
---|
[1a2fa9d8] | 232 | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
---|
| 233 | <br> |
---|
| 234 | <table align="center" border="0" cellpadding="1" cellspacing="1" class="tabla_datos"> |
---|
| 235 | <?php if ($opcion!=$op_eliminacion) |
---|
| 236 | echo '<tr><th align="center"> '.$TbMsg["WARN_NOTESOFMENU"].' </th></th>'; |
---|
| 237 | ?> |
---|
| 238 | </table> |
---|
[3ec149c] | 239 | </FORM> |
---|
| 240 | </DIV> |
---|
[b657326] | 241 | <?php |
---|
[3ec149c] | 242 | //________________________________________________________________________________________________________ |
---|
| 243 | include_once("../includes/opcionesbotonesop.php"); |
---|
| 244 | //________________________________________________________________________________________________________ |
---|
| 245 | ?> |
---|
| 246 | </BODY> |
---|
| 247 | </HTML> |
---|
[b657326] | 248 | <?php |
---|
[3ec149c] | 249 | //________________________________________________________________________________________________________ |
---|
| 250 | // Recupera los datos de un menu |
---|
| 251 | // Parametros: |
---|
| 252 | // - cmd: Una comando ya operativo (con conexión abierta) |
---|
| 253 | // - id: El identificador del menu |
---|
| 254 | //________________________________________________________________________________________________________ |
---|
| 255 | function TomaPropiedades($cmd,$id){ |
---|
| 256 | global $descripcion; |
---|
[6102bcc] | 257 | global $titulo; |
---|
| 258 | global $modalidad; |
---|
| 259 | global $smodalidad; |
---|
[3ec149c] | 260 | global $comentarios; |
---|
| 261 | global $htmlmenupub; |
---|
| 262 | global $htmlmenupri; |
---|
| 263 | global $resolucion; |
---|
| 264 | global $idurlimg; |
---|
| 265 | |
---|
| 266 | $rs=new Recordset; |
---|
| 267 | $cmd->texto="SELECT * FROM menus WHERE idmenu=".$id; |
---|
| 268 | $rs->Comando=&$cmd; |
---|
| 269 | if (!$rs->Abrir()) return(false); // Error al abrir recordset |
---|
| 270 | $rs->Primero(); |
---|
| 271 | if (!$rs->EOF){ |
---|
| 272 | $descripcion=$rs->campos["descripcion"]; |
---|
| 273 | $titulo=$rs->campos["titulo"]; |
---|
| 274 | $modalidad=$rs->campos["modalidad"]; |
---|
| 275 | $smodalidad=$rs->campos["smodalidad"]; |
---|
| 276 | $comentarios=$rs->campos["comentarios"]; |
---|
| 277 | $htmlmenupub=$rs->campos["htmlmenupub"]; |
---|
| 278 | $htmlmenupri=$rs->campos["htmlmenupri"]; |
---|
| 279 | $resolucion=$rs->campos["resolucion"]; |
---|
| 280 | $idurlimg=$rs->campos["idurlimg"]; |
---|
| 281 | $rs->Cerrar(); |
---|
| 282 | return(true); |
---|
| 283 | } |
---|
| 284 | else |
---|
| 285 | return(false); |
---|
| 286 | } |
---|
| 287 | ?> |
---|