1 | <html> |
---|
2 | <TITLE>Administración web de aulas</TITLE> |
---|
3 | <head> |
---|
4 | <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
5 | <LINK rel="stylesheet" type="text/css" href="../estilos.css"> |
---|
6 | <SCRIPT language="javascript" src="../jscripts/propiedades_aulas.js"></SCRIPT> |
---|
7 | <SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT> |
---|
8 | <SCRIPT language="javascript" src="../idiomas/javascripts/esp/propiedades_aulas_esp.js"></SCRIPT></HEAD> |
---|
9 | |
---|
10 | <script language="javascript" type="text/javascript"> |
---|
11 | |
---|
12 | function move(fbox, tbox) { |
---|
13 | var arrFbox = new Array(); |
---|
14 | var arrTbox = new Array(); |
---|
15 | var arrLookup = new Array(); |
---|
16 | var i; |
---|
17 | for (i = 0; i < tbox.options.length; i++) { |
---|
18 | arrLookup[tbox.options[i].text] = tbox.options[i].value; |
---|
19 | arrTbox[i] = tbox.options[i].text; |
---|
20 | } |
---|
21 | var fLength = 0; |
---|
22 | var tLength = arrTbox.length; |
---|
23 | for(i = 0; i < fbox.options.length; i++) { |
---|
24 | arrLookup[fbox.options[i].text] = fbox.options[i].value; |
---|
25 | if (fbox.options[i].selected && fbox.options[i].value != "") { |
---|
26 | arrTbox[tLength] = fbox.options[i].text; |
---|
27 | tLength++; |
---|
28 | } |
---|
29 | else { |
---|
30 | arrFbox[fLength] = fbox.options[i].text; |
---|
31 | fLength++; |
---|
32 | } |
---|
33 | } |
---|
34 | arrFbox.sort(); |
---|
35 | arrTbox.sort(); |
---|
36 | fbox.length = 0; |
---|
37 | tbox.length = 0; |
---|
38 | var c; |
---|
39 | |
---|
40 | for(c = 0; c < arrFbox.length; c++) { |
---|
41 | var no = new Option(); |
---|
42 | no.value = arrLookup[arrFbox[c]]; |
---|
43 | no.text = arrFbox[c]; |
---|
44 | fbox[c] = no; |
---|
45 | } |
---|
46 | |
---|
47 | for(c = 0; c < arrTbox.length; c++) { |
---|
48 | var no = new Option(); |
---|
49 | no.value = arrLookup[arrTbox[c]]; |
---|
50 | no.text = arrTbox[c]; |
---|
51 | tbox[c] = no; |
---|
52 | } |
---|
53 | } |
---|
54 | |
---|
55 | function allSelect() |
---|
56 | { |
---|
57 | var saveString = ""; |
---|
58 | // seleccionamos cada uno de los select |
---|
59 | var input = document.getElementsByTagName('select'); |
---|
60 | //alert(input.length); |
---|
61 | for(var i=0; i<input.length; i++){ |
---|
62 | //if(inputs[i].getAttribute('type')=='button'){ |
---|
63 | // your statements |
---|
64 | patron = "L"; |
---|
65 | parm = input[i].name; |
---|
66 | //alert(parm); |
---|
67 | parm = parm.replace(patron,''); |
---|
68 | //alert(parm); |
---|
69 | for (j=0;j<input[i].length;j++) |
---|
70 | { |
---|
71 | //List.options[i].selected = true; |
---|
72 | saveString = saveString + parm + '|' + input[i].options[j].value + ';'; |
---|
73 | //alert(saveString); |
---|
74 | } |
---|
75 | } |
---|
76 | document.forms['myForm'].listOfItems.value = saveString; |
---|
77 | } |
---|
78 | |
---|
79 | |
---|
80 | </script> |
---|
81 | </head> |
---|
82 | <body> |
---|
83 | |
---|
84 | <?php |
---|
85 | include_once("../includes/ctrlacc.php"); |
---|
86 | include_once("../clases/AdoPhp.php"); |
---|
87 | include_once("../clases/XmlPhp.php"); |
---|
88 | include_once("../clases/MenuContextual.php"); |
---|
89 | include_once("../clases/SockHidra.php"); |
---|
90 | include_once("../includes/constantes.php"); |
---|
91 | include_once("../includes/comunes.php"); |
---|
92 | include_once("../includes/CreaComando.php"); |
---|
93 | include_once("../idiomas/php/".$idioma."/aulas_".$idioma.".php"); |
---|
94 | |
---|
95 | $cmd=CreaComando($cadenaconexion); |
---|
96 | if (!$cmd) |
---|
97 | Header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D. |
---|
98 | //________________________________________________________________________________________________________ |
---|
99 | |
---|
100 | $litambito=0; |
---|
101 | $idambito=0; |
---|
102 | $nombreambito=""; |
---|
103 | |
---|
104 | |
---|
105 | if (isset($_GET["litambito"])) $litambito=$_GET["litambito"]; // Recoge parametros |
---|
106 | if (isset($_GET["idambito"])) $idambito=$_GET["idambito"]; |
---|
107 | if (isset($_GET["nombreambito"])) $nombreambito=$_GET["nombreambito"]; |
---|
108 | |
---|
109 | |
---|
110 | switch($litambito){ |
---|
111 | case "aulas": |
---|
112 | $seleccion="and idaula=" . $idambito .""; |
---|
113 | break; |
---|
114 | case "gruposordenadores": |
---|
115 | $seleccion= "and grupoid=" . $idambito . ""; |
---|
116 | break; |
---|
117 | } |
---|
118 | ?> |
---|
119 | |
---|
120 | <TABLE align=center border=1 cellPadding=1 cellSpacing=1 class=tabla_datos > |
---|
121 | <form name="myForm" method="post" action="../gestores/gestor_pxe.php?idaula=<?php echo $idambito ?>&nombreambito=<?php echo $nombreambito?>&litambito=<?php echo $litambito?>" > |
---|
122 | |
---|
123 | |
---|
124 | <P align=center class=cabeceras>Gestión Arranque Avanzado<BR> |
---|
125 | <SPAN align=center class=subcabeceras> <?php echo $nombreambito; ?> </SPAN> |
---|
126 | <input type="submit" value="GUARDAR" name="saveButton" onclick="allSelect()"> </P> |
---|
127 | |
---|
128 | |
---|
129 | |
---|
130 | |
---|
131 | |
---|
132 | |
---|
133 | <input type="hidden" name="listOfItems" value=""> |
---|
134 | <?php |
---|
135 | echo "<input type='hidden' name='rungrupo' value='" . $_GET['id_aula'] . "'>"; |
---|
136 | ?> |
---|
137 | |
---|
138 | |
---|
139 | <!-- primer file, nombre de las equipos por pxe hace falta <td> </td>--> |
---|
140 | <tr> |
---|
141 | <td> |
---|
142 | <!-- <a href="./muestramenu.php?labelmenu=pxe"> OGclient </a><br> pxe <br> --> |
---|
143 | OGclient <br> |
---|
144 | <select multiple size="30" name="Lpxe" id="Lpxe" style="width:100"> |
---|
145 | |
---|
146 | <?php |
---|
147 | #### listado de equipos con menu pxe |
---|
148 | $menupxe=pxe; |
---|
149 | $listadopxe=listaequipos($cmd,$menupxe,$seleccion); |
---|
150 | echo $listadopxe; |
---|
151 | ?> |
---|
152 | </select> |
---|
153 | </td> |
---|
154 | |
---|
155 | |
---|
156 | <?php |
---|
157 | |
---|
158 | $cmd->texto="SELECT * FROM menuboot where label <> 'pxe' "; |
---|
159 | $rsmenu=new Recordset; |
---|
160 | $rsmenu->Comando=&$cmd; |
---|
161 | if (!$rsmenu->Abrir()) echo "error"; |
---|
162 | $rsmenu->Primero(); |
---|
163 | while (!$rsmenu->EOF) |
---|
164 | { |
---|
165 | echo "<td></td>"; |
---|
166 | echo "<td> "; |
---|
167 | echo $rsmenu->campos['description']; |
---|
168 | #echo "<a href='./muestramenu.php?labelmenu=" . $rsmenu->campos['label'] ."'> " . $rsmenu->campos['description'] . " </a> <br>". $rs->campos['label'] . "<br>"; |
---|
169 | echo " <br>"; |
---|
170 | echo "<input type='button' onClick='move(this.form.L" . $rsmenu->campos['label'] . ",this.form.Lpxe)' value='OUT' style='height: 25px; width: 50px' >"; |
---|
171 | echo "<input type='button' onClick='move(this.form.Lpxe,this.form.L" . $rsmenu->campos['label'] .")' value='IN' style='height: 25px; width: 35px' >"; |
---|
172 | echo " <br>"; |
---|
173 | echo "<select multiple size='30' name='L" . $rsmenu->campos['label'] . "' style='width:100'>"; |
---|
174 | $listadopxe=""; |
---|
175 | $listadopxe=listaequipos($cmd,$rsmenu->campos['label'],$seleccion); |
---|
176 | echo $listadopxe; |
---|
177 | echo "</select>"; |
---|
178 | echo "</td>"; |
---|
179 | $rsmenu->Siguiente(); |
---|
180 | } |
---|
181 | $rsmenu->Cerrar(); |
---|
182 | |
---|
183 | |
---|
184 | |
---|
185 | |
---|
186 | |
---|
187 | |
---|
188 | |
---|
189 | // esta funcion genera los elementos de un select(formulario html) donde aparecen los nombres de los ordenadores, según su menu pxe |
---|
190 | function listaequipos($cmd,$menupxe,$seleccion) |
---|
191 | { |
---|
192 | $cmd->texto="SELECT * FROM ordenadores where arranque='" . $menupxe ."' " . $seleccion; |
---|
193 | $rs=new Recordset; |
---|
194 | $rs->Comando=&$cmd; |
---|
195 | if (!$rs->Abrir()) echo "error"; |
---|
196 | $rs->Primero(); |
---|
197 | while (!$rs->EOF) |
---|
198 | { |
---|
199 | echo "<option value='"; |
---|
200 | echo $rs->campos["nombreordenador"]; |
---|
201 | echo "'>"; |
---|
202 | echo $rs->campos["nombreordenador"]; |
---|
203 | echo "</option>"; |
---|
204 | $rs->Siguiente(); |
---|
205 | } |
---|
206 | $rs->Cerrar(); |
---|
207 | } |
---|
208 | |
---|
209 | ?> |
---|
210 | |
---|
211 | </tr> |
---|
212 | |
---|
213 | </form> |
---|
214 | </table> |
---|
215 | |
---|
216 | </body> |
---|
217 | </html> |
---|