[6f62a1a] | 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: Agosto-2010 |
---|
| 7 | // Nombre del fichero: perfilcomponente_hard.php |
---|
| 8 | // Descripción : |
---|
| 9 | // Administra los componentes hardware incluidos en un perfil harware |
---|
| 10 | // ************************************************************************************************************************************************* |
---|
| 11 | include_once("../includes/ctrlacc.php"); |
---|
| 12 | include_once("../clases/AdoPhp.php"); |
---|
| 13 | include_once("../includes/CreaComando.php"); |
---|
| 14 | include_once("../idiomas/php/".$idioma."/perfilcomponente_hard_".$idioma.".php"); |
---|
| 15 | //________________________________________________________________________________________________________ |
---|
| 16 | $idperfilhard=0; |
---|
| 17 | $descripcionperfil=""; |
---|
| 18 | if (isset($_GET["idperfilhard"])) $idperfilhard=$_GET["idperfilhard"]; // Recoge parametros |
---|
| 19 | if (isset($_GET["descripcionperfil"])) $descripcionperfil=$_GET["descripcionperfil"]; // Recoge parametros |
---|
| 20 | |
---|
| 21 | $cmd=CreaComando($cadenaconexion); |
---|
| 22 | if (!$cmd) |
---|
| 23 | Header('Location: '.$pagerror.'?herror=2'); // Error de conexióncon servidor B.D. |
---|
| 24 | //________________________________________________________________________________________________________ |
---|
| 25 | ?> |
---|
| 26 | <HTML> |
---|
| 27 | <HEAD> |
---|
[6694784] | 28 | <TITLE>Administración web de aulas</TITLE> |
---|
| 29 | <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
[3ec149c] | 30 | <LINK rel="stylesheet" type="text/css" href="../estilos.css"> |
---|
| 31 | <SCRIPT language="javascript" src="../jscripts/perfilcomponente_hard.js"></SCRIPT> |
---|
| 32 | <SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT> |
---|
| 33 | <SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT> |
---|
[6f62a1a] | 34 | <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/perfilcomponente_hard_'.$idioma.'.js"></SCRIPT>'?> |
---|
[3ec149c] | 35 | </HEAD> |
---|
| 36 | <BODY> |
---|
| 37 | <FORM name="fdatos"> |
---|
[6f62a1a] | 38 | <INPUT type=hidden value="<?php echo $idcentro?>" id=idcentro> |
---|
| 39 | <INPUT type=hidden value="<?php echo $idperfilhard?>" id=idperfilhard> |
---|
| 40 | <P align=center class=cabeceras><?php echo $TbMsg[0]?><BR> |
---|
| 41 | <SPAN align=center class=subcabeceras><?php echo $TbMsg[1]?></SPAN> <IMG src="../images/iconos/confihard.gif"></P> |
---|
[3ec149c] | 42 | <BR> |
---|
| 43 | <DIV align=center id="Layer_componentes"> |
---|
[6f62a1a] | 44 | <SPAN align=center class=presentaciones><B><U><?php echo $TbMsg[2]?></U>: <?php echo $descripcionperfil?></B></SPAN></P> |
---|
[3ec149c] | 45 | <TABLE width="100%" class="tabla_listados" cellspacing=1 cellpadding=0 > |
---|
| 46 | <TR> |
---|
| 47 | <TH> </TH> |
---|
| 48 | <TH>T</TH> |
---|
[6f62a1a] | 49 | <TH><?php echo $TbMsg[3]?></TH> |
---|
[3ec149c] | 50 | </TR> |
---|
[6f62a1a] | 51 | <?php |
---|
[3ec149c] | 52 | $rs=new Recordset; |
---|
[6f62a1a] | 53 | $cmd->texto='SELECT hardwares.idhardware, hardwares.descripcion,'. |
---|
| 54 | ' tipohardwares.descripcion AS hdescripcion, tipohardwares.urlimg'. |
---|
| 55 | ' FROM hardwares'. |
---|
| 56 | ' INNER JOIN perfileshard_hardwares ON hardwares.idhardware=perfileshard_hardwares.idhardware'. |
---|
| 57 | ' INNER JOIN tipohardwares ON hardwares.idtipohardware=tipohardwares.idtipohardware'. |
---|
| 58 | ' WHERE perfileshard_hardwares.idperfilhard='.$idperfilhard. |
---|
| 59 | ' ORDER BY tipohardwares.idtipohardware, hardwares.descripcion'; |
---|
[3ec149c] | 60 | $rs->Comando=&$cmd; |
---|
| 61 | |
---|
| 62 | if ($rs->Abrir()){ |
---|
| 63 | $rs->Primero(); |
---|
| 64 | $A_W=" WHERE "; |
---|
| 65 | $strex=""; |
---|
| 66 | while (!$rs->EOF){ |
---|
| 67 | echo '<TR>'; |
---|
| 68 | echo '<TD align=center width="10%" ><INPUT type=checkbox onclick="gestion_componente('.$rs->campos["idhardware"].',this)" checked ></INPUT></TD>'; |
---|
| 69 | echo '<TD align=center width="10%" ><IMG alt="'. $rs->campos["hdescripcion"].'"src="'.$rs->campos["urlimg"].'"></TD>'; |
---|
| 70 | echo '<TD width="80%" > '.$rs->campos["descripcion"].'</TD>'; |
---|
| 71 | echo '</TR>'; |
---|
| 72 | $strex.= $A_W."hardwares.idhardware<>".$rs->campos["idhardware"]; |
---|
| 73 | $A_W=" AND "; |
---|
| 74 | $rs->Siguiente(); |
---|
| 75 | } |
---|
| 76 | } |
---|
| 77 | $rs->Cerrar(); |
---|
[6f62a1a] | 78 | $cmd->texto='SELECT hardwares.idhardware, hardwares.descripcion,'. |
---|
| 79 | ' tipohardwares.descripcion AS hdescripcion, tipohardwares.urlimg,'. |
---|
| 80 | ' FROM hardwares'. |
---|
| 81 | ' INNER JOIN tipohardwares ON hardwares.idtipohardware=tipohardwares.idtipohardware '. |
---|
| 82 | $strex.' AND hardwares.idcentro='.$idcentro. |
---|
| 83 | ' ORDER BY tipohardwares.idtipohardware, hardwares.descripcion'; |
---|
[3ec149c] | 84 | $rs->Comando=&$cmd; |
---|
| 85 | if ($rs->Abrir()){ |
---|
| 86 | $rs->Primero(); |
---|
| 87 | while (!$rs->EOF){ |
---|
| 88 | echo '<TR>'; |
---|
| 89 | echo '<TD align=center width="10%" ><INPUT type=checkbox onclick="gestion_componente('.$rs->campos["idhardware"].',this)" ></INPUT></TD>'; |
---|
| 90 | echo '<TD align=center width="10%" ><IMG alt="'. $rs->campos["hdescripcion"].'"src="'.$rs->campos["urlimg"].'"></TD>'; |
---|
| 91 | |
---|
| 92 | echo '<TD width="80%" > '.$rs->campos["descripcion"].'</TD>'; |
---|
| 93 | echo '</TR>'; |
---|
| 94 | $rs->Siguiente(); |
---|
| 95 | } |
---|
| 96 | } |
---|
| 97 | $rs->Cerrar(); |
---|
| 98 | ?> |
---|
| 99 | </TABLE> |
---|
| 100 | </DIV> |
---|
| 101 | <DIV id="Layer_nota" align=center > |
---|
| 102 | <BR> |
---|
[6f62a1a] | 103 | <SPAN align=center class=notas><I><?php echo $TbMsg[4]?></I></SPAN> |
---|
[3ec149c] | 104 | </DIV> |
---|
| 105 | </FORM> |
---|
| 106 | </BODY> |
---|
| 107 | </HTML> |
---|