[4329e85] | 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: Año 2009-2010 |
---|
| 6 | // Fecha Última modificación: Marzo-2006 |
---|
| 7 | // Nombre del fichero: propiedades_grupos.php |
---|
| 8 | // Descripción : |
---|
| 9 | // Presenta el formulario de captura de datos de un grupo 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("../clases/AdoPhp.php"); |
---|
| 15 | include_once("../includes/constantes.php"); |
---|
| 16 | include_once("../idiomas/php/".$idioma."/propiedades_grupos_".$idioma.".php"); |
---|
| 17 | //________________________________________________________________________________________________________ |
---|
| 18 | $opcion=0; |
---|
| 19 | $opciones=array($TbMsg[0],$TbMsg[1],$TbMsg[2],$TbMsg[3]); |
---|
| 20 | //________________________________________________________________________________________________________ |
---|
| 21 | $nombregrupo=""; |
---|
| 22 | $comentarios=""; |
---|
| 23 | $grupoid=0; |
---|
| 24 | $idgrupo=0; |
---|
| 25 | $tipo=0; |
---|
| 26 | $literaltipo=""; |
---|
| 27 | $iduniversidad=0; |
---|
| 28 | $idaula=0; |
---|
| 29 | |
---|
| 30 | if (isset($_GET["opcion"])) $opcion=$_GET["opcion"]; // Recoge parametros |
---|
| 31 | if (isset($_GET["idgrupo"])) $idgrupo=$_GET["idgrupo"]; |
---|
| 32 | if (isset($_GET["grupoid"])) $grupoid=$_GET["grupoid"]; |
---|
| 33 | if (isset($_GET["tipo"])) $tipo=$_GET["tipo"]; |
---|
| 34 | if (isset($_GET["literaltipo"])) $literaltipo=$_GET["literaltipo"]; |
---|
| 35 | if (isset($_GET["iduniversidad"])) $iduniversidad=$_GET["iduniversidad"]; |
---|
| 36 | if (isset($_GET["idaula"])) $idaula=$_GET["idaula"]; |
---|
| 37 | |
---|
| 38 | if (isset($_GET["identificador"])) $idgrupo=$_GET["identificador"]; |
---|
[4329e85] | 39 | |
---|
[3ec149c] | 40 | //________________________________________________________________________________________________________ |
---|
| 41 | $cmd=CreaComando($cadenaconexion); // Crea objeto comando |
---|
| 42 | if (!$cmd) |
---|
| 43 | Header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D. |
---|
| 44 | if ($opcion!=$op_alta){ |
---|
| 45 | $resul=TomaPropiedades($cmd,$idgrupo); |
---|
| 46 | if (!$resul) |
---|
| 47 | Header('Location: '.$pagerror.'?herror=3'); // Error de recuperación de datos. |
---|
| 48 | } |
---|
| 49 | switch($literaltipo){ |
---|
| 50 | case $LITAMBITO_CENTROS : |
---|
| 51 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 52 | $textambito=$TbMsg[7]; |
---|
| 53 | break; |
---|
| 54 | case $LITAMBITO_GRUPOSAULAS : |
---|
| 55 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 56 | $textambito=$TbMsg[7]; |
---|
| 57 | break; |
---|
| 58 | case $LITAMBITO_GRUPOSORDENADORES: |
---|
| 59 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 60 | $textambito=$TbMsg[22]; |
---|
| 61 | break; |
---|
| 62 | case $LITAMBITO_GRUPOSTAREAS : |
---|
| 63 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 64 | $textambito=$TbMsg[9]; |
---|
| 65 | break; |
---|
| 66 | case $LITAMBITO_GRUPOSPROCEDIMIENTOS : |
---|
| 67 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 68 | $textambito=$TbMsg[8]; |
---|
| 69 | break; |
---|
| 70 | case $LITAMBITO_GRUPOSTRABAJOS : |
---|
| 71 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 72 | $textambito=$TbMsg[10]; |
---|
| 73 | break; |
---|
[4329e85] | 74 | case $LITAMBITO_GRUPOSIMAGENESMONOLITICAS : |
---|
| 75 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 76 | $textambito=$TbMsg[23]; |
---|
| 77 | break; |
---|
| 78 | case $LITAMBITO_GRUPOSIMAGENESBASICAS : |
---|
[3ec149c] | 79 | $urlimg='../images/iconos/carpeta.gif'; |
---|
[4329e85] | 80 | $textambito=$TbMsg[24]; |
---|
[3ec149c] | 81 | break; |
---|
[4329e85] | 82 | case $LITAMBITO_GRUPOSIMAGENESINCREMENTALES : |
---|
| 83 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 84 | $textambito=$TbMsg[25]; |
---|
| 85 | break; |
---|
[3ec149c] | 86 | case $LITAMBITO_GRUPOSCOMPONENTESHARD : |
---|
| 87 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 88 | $textambito=$TbMsg[12]; |
---|
| 89 | break; |
---|
| 90 | case $LITAMBITO_GRUPOSCOMPONENTESSOFT : |
---|
| 91 | $urlimg='../images/iconos/confisoft.gif'; |
---|
| 92 | $textambito=$TbMsg[13]; |
---|
| 93 | break; |
---|
| 94 | case $LITAMBITO_GRUPOSPERFILESHARD : |
---|
| 95 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 96 | $textambito=$TbMsg[14]; |
---|
| 97 | break; |
---|
| 98 | case $LITAMBITO_GRUPOSPERFILESSOFT : |
---|
| 99 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 100 | $textambito=$TbMsg[15]; |
---|
| 101 | break; |
---|
| 102 | case $LITAMBITO_GRUPOSSOFTINCREMENTAL : |
---|
| 103 | $urlimg='../images/iconos/softcombi.gif'; |
---|
| 104 | $textambito=$TbMsg[16]; |
---|
| 105 | break; |
---|
| 106 | case $LITAMBITO_GRUPOSSERVIDORESREMBO : |
---|
| 107 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 108 | $textambito=$TbMsg[17]; |
---|
| 109 | break; |
---|
| 110 | case $LITAMBITO_GRUPOSSERVIDORESDHCP : |
---|
| 111 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 112 | $textambito=$TbMsg[18]; |
---|
| 113 | break; |
---|
| 114 | case $LITAMBITO_GRUPOSMENUS : |
---|
| 115 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 116 | $textambito=$TbMsg[19]; |
---|
| 117 | break; |
---|
| 118 | case $LITAMBITO_GRUPOSRESERVAS : |
---|
| 119 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 120 | $textambito=$TbMsg[20]; |
---|
| 121 | break; |
---|
| 122 | case $LITAMBITO_GRUPOSENTIDADES : |
---|
| 123 | $urlimg='../images/iconos/carpeta.gif'; |
---|
| 124 | $textambito=$TbMsg[21]; |
---|
| 125 | break; |
---|
| 126 | default: |
---|
| 127 | $resul=false; |
---|
| 128 | } |
---|
| 129 | //________________________________________________________________________________________________________ |
---|
| 130 | ?> |
---|
| 131 | <HTML> |
---|
| 132 | <HEAD> |
---|
[b0d5fb32] | 133 | <TITLE>Administración web de aulas</TITLE> |
---|
[3ec149c] | 134 | <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
| 135 | <LINK rel="stylesheet" type="text/css" href="../estilos.css"> |
---|
| 136 | <SCRIPT language="javascript" src="../jscripts/propiedades_grupos.js"></SCRIPT> |
---|
| 137 | <SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT> |
---|
| 138 | <SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT> |
---|
[043e67d] | 139 | <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_grupos_'.$idioma.'.js"></SCRIPT>'?> |
---|
[3ec149c] | 140 | </HEAD> |
---|
| 141 | <BODY> |
---|
| 142 | <DIV align=center> |
---|
| 143 | <FORM name="fdatos" action="" method=post> |
---|
[043e67d] | 144 | <INPUT type=hidden name=opcion value=<?php echo $opcion?>> |
---|
| 145 | <INPUT type=hidden name=idgrupo value=<?php echo $idgrupo?>> |
---|
| 146 | <INPUT type=hidden name=grupoid value=<?php echo $grupoid?>> |
---|
| 147 | <INPUT type=hidden name=tipo value=<?php echo $tipo?>> |
---|
| 148 | <INPUT type=hidden name=literaltipo value="<?php echo $literaltipo?>"> |
---|
| 149 | <INPUT type=hidden name=iduniversidad value=<?php echo $iduniversidad?>> |
---|
| 150 | <INPUT type=hidden name=idaula value=<?php echo $idaula?>> |
---|
| 151 | <P align=center class=cabeceras><IMG src="<?php echo $urlimg?>"> <?php echo $textambito?><BR> |
---|
[b0d5fb32] | 152 | <SPAN class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P> |
---|
[3ec149c] | 153 | <TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos > |
---|
| 154 | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
---|
| 155 | <TR> |
---|
[b0d5fb32] | 156 | <TH align=center> <?php echo $TbMsg[5]?> </TH> |
---|
[4329e85] | 157 | <?php if ($opcion==$op_eliminacion) |
---|
[b0d5fb32] | 158 | echo '<TD style="width:300px">'.$nombregrupo.'</TD>'; |
---|
[3ec149c] | 159 | else |
---|
[b0d5fb32] | 160 | echo '<TD><INPUT class="formulariodatos" name=nombregrupo style="width:320px" type=text value="'.$nombregrupo.'"></TD>';?> |
---|
[3ec149c] | 161 | </TR> |
---|
| 162 | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
---|
| 163 | <TR> |
---|
[b0d5fb32] | 164 | <TH align=center> <?php echo $TbMsg[6]?> </TH> |
---|
[4329e85] | 165 | <?php if ($opcion==$op_eliminacion) |
---|
[3ec149c] | 166 | echo '<TD>'.$comentarios.'</TD>'; |
---|
| 167 | else |
---|
| 168 | echo '<TD><TEXTAREA class="formulariodatos" name=comentarios rows=3 cols=60>'.$comentarios.'</TEXTAREA></TD>'; |
---|
| 169 | ?> |
---|
| 170 | </TR> |
---|
| 171 | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
---|
| 172 | </TABLE> |
---|
| 173 | </FORM> |
---|
[4329e85] | 174 | <?php |
---|
[2307886] | 175 | //________________________________________________________________________________________________________ |
---|
| 176 | include_once("../includes/opcionesbotonesop.php"); |
---|
| 177 | //________________________________________________________________________________________________________ |
---|
| 178 | ?> |
---|
[3ec149c] | 179 | </BODY> |
---|
| 180 | </HTML> |
---|
[4329e85] | 181 | <?php |
---|
[3ec149c] | 182 | //________________________________________________________________________________________________________ |
---|
| 183 | // Recupera los datos de una grupo |
---|
| 184 | // Parametros: |
---|
| 185 | // - cmd: Una comando ya operativo (con conexión abierta) |
---|
| 186 | // - id: El identificador de la grupo |
---|
| 187 | //________________________________________________________________________________________________________ |
---|
| 188 | function TomaPropiedades($cmd,$id){ |
---|
| 189 | global $nombregrupo; |
---|
| 190 | global $comentarios; |
---|
| 191 | global $literaltipo; |
---|
| 192 | global $LITAMBITO_GRUPOSORDENADORES; |
---|
| 193 | |
---|
| 194 | $rs=new Recordset; |
---|
| 195 | if($literaltipo==$LITAMBITO_GRUPOSORDENADORES) |
---|
| 196 | $cmd->texto="SELECT * FROM gruposordenadores WHERE idgrupo=".$id; |
---|
| 197 | else |
---|
| 198 | $cmd->texto="SELECT * FROM grupos WHERE idgrupo=".$id; |
---|
| 199 | $rs->Comando=&$cmd; |
---|
| 200 | if (!$rs->Abrir()) return(false); // Error al abrir recordset |
---|
| 201 | $rs->Primero(); |
---|
| 202 | if (!$rs->EOF){ |
---|
| 203 | if($literaltipo==$LITAMBITO_GRUPOSORDENADORES) |
---|
| 204 | $nombregrupo=$rs->campos["nombregrupoordenador"]; |
---|
| 205 | else |
---|
| 206 | $nombregrupo=$rs->campos["nombregrupo"]; |
---|
| 207 | $comentarios=$rs->campos["comentarios"]; |
---|
| 208 | $rs->Cerrar(); |
---|
| 209 | return(true); |
---|
| 210 | } |
---|
| 211 | else |
---|
| 212 | return(false); |
---|
| 213 | } |
---|