source: admin/WebConsole/principal/colasacciones.php @ 9a2cda1e

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 9a2cda1e was b0dc2e4, checked in by alonso <alonso@…>, 16 years ago

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

  • Property mode set to 100644
File size: 67.4 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 2003-2004
6// Fecha Última modificación: Febrero-2005
7// Nombre del fichero: colasacciones.php
8// Descripción :
9//              Visualiza las acciones pendientes y finalizadas con los resultados de estatus y horas de inicio y finalización
10// *************************************************************************************************************************************************
11include_once("../includes/ctrlacc.php");
12include_once("../clases/AdoPhp.php");
13include_once("../clases/MenuContextual.php");
14include_once("../includes/constantes.php");
15include_once("../includes/comunes.php");
16include_once("../includes/InvFecha.php");
17include_once("../clases/XmlPhp.php");
18include_once("../includes/HTMLCTEMULSELECT.php");
19include_once("../includes/TomanDatos.php");
20include_once("../includes/TomaDato.php");
21include_once("../includes/CreaComando.php");
22include_once("../idiomas/php/".$idioma."/colasacciones_".$idioma.".php");
23//________________________________________________________________________________________________________
24$ambito="";
25$idambito=0;
26$nombreambito="";
27
28$fechainicio="";
29$fechafin="";
30$horainicio="";
31$horafin="";
32$tiposacciones="";
33$estados="";
34$resultados="";
35$porcendesde=0;
36$porcenhasta=100;
37$idcmdtskwrk=""; // Identificador del comando , la tarea o el trabajo
38$codtipoaccion=""; // Identificador del tipo de acción: comando , tarea o trabajo
39$idambcmdtskwrk=""; // Identificador del ambito al que se aplica el comando , la tarea o el trabajo
40
41$accionid=0;
42$idTipoAccion=0;
43$TipoAccion=0;
44$NombreTipoAccion="";
45
46if (isset($_GET["ambito"]))     $ambito=$_GET["ambito"];
47if (isset($_GET["idambito"])) $idambito=$_GET["idambito"];
48if (isset($_GET["nombreambito"])) $nombreambito=$_GET["nombreambito"];
49if (isset($_GET["tipocola"])) $tipocola=$_GET["tipocola"];
50
51$cmd=CreaComando($cadenaconexion);
52if (!$cmd)
53        Header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D.
54//________________________________________________________________________________________________________
55// Si entra por primera vez (criterios por defecto)
56if($ambito!="" && $idambito!="" && $nombreambito!="" && $tipocola!=""){
57        $wfechainicio=mktime(0, 0, 0, date("m")  , date("d")-3, date("Y")); // Acciones desde un mes anterior
58        $wfechafin=mktime(0, 0, 0, date("m")  , date("d")+1, date("Y"));
59        $fechainicio=date("d/m/Y",$wfechainicio);
60        $fechafin=date("d/m/Y ",$wfechafin);
61
62        // Tipos de acciones default
63        switch($tipocola){
64                case 0:
65                        $wtiposacciones[0]=$EJECUCION_COMANDO;
66                        $wtiposacciones[1]=$EJECUCION_TAREA;
67                        $wtiposacciones[2]=$EJECUCION_TRABAJO;
68
69                        $tiposacciones=$EJECUCION_COMANDO."=".$LITEJECUCION_COMANDO.";";
70                        $tiposacciones.=$EJECUCION_TAREA."=".$LITEJECUCION_TAREA.";";
71                        $tiposacciones.=$EJECUCION_TRABAJO."=".$LITEJECUCION_TRABAJO.";";
72                        break;
73                case $EJECUCION_COMANDO:
74                        $wtiposacciones[0]=$EJECUCION_COMANDO;
75                        $tiposacciones=$EJECUCION_COMANDO."=".$LITEJECUCION_COMANDO.";";       
76                        break;
77                case $EJECUCION_TAREA:
78                        $wtiposacciones[0]=$EJECUCION_TAREA;
79                        $tiposacciones=$EJECUCION_TAREA."=".$LITEJECUCION_TAREA.";";
80                        break;
81                case $EJECUCION_TRABAJO:
82                        $wtiposacciones[0]=$EJECUCION_TRABAJO;
83                        $tiposacciones=$EJECUCION_TRABAJO."=".$LITEJECUCION_TRABAJO.";";
84                        break;
85        }
86        // Estados default
87        $westados[0]=$ACCION_DETENIDA;
88        $westados[1]=$ACCION_INICIADA;
89        $westados[2]=$ACCION_FINALIZADA;
90        $estados=$ACCION_DETENIDA."=".$LITACCION_DETENIDA.";";
91        $estados.=$ACCION_INICIADA."=".$LITACCION_INICIADA.";";
92        $estados.=$ACCION_FINALIZADA."=".$LITACCION_FINALIZADA.";";
93
94        // Resultados default
95        $wresultados[0]=$ACCION_EXITOSA;
96        $wresultados[1]=$ACCION_FALLIDA;
97        //$resultados[2]=$ACCION_TERMINADA;
98        //$resultados[3]=$ACCION_ABORTADA;
99        $wresultados[2]=$ACCION_SINERRORES;
100        $wresultados[3]=$ACCION_CONERRORES;
101
102        $resultados=$ACCION_EXITOSA."=".$LITACCION_EXITOSA.";";
103        $resultados.=$ACCION_FALLIDA."=".$LITACCION_FALLIDA.";";
104        $resultados.=$ACCION_SINERRORES."=".$LITACCION_SINERRORES.";";
105        $resultados.=$ACCION_CONERRORES."=".$LITACCION_CONERRORES.";";
106}
107if (isset($_POST["ambito"]))    $ambito=$_POST["ambito"];
108if (isset($_POST["idambito"])) $idambito=$_POST["idambito"];
109if (isset($_POST["nombreambito"])) $nombreambito=$_POST["nombreambito"];
110
111if (isset($_POST["fechainicio"])) $fechainicio=$_POST["fechainicio"];
112if (isset($_POST["fechafin"])) $fechafin=$_POST["fechafin"];
113if (isset($_POST["horainicio"])) $horainicio=$_POST["horainicio"];
114if (isset($_POST["horafin"])) $horafin=$_POST["horafin"];
115
116if (isset($_POST["tiposacciones"])) {
117        $tiposacciones=$_POST["tiposacciones"];
118        $auxP=split(";",$tiposacciones);
119        $cont=0;
120        for ($i=0;$i<sizeof($auxP)-1;$i++){
121                $dualparam=split("=",$auxP[$i]);
122                $wtiposacciones[$cont++]=$dualparam[0];
123        }
124}
125if (isset($_POST["estados"])){
126        $estados=$_POST["estados"];
127        $auxP=split(";",$estados);
128        $cont=0;
129        for ($i=0;$i<sizeof($auxP)-1;$i++){
130                $dualparam=split("=",$auxP[$i]);
131                $westados[$cont++]=$dualparam[0];
132        }
133}
134if (isset($_POST["resultados"])){
135        $resultados=$_POST["resultados"];
136        $auxP=split(";",$resultados);
137        $cont=0;
138        for ($i=0;$i<sizeof($auxP)-1;$i++){
139                $dualparam=split("=",$auxP[$i]);
140                $wresultados[$cont++]=$dualparam[0];
141        }
142}
143if (isset($_POST["porcendesde"])) $porcendesde=$_POST["porcendesde"];
144if (isset($_POST["porcenhasta"])) $porcenhasta=$_POST["porcenhasta"];
145
146if($porcendesde=="") $porcendesde=0;
147if($porcenhasta=="") $porcenhasta=100;
148
149if (isset($_POST["idcmdtskwrk"])) $idcmdtskwrk=$_POST["idcmdtskwrk"];
150if (isset($_POST["codtipoaccion"])) $codtipoaccion=$_POST["codtipoaccion"];
151if (isset($_POST["idambcmdtskwrk"])) $idambcmdtskwrk=$_POST["idambcmdtskwrk"];
152
153if (isset($_POST["accionid"])) $accionid=$_POST["accionid"];
154if (isset($_POST["idTipoAccion"])) $idTipoAccion=$_POST["idTipoAccion"];
155if (isset($_POST["TipoAccion"])) $TipoAccion=$_POST["TipoAccion"];
156if (isset($_POST["NombreTipoAccion"])) $NombreTipoAccion=$_POST["NombreTipoAccion"];
157//________________________________________________________________________________________________________
158// Clausula WHERE ( construcción )
159$ClausulaWhere="";
160
161// Cuestion de fechas
162$WhereFechaInicio="";
163$WhereFechaFin="";
164$WhereFechaReg="";
165if($fechainicio!="")
166        $WhereFechaInicio="acciones.fechahorareg>='".InvFecha($fechainicio).' ' .$horainicio."'";
167if($fechafin!="")
168        $WhereFechaFin.=" acciones.fechahorareg<='".InvFecha($fechafin).' ' .$horafin."'";
169if($WhereFechaInicio!=""){
170        if($WhereFechaFin!="")
171                $WhereFechaReg=" (".$WhereFechaInicio." AND ".$WhereFechaFin.") ";
172        else
173                $WhereFechaReg=" (".$WhereFechaInicio.") ";
174}
175else{
176                if($WhereFechaFin!="")
177                        $WhereFechaReg=" (".$WhereFechaFin.") ";
178}
179$ClausulaWhere.=$WhereFechaReg;
180//________________________________________________________________________________________________________
181// Cuestion tipos de acciones
182$WhereTiposAcciones="";
183for($i=0;$i<sizeof($wtiposacciones);$i++){
184                if (isset($wtiposacciones[$i]))
185                        $WhereTiposAcciones.=" acciones.tipoaccion=".$wtiposacciones[$i]." OR ";
186}
187if($WhereTiposAcciones!=""){
188        $WhereTiposAcciones=substr($WhereTiposAcciones,0,strlen($WhereTiposAcciones)-3);
189        $ClausulaWhere.=" AND (".$WhereTiposAcciones.")";
190}
191//________________________________________________________________________________________________________
192// Cuestion estados
193$WhereEstados="";
194for($i=0;$i<sizeof($westados);$i++){
195        if (isset($westados[$i]))
196                $WhereEstados.=" acciones.estado=".$westados[$i]." OR ";
197}
198if($WhereEstados!=""){
199        $WhereEstados=substr($WhereEstados,0,strlen($WhereEstados)-3);
200        $ClausulaWhere.=" AND (".$WhereEstados.")";
201}
202//________________________________________________________________________________________________________
203// Cuestion resultados
204$WhereResultados="";
205for($i=0;$i<sizeof($wresultados);$i++){
206                if (isset($wresultados[$i]))
207                        $WhereResultados.=" acciones.resultado=".$wresultados[$i]." OR ";
208}
209if($WhereResultados!=""){
210        $WhereResultados=substr($WhereResultados,0,strlen($WhereResultados)-3); // Quita la coma
211        $ClausulaWhere.=" AND (".$WhereResultados.")";
212}
213//________________________________________________________________________________________________________
214// Cuestion identificador del comando la tarea o el trabajo implicado en la acción
215$Wherecmdtskwrk="";
216if($idcmdtskwrk!="" && $codtipoaccion!="" ){
217        $Wherecmdtskwrk='acciones.idtipoaccion='.$idcmdtskwrk.' AND acciones.tipoaccion='.$codtipoaccion;
218        $ClausulaWhere.=" AND (".$Wherecmdtskwrk.")";
219}
220//________________________________________________________________________________________________________
221// Cuestion identificador del ambito al que se aplica el comando la tarea o el trabajo implicado en la acción
222$Whereambcmdtskwrk="";
223if($idambcmdtskwrk!=""){
224        $Whereambcmdtskwrk='acciones.ambito='.$idambcmdtskwrk;
225        $ClausulaWhere.=" AND (".$Whereambcmdtskwrk.")";
226}
227//________________________________________________________________________________________________________
228// Cuestion identificador del Centro que ha ejecutado la acción
229$WhereCentroAccion="";
230$WhereCentroAccion='acciones.idcentro='.$idcentro;
231$ClausulaWhere.=" AND (".$WhereCentroAccion.")";
232
233//________________________________________________________________________________________________________
234// Cuestion accionid ( acciones que son hijas de otras acciones (Tarea-comando,Trabajo-Tarea)
235$WhereAccionid="";
236$WhereAccionid='acciones.accionid='.$accionid;
237$ClausulaWhere.=" AND (".$WhereAccionid.")";
238//________________________________________________________________________________________________________
239//echo $ClausulaWhere;
240$mulaccion=""; // Para opciones de multiples acciones
241
242// Captura de parametros de tareas y trabajos
243$tsk_ambito="";
244$tsk_idambito="";
245$tsk_nombreambito="";
246$tsk_fechainicio="";
247$tsk_fechafin="";
248$tsk_horainicio="";
249$tsk_horafin="";
250$tsk_tiposacciones="";
251$tsk_estados="";
252$tsk_resultados="";
253$tsk_porcendesde="";
254$tsk_porcenhasta="";
255
256$tsk_idcmdtskwrk="";
257$tsk_codtipoaccion="";
258$tsk_idambcmdtskwrk="";
259
260$tsk_accionid="";
261$tsk_idTipoAccion="";
262$tsk_TipoAccion="";
263$tsk_NombreTipoAccion="";
264
265// Trabajos
266$wrk_ambito="";
267$wrk_idambito="";
268$wrk_nombreambito="";
269$wrk_fechainicio="";
270$wrk_fechafin="";
271$wrk_horainicio="";
272$wrk_horafin="";
273$wrk_tiposacciones="";
274$wrk_estados="";
275$wrk_resultados="";
276$wrk_porcendesde="";
277$wrk_porcenhasta="";
278
279$wrk_idcmdtskwrk="";
280$wrk_codtipoaccion="";
281$wrk_idambcmdtskwrk="";
282
283$wrk_accionid="";
284$wrk_idTipoAccion="";
285$wrk_TipoAccion="";
286$wrk_NombreTipoAccion="";
287
288// Tareas
289if (isset($_POST["tsk_ambito"])) $tsk_ambito=$_POST["tsk_ambito"];
290if (isset($_POST["tsk_idambito"])) $tsk_idambito=$_POST["tsk_idambito"];
291if (isset($_POST["tsk_nombreambito"])) $tsk_nombreambito=$_POST["tsk_nombreambito"];
292
293if (isset($_POST["tsk_fechainicio"])) $tsk_fechainicio=$_POST["tsk_fechainicio"];
294if (isset($_POST["tsk_fechafin"])) $tsk_fechafin=$_POST["tsk_fechafin"];
295if (isset($_POST["tsk_horainicio"])) $tsk_horainicio=$_POST["tsk_horainicio"];
296if (isset($_POST["tsk_horafin"])) $tsk_horafin=$_POST["tsk_horafin"];
297
298if (isset($_POST["tsk_tiposacciones"])) $tsk_tiposacciones=$_POST["tsk_tiposacciones"];
299if (isset($_POST["tsk_estados"])) $tsk_estados=$_POST["tsk_estados"];
300if (isset($_POST["tsk_resultados"]))    $tsk_resultados=$_POST["tsk_resultados"];
301
302if (isset($_POST["tsk_porcendesde"])) $tsk_porcendesde=$_POST["tsk_porcendesde"];
303if (isset($_POST["tsk_porcenhasta"])) $tsk_porcenhasta=$_POST["tsk_porcenhasta"];
304
305if (isset($_POST["tsk_idcmdtskwrk"])) $tsk_idcmdtskwrk=$_POST["tsk_idcmdtskwrk"];
306if (isset($_POST["tsk_codtipoaccion"])) $tsk_codtipoaccion=$_POST["tsk_codtipoaccion"];
307if (isset($_POST["tsk_idambcmdtskwrk"])) $tsk_idambcmdtskwrk=$_POST["tsk_idambcmdtskwrk"];
308
309if (isset($_POST["tsk_accionid"])) $tsk_accionid=$_POST["tsk_accionid"];
310if (isset($_POST["tsk_idTipoAccion"])) $tsk_idTipoAccion=$_POST["tsk_idTipoAccion"];
311if (isset($_POST["tsk_TipoAccion"])) $tsk_TipoAccion=$_POST["tsk_TipoAccion"];
312if (isset($_POST["tsk_NombreTipoAccion"])) $tsk_NombreTipoAccion=$_POST["tsk_NombreTipoAccion"];
313
314// Trabajos
315if (isset($_POST["wrk_ambito"])) $wrk_ambito=$_POST["wrk_ambito"];
316if (isset($_POST["wrk_idambito"])) $wrk_idambito=$_POST["wrk_idambito"];
317if (isset($_POST["wrk_nombreambito"])) $wrk_nombreambito=$_POST["wrk_nombreambito"];
318
319if (isset($_POST["wrk_fechainicio"])) $wrk_fechainicio=$_POST["wrk_fechainicio"];
320if (isset($_POST["wrk_fechafin"])) $wrk_fechafin=$_POST["wrk_fechafin"];
321if (isset($_POST["wrk_horainicio"])) $wrk_horainicio=$_POST["wrk_horainicio"];
322if (isset($_POST["wrk_horafin"])) $wrk_horafin=$_POST["wrk_horafin"];
323
324if (isset($_POST["wrk_tiposacciones"])) $wrk_tiposacciones=$_POST["wrk_tiposacciones"];
325if (isset($_POST["wrk_estados"])) $wrk_estados=$_POST["wrk_estados"];
326if (isset($_POST["wrk_resultados"])) $wrk_resultados=$_POST["wrk_resultados"];
327
328if (isset($_POST["wrk_porcendesde"])) $wrk_porcendesde=$_POST["wrk_porcendesde"];
329if (isset($_POST["wrk_porcenhasta"])) $wrk_porcenhasta=$_POST["wrk_porcenhasta"];
330
331if (isset($_POST["wrk_idcmdtskwrk"])) $wrk_idcmdtskwrk=$_POST["wrk_idcmdtskwrk"];
332if (isset($_POST["wrk_codtipoaccion"])) $wrk_codtipoaccion=$_POST["wrk_codtipoaccion"];
333if (isset($_POST["wrk_idambcmdtskwrk"])) $wrk_idambcmdtskwrk=$_POST["wrk_idambcmdtskwrk"];
334
335if (isset($_POST["wrk_accionid"])) $wrk_accionid=$_POST["wrk_accionid"];
336if (isset($_POST["wrk_idTipoAccion"])) $wrk_idTipoAccion=$_POST["wrk_idTipoAccion"];
337if (isset($_POST["wrk_TipoAccion"])) $wrk_TipoAccion=$_POST["wrk_TipoAccion"];
338if (isset($_POST["wrk_NombreTipoAccion"])) $wrk_NombreTipoAccion=$_POST["wrk_NombreTipoAccion"];
339//________________________________________________________________________________________________________
340?>
341<HTML>
342<TITLE>Administración web de aulas</TITLE>
343<HEAD>
344        <LINK rel="stylesheet" type="text/css" href="../estilos.css">
345        <SCRIPT language="javascript" src="../clases/jscripts/MenuContextual.js"></SCRIPT>
346        <SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
347        <SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
348        <SCRIPT language="javascript" src="../jscripts/colasacciones.js"></SCRIPT>
349        <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/colasacciones_'.$idioma.'.js"></SCRIPT>'?>
350</HEAD>
351<BODY OnContextMenu="return false">
352<?
353$flotante=new MenuContextual(); // Crea objeto MenuContextual
354$XMLcontextual=ContextualXMLComando(); // Crea contextual de las acciones
355echo $flotante->CreaMenuContextual($XMLcontextual);
356$XMLcontextual=ContextualXMLTarea(); // Crea contextual de las acciones
357echo $flotante->CreaMenuContextual($XMLcontextual);
358$XMLcontextual=ContextualXMLTrabajo(); // Crea contextual de las acciones
359echo $flotante->CreaMenuContextual($XMLcontextual);
360$XMLcontextual=ContextualXMLNotificaciones(); // Crea contextual de las notificaciones
361echo $flotante->CreaMenuContextual($XMLcontextual);
362$XMLcontextual=ContextualXMLModifAcciones(); // Crea subcontextual de las notificaciones
363echo $flotante->CreaMenuContextual($XMLcontextual);
364switch($ambito){
365                case $AMBITO_CENTROS :
366                        $urlimg='../images/iconos/centros.gif';
367                        $textambito=$TbMsg[24];
368                        break;
369                case $AMBITO_GRUPOSAULAS :
370                        $urlimg='../images/iconos/carpeta.gif';
371                        $textambito=$TbMsg[25];
372                        break;
373                case $AMBITO_AULAS :
374                        $urlimg='../images/iconos/aula.gif';
375                        $textambito=$TbMsg[26];
376                        break;
377                case $AMBITO_GRUPOSORDENADORES :
378                        $urlimg='../images/iconos/carpeta.gif';
379                        $textambito=$TbMsg[27];
380                        break;
381                case $AMBITO_ORDENADORES :
382                        $urlimg='../images/iconos/ordenador.gif';
383                        $textambito=$TbMsg[28];
384                        break;
385}
386$tabla_ambitosacciones=""; // Tabla  para localizar ambitos  e identificadores con acciones sobre ellos
387$cont_ambitosacciones=0; // Contador de la tabla
388
389$tabla_parametros=""; // Tabla  para localizar parametros
390$cont_parametros=0; // Contador de la tabla
391CreaTablaParametros($cmd); // Crea tabla  especificaciones de lparametros en memoria
392
393echo '<p align=center class=cabeceras><img src="../images/iconos/acciones.gif">&nbsp;'.$TbMsg[0].'&nbsp;</p>';
394echo '<FORM name="fdatos" action="colasacciones.php" method="post">'.chr(13);
395// Campos ocultos
396echo '<INPUT type=hidden name=ambito value="'.$ambito.'">';
397echo '<INPUT type=hidden name=idambito value="'.$idambito.'">';
398echo '<INPUT type=hidden name=nombreambito value="'.$nombreambito.'">';
399
400echo '<INPUT type=hidden name=idcmdtskwrk value="'.$idcmdtskwrk.'">';
401echo '<INPUT type=hidden name=codtipoaccion value="'.$codtipoaccion.'">';
402echo '<INPUT type=hidden name=idambcmdtskwrk value="'.$idambcmdtskwrk.'">';
403
404echo '<INPUT type=hidden name=tiposacciones value="'.$tiposacciones.'">';
405echo '<INPUT type=hidden name=estados value="'.$estados.'">';
406echo '<INPUT type=hidden name=resultados value="'.$resultados.'">';
407
408echo '<INPUT type=hidden name=accionid value="'.$accionid.'">';
409echo '<INPUT type=hidden name=idTipoAccion value="'.$idTipoAccion.'">';
410echo '<INPUT type=hidden name=TipoAccion value="'.$TipoAccion.'">';
411echo '<INPUT type=hidden name=NombreTipoAccion value="'.$NombreTipoAccion.'">';
412
413// Parametros Tarea padre
414echo '<INPUT type=hidden name=tsk_ambito  value="'.$tsk_ambito.'">';
415echo '<INPUT type=hidden name=tsk_idambito  value="'.$tsk_idambito.'">';
416echo '<INPUT type=hidden name=tsk_nombreambito value="'.$tsk_nombreambito.'">';
417echo '<INPUT type=hidden name=tsk_fechainicio value="'.$tsk_fechainicio.'">';
418echo '<INPUT type=hidden name=tsk_fechafin value="'.$tsk_fechafin.'">';
419echo '<INPUT type=hidden name=tsk_horainicio value="'.$tsk_horainicio.'">';
420echo '<INPUT type=hidden name=tsk_horafin value="'.$tsk_horafin.'">';
421echo '<INPUT type=hidden name=tsk_tiposacciones value="'.$tsk_tiposacciones.'">';
422echo '<INPUT type=hidden name=tsk_estados value="'.$tsk_estados.'">';
423echo '<INPUT type=hidden name=tsk_resultados value="'.$tsk_resultados.'">';
424echo '<INPUT type=hidden name=tsk_porcendesde value="'.$tsk_porcendesde.'">';
425echo '<INPUT type=hidden name=tsk_porcenhasta value="'.$tsk_porcenhasta.'">';
426
427echo '<INPUT type=hidden name=tsk_idcmdtskwrk value="'.$tsk_idcmdtskwrk.'">';
428echo '<INPUT type=hidden name=tsk_codtipoaccion value="'.$tsk_codtipoaccion.'">';
429echo '<INPUT type=hidden name=tsk_idambcmdtskwrk value="'.$tsk_idambcmdtskwrk.'">';
430
431echo '<INPUT type=hidden name=tsk_accionid value="'.$tsk_accionid.'">';
432echo '<INPUT type=hidden name=tsk_idTipoAccion value="'.$tsk_idTipoAccion.'">';
433echo '<INPUT type=hidden name=tsk_TipoAccion value="'.$tsk_TipoAccion.'">';
434echo '<INPUT type=hidden name=tsk_NombreTipoAccion value="'.$tsk_NombreTipoAccion.'">';
435
436// Parametros Trabajo padre
437echo '<INPUT type=hidden name=wrk_ambito  value="'.$wrk_ambito.'">';
438echo '<INPUT type=hidden name=wrk_idambito  value="'.$wrk_idambito.'">';
439echo '<INPUT type=hidden name=wrk_nombreambito value="'.$wrk_nombreambito.'">';
440
441echo '<INPUT type=hidden name=wrk_fechainicio value="'.$wrk_fechainicio.'">';
442echo '<INPUT type=hidden name=wrk_fechafin value="'.$wrk_fechafin.'">';
443echo '<INPUT type=hidden name=wrk_horainicio value="'.$wrk_horainicio.'">';
444echo '<INPUT type=hidden name=wrk_horafin value="'.$wrk_horafin.'">';
445echo '<INPUT type=hidden name=wrk_tiposacciones value="'.$wrk_tiposacciones.'">';
446echo '<INPUT type=hidden name=wrk_estados value="'.$wrk_estados.'">';
447echo '<INPUT type=hidden name=wrk_resultados value="'.$wrk_resultados.'">';
448echo '<INPUT type=hidden name=wrk_porcendesde value="'.$wrk_porcendesde.'">';
449echo '<INPUT type=hidden name=wrk_porcenhasta value="'.$wrk_porcenhasta.'">';
450
451echo '<INPUT type=hidden name=wrk_idcmdtskwrk value="'.$wrk_idcmdtskwrk.'">';
452echo '<INPUT type=hidden name=wrk_codtipoaccion value="'.$wrk_codtipoaccion.'">';
453echo '<INPUT type=hidden name=wrk_idambcmdtskwrk value="'.$wrk_idambcmdtskwrk.'">';
454
455echo '<INPUT type=hidden name=wrk_accionid value="'.$wrk_accionid.'">';
456echo '<INPUT type=hidden name=wrk_idTipoAccion value="'.$wrk_idTipoAccion.'">';
457echo '<INPUT type=hidden name=wrk_TipoAccion value="'.$wrk_TipoAccion.'">';
458echo '<INPUT type=hidden name=wrk_NombreTipoAccion value="'.$wrk_NombreTipoAccion.'">';
459//________________________________________________________________________________________________________
460echo CriteriosBusquedas();
461echo '</FORM>'.chr(13);
462echo '<DIV align=center>';
463if($accionid>0){
464        switch($TipoAccion){
465                        case $EJECUCION_COMANDO :
466                                $textoaccion=$LITEJECUCION_COMANDO;
467                                $urlimg='../images/iconos/comandos.gif';
468                                break;
469                        case $EJECUCION_TAREA :
470                                $textoaccion=$LITEJECUCION_TAREA;
471                                $urlimg='../images/iconos/tareas.gif';
472                                break;
473                        case $EJECUCION_TRABAJO :
474                                $textoaccion=$LITEJECUCION_TRABAJO;
475                                $urlimg='../images/iconos/trabajos.gif';
476                                break;
477        }
478        echo '<span align=center class=subcabeceras>'.$textoaccion.':'.$NombreTipoAccion.'</span>&nbsp;&nbsp;<IMG src="'.$urlimg.'">&nbsp;&nbsp;&nbsp;<span class=notas><A href="javascript:ver_accionpadre('.$TipoAccion.');">Volver >></A></span>';
479}
480else{
481        echo '<span align=center class=subcabeceras><U>'.$TbMsg[11].':'.$textambito.'</U>,&nbsp'.$nombreambito.'</span>&nbsp;&nbsp;<IMG src="'.$urlimg.'"></span>';
482}
483?>
484<BR><BR>
485<? if($accionid==0){?>
486                <TABLE  align=center class=filtros border=0 align=left cellPadding=2 cellSpacing=5 >
487                  <TR height=20 width=450 valign=baseline>
488                        <TD width=70 onclick=eleccion(this,1)  onmouseout=desresaltar(this) onmouseover=resaltar(this) >
489                                &nbsp;<IMG src="../images/iconos/eliminar.gif"'>&nbsp;<?echo $TbMsg[12]?>&nbsp;</TD>
490                        <TD width=85 onclick=eleccion(this,2) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>             
491                                &nbsp;<IMG src="../images/iconos/reiniciar.gif"'>&nbsp;<?echo $TbMsg[13]?>&nbsp;</TD>
492                        <TD width=75 onclick=eleccion(this,3) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
493                                        &nbsp;<IMG src="../images/iconos/acDetenida.gif"'>&nbsp;<?echo $TbMsg[14]?>&nbsp;</TD>
494                        <TD width=80 onclick=eleccion(this,4) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
495                                        &nbsp;<IMG src="../images/iconos/acIniciada.gif"'>&nbsp;<?echo $TbMsg[15]?>&nbsp;</TD>
496                        <TD width=75  onclick=eleccion(this,5) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
497                                        &nbsp;<IMG src="../images/iconos/acAbortada.gif"';>&nbsp;<?echo $TbMsg[16]?>&nbsp;</TD>
498                        <TD width=75 onclick=eleccion(this,6) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>                     &nbsp;<IMG src="../images/iconos/acTerminada.gif"'>&nbsp;<?echo $TbMsg[17]?>&nbsp;</TD>
499                   </TR>
500                 </TABLE>
501<?}
502ListaAcciones($cmd);
503echo '</DIV>';
504echo '<INPUT type=hidden id=mulaccion value="'.$mulaccion.'">';
505//________________________________________________________________________________________________________
506include_once("../includes/iframecomun.php");
507//________________________________________________________________________________________________________
508?>
509</BODY>
510</HTML>
511<?
512/**************************************************************************************************************************************************
513        Dibuja la tabla de acciones y notificaciones aplicadas a los distintos ambitos
514________________________________________________________________________________________________________*/
515function ListaAcciones($cmd){
516        global $TbMsg;
517        global $AMBITO_CENTROS;
518        global $AMBITO_GRUPOSAULAS;
519        global $AMBITO_AULAS;
520        global $AMBITO_GRUPOSORDENADORES;
521        global $AMBITO_ORDENADORES;
522        global $idcmdtskwrk;
523        global $codtipoaccion;
524        global $idambcmdtskwrk;
525        global $tabla_ambitosacciones;
526        global $cont_ambitosacciones;
527        global $ambito;
528        global $idambito;
529
530        echo '<TABLE  border=0 class="tabla_listados" cellspacing=1 cellpadding=0 >'.chr(13);
531        echo '<TR height=20>'.chr(13);
532        echo '<TH>&nbsp;</TH>'.chr(13);
533        if($idcmdtskwrk=="" && $codtipoaccion=="" && $idambcmdtskwrk=="") // Sin filtro
534                echo '<TH>A</TH>'.chr(13);
535        else
536                echo '<TH>A*</TH>'.chr(13);
537        echo '<TH>&nbsp;'.$TbMsg[18].'&nbsp;</TH>'.chr(13);
538        echo '<TH>&nbsp;'.$TbMsg[19].'&nbsp;</TH>'.chr(13);
539        echo '<TH>&nbsp;'.$TbMsg[20].'&nbsp;</TH>'.chr(13);
540        echo '<TH>&nbsp;'.$TbMsg[21].'&nbsp;</TH>'.chr(13);
541        echo '<TH>&nbsp;'.$TbMsg[22].'&nbsp;</TH>'.chr(13);
542        echo '<TH>&nbsp;</TH>'.chr(13);
543        echo '<TH>&nbsp;'.$TbMsg[23].'&nbsp;</TH>'.chr(13);
544        echo '<TH>S</TH>'.chr(13);
545        echo '<TH>%</TH>'.chr(13);
546        echo '<TH>R</TH>'.chr(13);
547        echo '</TR>'.chr(13);
548
549        switch($ambito){
550                case $AMBITO_CENTROS :
551                        $cmd->texto="SELECT idcentro,nombrecentro FROM centros WHERE idcentro=".$idambito;
552                        RecorreCentro($cmd);
553                        break;
554                case $AMBITO_GRUPOSAULAS :
555                        $cmd->texto="SELECT idgrupo,nombregrupo FROM grupos WHERE idgrupo=".$idambito." AND tipo=".$AMBITO_GRUPOSAULAS;
556                        RecorreGruposAulas($cmd);
557                        break;
558                case $AMBITO_AULAS :
559                        $cmd->texto="SELECT idaula,nombreaula FROM aulas WHERE idaula=".$idambito;
560                        RecorreAulas($cmd);
561                        break;
562                case $AMBITO_GRUPOSORDENADORES :
563                        $cmd->texto="SELECT idgrupo,nombregrupoordenador FROM gruposordenadores WHERE idgrupo=".$idambito;
564                        RecorreGruposOrdenadores($cmd);
565                        break;
566                case $AMBITO_ORDENADORES :
567                        $cmd->texto="SELECT idordenador,nombreordenador FROM ordenadores WHERE idordenador=".$idambito;
568                        RecorreOrdenadores($cmd);
569                        break;
570        }
571        // Ordena
572        $cont=$cont_ambitosacciones;
573        $auxambitoaccion="";
574        for ($i=0;$i<$cont-1;$i++){
575                for ($j=$i+1;$j<$cont;$j++){
576                        if($tabla_ambitosacciones[$i][0]>$tabla_ambitosacciones[$j][0]){
577                                $auxambitoaccion=$tabla_ambitosacciones[$i][0];
578                                $tabla_ambitosacciones[$i][0]=$tabla_ambitosacciones[$j][0];
579                                $tabla_ambitosacciones[$j][0]=$auxambitoaccion;
580
581                                $auxtabla_ambitosacciones=$tabla_ambitosacciones[$i][1];
582                                $tabla_ambitosacciones[$i][1]=$tabla_ambitosacciones[$j][1];
583                                $tabla_ambitosacciones[$j][1]=$auxtabla_ambitosacciones;
584                        }
585                }
586        }
587        ListandoAcciones($cmd);
588        echo '</TABLE>';
589}
590//________________________________________________________________________________________________________
591function ListandoAcciones($cmd){
592        global $AMBITO_CENTROS;
593        global $AMBITO_GRUPOSAULAS;
594        global $AMBITO_AULAS;
595        global $AMBITO_GRUPOSORDENADORES;
596        global $AMBITO_ORDENADORES;
597
598        global $EJECUCION_COMANDO;
599        global $EJECUCION_TAREA;
600        global $EJECUCION_TRABAJO;
601
602        global $ACCION_EXITOSA;
603        global $ACCION_FALLIDA;
604        global $ACCION_TERMINADA;
605        global $ACCION_ABORTADA;
606        global $ACCION_SINERRORES;
607        global $ACCION_CONERRORES;
608
609        global $ACCION_DETENIDA;
610        global $ACCION_INICIADA;
611        global $ACCION_FINALIZADA;
612
613        global $porcendesde;
614        global $porcenhasta;
615        global $tabla_ambitosacciones;
616        global $cont_ambitosacciones;
617        global $ClausulaWhere;
618        global $mulaccion;
619
620        global $PROCESOS;
621        global $NOTIFICACIONES;
622
623        // Selecciona acciones
624        $rs=new Recordset;
625        $cmd->texto="SELECT acciones.* FROM acciones";
626        if($ClausulaWhere!="")  $cmd->texto.=" WHERE  (".$ClausulaWhere.")";
627        $cmd->texto.=" ORDER BY acciones.idaccion desc ";
628
629        $rs->Comando=&$cmd;
630        if (!$rs->Abrir()) return; // Error al abrir recordset
631        $rs->Primero();
632
633        // Recorre acciones
634        while (!$rs->EOF){
635                $HTMLparametros="";
636                $HTMLnotificaciones="";
637                if($rs->campos["tipoaccion"]==$EJECUCION_TAREA || $rs->campos["tipoaccion"]==$EJECUCION_TRABAJO ){
638                        $auxP=split(";",$rs->campos["ambitskwrk"]); // Recorre los ambitos de la tarea o trabajo
639                        $i=0;
640                        do{
641                                $dualparam=split(":",$auxP[$i]);
642                                $datobinario=$dualparam[0]."-".$dualparam[1];
643                                $posp=busca_indicebinariodual($datobinario,$tabla_ambitosacciones,$cont_ambitosacciones); // Busca ambito e id.
644                                $i++;
645                        }while($posp<0 && $i<sizeof($auxP));
646                }
647                else{
648                        $datobinario=$rs->campos["ambito"]."-".$rs->campos["idambito"];
649                        $posp=busca_indicebinariodual($datobinario,$tabla_ambitosacciones,$cont_ambitosacciones); // Busca datos en la tabla
650                }
651                if ($posp>=0){
652                                $auxtabla_ambitosacciones=$tabla_ambitosacciones[$posp][1];
653                                $ambito=$auxtabla_ambitosacciones["ambito"];
654                                $nombreambito=$auxtabla_ambitosacciones["nombreambito"];
655                                switch($ambito){
656                                        case $AMBITO_CENTROS :
657                                                $urlimg='../images/iconos/centros.gif';
658                                                $textambito="Centros";
659                                                $bgcolor="#ff5566";
660                                                break;
661                                        case $AMBITO_GRUPOSAULAS :
662                                                $urlimg='../images/iconos/carpeta.gif';
663                                                $textambito="Grupos de aulas";
664                                                $bgcolor="#FFCC55";
665                                                break;
666                                        case $AMBITO_AULAS :
667                                                $urlimg='../images/iconos/aula.gif';
668                                                $textambito="Aulas";
669                                                $bgcolor="#D4D4D4";
670                                                break;
671                                        case $AMBITO_GRUPOSORDENADORES :
672                                                $urlimg='../images/iconos/carpeta.gif';
673                                                $textambito="Grupos de ordenadores";
674                                                $bgcolor="#FF00CC";
675                                                break;
676                                        case $AMBITO_ORDENADORES :
677                                                $urlimg='../images/iconos/ordenador.gif';
678                                                $bgcolor="#FFFF68";
679                                                $textambito="Ordenadores";
680                                                break;
681                                }
682                                $ipesnotificadas=""; // Almacena las ipes de los prdenadores que ya han notificado
683                                $HTMLnotificaciones=notificaciones($cmd,$rs->campos["idaccion"],&$numnot,$rs->campos["tipoaccion"], $rs->campos["parametros"],&$ipesnotificadas );
684                                $nottotales=NotificacionesEsperadas($rs->campos["parametros"],$rs->campos["tipoaccion"]);
685                                if($nottotales>0)
686                                        $porcen=round(($numnot/$nottotales)*100,1);
687                                else
688                                        $porcen=0;
689       
690                                if($porcen>=$porcendesde && $porcen<=$porcenhasta){
691                                                $mulaccion.=$rs->campos["idaccion"].":"; // Formato idaccion:estado:resultado;
692                                                echo '<TR id="ACC_'.$rs->campos["idaccion"].'" name='.$rs->campos["tipoaccion"].' value='.$rs->campos["ambito"].' height=20>'.chr(13);
693                                                echo '<TD  align=center><IMG onclick=ver_notificaciones(this,0,'.$rs->campos["idaccion"].'); style="cursor:hand;display:block" src="../images/tsignos/contra.gif">';
694                                                echo '<IMG onclick=ver_notificaciones(this,1,'.$rs->campos["idaccion"].'); style="cursor:hand;display:none" src="../images/tsignos/desple.gif">';
695                                                echo '</TD>'.chr(13);
696
697                                                switch($rs->campos["tipoaccion"]){
698                                                        case $EJECUCION_COMANDO :
699                                                                $nombreliterales[0]="descripcion";
700                                                                $nombreliterales[1]="visuparametros";
701                                                                $Datos=TomanDatos($cmd,"comandos",$rs->campos["idtipoaccion"],"idcomando",$nombreliterales);
702                                                                $nombreaccion=$Datos["descripcion"];
703                                                          //  Visualización de los parametros de un comando
704                                                                $HTMLparametros=infoparametros($cmd,$rs->campos["idaccion"],$rs->campos["parametros"],$Datos["visuparametros"],$ipesnotificadas);
705                                                                echo '<TD align=center><IMG name="'.$rs->campos["idtipoaccion"].'" id='.$rs->campos["idaccion"].' src="../images/iconos/comandos.gif" style="cursor:hand" oncontextmenu="resalta(this,'.$EJECUCION_COMANDO.','."'".$nombreaccion.".'".')"></TD>'.chr(13);
706                                                                break;
707                                                        case $EJECUCION_TAREA :
708                                                                $HTMLparametros=infoparametrosTskWrk($cmd,$rs->campos["idaccion"],$rs->campos["parametros"]);
709                                                                $nombreaccion=TomaDato($cmd,0,'tareas',$rs->campos["idtipoaccion"],'idtarea','descripcion');
710                                                                echo '<TD align=center><IMG name="'.$rs->campos["idtipoaccion"].'" id='.$rs->campos["idaccion"].' src="../images/iconos/tareas.gif" style="cursor:hand" oncontextmenu="resalta(this,'.$EJECUCION_TAREA.','."'".$nombreaccion.".'".')"></TD>'.chr(13);
711                                                                break;
712                                                        case $EJECUCION_TRABAJO :
713                                                                $HTMLparametros=infoparametrosTskWrk($cmd,$rs->campos["idaccion"],$rs->campos["parametros"]);
714                                                                $nombreaccion=TomaDato($cmd,0,'trabajos',$rs->campos["idtipoaccion"],'idtrabajo','descripcion');
715                                                                echo '<TD align=center><IMG name="'.$rs->campos["idtipoaccion"].'" id='.$rs->campos["idaccion"].' src="../images/iconos/trabajos.gif" style="cursor:hand" oncontextmenu="resalta(this,'.$EJECUCION_TRABAJO.','."'".$nombreaccion.".'".')"></TD>'.chr(13);
716                                                                break;
717                                                }
718                                                echo '<TD align=center>&nbsp;'.$nombreaccion.'&nbsp;</TD>'.chr(13);
719
720                                                $fechahorareg=$rs->campos["fechahorafin"];
721                                                $wfecha=substr($fechahorareg,0,strpos($fechahorareg,' '));
722                                                $whora =substr (strrchr ($fechahorareg, " "), 1);
723                                                $fecha=trim($wfecha);
724                                                $hora=trim($whora);
725                                                if ($fecha=="0000-00-00") $hora="";
726                                                echo '<TD align=center>&nbsp;'.InvFecha($fecha).'&nbsp;</TD>'.chr(13);
727                                                echo '<TD align=center>&nbsp;'.$hora.'&nbsp;</TD>'.chr(13);
728
729                                                $fechahorareg=$rs->campos["fechahorareg"];
730                                                $wfecha=substr($fechahorareg,0,strpos($fechahorareg,' '));
731                                                $whora =substr (strrchr ($fechahorareg, " "), 1);
732                                                $fecha=trim($wfecha);
733                                                $hora=trim($whora);
734                                                if ($fecha=="0000-00-00") $hora="";
735                                                echo '<TD align=center>&nbsp;'.InvFecha($fecha).'&nbsp;</TD>'.chr(13);
736                                                echo '<TD align=center>&nbsp;'.$hora.'&nbsp;</TD>'.chr(13);
737
738                                                if($rs->campos["tipoaccion"]==$EJECUCION_TAREA || $rs->campos["tipoaccion"]==$EJECUCION_TRABAJO ){
739                                                        echo '<TD align=center>&nbsp;</TD>'.chr(13);
740                                                        echo '<TD align=center>&nbsp;</TD>'.chr(13);
741                                                }
742                                                else{
743                                                        echo '<TD align=center><IMG src="'.$urlimg.'"></TD>'.chr(13);
744                                                        echo '<TD align=center>&nbsp;'.$nombreambito.'&nbsp;</TD>'.chr(13);
745                                                }
746                                                $mulaccion.=$rs->campos["estado"].":"; // Formato idaccion:estado:resultado;
747                                                switch($rs->campos["estado"]){
748                                                                case $ACCION_DETENIDA:
749                                                                        echo '<TD align=center><IMG value="'.$ACCION_DETENIDA.'" src="../images/iconos/acDetenida.gif" width=16 height=16></TD>'.chr(13);
750                                                                        break;
751                                                                case $ACCION_INICIADA:
752                                                                        echo '<TD align=center><IMG value="'.$ACCION_INICIADA.'" src="../images/iconos/acIniciada.gif" width=16 height=16></TD>'.chr(13);
753                                                                        break;
754                                                                case $ACCION_FINALIZADA:
755                                                                        echo '<TD align=center><IMG value="'.$ACCION_FINALIZADA.'" src="../images/iconos/acFinalizada.gif" width=16 height=16></TD>'.chr(13);
756                                                                        break;
757                                                }
758                                                echo '<TD id="PORCEN-'.$rs->campos["idaccion"].'" align=center >&nbsp;'.$porcen.'%&nbsp;</TD>';
759                                                $mulaccion.=$rs->campos["resultado"].";"; // Formato idaccion:estado:resultado;
760                                                switch($rs->campos["resultado"]){
761                                                        case $ACCION_EXITOSA:
762                                                                echo '<TD align=center><IMG value="'.$ACCION_EXITOSA.'" src="../images/iconos/acExitosa.gif" width=16 height=16></TD>'.chr(13);
763                                                                break;
764                                                        case $ACCION_FALLIDA:
765                                                                echo '<TD align=center><IMG value="'.$ACCION_FALLIDA.'" src="../images/iconos/acFallida.gif" width=16 height=16></TD>'.chr(13);
766                                                                break;
767                                                        case $ACCION_SINERRORES:
768                                                                echo '<TD align=center><IMG value="'.$ACCION_SINERRORES.'" src="../images/iconos/acSinErrores.gif" width=16 height=16></TD>'.chr(13);
769                                                                break;
770                                                        case $ACCION_CONERRORES:
771                                                                echo '<TD align=center><IMG value="'.$ACCION_CONERRORES.'" src="../images/iconos/acConErrores.gif" width=16 height=16></TD>'.chr(13);
772                                                                break;
773                                                        case $ACCION_TERMINADA:
774                                                                echo '<TD align=center><IMG value="'.$ACCION_TERMINADA.'" src="../images/iconos/acTerminada.gif" width=16 height=16></TD>'.chr(13);
775                                                                break;
776                                                        case $ACCION_ABORTADA:
777                                                                echo '<TD align=center><IMG value="'.$ACCION_ABORTADA.'" src="../images/iconos/acAbortada.gif" width=16 height=16></TD>'.chr(13);
778                                                                break;
779                                                        default:
780                                                                echo '<TD >&nbsp;</TD>';
781                                                }
782                                                echo '</TR>'.chr(13);
783                                                echo $HTMLparametros;
784                                                echo $HTMLnotificaciones;
785                                }
786                }
787                $rs->Siguiente();
788        }
789        $rs->Cerrar();
790}
791/*________________________________________________________________________________________________________
792        Dibuja la tabla de parametros de una tarea o un trabajo
793________________________________________________________________________________________________________*/
794function infoparametrosTskWrk($cmd,$idaccion,$parametros){
795        $HTMLparametros="";
796        $HTMLparametros.='<TR id="PAR_'.$idaccion.'" style="display:none">'.chr(13);
797        $HTMLparametros.= '<TD>&nbsp;</TD>'.chr(13);
798        $HTMLparametros.=  '<TH align=center style="FONT-WEIGHT: 700;COLOR: #000000;BACKGROUND-COLOR: #D4D4D4; " >Nº</TH>'.chr(13);
799        $HTMLparametros.=  '<TH style="FONT-WEIGHT: 700;COLOR: #000000;BACKGROUND-COLOR: #D4D4D4;"  colspan=10>Acción</TH>'.chr(13);
800        $HTMLparametros.=  '</TR>'.chr(13);
801       
802        $rs=new Recordset;
803        $rs->Comando=&$cmd;
804        $dualparam=split("=",$parametros);
805        $auxC=split(";",$dualparam[1]); // Recorre valores delimitado por comas
806        for ($j=0;$j<sizeof($auxC);$j++){
807                if ($dualparam[0]=="cmd")
808                        $cmd->texto="SELECT comandos.descripcion FROM comandos INNER JOIN tareas_comandos ON tareas_comandos.idcomando=comandos.idcomando WHERE tareas_comandos.idtareacomando=".$auxC[$j] ;
809                else
810                        $cmd->texto="SELECT tareas.descripcion FROM tareas INNER JOIN trabajos_tareas ON trabajos_tareas.idtarea=tareas.idtarea WHERE trabajos_tareas.idtrabajotarea=".$auxC[$j] ;
811                if (!$rs->Abrir()) return(""); // Error al abrir recordset
812                if($rs->EOF) return("");
813                $valor=$rs->campos["descripcion"];
814                $rs->Cerrar();
815                $HTMLparametros.='<TR  id="PAR_'.$idaccion.'" style="display:none">'.chr(13);
816                $HTMLparametros.= '<TD>&nbsp;</TD>'.chr(13);
817                $HTMLparametros.=  '<TD align=center style="BACKGROUND-COLOR: #b5daad;" >'.($j+1).'</TD>'.chr(13);
818                $HTMLparametros.=  '<TD  style="BACKGROUND-COLOR: #b5daad;" colspan=10>'.$valor.'</TD>'.chr(13);
819                $HTMLparametros.=  '</TR>'.chr(13);
820        }
821        return($HTMLparametros);
822}
823/*________________________________________________________________________________________________________
824        Dibuja la tabla de parametros de un comando
825________________________________________________________________________________________________________*/
826function infoparametros($cmd,$idaccion,$parametros,$visuparametros,$ipesnotificadas){
827        global  $tabla_parametros;
828        global  $cont_parametros;
829        global  $MAXLONVISUSCRIPT; // longitud Maxima de visualización del script
830
831        $HTMLparametros="";
832        $HTMLparametros.='<TR  id="PAR_'.$idaccion.'" style="display:none">'.chr(13);
833        $HTMLparametros.= '<TD>&nbsp;</TD>'.chr(13);
834        $HTMLparametros.=  '<TH style="FONT-WEIGHT: 700;COLOR: #000000;BACKGROUND-COLOR: #D4D4D4; " colspan=3>Parameter</TH>'.chr(13);
835        $HTMLparametros.=  '<TH style="FONT-WEIGHT: 700;COLOR: #000000;BACKGROUND-COLOR: #D4D4D4;"  colspan=8>Value</TH>'.chr(13);
836        $HTMLparametros.=  '</TR>'.chr(13);
837       
838        $auxVP=split(";",$visuparametros); // Parametros visualizables
839        $auxP=split(chr(13),$parametros); // Recorre parametros para visualizar los que así sean
840        for ($i=0;$i<sizeof($auxP);$i++){
841                $dualparam=split("=",$auxP[$i]);
842                for ($k=0;$k<sizeof($auxVP);$k++){
843                         if($auxVP[$k]==$dualparam[0]){
844                                $posp=busca_indicebinariodual($dualparam[0],$tabla_parametros,$cont_parametros); // Busca datos del parámetro en la tabla cargada previamentre con todos los parámetros
845                                if ($posp>=0){
846                                        $auxtabla_parametros=$tabla_parametros[$posp][1];
847                                        $HTMLparametros.='<TR  id="PAR_'.$idaccion.'" style="display:none">'.chr(13);
848                                        $HTMLparametros.= '<TD>&nbsp;</TD>'.chr(13);
849                                        $HTMLparametros.=  '<TD style="BACKGROUND-COLOR: #b5daad;" colspan=3>&nbsp;'.$auxtabla_parametros["descripcion"].'</TD>'.chr(13);
850                                        if($auxtabla_parametros["tipopa"]==1){
851                                        $valor=TomaDato($cmd,0,$auxtabla_parametros["nomtabla"],$dualparam[1],$auxtabla_parametros["nomidentificador"],$auxtabla_parametros["nomliteral"]);
852                                        }else
853                                                $valor=$dualparam[1];
854                                       
855                                        switch($dualparam[0]){
856                                                case "iph": // Si el parametro es la s Ipes de los ordenadores se pintan
857                                                                $tablaipes=PintaOrdenadores($cmd,$valor,$ipesnotificadas,$idaccion);
858                                                                $HTMLparametros.=  '<TD  style="BACKGROUND-COLOR: #b5daad;" colspan=8>'.$tablaipes.'</TD>'.chr(13);
859                                                                break;
860                                                default:
861                                                                $HTMLparametros.=  '<TD  style="BACKGROUND-COLOR: #b5daad;" colspan=8>&nbsp;'.Urldecode($valor).'</TD>'.chr(13);
862                                        }
863                                        $HTMLparametros.=  '</TR>'.chr(13);
864                                }
865                        }
866                }
867        }
868        return($HTMLparametros);
869}
870/*________________________________________________________________________________________________________
871        Dibuja la tabla de notificaciones
872________________________________________________________________________________________________________*/
873function notificaciones($cmd,$idaccion,$numnot,$TipoAccion,$parametros,$ipesnotificadas){
874        global $TbMsg;
875        global $EJECUCION_COMANDO;
876        global $EJECUCION_TAREA;
877        global $EJECUCION_TRABAJO;
878        global $ACCION_EXITOSA;
879        global $ACCION_FALLIDA;
880        global $NOTIFICADOR_ORDENADOR;
881        global $NOTIFICADOR_COMANDO;
882        global $NOTIFICADOR_TAREA;
883
884        $HTMLnotificaciones="";
885        $numnot=0;
886        $rs=new Recordset;
887        switch($TipoAccion){
888                case $EJECUCION_COMANDO :
889                        $TipoNotificador=$NOTIFICADOR_ORDENADOR;
890                        $urlimg='../images/iconos/comandos.gif';
891                        $cmd->texto='SELECT notificaciones.*,ordenadores.idordenador as identificadornot,ordenadores.nombreordenador as nombreidentificadornot,ordenadores.ip FROM notificaciones';
892                        $cmd->texto.=" INNER JOIN  ordenadores ON notificaciones.idnotificador=ordenadores.idordenador";
893                        $cmd->texto.=" WHERE notificaciones.accionid=".$idaccion." ORDER BY notificaciones.fechahorareg desc";
894                        break;
895                case $EJECUCION_TAREA :
896                        $TipoNotificador=$NOTIFICADOR_COMANDO;
897                        $urlimg='../images/iconos/tareas.gif';
898                        $cmd->texto='SELECT notificaciones.*,tareas_comandos.idtareacomando as identificadornot,comandos.descripcion as nombreidentificadornot FROM notificaciones';
899                        $cmd->texto.=" INNER JOIN  tareas_comandos ON notificaciones.idnotificador=tareas_comandos.idtareacomando";
900                        $cmd->texto.=" INNER JOIN  comandos ON comandos.idcomando=tareas_comandos.idcomando";
901                        $cmd->texto.=" WHERE notificaciones.accionid=".$idaccion." ORDER BY notificaciones.fechahorareg desc ";
902                        $urlimg= '../images/iconos/comandos.gif>';
903                        break;
904                case $EJECUCION_TRABAJO :
905                        $TipoNotificador=$NOTIFICADOR_TAREA;
906                        $urlimg='../images/iconos/trabajos.gif';
907                        $cmd->texto='SELECT notificaciones.*,trabajos_tareas.idtrabajotarea  as identificadornot,tareas.descripcion as nombreidentificadornot FROM notificaciones';
908                        $cmd->texto.=" INNER JOIN  trabajos_tareas ON notificaciones.idnotificador=trabajos_tareas.idtrabajotarea";
909                        $cmd->texto.=" INNER JOIN  tareas ON tareas.idtarea=trabajos_tareas.idtarea";
910                        $cmd->texto.=" WHERE notificaciones.accionid=".$idaccion." ORDER BY notificaciones.fechahorareg desc";
911                        $urlimg= '../images/iconos/tareas.gif>';
912                        break;
913        }
914        $rs->Comando=&$cmd;
915        if (!$rs->Abrir()) return; // Error al abrir recordset
916        $numreg=0;
917        $rs->Primero();
918        while (!$rs->EOF){
919                        $numnot++;
920                        if($numreg==0){
921                                $HTMLnotificaciones.='<TR  id="NOT_'.$idaccion.'" style="display:none" >'.chr(13);
922                                $HTMLnotificaciones.= '<TD>&nbsp;</TD>'.chr(13);
923                                $HTMLnotificaciones.=  '<TH style="FONT-WEIGHT: 700;COLOR: #000000;BACKGROUND-COLOR: #D4D4D4;">&nbsp;</TH>'.chr(13);
924                                $HTMLnotificaciones.=  '<TH style="FONT-WEIGHT: 700;COLOR: #000000;BACKGROUND-COLOR: #D4D4D4;">'.$TbMsg[23].'</TH>'.chr(13);
925                                $HTMLnotificaciones.=  '<TH style="FONT-WEIGHT: 700;COLOR: #000000;BACKGROUND-COLOR: #D4D4D4;">'.$TbMsg[19].'</TH>'.chr(13);
926                                $HTMLnotificaciones.=  '<TH style="FONT-WEIGHT: 700;COLOR: #000000;BACKGROUND-COLOR: #D4D4D4;">'.$TbMsg[20].'</TH>'.chr(13);
927                                $HTMLnotificaciones.=  '<TH style="FONT-WEIGHT: 700;COLOR: #000000;BACKGROUND-COLOR: #D4D4D4;" colspan=6>'.$TbMsg[57].'</TH>'.chr(13);
928                                $HTMLnotificaciones.=  '<TH style="FONT-WEIGHT: 700;COLOR: #000000;BACKGROUND-COLOR: #D4D4D4;">R</TH>'.chr(13);
929                                $HTMLnotificaciones.=  '</TR>'.chr(13);
930                                $numreg++;
931                        }
932                        if($TipoAccion==$EJECUCION_COMANDO){
933                                switch($rs->campos["resultado"]){
934                                        case $ACCION_EXITOSA:
935                                                $urlimg= '../images/iconos/ordenadornot_ok.gif>';
936                                                break;
937                                        case $ACCION_FALLIDA:
938                                                $urlimg= '../images/iconos/ordenadornot_ko.gif>';
939                                                break;
940                                }
941                        }
942                        $HTMLnotificaciones.='<TR id="NOT_'.$idaccion.'" style="display:none" height=20 value="'.$idaccion.'">'.chr(13);
943                        $HTMLnotificaciones.='<TD>&nbsp;</TD>'.chr(13);
944                        $HTMLnotificaciones.='<TD  style="BACKGROUND-COLOR: #E3D8C6;" align=center>';
945                        $HTMLnotificaciones.='<IMG id="'.$rs->campos["accionid"].'" name="'.$rs->campos["idnotificacion"].'" value="'.$rs->campos["identificadornot"].'" oncontextmenu="resaltanot(this,'.$TipoNotificador.');" src='.$urlimg.'</TD>'.chr(13);
946                        $HTMLnotificaciones.=  '<TD  style="BACKGROUND-COLOR: #E3D8C6;" align=center>'.$rs->campos["nombreidentificadornot"].'</TD>'.chr(13);
947                        $fechahorareg=$rs->campos["fechahorareg"];
948                        $wfecha=substr($fechahorareg,0,strpos($fechahorareg,' '));
949                        $whora =substr (strrchr ($fechahorareg, " "), 1);
950                        $fecha=trim($wfecha);
951                        $hora=trim($whora);
952                        if ($fecha=="0000-00-00") $hora="";
953                        $HTMLnotificaciones.=  '<TD  style="BACKGROUND-COLOR: #E3D8C6;" align=center>&nbsp;'.InvFecha($fecha).'&nbsp;</TD>'.chr(13);
954                        $HTMLnotificaciones.=  '<TD  style="BACKGROUND-COLOR: #E3D8C6;"align=center>&nbsp;'.$hora.'&nbsp;</TD>'.chr(13);
955                        $HTMLnotificaciones.=  '<TD  style="BACKGROUND-COLOR: #E3D8C6;" colspan=6 align=center>'.$rs->campos["descrinotificacion"].'&nbsp;</TD>'.chr(13);
956                        switch($rs->campos["resultado"]){
957                                case $ACCION_EXITOSA:
958                                        $HTMLnotificaciones.=  '<TD  style="BACKGROUND-COLOR: #E3D8C6;" align=center><IMG value="'.$ACCION_EXITOSA.'" src="../images/iconos/acExitosa.gif" width=16 height=16></TD>'.chr(13);
959                                        if($TipoNotificador==$NOTIFICADOR_ORDENADOR){
960                                                $ipesnotificadas.=$rs->campos["ip"]."=".$ACCION_EXITOSA."=".$rs->campos["idnotificacion"].";";
961                                        }
962                                        break;
963                                case $ACCION_FALLIDA:
964                                        $HTMLnotificaciones.=  '<TD  style="BACKGROUND-COLOR: #E3D8C6;" align=center><IMG value="'.$ACCION_FALLIDA.'" src="../images/iconos/acFallida.gif" width=16 height=16></TD>'.chr(13);
965                                        if($TipoNotificador==$NOTIFICADOR_ORDENADOR){
966                                                $ipesnotificadas.=$rs->campos["ip"]."=".$ACCION_FALLIDA."=".$rs->campos["idnotificacion"].";";
967                                        }
968                                        break;
969                        }
970                        $HTMLnotificaciones.='</TR>'.chr(13);
971                        $rs->Siguiente();
972        }
973        return($HTMLnotificaciones);
974}
975/*________________________________________________________________________________________________________
976        Recorrea loa distintod ambitos
977________________________________________________________________________________________________________*/
978function RecorreCentro($cmd){
979        global $AMBITO_CENTROS;
980        global $AMBITO_GRUPOSAULAS;
981        global $tabla_ambitosacciones;
982        global $cont_ambitosacciones;
983
984        $auxtabla_ambitosacciones="";
985
986        $rs=new Recordset;
987        $rs->Comando=&$cmd;
988        if (!$rs->Abrir()) return; // Error al abrir recordset
989        $rs->Primero();
990        if(!$rs->EOF){
991                $idcentro=$rs->campos["idcentro"];
992                $tabla_ambitosacciones[$cont_ambitosacciones][0]=$AMBITO_CENTROS."-".$idcentro;
993                $auxtabla_ambitosacciones["ambito"]=$AMBITO_CENTROS;
994                $auxtabla_ambitosacciones["nombreambito"]=$rs->campos["nombrecentro"];
995                $tabla_ambitosacciones[$cont_ambitosacciones++][1]=$auxtabla_ambitosacciones;
996                $cmd->texto="SELECT idgrupo,nombregrupo FROM grupos WHERE idcentro=".$idcentro." AND grupoid=0  AND tipo=".$AMBITO_GRUPOSAULAS;
997                RecorreGruposAulas($cmd);
998                $cmd->texto="SELECT idaula,nombreaula FROM aulas WHERE idcentro=".$idcentro." AND grupoid=0";
999                RecorreAulas($cmd);
1000        }
1001        $rs->Cerrar();
1002}
1003//________________________________________________________________________________________________________
1004function RecorreGruposAulas($cmd){
1005        global $AMBITO_GRUPOSAULAS;
1006        global $tabla_ambitosacciones;
1007        global $cont_ambitosacciones;
1008
1009        $auxtabla_ambitosacciones="";
1010
1011        $rs=new Recordset;
1012        $rs->Comando=&$cmd;
1013        if (!$rs->Abrir()) return; // Error al abrir recordset
1014        $rs->Primero();
1015
1016        while (!$rs->EOF){
1017                $idgrupo=$rs->campos["idgrupo"];
1018                $tabla_ambitosacciones[$cont_ambitosacciones][0]=$AMBITO_GRUPOSAULAS."-".$idgrupo;
1019                $auxtabla_ambitosacciones["ambito"]=$AMBITO_GRUPOSAULAS;
1020                $auxtabla_ambitosacciones["nombreambito"]=$rs->campos["nombregrupo"];
1021                $tabla_ambitosacciones[$cont_ambitosacciones++][1]=$auxtabla_ambitosacciones;
1022                $cmd->texto="SELECT idgrupo,nombregrupo FROM grupos WHERE grupoid=".$idgrupo ." AND tipo=".$AMBITO_GRUPOSAULAS;
1023                RecorreGruposAulas($cmd);
1024                $cmd->texto="SELECT idaula,nombreaula FROM aulas WHERE  grupoid=".$idgrupo;
1025                RecorreAulas($cmd);
1026                $rs->Siguiente();
1027        }
1028        $rs->Cerrar();
1029}
1030//________________________________________________________________________________________________________
1031function RecorreAulas($cmd){
1032        global $AMBITO_AULAS;
1033        global $tabla_ambitosacciones;
1034        global $cont_ambitosacciones;
1035
1036        $auxtabla_ambitosacciones="";
1037
1038        $rs=new Recordset;
1039        $rs->Comando=&$cmd;
1040        if (!$rs->Abrir()) return; // Error al abrir recordset
1041        $rs->Primero();
1042
1043        while (!$rs->EOF){
1044                $idaula=$rs->campos["idaula"];
1045                $tabla_ambitosacciones[$cont_ambitosacciones][0]=$AMBITO_AULAS."-".$idaula;
1046                $auxtabla_ambitosacciones["ambito"]=$AMBITO_AULAS;
1047                $auxtabla_ambitosacciones["nombreambito"]=$rs->campos["nombreaula"];
1048                $tabla_ambitosacciones[$cont_ambitosacciones++][1]=$auxtabla_ambitosacciones;
1049                $cmd->texto="SELECT idgrupo,nombregrupoordenador FROM gruposOrdenadores WHERE idaula=".$idaula." AND grupoid=0";
1050                RecorreGruposOrdenadores($cmd);
1051                $cmd->texto="SELECT idordenador,nombreordenador FROM ordenadores WHERE  idaula=".$idaula." AND grupoid=0";
1052                RecorreOrdenadores($cmd);
1053                $rs->Siguiente();
1054        }
1055        $rs->Cerrar();
1056}
1057//________________________________________________________________________________________________________
1058function RecorreGruposOrdenadores($cmd){
1059        global $AMBITO_GRUPOSORDENADORES;
1060        global $tabla_ambitosacciones;
1061        global $cont_ambitosacciones;
1062
1063        $auxtabla_ambitosacciones="";
1064
1065        $rs=new Recordset;
1066        $rs->Comando=&$cmd;
1067        if (!$rs->Abrir()) return; // Error al abrir recordset
1068        $rs->Primero();
1069        while (!$rs->EOF){
1070                $idgrupo=$rs->campos["idgrupo"];
1071                $tabla_ambitosacciones[$cont_ambitosacciones][0]=$AMBITO_GRUPOSORDENADORES."-".$idgrupo;
1072                $auxtabla_ambitosacciones["ambito"]=$AMBITO_GRUPOSORDENADORES;
1073                $auxtabla_ambitosacciones["nombreambito"]=$rs->campos["nombregrupoordenador"];
1074                $tabla_ambitosacciones[$cont_ambitosacciones++][1]=$auxtabla_ambitosacciones;
1075                $cmd->texto="SELECT idgrupo,nombregrupoordenador FROM gruposOrdenadores WHERE grupoid=".$idgrupo;
1076                RecorreGruposOrdenadores($cmd);
1077                $cmd->texto="SELECT idordenador,nombreordenador FROM ordenadores WHERE  grupoid=".$idgrupo;
1078                RecorreOrdenadores($cmd);
1079                $rs->Siguiente();
1080        }
1081        $rs->Cerrar();
1082}
1083//________________________________________________________________________________________________________
1084function RecorreOrdenadores($cmd){
1085        global $AMBITO_ORDENADORES;
1086        global $tabla_ambitosacciones;
1087        global $cont_ambitosacciones;
1088
1089        $rs=new Recordset;
1090        $rs->Comando=&$cmd;
1091        if (!$rs->Abrir()) return; // Error al abrir recordset
1092        $rs->Primero();
1093
1094        while (!$rs->EOF){
1095                $idordenador=$rs->campos["idordenador"];
1096                $tabla_ambitosacciones[$cont_ambitosacciones][0]=$AMBITO_ORDENADORES."-".$idordenador;
1097                $auxtabla_ambitosacciones["ambito"]=$AMBITO_ORDENADORES;
1098                $auxtabla_ambitosacciones["nombreambito"]=$rs->campos["nombreordenador"];
1099                $tabla_ambitosacciones[$cont_ambitosacciones++][1]=$auxtabla_ambitosacciones;
1100                $rs->Siguiente();
1101        }
1102        $rs->Cerrar();
1103}
1104/*________________________________________________________________________________________________________
1105        Cuenta el numero de ordenadores a los que afecta la acción
1106________________________________________________________________________________________________________*/
1107function NotificacionesEsperadas($parametros,$TipoAccion){
1108        global $EJECUCION_COMANDO;
1109        global $EJECUCION_TAREA;
1110        global $EJECUCION_TRABAJO;
1111
1112        switch($TipoAccion){
1113                case $EJECUCION_COMANDO :
1114                        $cadenanot=extrae_parametro($parametros,chr(13),'=',"iph");
1115                        break;
1116                case $EJECUCION_TAREA :
1117                        $cadenanot=extrae_parametro($parametros,chr(13),'=',"cmd");
1118                        break;
1119                case $EJECUCION_TRABAJO :
1120                        $cadenanot=extrae_parametro($parametros,chr(13),'=',"tsk");
1121                        break;
1122        }
1123        $cont=1;
1124        for($i=0;$i<strlen($cadenanot);$i++){
1125                if(substr($cadenanot,$i,1)==';') $cont++;
1126        }
1127        return($cont);
1128}
1129//________________________________________________________________________________________________________
1130function CriteriosBusquedas(){
1131        global $idcentro;
1132        global $TbMsg;
1133        global $EJECUCION_COMANDO;
1134        global $EJECUCION_TAREA;
1135        global $EJECUCION_TRABAJO;
1136
1137        global $LITEJECUCION_COMANDO;
1138        global $LITEJECUCION_TAREA;
1139        global $LITEJECUCION_TRABAJO;
1140
1141        global $ACCION_DETENIDA;
1142        global $ACCION_INICIADA;
1143        global $ACCION_FINALIZADA;
1144
1145        global $LITACCION_DETENIDA;
1146        global $LITACCION_INICIADA;
1147        global $LITACCION_FINALIZADA;
1148
1149        global $ACCION_EXITOSA;
1150        global $ACCION_FALLIDA;
1151        global $ACCION_TERMINADA;
1152        global $ACCION_ABORTADA;
1153        global $ACCION_SINERRORES;
1154        global $ACCION_CONERRORES;
1155
1156        global $LITACCION_EXITOSA;
1157        global $LITACCION_FALLIDA;
1158        global $LITACCION_TERMINADA;
1159        global $LITACCION_ABORTADA;
1160        global $LITACCION_SINERRORES;
1161        global $LITACCION_CONERRORES;
1162
1163        global $fechainicio;
1164        global $fechafin;
1165        global $horainicio;
1166        global $horafin;
1167       
1168        global $wtiposacciones;
1169        global $westados;
1170        global $wresultados;
1171        global $porcendesde;
1172        global $porcenhasta;
1173
1174        $HTMLCriterios="";
1175        $HTMLCriterios.='<TABLE class=tabla_busquedas align=center border="0">'.chr(13);
1176        $HTMLCriterios.='<TR HEIGHT=30>'.chr(13);
1177        $HTMLCriterios.='<TD style="    BORDER-BOTTOM:#5a86b5 1px solid;"colspan=2 align="center" >'.chr(13);
1178        $HTMLCriterios.='<SPAN style="FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 11px;COLOR:#5a86b5;FONT-WEIGHT: 700;">____ '.$TbMsg[1].'____</SPAN>'.chr(13);
1179        $HTMLCriterios.='</TR>'.chr(13);
1180        $HTMLCriterios.='</TD>'.chr(13);
1181
1182        $HTMLCriterios.='<TR>'.chr(13);
1183        $HTMLCriterios.='<TD>'.chr(13);
1184
1185        // Desplegable con los tipos de acciones
1186        $HTMLCriterios.='<TABLE class=tabla_standar align=center border="0">'.chr(13);
1187        $HTMLCriterios.='<TR>'.chr(13);
1188        $HTMLCriterios.='       <TH align=center>&nbsp;'.$TbMsg[2].'&nbsp;</TH>'.chr(13);
1189        $HTMLCriterios.='</TR>'.chr(13);
1190        $HTMLCriterios.='<TR>'.chr(13);
1191        $parametros=$EJECUCION_COMANDO."=".$LITEJECUCION_COMANDO.chr(13);
1192        $parametros.=$EJECUCION_TAREA."=".$LITEJECUCION_TAREA.chr(13);
1193        $parametros.=$EJECUCION_TRABAJO."=".$LITEJECUCION_TRABAJO;
1194        $HTMLCriterios.='<TD colspan=3>'.HTMLCTEMULSELECT($parametros,"wtiposacciones",$wtiposacciones,"estilodesple","chgdespleacciones",100,3).'</TD>';
1195        $HTMLCriterios.='</TR>'.chr(13);
1196        $HTMLCriterios.='</TABLE>'.chr(13);
1197
1198        // Desplegable con los distintos estados
1199        $HTMLCriterios.='<TABLE class=tabla_standar align=center border="0">'.chr(13);
1200        $HTMLCriterios.='<TR>'.chr(13);
1201        $HTMLCriterios.='       <TH align=center>&nbsp;'.$TbMsg[4].'&nbsp;</TH>'.chr(13);
1202        $HTMLCriterios.='</TR>'.chr(13);
1203        $HTMLCriterios.='<TR>'.chr(13);
1204        $parametros=$ACCION_DETENIDA."=".$LITACCION_DETENIDA.chr(13);
1205        $parametros.=$ACCION_INICIADA."=".$LITACCION_INICIADA.chr(13);
1206        $parametros.=$ACCION_FINALIZADA."=".$LITACCION_FINALIZADA;
1207        $HTMLCriterios.='<TD colspan=3>'.HTMLCTEMULSELECT($parametros,"westados",$westados,"estilodesple","chgdespleestados",100,3).'</TD>';
1208        $HTMLCriterios.='</TR>'.chr(13);
1209        $HTMLCriterios.='</TABLE>'.chr(13);
1210
1211        $HTMLCriterios.='</TD>'.chr(13);
1212        $HTMLCriterios.='<TD valign=top>'.chr(13);
1213        // Desplegable con los distintos resultados
1214        $HTMLCriterios.='<TABLE class=tabla_standar align=center border="0">'.chr(13);
1215        $HTMLCriterios.='<TR>'.chr(13);
1216        $HTMLCriterios.='       <TH align=center>&nbsp;'.$TbMsg[3].'&nbsp;</TH>'.chr(13);
1217        $HTMLCriterios.='</TR>'.chr(13);
1218        $HTMLCriterios.='<TR>'.chr(13);
1219        $parametros=$ACCION_EXITOSA."=".$LITACCION_EXITOSA.chr(13);
1220        $parametros.=$ACCION_FALLIDA."=".$LITACCION_FALLIDA.chr(13);
1221        $parametros.=$ACCION_TERMINADA."=".$LITACCION_TERMINADA.chr(13);
1222        $parametros.=$ACCION_ABORTADA."=".$LITACCION_ABORTADA.chr(13);
1223        $parametros.=$ACCION_SINERRORES."=".$LITACCION_SINERRORES.chr(13);
1224        $parametros.=$ACCION_CONERRORES."=".$LITACCION_CONERRORES;
1225        $HTMLCriterios.='<TD colspan=3>'.HTMLCTEMULSELECT($parametros,"wresultados",$wresultados,"estilodesple","chgdespleresultados",250,6).'</TD>';
1226        $HTMLCriterios.='</TR>'.chr(13);
1227
1228        // Porcentajes
1229        $HTMLCriterios.='<TR>'.chr(13);
1230        $HTMLCriterios.='<TH>&nbsp;'.$TbMsg[5].':&nbsp;<INPUT size=1 name="porcendesde" value="'.$porcendesde.'">&nbsp;'.$TbMsg[6].':&nbsp;<INPUT size =1 name="porcenhasta" value="'.$porcenhasta.'"></TH>'.chr(13);
1231        $HTMLCriterios.='</TR>'.chr(13);
1232        $HTMLCriterios.='</TABLE>'.chr(13);
1233
1234        $HTMLCriterios.='<TR>'.chr(13);
1235        $HTMLCriterios.='<TD  style="BORDER-BOTTOM:#5a86b5 1px solid;" COLSPAN=2>'.chr(13);
1236        // Fechas
1237        $HTMLCriterios.='<TABLE WIDTH=100% class=tabla_standar align=center border="0">'.chr(13);
1238        $HTMLCriterios.='<TR>'.chr(13);
1239        $HTMLCriterios.='<TH>&nbsp;'.$TbMsg[7].':&nbsp;</TH>'.chr(13);
1240        $HTMLCriterios.='<TD><INPUT class="cajatexto" onclick="vertabla_calendario(this)" style="WIDTH:80" name="fechainicio" value="'.$fechainicio.'"></TD>'.chr(13);
1241        $HTMLCriterios.='<TH align=right>&nbsp;'.$TbMsg[8].':&nbsp;&nbsp;</TH>'.chr(13);
1242        $HTMLCriterios.='<TD align=right><INPUT class="cajatexto" onclick="vertabla_calendario(this)" style="WIDTH:80" name="fechafin" value="'.$fechafin.'"></TD>'.chr(13);
1243        $HTMLCriterios.='</TR>'.chr(13);
1244        $HTMLCriterios.='<TR>'.chr(13);
1245        $HTMLCriterios.='<TH>&nbsp;'.$TbMsg[9].':&nbsp;</TH>'.chr(13);
1246        $HTMLCriterios.='<TD><INPUT class="cajatexto" onclick="vertabla_horario(this)" style="WIDTH:80" name="horainicio" value="'.$horainicio.'"></TD>'.chr(13);
1247        $HTMLCriterios.='<TH align=right>&nbsp;'.$TbMsg[10].':&nbsp;&nbsp;</TH>'.chr(13);
1248        $HTMLCriterios.='<TD align=right><INPUT class="cajatexto" onclick="vertabla_horario(this)" style="WIDTH:80" name="horafin" value="'.$horafin.'"></TD>'.chr(13);
1249        $HTMLCriterios.='</TR>'.chr(13);
1250        $HTMLCriterios.='</TABLE>'.chr(13);
1251       
1252        // Fechas
1253        $HTMLCriterios.='</TD>'.chr(13);
1254        $HTMLCriterios.='</TR>'.chr(13);
1255       
1256        $HTMLCriterios.='</TD>'.chr(13);
1257        $HTMLCriterios.='</TR>'.chr(13);
1258        $HTMLCriterios.='</TABLE>'.chr(13);
1259
1260        $HTMLCriterios.='<TABLE class=tabla_busquedas align=center border="0">'.chr(13);
1261        $HTMLCriterios.='<TR>'.chr(13);
1262        $HTMLCriterios.='<TD>';
1263        // Lupa
1264        $HTMLCriterios.='<IMG src="../images/iconos/busquedas.gif" onclick="javascript:fdatos.submit()" style="cursor:hand" alt="Buscar">';
1265        $HTMLCriterios.='</TD>';
1266        $HTMLCriterios.='<TD>';
1267               
1268        $HTMLCriterios.='</TD>'.chr(13);
1269        $HTMLCriterios.='</TR>'.chr(13);
1270        $HTMLCriterios.='</TABLE>';
1271
1272  return($HTMLCriterios);
1273}
1274/*________________________________________________________________________________________________________
1275        Crea la tabla de ordenadores ( iconos pequeños )
1276________________________________________________________________________________________________________*/
1277function PintaOrdenadores($cmd,$cadenaip,$ipesnotificadas,$idaccion){
1278        global $ACCION_EXITOSA;
1279        global $ACCION_FALLIDA;
1280       
1281        if(!empty($ipesnotificadas)){
1282                $ipesnotificadas=substr($ipesnotificadas,0,strlen($ipesnotificadas)-1); // Quita la coma
1283                $auxN=split(";",$ipesnotificadas);
1284                $cont=sizeof($auxN);
1285                $tbipes="";
1286                $tbresipes="";
1287                $tbnotif="";
1288                for ($i=0;$i<$cont;$i++){
1289                        $dualvalor=split("=",$auxN[$i]);
1290                        $tbipes[$i]=$dualvalor[0];
1291                        $tbresipes[$i]=$dualvalor[1];
1292                        $tbnotif[$i]=$dualvalor[2];
1293                }
1294                $auxtbipes="";
1295                $auxtbresipes="";
1296                $auxtbnotif="";
1297                // Ordena según la ip
1298                for ($i=0;$i<$cont-1;$i++){
1299                        for ($j=$i+1;$j<$cont;$j++){
1300                                if($tbipes[$i]>$tbipes[$j]){
1301                                        $auxtbipes=$tbipes[$i];
1302                                        $tbipes[$i]=$tbipes[$j];
1303                                        $tbipes[$j]=$auxtbipes;
1304
1305                                        $auxtbresipes=$tbresipes[$i];
1306                                        $tbresipes[$i]=$tbresipes[$j];
1307                                        $tbresipes[$j]=$auxtbresipes;
1308
1309                                        $auxtbnotif=$tbnotif[$i];
1310                                        $tbnotif[$i]=$tbnotif[$j];
1311                                        $tbnotif[$j]=$auxtbnotif;
1312                                }
1313                        }
1314                }
1315        }
1316        $auxP=split(";",$cadenaip);
1317        if(sizeof($auxP)<1) return("");
1318
1319        $clauslaIN="'".$auxP[0]."'";
1320        for ($i=1;$i<sizeof($auxP);$i++)
1321                $clauslaIN.=",'".$auxP[$i]."'";
1322
1323        $rs=new Recordset;
1324        $contor=0;
1325        $maxord=5; // Máximos ordenadores por linea
1326        $cmd->texto=" SELECT nombreordenador,ip FROM ordenadores  INNER JOIN aulas ON aulas.idaula=ordenadores.idaula WHERE ip IN(".$clauslaIN.") ORDER by nombreaula,nombreordenador";
1327        $rs->Comando=&$cmd;
1328        if (!$rs->Abrir()) return(""); // Error al abrir recordset
1329        $tablaHtml='<TABLE align=left border=0><TR>';
1330        while (!$rs->EOF){
1331                $contor++;
1332                $tablaHtml.= '<TD align=center style="BACKGROUND-COLOR: #b5daad;FONT-FAMILY: Arial, Helvetica, sans-serif;      BORDER-BOTTOM:#000000 none;FONT-SIZE: 8px">';
1333                if(!empty($ipesnotificadas)){
1334                        $datobinario=$rs->campos["ip"];
1335                        $posp=busca_indicebinario($datobinario,$tbipes,$cont); // Busca ip
1336                }
1337                else
1338                        $posp=-1;
1339                if ($posp>=0){
1340                        if($tbresipes[$posp]==$ACCION_EXITOSA)
1341                                $tablaHtml.='<IMG id="ORDNOT_'.$idaccion."_".$tbnotif[$posp].'" src="../images/iconos/ordenadornot_ok.gif">';
1342                        else
1343                                $tablaHtml.='<IMG id="ORDNOT_'.$idaccion."_".$tbnotif[$posp].'" src="../images/iconos/ordenadornot_ko.gif">';
1344                }
1345                else // No ha notificado
1346                        $tablaHtml.='<IMG src="../images/iconos/ordenadornot.gif">';
1347                $tablaHtml.='<br><span style="FONT-SIZE:9px" >'.$rs->campos["nombreordenador"].'</TD>';
1348                if($contor>$maxord){
1349                        $contor=0;
1350                        $tablaHtml.='</TR><TR>';
1351                }
1352                $rs->Siguiente();
1353}
1354        $tablaHtml.='</TR>';
1355        $tablaHtml.= '</TR></TABLE>';
1356        return($tablaHtml);
1357}
1358//________________________________________________________________________________________________________
1359function ContextualXMLComando(){
1360        global $TbMsg;
1361        global $idcmdtskwrk;
1362        global $codtipoaccion;
1363        global $accionid;
1364        global $EJECUCION_TAREA;
1365
1366        $layerXML='<MENUCONTEXTUAL';
1367        $layerXML.=' idctx="flo_comandos"';
1368        $layerXML.=' maxanchu=130';
1369        $layerXML.=' swimg=1';
1370        $layerXML.=' clase="menu_contextual"';
1371        $layerXML.='>';
1372
1373        if($idcmdtskwrk=="" && $codtipoaccion==""){
1374                $layerXML.='<ITEM';
1375                $layerXML.=' alpulsar="filtrar_accion()"';
1376                $layerXML.=' imgitem="../images/iconos/filtroaccion.gif"';
1377                $layerXML.=' textoitem='.$TbMsg[41];
1378                $layerXML.='></ITEM>';
1379
1380                $layerXML.='<ITEM';
1381                $layerXML.=' alpulsar="filtrar_porambito()"';
1382                $layerXML.=' imgitem="../images/iconos/filtroambito.gif"';
1383                $layerXML.=' textoitem='.$TbMsg[42];
1384                $layerXML.='></ITEM>';
1385        }
1386        else{
1387                $layerXML.='<ITEM';
1388                $layerXML.=' alpulsar="quitar_filtro()"';
1389                $layerXML.=' imgitem="../images/iconos/filtro_off.gif"';
1390                $layerXML.=' textoitem='.$TbMsg[43];
1391                $layerXML.='></ITEM>';
1392        }
1393
1394        $layerXML.='<SEPARADOR>';
1395        $layerXML.='</SEPARADOR>';
1396
1397        $layerXML.='<ITEM';
1398        $layerXML.=' subflotante="flo_modifacciones"';
1399        $layerXML.=' textoitem='.$TbMsg[44];
1400        $layerXML.='></ITEM>';
1401
1402        $layerXML.='<SEPARADOR>';
1403        $layerXML.='</SEPARADOR>';
1404       
1405        $layerXML.='<ITEM';
1406        $layerXML.=' alpulsar="reiniciar_accion()"';
1407        $layerXML.=' imgitem="../images/iconos/reiniciar.gif"';
1408        $layerXML.=' textoitem='.$TbMsg[45];
1409        $layerXML.='></ITEM>';
1410
1411        if($accionid==0){
1412                $layerXML.='<ITEM';
1413                $layerXML.=' alpulsar="eliminar_accion()"';
1414                $layerXML.=' imgitem="../images/iconos/Eliminar.gif"';
1415                $layerXML.=' textoitem='.$TbMsg[46];
1416                $layerXML.='></ITEM>';
1417        }
1418       
1419        if($accionid>0){
1420                $layerXML.='<SEPARADOR>';
1421                $layerXML.='</SEPARADOR>';
1422
1423                $layerXML.='<ITEM';
1424                $layerXML.=' alpulsar="ver_accionpadre('.$EJECUCION_TAREA.')"';
1425                $layerXML.=' imgitem="../images/iconos/tareas.gif"';
1426                $layerXML.=' textoitem='.$TbMsg[47];
1427                $layerXML.='></ITEM>';
1428        }
1429        $layerXML.='</MENUCONTEXTUAL>';
1430        return($layerXML);
1431}
1432//________________________________________________________________________________________________________
1433function ContextualXMLTarea(){ 
1434        global $TbMsg;
1435        global $idcmdtskwrk;
1436        global $codtipoaccion;
1437        global $accionid;
1438        global $EJECUCION_TRABAJO;
1439
1440        $layerXML='<MENUCONTEXTUAL';
1441        $layerXML.=' idctx="flo_tareas"';
1442        $layerXML.=' maxanchu=120';
1443        $layerXML.=' swimg=1';
1444        $layerXML.=' clase="menu_contextual"';
1445        $layerXML.='>';
1446
1447        if($idcmdtskwrk=="" && $codtipoaccion==""){
1448                $layerXML.='<ITEM';
1449                $layerXML.=' alpulsar="filtrar_accion()"';
1450                $layerXML.=' imgitem="../images/iconos/filtroaccion.gif"';
1451                $layerXML.=' textoitem='.$TbMsg[41];
1452                $layerXML.='></ITEM>';
1453        }
1454        else{
1455                $layerXML.='<ITEM';
1456                $layerXML.=' alpulsar="quitar_filtro()"';
1457                $layerXML.=' imgitem="../images/iconos/filtro_off.gif"';
1458                $layerXML.=' textoitem='.$TbMsg[43];
1459                $layerXML.='></ITEM>';
1460        }
1461
1462        $layerXML.='<SEPARADOR>';
1463        $layerXML.='</SEPARADOR>';
1464
1465        $layerXML.='<ITEM';
1466        $layerXML.=' subflotante="flo_modifacciones"';
1467        $layerXML.=' textoitem='.$TbMsg[44];
1468        $layerXML.='></ITEM>';
1469
1470        $layerXML.='<SEPARADOR>';
1471        $layerXML.='</SEPARADOR>';
1472       
1473        $layerXML.='<ITEM';
1474        $layerXML.=' alpulsar="reiniciar_accion()"';
1475        $layerXML.=' imgitem="../images/iconos/reiniciar.gif"';
1476        $layerXML.=' textoitem='.$TbMsg[45];
1477        $layerXML.='></ITEM>';
1478
1479        if($accionid==0){
1480                $layerXML.='<ITEM';
1481                $layerXML.=' alpulsar="eliminar_accion()"';
1482                $layerXML.=' imgitem="../images/iconos/Eliminar.gif"';
1483                $layerXML.=' textoitem='.$TbMsg[46];
1484                $layerXML.='></ITEM>';
1485        }
1486
1487        $layerXML.='<SEPARADOR>';
1488        $layerXML.='</SEPARADOR>';
1489
1490        if($accionid>0){
1491                $layerXML.='<ITEM';
1492                $layerXML.=' alpulsar="ver_accionpadre('.$EJECUCION_TRABAJO.')"';
1493                $layerXML.=' imgitem="../images/iconos/trabajos.gif"';
1494                $layerXML.=' textoitem='.$TbMsg[48];
1495                $layerXML.='></ITEM>';
1496        }
1497        $layerXML.='<ITEM';
1498        $layerXML.=' alpulsar="ver_accion()"';
1499        $layerXML.=' imgitem="../images/iconos/comandos.gif"';
1500        $layerXML.=' textoitem='.$TbMsg[49];
1501        $layerXML.='></ITEM>';
1502       
1503        $layerXML.='</MENUCONTEXTUAL>';
1504        return($layerXML);
1505}
1506//________________________________________________________________________________________________________
1507function ContextualXMLTrabajo(){
1508        global $TbMsg;
1509        global $idcmdtskwrk;
1510        global $codtipoaccion;
1511        global $accionid;
1512
1513        $layerXML='<MENUCONTEXTUAL';
1514        $layerXML.=' idctx="flo_trabajos"';
1515        $layerXML.=' maxanchu=120';
1516        $layerXML.=' swimg=1';
1517        $layerXML.=' clase="menu_contextual"';
1518        $layerXML.='>';
1519
1520        if($idcmdtskwrk=="" && $codtipoaccion==""){
1521                $layerXML.='<ITEM';
1522                $layerXML.=' alpulsar="filtrar_accion()"';
1523                $layerXML.=' imgitem="../images/iconos/filtroaccion.gif"';
1524                $layerXML.=' textoitem='.$TbMsg[41];
1525                $layerXML.='></ITEM>';
1526        }
1527        else{
1528                $layerXML.='<ITEM';
1529                $layerXML.=' alpulsar="quitar_filtro()"';
1530                $layerXML.=' imgitem="../images/iconos/filtro_off.gif"';
1531                $layerXML.=' textoitem='.$TbMsg[43];
1532                $layerXML.='></ITEM>';
1533        }
1534
1535        $layerXML.='<SEPARADOR>';
1536        $layerXML.='</SEPARADOR>';
1537
1538        $layerXML.='<ITEM';
1539        $layerXML.=' subflotante="flo_modifacciones"';
1540        $layerXML.=' textoitem='.$TbMsg[44];
1541        $layerXML.='></ITEM>';
1542
1543        $layerXML.='<SEPARADOR>';
1544        $layerXML.='</SEPARADOR>';
1545
1546        $layerXML.='<ITEM';
1547        $layerXML.=' alpulsar="reiniciar_accion()"';
1548        $layerXML.=' imgitem="../images/iconos/reiniciar.gif"';
1549        $layerXML.=' textoitem='.$TbMsg[45];
1550        $layerXML.='></ITEM>';
1551
1552        $layerXML.='<ITEM';
1553        $layerXML.=' alpulsar="eliminar_accion()"';
1554        $layerXML.=' imgitem="../images/iconos/Eliminar.gif"';
1555        $layerXML.=' textoitem='.$TbMsg[46];
1556        $layerXML.='></ITEM>';
1557
1558        $layerXML.='<SEPARADOR>';
1559        $layerXML.='</SEPARADOR>';
1560
1561        $layerXML.='<ITEM';
1562        $layerXML.=' alpulsar="ver_accion()"';
1563        $layerXML.=' imgitem="../images/iconos/tareas.gif"';
1564        $layerXML.=' textoitem='.$TbMsg[50];
1565        $layerXML.='></ITEM>';
1566
1567        $layerXML.='</MENUCONTEXTUAL>';
1568        return($layerXML);
1569}
1570//________________________________________________________________________________________________________
1571function ContextualXMLModifAcciones(){
1572        global $TbMsg;
1573        global $ACCION_TERMINADA; // Finalizada manualmente con indicacion de exito
1574        global $ACCION_ABORTADA; // Finalizada manualmente con indicacion de errores
1575        global $ACCION_DETENIDA;
1576        global $ACCION_INICIADA;
1577
1578        $layerXML='<MENUCONTEXTUAL';
1579        $layerXML.=' idctx="flo_modifacciones"';
1580        $layerXML.=' maxanchu=120';
1581        $layerXML.=' swimg=1';
1582        $layerXML.=' clase="menu_contextual"';
1583        $layerXML.='>';
1584
1585        $layerXML.='<ITEM';
1586        $layerXML.=' alpulsar="modificar_estado('.$ACCION_DETENIDA.')"';
1587        $layerXML.=' imgitem="../images/iconos/acDetenida.gif"';
1588        $layerXML.=' textoitem='.$TbMsg[51];
1589        $layerXML.='></ITEM>';
1590
1591        $layerXML.='<ITEM';
1592        $layerXML.=' alpulsar="modificar_estado('.$ACCION_INICIADA.')"';
1593        $layerXML.=' imgitem="../images/iconos/acIniciada.gif"';
1594        $layerXML.=' textoitem='.$TbMsg[52];
1595        $layerXML.='></ITEM>';
1596
1597        $layerXML.='<SEPARADOR>';
1598        $layerXML.='</SEPARADOR>';
1599
1600        $layerXML.='<ITEM';
1601        $layerXML.=' alpulsar="modificar_resultado('.$ACCION_ABORTADA.')"';
1602        $layerXML.=' imgitem="../images/iconos/acAbortada.gif"';
1603        $layerXML.=' textoitem='.$TbMsg[53];
1604        $layerXML.='></ITEM>';
1605
1606        $layerXML.='<ITEM';
1607        $layerXML.=' alpulsar="modificar_resultado('.$ACCION_TERMINADA.')"';
1608        $layerXML.=' imgitem="../images/iconos/acTerminada.gif"';
1609        $layerXML.=' textoitem='.$TbMsg[54];
1610        $layerXML.='></ITEM>';
1611
1612       
1613        $layerXML.='</MENUCONTEXTUAL>';
1614        return($layerXML);
1615}
1616//________________________________________________________________________________________________________
1617function ContextualXMLNotificaciones(){
1618        global $TbMsg;
1619        global $ACCION_EXITOSA; // Finalizada con exito
1620        global $ACCION_FALLIDA; // Finalizada con errores
1621
1622        $layerXML='<MENUCONTEXTUAL';
1623        $layerXML.=' idctx="flo_notificaciones"';
1624        $layerXML.=' maxanchu=135';
1625        $layerXML.=' swimg=1';
1626        $layerXML.=' clase="menu_contextual"';
1627        $layerXML.='>';
1628
1629        $layerXML.='<ITEM';
1630        $layerXML.=' alpulsar="modificar_resultado_notificacion('.$ACCION_EXITOSA.')"';
1631        $layerXML.=' imgitem="../images/iconos/acExitosa.gif"';
1632        $layerXML.=' textoitem='.$TbMsg[55];
1633        $layerXML.='></ITEM>';
1634
1635        $layerXML.='<ITEM';
1636        $layerXML.=' alpulsar="modificar_resultado_notificacion('.$ACCION_FALLIDA.')"';
1637        $layerXML.=' imgitem="../images/iconos/acFallida.gif"';
1638        $layerXML.=' textoitem='.$TbMsg[56];
1639        $layerXML.='></ITEM>';
1640
1641        $layerXML.='<SEPARADOR>';
1642        $layerXML.='</SEPARADOR>';
1643
1644        $layerXML.='<ITEM';
1645        $layerXML.=' alpulsar="reiniciar_notificacion()"';
1646        $layerXML.=' imgitem="../images/iconos/reiniciar.gif"';
1647        $layerXML.=' textoitem='.$TbMsg[45];
1648        $layerXML.='></ITEM>';
1649
1650        $layerXML.='</MENUCONTEXTUAL>';
1651        return($layerXML);
1652}
1653?>
Note: See TracBrowser for help on using the repository browser.