source: admin/WebConsole/varios/perfilcomponente_hard.php @ 2b2311f

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since 2b2311f was 6f62a1a, checked in by ramon <ramongomez@…>, 10 years ago

#713: Eliminar campo pci de la tabla de tipos de hardware y crear SQL para actualizaciones dentro de la versión 1.1.0

git-svn-id: https://opengnsys.es/svn/branches/version1.1@4667 a21b9725-9963-47de-94b9-378ad31fedc9

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