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 2003-2004 |
---|
6 | // Fecha Última modificación: Marzo-2005 |
---|
7 | // Nombre del fichero: InventarioSoftware.php |
---|
8 | // Descripción : |
---|
9 | // Implementación del comando "Inventario Software" |
---|
10 | // ************************************************************************************************************************************************* |
---|
11 | include_once("../includes/ctrlacc.php"); |
---|
12 | include_once("../clases/AdoPhp.php"); |
---|
13 | include_once("../includes/constantes.php"); |
---|
14 | include_once("../includes/comunes.php"); |
---|
15 | include_once("../includes/CreaComando.php"); |
---|
16 | include_once("../includes/HTMLSELECT.php"); |
---|
17 | include_once("../idiomas/php/".$idioma."/comandos/inventariosoftware_".$idioma.".php"); |
---|
18 | //________________________________________________________________________________________________________ |
---|
19 | $fp = fopen($fileparam,"r"); |
---|
20 | $parametros= fread ($fp, filesize ($fileparam)); |
---|
21 | fclose($fp); |
---|
22 | |
---|
23 | $ValorParametros=extrae_parametros($parametros,chr(13),'='); |
---|
24 | $idambito=$ValorParametros["idambito"]; |
---|
25 | $ambito=$ValorParametros["ambito"]; |
---|
26 | $nombreambito=$ValorParametros["nombreambito"]; |
---|
27 | |
---|
28 | $cmd=CreaComando($cadenaconexion); |
---|
29 | if (!$cmd) |
---|
30 | Header('Location: '.$pagerror.'?herror=2'); // Error de conexióncon servidor B.D. |
---|
31 | //________________________________________________________________________________________________________ |
---|
32 | ?> |
---|
33 | <HTML> |
---|
34 | <TITLE>Administración web de aulas</TITLE> |
---|
35 | <HEAD> |
---|
36 | <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
37 | <LINK rel="stylesheet" type="text/css" href="../estilos.css"> |
---|
38 | <SCRIPT language="javascript" src="./jscripts/InventarioSoftware.js"></SCRIPT> |
---|
39 | <SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT> |
---|
40 | <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?> |
---|
41 | </HEAD> |
---|
42 | <BODY> |
---|
43 | <? |
---|
44 | switch($ambito){ |
---|
45 | case $AMBITO_CENTROS : |
---|
46 | $urlimg='../images/iconos/centros.gif'; |
---|
47 | $textambito=$TbMsg[0]; |
---|
48 | break; |
---|
49 | case $AMBITO_GRUPOSAULAS : |
---|
50 | $urlimg='../images/iconos/carpeta.gif'; |
---|
51 | $textambito=$TbMsg[1]; |
---|
52 | break; |
---|
53 | case $AMBITO_AULAS : |
---|
54 | $urlimg='../images/iconos/aula.gif'; |
---|
55 | $textambito=$TbMsg[2]; |
---|
56 | break; |
---|
57 | case $AMBITO_GRUPOSORDENADORES : |
---|
58 | $urlimg='../images/iconos/carpeta.gif'; |
---|
59 | $textambito=$TbMsg[3]; |
---|
60 | break; |
---|
61 | case $AMBITO_ORDENADORES : |
---|
62 | $urlimg='../images/iconos/ordenador.gif'; |
---|
63 | $textambito=$TbMsg[4]; |
---|
64 | break; |
---|
65 | } |
---|
66 | echo '<p align=center><span class=cabeceras>'.$TbMsg[5].' </span><br>'; |
---|
67 | echo '<IMG src="'.$urlimg.'"> <span align=center class=subcabeceras><U>'.$TbMsg[6].': '.$textambito.','.$nombreambito.'</U></span> </span></p>'; |
---|
68 | ?> |
---|
69 | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
---|
70 | <P align=center> |
---|
71 | <SPAN align=center class=subcabeceras><? echo $TbMsg[7] ?></SPAN> |
---|
72 | </BR> |
---|
73 | <TABLE id="tabla_conf" align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos> |
---|
74 | <TR> |
---|
75 | <TH align=center> </TH> |
---|
76 | <TH align=center> <? echo $TbMsg[8] ?> </TH> |
---|
77 | <TH align=center> <? echo $TbMsg[9] ?> </TH> |
---|
78 | </TR> |
---|
79 | <? |
---|
80 | echo tabla_configuraciones($cmd,$idambito); |
---|
81 | ?> |
---|
82 | </TABLE> |
---|
83 | |
---|
84 | <BR> |
---|
85 | <? |
---|
86 | //________________________________________________________________________________________________________ |
---|
87 | include_once("../includes/opcionesacciones.php"); |
---|
88 | //________________________________________________________________________________________________________ |
---|
89 | //________________________________________________________________________________________________________ |
---|
90 | include_once("../includes/opcionesbotones.php"); |
---|
91 | //________________________________________________________________________________________________________ |
---|
92 | //________________________________________________________________________________________________________ |
---|
93 | include_once("../includes/iframecomun.php"); |
---|
94 | //________________________________________________________________________________________________________ |
---|
95 | ?> |
---|
96 | </BODY> |
---|
97 | </HTML> |
---|
98 | <? |
---|
99 | /*________________________________________________________________________________________________________ |
---|
100 | Particiones |
---|
101 | ________________________________________________________________________________________________________*/ |
---|
102 | function tabla_configuraciones($cmd,$idordenador){ |
---|
103 | global $idcentro; |
---|
104 | $tablaHtml=""; |
---|
105 | $rs=new Recordset; |
---|
106 | $rsp=new Recordset; |
---|
107 | $cmd->texto="SELECT configuraciones.configuracion FROM configuraciones INNER JOIN ordenadores ON configuraciones.idconfiguracion=ordenadores.idconfiguracion WHERE ordenadores.idordenador='".$idordenador."'"; |
---|
108 | $rs->Comando=&$cmd; |
---|
109 | if (!$rs->Abrir()) return(""); // Error al abrir recordset |
---|
110 | $configuracion= $rs->campos["configuracion"]; |
---|
111 | $auxsplit=split("\t",$configuracion); |
---|
112 | for($j=0;$j<sizeof($auxsplit)-1;$j++){ |
---|
113 | $ValorParametros=extrae_parametros($auxsplit[$j],chr(10),'='); |
---|
114 | $particion=$ValorParametros["numpart"]; // Toma la partici� |
---|
115 | $tiposo=$ValorParametros["tiposo"]; // Toma nombre del sistema operativo |
---|
116 | $tipopart=trim($ValorParametros["tipopart"]); // Toma tipo de partici� del sistema operativo |
---|
117 | $nombreso=$ValorParametros["nombreso"]; // Toma nombre del sistema operativo |
---|
118 | if(!empty($tiposo)){ |
---|
119 | $tablaHtml.='<TR>'.chr(13); |
---|
120 | $tablaHtml.='<TD ><input type=checkbox name=particion_'.$particion.' value='.$particion.'></TD>'.chr(13); |
---|
121 | $tablaHtml.='<TD align=center> '.$particion.' </TD>'.chr(13); |
---|
122 | $tablaHtml.='<TD> '.$nombreso.' </TD>'.chr(13); |
---|
123 | $tiposo=$ValorParametros["tiposo"]; |
---|
124 | $tablaHtml.='</TR>'.chr(13); |
---|
125 | } |
---|
126 | } |
---|
127 | $rs->Cerrar(); |
---|
128 | return($tablaHtml); |
---|
129 | } |
---|
130 | ?> |
---|