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: aula.php |
---|
8 | // Descripción : |
---|
9 | // Visualiza los ordenadores de las aulas de un determinado Centro |
---|
10 | // ************************************************************************************************************************************************* |
---|
11 | include_once("../includes/ctrlacc.php"); |
---|
12 | include_once("../clases/AdoPhp.php"); |
---|
13 | include_once("../clases/XmlPhp.php"); |
---|
14 | include_once("../clases/MenuContextual.php"); |
---|
15 | include_once("../clases/SockHidra.php"); |
---|
16 | include_once("../includes/constantes.php"); |
---|
17 | include_once("../includes/comunes.php"); |
---|
18 | include_once("../includes/CreaComando.php"); |
---|
19 | include_once("../idiomas/php/".$idioma."/aulas_".$idioma.".php"); |
---|
20 | //________________________________________________________________________________________________________ |
---|
21 | $litambito=0; |
---|
22 | $idambito=0; |
---|
23 | $nombreambito=""; |
---|
24 | $idsrvrembo=0; |
---|
25 | $idsrvdhcp=0; |
---|
26 | |
---|
27 | if (isset($_GET["litambito"])) $litambito=$_GET["litambito"]; // Recoge parametros |
---|
28 | if (isset($_GET["idambito"])) $idambito=$_GET["idambito"]; |
---|
29 | if (isset($_GET["nombreambito"])) $nombreambito=$_GET["nombreambito"]; |
---|
30 | |
---|
31 | $Midordenador= Array(); |
---|
32 | $Mnombreordenador= Array(); |
---|
33 | $MimgOrdenador=Array(); |
---|
34 | $Mip= Array(); |
---|
35 | $Mmac= Array(); |
---|
36 | $k=0; // Indice de la Matriz |
---|
37 | |
---|
38 | $cadenaip=""; |
---|
39 | $idaula=0; |
---|
40 | $nombreaula=""; |
---|
41 | //________________________________________________________________________________________________________ |
---|
42 | $cmd=CreaComando($cadenaconexion); |
---|
43 | if (!$cmd) |
---|
44 | Header('Location: '.$pagerror.'?herror=2'); // Error de conexióncon servidor B.D. |
---|
45 | //________________________________________________________________________________________________________ |
---|
46 | ?> |
---|
47 | <HTML> |
---|
48 | <HEAD> |
---|
49 | <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
50 | <LINK rel="stylesheet" type="text/css" href="../estilos.css"> |
---|
51 | </HEAD> |
---|
52 | <BODY OnContextMenu="return false"> |
---|
53 | <SCRIPT language="javascript" src="../clases/jscripts/ArbolVistaXML.js"></SCRIPT> |
---|
54 | <SCRIPT language="javascript" src="../clases/jscripts/MenuContextual.js"></SCRIPT> |
---|
55 | <SCRIPT language="javascript" src="../jscripts/aula.js"></SCRIPT> |
---|
56 | <SCRIPT language="javascript" src="../jscripts/aulas.js"></SCRIPT> |
---|
57 | <SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT> |
---|
58 | <SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT> |
---|
59 | <SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT> |
---|
60 | <SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT> |
---|
61 | <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?> |
---|
62 | <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/aulas_'.$idioma.'.js"></SCRIPT>'?> |
---|
63 | <? |
---|
64 | //________________________________________________________________________________________________________ |
---|
65 | switch($litambito){ |
---|
66 | case $LITAMBITO_CENTROS : |
---|
67 | $ambito=$AMBITO_CENTROS; |
---|
68 | echo '<p align=center class=cabeceras>'.$TbMsg[22].'<br>'.$TbMsg[24].'<br><span class=subcabeceras>'.$nombreambito.'</span></p>'; |
---|
69 | $cmd->texto="SELECT idcentro,nombrecentro FROM centros WHERE idcentro=".$idambito; |
---|
70 | RecorreCentro($cmd); |
---|
71 | break; |
---|
72 | case $LITAMBITO_GRUPOSAULAS : |
---|
73 | $ambito=$AMBITO_GRUPOSAULAS; |
---|
74 | echo '<p align=center class=cabeceras>'.$TbMsg[22].'<br>'.$TbMsg[25].'<br><span class=subcabeceras>'.$nombreambito.'</span></p>'; |
---|
75 | $cmd->texto="SELECT idgrupo,nombregrupo FROM grupos WHERE tipo=".$AMBITO_GRUPOSAULAS." AND idgrupo=".$idambito; |
---|
76 | RecorreGruposAulas($cmd); |
---|
77 | break; |
---|
78 | case $LITAMBITO_AULAS : |
---|
79 | $ambito=$AMBITO_AULAS; |
---|
80 | $cmd->texto="SELECT idaula,nombreaula FROM aulas WHERE idaula=".$idambito; |
---|
81 | RecorreAulas($cmd); |
---|
82 | break; |
---|
83 | case $LITAMBITO_GRUPOSORDENADORES : |
---|
84 | $ambito=$AMBITO_GRUPOSORDENADORES; |
---|
85 | echo '<p align=center class=cabeceras>'.$TbMsg[22].'<br>'.$TbMsg[26].'<br><span class=subcabeceras>'.$nombreambito.'</span></p>'; |
---|
86 | $cmd->texto="SELECT idgrupo,nombregrupoordenador FROM gruposordenadores WHERE idgrupo=".$idambito; |
---|
87 | RecorreGruposOrdenadores($cmd); |
---|
88 | pintaordenadores(); |
---|
89 | break; |
---|
90 | } |
---|
91 | ?> |
---|
92 | <FORM name="fcomandos" action="" method="post" target="frame_contenidos"> |
---|
93 | <INPUT type="hidden" name="idcomando" value=""> |
---|
94 | <INPUT type="hidden" name="descricomando" value=""> |
---|
95 | <INPUT type="hidden" name="ambito" value="<? echo $ambito?>"> |
---|
96 | <INPUT type="hidden" name="idambito" value="<? echo $idambito?>"> |
---|
97 | <INPUT type="hidden" name="nombreambito" value=""> |
---|
98 | <INPUT type="hidden" name="gestor" value=""> |
---|
99 | <INPUT type="hidden" name="funcion" value=""> |
---|
100 | <INPUT type="hidden" name="script" value=""> |
---|
101 | </FORM> |
---|
102 | <? |
---|
103 | $flotante=new MenuContextual(); // Crea objeto menu contextual |
---|
104 | $XMLcontextual=ContextualXMLAulas(); // Crea contextual de aulas |
---|
105 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
106 | $XMLcontextual=ContextualXMLOrdenadores(); // Crea contextual de ordenadores |
---|
107 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
108 | |
---|
109 | // Crea contextual de los comandos para los distintosn ámbitos |
---|
110 | $XMLcontextual=ContextualXMLComandos($LITAMBITO_AULAS,$AMBITO_AULAS); |
---|
111 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
112 | $XMLcontextual=ContextualXMLComandos($LITAMBITO_ORDENADORES,$AMBITO_ORDENADORES); |
---|
113 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
114 | |
---|
115 | // Crea contextual de los asistentes para los distintosn ámbitos |
---|
116 | $XMLcontextual=ContextualXMLAsistentes($LITAMBITO_AULAS,$AMBITO_AULAS); |
---|
117 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
118 | $XMLcontextual=ContextualXMLAsistentes($LITAMBITO_ORDENADORES,$AMBITO_ORDENADORES); |
---|
119 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
120 | |
---|
121 | ?> |
---|
122 | <SCRIPT language="javascript"> |
---|
123 | Sondeo(); |
---|
124 | </SCRIPT> |
---|
125 | </BODY> |
---|
126 | </HTML> |
---|
127 | <? |
---|
128 | // ************************************************************************************************************************************************* |
---|
129 | function RecorreCentro($cmd){ |
---|
130 | global $AMBITO_GRUPOSAULAS; |
---|
131 | $rs=new Recordset; |
---|
132 | $rs->Comando=&$cmd; |
---|
133 | if (!$rs->Abrir()) return; // Error al abrir recordset |
---|
134 | $rs->Primero(); |
---|
135 | if(!$rs->EOF){ |
---|
136 | $idcentro=$rs->campos["idcentro"]; |
---|
137 | $cmd->texto="SELECT idgrupo,nombregrupo FROM grupos WHERE idcentro=".$idcentro." AND grupoid=0 AND tipo=".$AMBITO_GRUPOSAULAS." ORDER BY nombregrupo "; |
---|
138 | RecorreGruposAulas($cmd); |
---|
139 | $cmd->texto="SELECT idaula,nombreaula FROM aulas WHERE idcentro=".$idcentro." AND grupoid=0 ORDER BY nombreaula"; |
---|
140 | RecorreAulas($cmd); |
---|
141 | } |
---|
142 | $rs->Cerrar(); |
---|
143 | } |
---|
144 | //________________________________________________________________________________________________________ |
---|
145 | function RecorreGruposAulas($cmd){ |
---|
146 | global $AMBITO_GRUPOSAULAS; |
---|
147 | $rs=new Recordset; |
---|
148 | $rs->Comando=&$cmd; |
---|
149 | if (!$rs->Abrir()) return; // Error al abrir recordset |
---|
150 | $rs->Primero(); |
---|
151 | while (!$rs->EOF){ |
---|
152 | $idgrupo=$rs->campos["idgrupo"]; |
---|
153 | $cmd->texto="SELECT idgrupo,nombregrupo FROM grupos WHERE grupoid=".$idgrupo." AND tipo=".$AMBITO_GRUPOSAULAS." ORDER BY nombregrupo"; |
---|
154 | RecorreGruposAulas($cmd); |
---|
155 | $cmd->texto="SELECT idaula,nombreaula FROM aulas WHERE grupoid=".$idgrupo." ORDER BY nombreaula"; |
---|
156 | RecorreAulas($cmd); |
---|
157 | $rs->Siguiente(); |
---|
158 | } |
---|
159 | $rs->Cerrar(); |
---|
160 | } |
---|
161 | //________________________________________________________________________________________________________ |
---|
162 | function RecorreAulas($cmd){ |
---|
163 | global $idaula; |
---|
164 | global $nombreaula; |
---|
165 | global $k; // Indice de la Matriz |
---|
166 | global $cadenaip; |
---|
167 | |
---|
168 | $rs=new Recordset; |
---|
169 | $rs->Comando=&$cmd; |
---|
170 | if (!$rs->Abrir()) return; // Error al abrir recordset |
---|
171 | $rs->Primero(); |
---|
172 | while (!$rs->EOF){ |
---|
173 | $idaula=$rs->campos["idaula"]; |
---|
174 | $nombreaula=$rs->campos["nombreaula"]; |
---|
175 | $cmd->texto="SELECT idordenador,nombreordenador,ip,mac FROM ordenadores WHERE idaula=".$idaula; |
---|
176 | $k=0; |
---|
177 | $cadenaip=""; |
---|
178 | RecorreOrdenadores($cmd); |
---|
179 | pintaordenadores(); |
---|
180 | $rs->Siguiente(); |
---|
181 | } |
---|
182 | $rs->Cerrar(); |
---|
183 | } |
---|
184 | //________________________________________________________________________________________________________ |
---|
185 | function RecorreGruposOrdenadores($cmd){ |
---|
186 | $rs=new Recordset; |
---|
187 | $rs->Comando=&$cmd; |
---|
188 | if (!$rs->Abrir()) return; // Error al abrir recordset |
---|
189 | $rs->Primero(); |
---|
190 | while (!$rs->EOF){ |
---|
191 | $idgrupo=$rs->campos["idgrupo"]; |
---|
192 | $cmd->texto="SELECT idgrupo,nombregrupoordenador FROM gruposOrdenadores WHERE grupoid=".$idgrupo." ORDER BY nombregrupoordenador"; |
---|
193 | RecorreGruposOrdenadores($cmd); |
---|
194 | $cmd->texto="SELECT idordenador,nombreordenador,ip,mac FROM ordenadores WHERE grupoid=".$idgrupo; |
---|
195 | RecorreOrdenadores($cmd); |
---|
196 | $rs->Siguiente(); |
---|
197 | } |
---|
198 | $rs->Cerrar(); |
---|
199 | } |
---|
200 | //________________________________________________________________________________________________________ |
---|
201 | function RecorreOrdenadores($cmd){ |
---|
202 | global $Midordenador; |
---|
203 | global $Mnombreordenador; |
---|
204 | global $MimgOrdenador; |
---|
205 | global $Mip; |
---|
206 | global $Mmac; |
---|
207 | global $k; // Indice de la Matriz |
---|
208 | |
---|
209 | global $cadenaip; |
---|
210 | |
---|
211 | $cmd->texto.= " ORDER BY nombreordenador"; |
---|
212 | $rs=new Recordset; |
---|
213 | $rs->Comando=&$cmd; |
---|
214 | if (!$rs->Abrir()) return; // Error al abrir recordset |
---|
215 | $rs->Primero(); |
---|
216 | |
---|
217 | while (!$rs->EOF){ |
---|
218 | $idordenador=$rs->campos["idordenador"]; |
---|
219 | $Midordenador[$k]=$rs->campos["idordenador"]; |
---|
220 | $Mnombreordenador[$k]=$rs->campos["nombreordenador"]; |
---|
221 | $MimgOrdenador[$k]="ordenador_OFF.gif"; |
---|
222 | $Mip[$k]=$rs->campos["ip"]; |
---|
223 | $Mmac[$k]=$rs->campos["mac"]; |
---|
224 | $cadenaip.=$rs->campos["ip"].";"; |
---|
225 | $k++; |
---|
226 | $rs->Siguiente(); |
---|
227 | } |
---|
228 | $rs->Cerrar(); |
---|
229 | } |
---|
230 | //________________________________________________________________________________________________________ |
---|
231 | function pintaordenadores(){ |
---|
232 | global $AMBITO_AULAS; |
---|
233 | global $AMBITO_ORDENADORES; |
---|
234 | global $LITAMBITO_AULAS; |
---|
235 | global $LITAMBITO_ORDENADORES; |
---|
236 | global $LONCABECERA; |
---|
237 | global $Midordenador; |
---|
238 | global $Mnombreordenador; |
---|
239 | global $MimgOrdenador; |
---|
240 | global $Mip; |
---|
241 | global $Mmac; |
---|
242 | global $k; // Indice de la Matriz |
---|
243 | global $cadenaip; |
---|
244 | global $idaula; |
---|
245 | global $nombreaula; |
---|
246 | global $servidorhidra,$hidraport; |
---|
247 | global $TbMsg; |
---|
248 | |
---|
249 | $ntr=0; // Numero de ordenadores por fila |
---|
250 | if ($nombreaula!=""){ |
---|
251 | echo '<DIV>'; |
---|
252 | echo '<p align=center class=cabeceras><img border=0 nod="'.$LITAMBITO_AULAS.'-'.$idaula.'" value="'.$nombreaula.'" |
---|
253 | style="cursor:pointer" src="../images/iconos/aula.gif" oncontextmenu="nwmenucontextual(this,' ."'flo_".$LITAMBITO_AULAS."'" .')" > '.$TbMsg[23].'</br><span id="'.$LITAMBITO_AULAS.'-'.$idaula.'" class=subcabeceras>'.$nombreaula.'</span></p>'; |
---|
254 | } |
---|
255 | echo '<TABLE style="BORDER-BOTTOM: #d4d0c8 1px solid;BORDER-LEFT: #d4d0c8 1px solid;BORDER-RIGHT: #d4d0c8 1px solid;BORDER-TOP: #d4d0c8 1px solid" align=center><TR>'; |
---|
256 | for($i=0;$i<$k;$i++){ // Vuelve a recorrer los datos de ordenadores para crear HTML |
---|
257 | $ntr++; |
---|
258 | echo '<TD>'; |
---|
259 | echo '<table border=0>'; |
---|
260 | echo '<tr>'; |
---|
261 | echo ' <td align=center width=70 height=40>'; |
---|
262 | echo ' <a href="#"><img id="'.$Mip[$i].'" border=0 sondeo="" nod="'.$LITAMBITO_ORDENADORES.'-'.$Midordenador[$i].'" |
---|
263 | value="'.$Mnombreordenador[$i].'" src="../images/'.$MimgOrdenador[$i].'" oncontextmenu="nwmenucontextual(this,'."'flo_".$LITAMBITO_ORDENADORES."'" .')" width="32" height="32"></A>'; |
---|
264 | echo ' </td>'; |
---|
265 | echo '</tr>'; |
---|
266 | echo '<tr>'; |
---|
267 | echo '<td align=center id="'.$LITAMBITO_ORDENADORES.'-'.$Midordenador[$i].'">'; |
---|
268 | echo ' <font color="#003300" size="1" face="Arial, Helvetica, sans-serif">'.$Mnombreordenador[$i].'</font>'; |
---|
269 | echo ' </br>'; |
---|
270 | echo ' <font color="#003300" size="1" face="Arial, Helvetica, sans-serif">'; |
---|
271 | echo ' <strong><font color="#D0A126">'.$Mip[$i].'</font></strong>'; |
---|
272 | echo ' </br>'; |
---|
273 | echo ' <font color="#003300" size="1" face="Arial, Helvetica, sans-serif">'.$Mmac[$i].'</font>'; |
---|
274 | echo '</td>'; |
---|
275 | echo '</tr>'; |
---|
276 | echo '</table>'; |
---|
277 | echo '</TD>'; |
---|
278 | if ($ntr>4){ |
---|
279 | $ntr=0; |
---|
280 | echo '</TR><TR>'; |
---|
281 | } |
---|
282 | } |
---|
283 | echo '</TABLE>'; |
---|
284 | if ($nombreaula!="") |
---|
285 | echo '</DIV>'; |
---|
286 | } |
---|
287 | //________________________________________________________________________________________________________ |
---|
288 | function ContextualXMLAulas(){ |
---|
289 | global $TbMsg; |
---|
290 | global $AMBITO_AULAS; |
---|
291 | global $LITAMBITO_AULAS; |
---|
292 | global $RESERVA_CONFIRMADA; |
---|
293 | global $OPERADOR; |
---|
294 | |
---|
295 | $layerXML='<MENUCONTEXTUAL'; |
---|
296 | $layerXML.=' idctx="flo_'.$LITAMBITO_AULAS.'"'; |
---|
297 | $layerXML.=' maxanchu=185'; |
---|
298 | $layerXML.=' swimg=1'; |
---|
299 | $layerXML.=' clase="menu_contextual"'; |
---|
300 | $layerXML.='>'; |
---|
301 | |
---|
302 | $layerXML.='<ITEM'; |
---|
303 | $layerXML.=' alpulsar="cola_acciones()"'; |
---|
304 | $layerXML.=' imgitem="../images/iconos/acciones.gif"'; |
---|
305 | $layerXML.=' textoitem='.$TbMsg[6]; |
---|
306 | $layerXML.='></ITEM>'; |
---|
307 | |
---|
308 | $layerXML.='<SEPARADOR>'; |
---|
309 | $layerXML.='</SEPARADOR>'; |
---|
310 | |
---|
311 | |
---|
312 | |
---|
313 | $layerXML.='<ITEM'; |
---|
314 | $layerXML.=' alpulsar="actualizar_ordenadores(this)"'; |
---|
315 | $layerXML.=' imgitem="../images/iconos/actualizar.gif"'; |
---|
316 | $layerXML.=' textoitem='.$TbMsg[4]; |
---|
317 | $layerXML.='></ITEM>'; |
---|
318 | |
---|
319 | $layerXML.='<ITEM'; |
---|
320 | $layerXML.=' alpulsar="purgar_ordenadores()"'; |
---|
321 | $layerXML.=' imgitem="../images/iconos/purgar.gif"'; |
---|
322 | $layerXML.=' textoitem='.$TbMsg[2]; |
---|
323 | $layerXML.='></ITEM>'; |
---|
324 | |
---|
325 | $layerXML.='<SEPARADOR>'; |
---|
326 | $layerXML.='</SEPARADOR>'; |
---|
327 | |
---|
328 | $layerXML.='<ITEM'; |
---|
329 | $layerXML.=' alpulsar="consola_remota()"'; |
---|
330 | $layerXML.=' imgitem="../images/iconos/shell.gif"'; |
---|
331 | $layerXML.=' textoitem='.$TbMsg[33]; |
---|
332 | $layerXML.='></ITEM>'; |
---|
333 | |
---|
334 | $layerXML.='<SEPARADOR>'; |
---|
335 | $layerXML.='</SEPARADOR>'; |
---|
336 | |
---|
337 | $layerXML.='<ITEM'; |
---|
338 | $layerXML.=' subflotante="flo_comandos_'.$LITAMBITO_AULAS.'"'; |
---|
339 | $layerXML.=' imgitem="../images/iconos/comandos.gif"'; |
---|
340 | $layerXML.=' textoitem='.$TbMsg[5]; |
---|
341 | $layerXML.='></ITEM>'; |
---|
342 | |
---|
343 | $layerXML.='<ITEM'; |
---|
344 | $layerXML.=' subflotante="flo_asistentes_'.$LITAMBITO_AULAS.'"'; |
---|
345 | $layerXML.=' imgitem="../images/iconos/comandos.gif"'; |
---|
346 | $layerXML.=' textoitem=Asistentes'; |
---|
347 | $layerXML.='></ITEM>'; |
---|
348 | |
---|
349 | $layerXML.='<ITEM'; |
---|
350 | $layerXML.=' alpulsar="confirmarprocedimiento('.$AMBITO_AULAS.')"'; |
---|
351 | $layerXML.=' imgitem="../images/iconos/procedimiento.gif"'; |
---|
352 | $layerXML.=' textoitem='.$TbMsg[28]; |
---|
353 | $layerXML.='></ITEM>'; |
---|
354 | |
---|
355 | $layerXML.='<SEPARADOR>'; |
---|
356 | $layerXML.='</SEPARADOR>'; |
---|
357 | |
---|
358 | $layerXML.='<ITEM'; |
---|
359 | $layerXML.=' alpulsar="incorporarordenador()"'; |
---|
360 | $layerXML.=' imgitem="../images/iconos/aula.gif"'; |
---|
361 | $layerXML.=' textoitem='.$TbMsg[27]; |
---|
362 | $layerXML.='></ITEM>'; |
---|
363 | |
---|
364 | $layerXML.='<ITEM'; |
---|
365 | $layerXML.=' alpulsar="ordenador_estandar()"'; |
---|
366 | $layerXML.=' imgitem="../images/iconos/ordenadores.gif"'; |
---|
367 | $layerXML.=' textoitem='.$TbMsg[12]; |
---|
368 | $layerXML.='></ITEM>'; |
---|
369 | |
---|
370 | $layerXML.='<SEPARADOR>'; |
---|
371 | $layerXML.='</SEPARADOR>'; |
---|
372 | |
---|
373 | $layerXML.='<ITEM'; |
---|
374 | $layerXML.=' alpulsar="configuraciones('.$AMBITO_AULAS.')"'; |
---|
375 | $layerXML.=' textoitem='.$TbMsg[10]; |
---|
376 | $layerXML.=' imgitem="../images/iconos/configuraciones.gif"'; |
---|
377 | $layerXML.='></ITEM>'; |
---|
378 | |
---|
379 | $wLeft=170; |
---|
380 | $wTop=80; |
---|
381 | $wWidth=480; |
---|
382 | $wHeight=480; |
---|
383 | $wpages="../propiedades/propiedades_aulas.php"; |
---|
384 | $wParam=$wLeft .",".$wTop.",".$wWidth.",".$wHeight.",'". $wpages."'"; |
---|
385 | $layerXML.='<ITEM'; |
---|
386 | $layerXML.=' alpulsar="modificar('.$wParam.')"'; |
---|
387 | $layerXML.=' textoitem='.$TbMsg[13]; |
---|
388 | $layerXML.=' imgitem="../images/iconos/propiedades.gif"'; |
---|
389 | $layerXML.='></ITEM>'; |
---|
390 | |
---|
391 | $layerXML.='<SEPARADOR>'; |
---|
392 | $layerXML.='</SEPARADOR>'; |
---|
393 | |
---|
394 | // Crear operador |
---|
395 | $wLeft=140; |
---|
396 | $wTop=115; |
---|
397 | $wWidth=400; |
---|
398 | $wHeight=320; |
---|
399 | $wpages="../propiedades/propiedades_usuarios.php?idtipousuario=".$OPERADOR; |
---|
400 | $wParam=$wLeft .",".$wTop.",".$wWidth.",".$wHeight.",'". $wpages."'"; |
---|
401 | $layerXML.='<ITEM'; |
---|
402 | $layerXML.=' alpulsar="insertar('.$wParam.',3)"'; |
---|
403 | $layerXML.=' imgitem="../images/iconos/operadores.gif"'; |
---|
404 | $layerXML.=' textoitem='.$TbMsg[37]; |
---|
405 | $layerXML.='></ITEM>'; |
---|
406 | |
---|
407 | $layerXML.='<ITEM'; |
---|
408 | $layerXML.=' alpulsar="cola_reservas('.$RESERVA_CONFIRMADA.')"'; |
---|
409 | $layerXML.=' imgitem="../images/iconos/reservas.gif"'; |
---|
410 | $layerXML.=' textoitem='.$TbMsg[29]; |
---|
411 | $layerXML.='></ITEM>'; |
---|
412 | |
---|
413 | $layerXML.='</MENUCONTEXTUAL>'; |
---|
414 | return($layerXML); |
---|
415 | } |
---|
416 | //________________________________________________________________________________________________________ |
---|
417 | function ContextualXMLOrdenadores(){ |
---|
418 | global $TbMsg; |
---|
419 | global $AMBITO_ORDENADORES; |
---|
420 | global $LITAMBITO_ORDENADORES; |
---|
421 | |
---|
422 | $layerXML='<MENUCONTEXTUAL'; |
---|
423 | $layerXML.=' idctx="flo_'.$LITAMBITO_ORDENADORES.'"'; |
---|
424 | $layerXML.=' maxanchu=140'; |
---|
425 | $layerXML.=' swimg=1'; |
---|
426 | $layerXML.=' clase="menu_contextual"'; |
---|
427 | $layerXML.='>'; |
---|
428 | |
---|
429 | $layerXML.='<ITEM'; |
---|
430 | $layerXML.=' alpulsar="cola_acciones()"'; |
---|
431 | $layerXML.=' imgitem="../images/iconos/acciones.gif"'; |
---|
432 | $layerXML.=' textoitem='.$TbMsg[6]; |
---|
433 | $layerXML.='></ITEM>'; |
---|
434 | |
---|
435 | $layerXML.='<SEPARADOR>'; |
---|
436 | $layerXML.='</SEPARADOR>'; |
---|
437 | |
---|
438 | $layerXML.='<ITEM'; |
---|
439 | $layerXML.=' alpulsar="ver_log('.$AMBITO_ORDENADORES.')"'; |
---|
440 | $layerXML.=' imgitem="../images/iconos/acciones.gif"'; |
---|
441 | $layerXML.=' textoitem="Log"'; |
---|
442 | $layerXML.='></ITEM>'; |
---|
443 | |
---|
444 | $layerXML.='<ITEM'; |
---|
445 | $layerXML.=' alpulsar="ver_log_seguimiento('.$AMBITO_ORDENADORES.')"'; |
---|
446 | $layerXML.=' imgitem="../images/iconos/acciones.gif"'; |
---|
447 | $layerXML.=' textoitem="Log_seguimiento"'; |
---|
448 | $layerXML.='></ITEM>'; |
---|
449 | |
---|
450 | $layerXML.='<ITEM'; |
---|
451 | $layerXML.=' alpulsar="actualizar_ordenadores()"'; |
---|
452 | $layerXML.=' imgitem="../images/iconos/actualizar.gif"'; |
---|
453 | $layerXML.=' textoitem='.$TbMsg[4]; |
---|
454 | $layerXML.='></ITEM>'; |
---|
455 | |
---|
456 | $layerXML.='<ITEM'; |
---|
457 | $layerXML.=' alpulsar="purgar_ordenadores()"'; |
---|
458 | $layerXML.=' imgitem="../images/iconos/purgar.gif"'; |
---|
459 | $layerXML.=' textoitem='.$TbMsg[2]; |
---|
460 | $layerXML.='></ITEM>'; |
---|
461 | |
---|
462 | $layerXML.='<SEPARADOR>'; |
---|
463 | $layerXML.='</SEPARADOR>'; |
---|
464 | |
---|
465 | $layerXML.='<ITEM'; |
---|
466 | $layerXML.=' alpulsar="consola_remota()"'; |
---|
467 | $layerXML.=' imgitem="../images/iconos/shell.gif"'; |
---|
468 | $layerXML.=' textoitem='.$TbMsg[33]; |
---|
469 | $layerXML.='></ITEM>'; |
---|
470 | |
---|
471 | $layerXML.='<ITEM'; |
---|
472 | $layerXML.=' alpulsar="eco_remoto()"'; |
---|
473 | $layerXML.=' imgitem="../images/iconos/ecocon.gif"'; |
---|
474 | $layerXML.=' textoitem='.$TbMsg[39]; |
---|
475 | $layerXML.='></ITEM>'; |
---|
476 | |
---|
477 | $layerXML.='<SEPARADOR>'; |
---|
478 | $layerXML.='</SEPARADOR>'; |
---|
479 | |
---|
480 | $layerXML.='<ITEM'; |
---|
481 | $layerXML.=' subflotante="flo_comandos_'.$LITAMBITO_ORDENADORES.'"'; |
---|
482 | $layerXML.=' imgitem="../images/iconos/comandos.gif"'; |
---|
483 | $layerXML.=' textoitem='.$TbMsg[5]; |
---|
484 | $layerXML.='></ITEM>'; |
---|
485 | |
---|
486 | $layerXML.='<ITEM'; |
---|
487 | $layerXML.=' subflotante="flo_asistentes_'.$LITAMBITO_ORDENADORES.'"'; |
---|
488 | $layerXML.=' imgitem="../images/iconos/comandos.gif"'; |
---|
489 | $layerXML.=' textoitem=Asistentes'; |
---|
490 | $layerXML.='></ITEM>'; |
---|
491 | |
---|
492 | |
---|
493 | $layerXML.='<ITEM'; |
---|
494 | $layerXML.=' alpulsar="confirmarprocedimiento('.$AMBITO_ORDENADORES.')"'; |
---|
495 | $layerXML.=' imgitem="../images/iconos/procedimiento.gif"'; |
---|
496 | $layerXML.=' textoitem='.$TbMsg[28]; |
---|
497 | $layerXML.='></ITEM>'; |
---|
498 | |
---|
499 | $layerXML.='<SEPARADOR>'; |
---|
500 | $layerXML.='</SEPARADOR>'; |
---|
501 | |
---|
502 | $layerXML.='<ITEM'; |
---|
503 | $layerXML.=' alpulsar="configuraciones('.$AMBITO_ORDENADORES.')"'; |
---|
504 | $layerXML.=' textoitem='.$TbMsg[10]; |
---|
505 | $layerXML.=' imgitem="../images/iconos/configuraciones.gif"'; |
---|
506 | $layerXML.='></ITEM>'; |
---|
507 | |
---|
508 | $wLeft=170; |
---|
509 | $wTop=80; |
---|
510 | $wWidth=480; |
---|
511 | $wHeight=400; |
---|
512 | $wpages="../propiedades/propiedades_ordenadores.php"; |
---|
513 | $wParam=$wLeft .",".$wTop.",".$wWidth.",".$wHeight.",'". $wpages."'"; |
---|
514 | $layerXML.='<ITEM'; |
---|
515 | $layerXML.=' alpulsar="modificar('.$wParam.')"'; |
---|
516 | |
---|
517 | $layerXML.=' textoitem='.$TbMsg[13]; |
---|
518 | $layerXML.=' imgitem="../images/iconos/propiedades.gif"'; |
---|
519 | $layerXML.='></ITEM>'; |
---|
520 | |
---|
521 | $layerXML.='<ITEM'; |
---|
522 | $layerXML.=' alpulsar="eliminar('.$wParam.')"'; |
---|
523 | $layerXML.=' imgitem="../images/iconos/eliminar.gif"'; |
---|
524 | $layerXML.=' textoitem='.$TbMsg[18]; |
---|
525 | $layerXML.='></ITEM>'; |
---|
526 | |
---|
527 | $layerXML.='</MENUCONTEXTUAL>'; |
---|
528 | return($layerXML); |
---|
529 | } |
---|
530 | //________________________________________________________________________________________________________ |
---|
531 | function ContextualXMLComandos($litambito,$ambito){ |
---|
532 | global $cmd; |
---|
533 | $maxlongdescri=0; |
---|
534 | $rs=new Recordset; |
---|
535 | $cmd->texto="SELECT idcomando,descripcion,pagina,gestor,funcion |
---|
536 | FROM comandos |
---|
537 | WHERE activo=1 AND aplicambito & ".$ambito.">0 |
---|
538 | ORDER BY descripcion"; |
---|
539 | $rs->Comando=&$cmd; |
---|
540 | if ($rs->Abrir()){ |
---|
541 | $layerXML=""; |
---|
542 | $rs->Primero(); |
---|
543 | while (!$rs->EOF){ |
---|
544 | $layerXML.='<ITEM'; |
---|
545 | $layerXML.=' alpulsar="confirmarcomando('."'".$ambito."'".','.$rs->campos["idcomando"].',\''.$rs->campos["descripcion"].'\',\''.$rs->campos["pagina"]. '\',\''.$rs->campos["gestor"]. '\',\''.$rs->campos["funcion"]. '\')"'; |
---|
546 | $layerXML.=' textoitem="'.$rs->campos["descripcion"].'"'; |
---|
547 | $layerXML.='></ITEM>'; |
---|
548 | if($maxlongdescri<strlen($rs->campos["descripcion"])) // Toma la Descripción de mayor longitud |
---|
549 | $maxlongdescri=strlen($rs->campos["descripcion"]); |
---|
550 | $rs->Siguiente(); |
---|
551 | } |
---|
552 | $layerXML.='</MENUCONTEXTUAL>'; |
---|
553 | $prelayerXML='<MENUCONTEXTUAL'; |
---|
554 | $prelayerXML.=' idctx="flo_comandos_'.$litambito.'"'; |
---|
555 | $prelayerXML.=' maxanchu='.$maxlongdescri*7; |
---|
556 | $prelayerXML.=' clase="menu_contextual"'; |
---|
557 | $prelayerXML.='>'; |
---|
558 | $finallayerXML=$prelayerXML.$layerXML; |
---|
559 | return($finallayerXML); |
---|
560 | } |
---|
561 | } |
---|
562 | |
---|
563 | |
---|
564 | function ContextualXMLAsistentes($litambito,$ambito){ |
---|
565 | global $cmd; |
---|
566 | $maxlongdescri=0; |
---|
567 | $rs=new Recordset; |
---|
568 | $cmd->texto="SELECT idcomando,descripcion,pagina,gestor,funcion |
---|
569 | FROM asistentes |
---|
570 | WHERE activo=1 AND aplicambito & ".$ambito.">0 |
---|
571 | ORDER BY descripcion"; |
---|
572 | $rs->Comando=&$cmd; |
---|
573 | if ($rs->Abrir()){ |
---|
574 | $layerXML=""; |
---|
575 | $rs->Primero(); |
---|
576 | while (!$rs->EOF){ |
---|
577 | $layerXML.='<ITEM'; |
---|
578 | $layerXML.=' alpulsar="confirmarcomando('."'".$ambito."'".','.$rs->campos["idcomando"].',\''.$rs->campos["descripcion"].'\',\''.$rs->campos["pagina"]. '\',\''.$rs->campos["gestor"]. '\',\''.$rs->campos["funcion"]. '\')"'; |
---|
579 | $layerXML.=' textoitem="'.$rs->campos["descripcion"].'"'; |
---|
580 | $layerXML.='></ITEM>'; |
---|
581 | if($maxlongdescri<strlen($rs->campos["descripcion"])) // Toma la Descripción de mayor longitud |
---|
582 | $maxlongdescri=strlen($rs->campos["descripcion"]); |
---|
583 | $rs->Siguiente(); |
---|
584 | } |
---|
585 | $layerXML.='</MENUCONTEXTUAL>'; |
---|
586 | $prelayerXML='<MENUCONTEXTUAL'; |
---|
587 | $prelayerXML.=' idctx="flo_asistentes_'.$litambito.'"'; |
---|
588 | $prelayerXML.=' maxanchu='.$maxlongdescri*7; |
---|
589 | $prelayerXML.=' clase="menu_contextual"'; |
---|
590 | $prelayerXML.='>'; |
---|
591 | $finallayerXML=$prelayerXML.$layerXML; |
---|
592 | return($finallayerXML); |
---|
593 | } |
---|
594 | } |
---|