source: admin/WebConsole/varios/perfilcomponente_hard.php @ fe6843b

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 fe6843b was 3ec149c, checked in by alonso <alonso@…>, 15 years ago

git-svn-id: https://opengnsys.es/svn/trunk@1314 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100644
File size: 4.7 KB
Line 
1<?
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<? 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="<? echo $idcentro?>" id=idcentro>     
38        <INPUT type=hidden value="<? echo $idperfilhard?>" id=idperfilhard>     
39        <P align=center class=cabeceras><?echo $TbMsg[0]?><BR>
40        <SPAN align=center class=subcabeceras><?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><?echo $TbMsg[2]?></U>:&nbsp;<? 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><?echo $TbMsg[3]?></TH>
49                        </TR>
50                <?
51                        $rs=new Recordset;
52                        $cmd->texto='SELECT hardwares.idhardware,hardwares.descripcion,tipohardwares.descripcion as hdescripcion,tipohardwares.urlimg,tipohardwares.pci FROM hardwares INNER JOIN perfileshard_hardwares ON hardwares.idhardware=perfileshard_hardwares.idhardware INNER JOIN tipohardwares ON hardwares.idtipohardware=tipohardwares.idtipohardware WHERE perfileshard_hardwares.idperfilhard='.$idperfilhard.' ORDER BY tipohardwares.idtipohardware,hardwares.descripcion';
53                        $rs->Comando=&$cmd;
54
55                        if ($rs->Abrir()){
56                                $rs->Primero();
57                                $A_W=" WHERE ";
58                                $strex="";
59                                while (!$rs->EOF){
60                                                 echo '<TR>';
61                                                 echo '<TD align=center width="10%" ><INPUT type=checkbox onclick="gestion_componente('.$rs->campos["idhardware"].',this)" checked ></INPUT></TD>';
62                                                 echo '<TD align=center width="10%" ><IMG alt="'. $rs->campos["hdescripcion"].'"src="'.$rs->campos["urlimg"].'"></TD>';
63                                                 echo '<TD  width="80%" >&nbsp;'.$rs->campos["descripcion"].'</TD>';
64                                                 echo '</TR>';
65                                                 $strex.= $A_W."hardwares.idhardware<>".$rs->campos["idhardware"];
66                                                $A_W=" AND ";
67                                                $rs->Siguiente();
68                                }
69                        }
70                        $rs->Cerrar();
71                        $cmd->texto='SELECT hardwares.idhardware,hardwares.descripcion,tipohardwares.descripcion as hdescripcion,tipohardwares.urlimg,tipohardwares.pci  FROM hardwares  INNER JOIN tipohardwares ON hardwares.idtipohardware=tipohardwares.idtipohardware '.$strex.' AND hardwares.idcentro='.$idcentro.'  ORDER BY tipohardwares.idtipohardware,hardwares.descripcion';
72                        $rs->Comando=&$cmd;
73                        if ($rs->Abrir()){
74                                $rs->Primero();
75                                while (!$rs->EOF){
76                                                 echo '<TR>';
77                                                 echo '<TD align=center width="10%" ><INPUT type=checkbox onclick="gestion_componente('.$rs->campos["idhardware"].',this)"  ></INPUT></TD>';
78                                                 echo '<TD align=center width="10%" ><IMG alt="'. $rs->campos["hdescripcion"].'"src="'.$rs->campos["urlimg"].'"></TD>';
79
80                                                 echo '<TD width="80%" >&nbsp;'.$rs->campos["descripcion"].'</TD>';
81                                                 echo '</TR>';
82                                                $rs->Siguiente();
83                                }
84                        }
85                        $rs->Cerrar();
86                ?>
87                </TABLE>
88        </DIV>         
89        <DIV id="Layer_nota" align=center >
90                <BR>
91                <SPAN align=center class=notas><I><?echo $TbMsg[4]?></I></SPAN>
92        </DIV>
93</FORM>
94</BODY>
95</HTML>
Note: See TracBrowser for help on using the repository browser.