source: admin/ogAdmSources/ogAdmWebCon/varios/perfilcomponente_hard.php @ e42f34e

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 e42f34e was 8964f9b, checked in by ramon <ramongomez@…>, 16 years ago

Resstructuración de trunk.

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

  • Property mode set to 100644
File size: 5.3 KB
Line 
1<?
2// *************************************************************************************************************************************************
3// Aplicación WEB: ogAdmWebCon
4// Copyright 200-2005 Jos�Manuel Alonso. Todos los derechos reservados.
5// Fecha Creación: Año 2003-2004
6// Fecha Última modificación: Febrero-2005
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<LINK rel="stylesheet" type="text/css" href="../estilos.css">
29<SCRIPT language="javascript" src="../jscripts/perfilcomponente_hard.js"></SCRIPT>
30<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
31<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/perfilcomponente_hard_'.$idioma.'.js"></SCRIPT>'?>
32</HEAD>
33<BODY>
34<FORM name="fdatos"> 
35        <INPUT type=hidden value="<? echo $idcentro?>" id=idcentro>     
36        <INPUT type=hidden value="<? echo $idperfilhard?>" id=idperfilhard>     
37        <P align=center class=cabeceras><?echo $TbMsg[0]?><BR>
38        <SPAN align=center class=subcabeceras><?echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confihard.gif"></P>
39        <BR>
40        <DIV align=center id="Layer_componentes">
41                <SPAN align=center class=presentaciones><B><U><?echo $TbMsg[2]?></U>:&nbsp;<? echo $descripcionperfil?></B></SPAN></P>
42                <TABLE width="100%" class="tabla_listados" cellspacing=1 cellpadding=0 >
43                         <TR>
44                                <TH>&nbsp</TH>
45                                <TH>T</TH>
46                                <TH><?echo $TbMsg[3]?></TH>
47                        </TR>
48                <?
49                        $rs=new Recordset;
50                        $cmd->texto='SELECT hardwares.idhardware,hardwares.descripcion,tipohardwares.descripcion as hdescripcion,tipohardwares.urlimg,fabricantes.nombre as nombrefabricante,tipohardwares.pci FROM hardwares INNER JOIN perfileshard_hardwares ON hardwares.idhardware=perfileshard_hardwares.idhardware INNER JOIN tipohardwares ON hardwares.idtipohardware=tipohardwares.idtipohardware LEFT OUTER JOIN fabricantes  ON fabricantes.codigo=hardwares.codigo1 WHERE perfileshard_hardwares.idperfilhard='.$idperfilhard.' ORDER BY tipohardwares.idtipohardware,hardwares.descripcion';
51                        $rs->Comando=&$cmd;
52                        if ($rs->Abrir()){
53                                $rs->Primero();
54                                $A_W=" WHERE ";
55                                $strex="";
56                                while (!$rs->EOF){
57                                                 echo '<TR>';
58                                                 echo '<TD align=center width="10%" ><INPUT type=checkbox onclick="gestion_componente('.$rs->campos["idhardware"].',this)" checked ></INPUT></TD>';
59                                                 echo '<TD align=center width="10%" ><IMG alt="'. $rs->campos["hdescripcion"].'"src="'.$rs->campos["urlimg"].'"></TD>';
60                                                if ($rs->campos["pci"]>0)
61                                                        $fabricante="(".trim($rs->campos["nombrefabricante"]).")";
62                                                else
63                                                        $fabricante="";
64                                                 echo '<TD  width="80%" >&nbsp;'.$fabricante.$rs->campos["descripcion"].'</TD>';
65                                                 echo '</TR>';
66                                                 $strex.= $A_W."hardwares.idhardware<>".$rs->campos["idhardware"];
67                                                $A_W=" AND ";
68                                                $rs->Siguiente();
69                                }
70                        }
71                        $rs->Cerrar();
72                        $cmd->texto='SELECT hardwares.idhardware,hardwares.descripcion,tipohardwares.descripcion as hdescripcion,tipohardwares.urlimg,fabricantes.nombre as nombrefabricante,tipohardwares.pci  FROM hardwares  INNER JOIN tipohardwares ON hardwares.idtipohardware=tipohardwares.idtipohardware  LEFT OUTER JOIN fabricantes   ON fabricantes.codigo=hardwares.codigo1  '.$strex.' AND hardwares.idcentro='.$idcentro.'  ORDER BY tipohardwares.idtipohardware,hardwares.descripcion';
73                        $rs->Comando=&$cmd;
74                        if ($rs->Abrir()){
75                                $rs->Primero();
76                                while (!$rs->EOF){
77                                                 echo '<TR>';
78                                                 echo '<TD align=center width="10%" ><INPUT type=checkbox onclick="gestion_componente('.$rs->campos["idhardware"].',this)"  ></INPUT></TD>';
79                                                 echo '<TD align=center width="10%" ><IMG alt="'. $rs->campos["hdescripcion"].'"src="'.$rs->campos["urlimg"].'"></TD>';
80                                                if ($rs->campos["pci"]>0)
81                                                        $fabricante="(".trim($rs->campos["nombrefabricante"]).")";
82                                                else
83                                                        $fabricante="";
84                                                 echo '<TD width="80%" >&nbsp;'.$fabricante.$rs->campos["descripcion"].'</TD>';
85                                                 echo '</TR>';
86                                                $rs->Siguiente();
87                                }
88                        }
89                        $rs->Cerrar();
90                ?>
91                </TABLE>
92        </DIV>         
93        <DIV id="Layer_nota" align=center >
94                <BR>
95                <SPAN align=center class=notas><I><?echo $TbMsg[4]?></I></SPAN>
96        </DIV>
97</FORM>
98<?
99//________________________________________________________________________________________________________
100include_once("../includes/iframecomun.php");
101//________________________________________________________________________________________________________
102?>
103</BODY>
104</HTML>
Note: See TracBrowser for help on using the repository browser.