[8c9fcb2] | 1 | <?php |
---|
[3ec149c] | 2 | // ************************************************************************************************************************************************* |
---|
| 3 | // Aplicación WEB: ogAdmWebCon |
---|
| 4 | // Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla |
---|
| 5 | // Fecha Creación: Año 2009-2010 |
---|
| 6 | // Fecha Última modificación: Agosto-2010 |
---|
| 7 | // Nombre del fichero: aula.php |
---|
| 8 | // Descripción : |
---|
| 9 | // Visualiza los ordenadores de las aulas de un determinado Centro |
---|
| 10 | // ************************************************************************************************************************************************* |
---|
| 11 | include_once("../includes/ctrlacc.php"); |
---|
| 12 | include_once("../clases/AdoPhp.php"); |
---|
| 13 | include_once("../clases/XmlPhp.php"); |
---|
| 14 | include_once("../clases/MenuContextual.php"); |
---|
| 15 | include_once("../includes/constantes.php"); |
---|
| 16 | include_once("../includes/comunes.php"); |
---|
| 17 | include_once("../includes/CreaComando.php"); |
---|
| 18 | include_once("../idiomas/php/".$idioma."/aulas_".$idioma.".php"); |
---|
[c65587c] | 19 | include_once("../idiomas/php/".$idioma."/estados_".$idioma.".php"); |
---|
[4634acd] | 20 | include_once("../idiomas/php/".$idioma."/comandos/mensajes_".$idioma.".php"); |
---|
[3ec149c] | 21 | //________________________________________________________________________________________________________ |
---|
| 22 | $litambito=0; |
---|
| 23 | $idambito=0; |
---|
| 24 | $nombreambito=""; |
---|
| 25 | $idsrvrembo=0; |
---|
| 26 | $idsrvdhcp=0; |
---|
| 27 | |
---|
| 28 | if (isset($_GET["litambito"])) $litambito=$_GET["litambito"]; // Recoge parametros |
---|
| 29 | if (isset($_GET["idambito"])) $idambito=$_GET["idambito"]; |
---|
| 30 | if (isset($_GET["nombreambito"])) $nombreambito=$_GET["nombreambito"]; |
---|
| 31 | |
---|
[820d4ca] | 32 | $Midordenador=[]; |
---|
| 33 | $Mnombreordenador=[]; |
---|
| 34 | $MimgOrdenador=[]; |
---|
| 35 | $Mip=[]; |
---|
| 36 | $Mmac=[]; |
---|
| 37 | $Mmaintenance=[]; |
---|
[3ec149c] | 38 | $k=0; // Indice de la Matriz |
---|
| 39 | |
---|
| 40 | $cadenaip=""; |
---|
| 41 | $idaula=0; |
---|
| 42 | $nombreaula=""; |
---|
| 43 | //________________________________________________________________________________________________________ |
---|
| 44 | $cmd=CreaComando($cadenaconexion); |
---|
| 45 | if (!$cmd) |
---|
| 46 | Header('Location: '.$pagerror.'?herror=2'); // Error de conexióncon servidor B.D. |
---|
| 47 | //________________________________________________________________________________________________________ |
---|
| 48 | ?> |
---|
| 49 | <HTML> |
---|
| 50 | <HEAD> |
---|
| 51 | <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
| 52 | <LINK rel="stylesheet" type="text/css" href="../estilos.css"> |
---|
| 53 | </HEAD> |
---|
| 54 | <BODY OnContextMenu="return false"> |
---|
| 55 | <SCRIPT language="javascript" src="../clases/jscripts/ArbolVistaXML.js"></SCRIPT> |
---|
| 56 | <SCRIPT language="javascript" src="../clases/jscripts/MenuContextual.js"></SCRIPT> |
---|
| 57 | <SCRIPT language="javascript" src="../jscripts/aula.js"></SCRIPT> |
---|
| 58 | <SCRIPT language="javascript" src="../jscripts/aulas.js"></SCRIPT> |
---|
| 59 | <SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT> |
---|
| 60 | <SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT> |
---|
| 61 | <SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT> |
---|
| 62 | <SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT> |
---|
[043e67d] | 63 | <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?> |
---|
| 64 | <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/aulas_'.$idioma.'.js"></SCRIPT>'?> |
---|
| 65 | <?php |
---|
[3ec149c] | 66 | //________________________________________________________________________________________________________ |
---|
| 67 | switch($litambito){ |
---|
| 68 | case $LITAMBITO_CENTROS : |
---|
| 69 | $ambito=$AMBITO_CENTROS; |
---|
| 70 | echo '<p align=center class=cabeceras>'.$TbMsg[22].'<br>'.$TbMsg[24].'<br><span class=subcabeceras>'.$nombreambito.'</span></p>'; |
---|
| 71 | $cmd->texto="SELECT idcentro,nombrecentro FROM centros WHERE idcentro=".$idambito; |
---|
| 72 | RecorreCentro($cmd); |
---|
| 73 | break; |
---|
| 74 | case $LITAMBITO_GRUPOSAULAS : |
---|
| 75 | $ambito=$AMBITO_GRUPOSAULAS; |
---|
| 76 | echo '<p align=center class=cabeceras>'.$TbMsg[22].'<br>'.$TbMsg[25].'<br><span class=subcabeceras>'.$nombreambito.'</span></p>'; |
---|
| 77 | $cmd->texto="SELECT idgrupo,nombregrupo FROM grupos WHERE tipo=".$AMBITO_GRUPOSAULAS." AND idgrupo=".$idambito; |
---|
| 78 | RecorreGruposAulas($cmd); |
---|
| 79 | break; |
---|
| 80 | case $LITAMBITO_AULAS : |
---|
| 81 | $ambito=$AMBITO_AULAS; |
---|
[aaf6857] | 82 | $cmd->texto="SELECT idaula, nombreaula, idordprofesor FROM aulas WHERE idaula=".$idambito; |
---|
[3ec149c] | 83 | RecorreAulas($cmd); |
---|
| 84 | break; |
---|
| 85 | case $LITAMBITO_GRUPOSORDENADORES : |
---|
| 86 | $ambito=$AMBITO_GRUPOSORDENADORES; |
---|
| 87 | echo '<p align=center class=cabeceras>'.$TbMsg[22].'<br>'.$TbMsg[26].'<br><span class=subcabeceras>'.$nombreambito.'</span></p>'; |
---|
| 88 | $cmd->texto="SELECT idgrupo,nombregrupoordenador FROM gruposordenadores WHERE idgrupo=".$idambito; |
---|
| 89 | RecorreGruposOrdenadores($cmd); |
---|
| 90 | pintaordenadores(); |
---|
| 91 | break; |
---|
| 92 | } |
---|
| 93 | ?> |
---|
| 94 | <FORM name="fcomandos" action="" method="post" target="frame_contenidos"> |
---|
| 95 | <INPUT type="hidden" name="idcomando" value=""> |
---|
| 96 | <INPUT type="hidden" name="descricomando" value=""> |
---|
[043e67d] | 97 | <INPUT type="hidden" name="ambito" value="<?php echo $ambito?>"> |
---|
| 98 | <INPUT type="hidden" name="idambito" value="<?php echo $idambito?>"> |
---|
[3ec149c] | 99 | <INPUT type="hidden" name="nombreambito" value=""> |
---|
| 100 | <INPUT type="hidden" name="gestor" value=""> |
---|
| 101 | <INPUT type="hidden" name="funcion" value=""> |
---|
| 102 | <INPUT type="hidden" name="script" value=""> |
---|
| 103 | </FORM> |
---|
[043e67d] | 104 | <?php |
---|
[3ec149c] | 105 | $flotante=new MenuContextual(); // Crea objeto menu contextual |
---|
| 106 | $XMLcontextual=ContextualXMLAulas(); // Crea contextual de aulas |
---|
| 107 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
| 108 | $XMLcontextual=ContextualXMLOrdenadores(); // Crea contextual de ordenadores |
---|
| 109 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
| 110 | |
---|
| 111 | // Crea contextual de los comandos para los distintosn ámbitos |
---|
| 112 | $XMLcontextual=ContextualXMLComandos($LITAMBITO_AULAS,$AMBITO_AULAS); |
---|
| 113 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
| 114 | $XMLcontextual=ContextualXMLComandos($LITAMBITO_ORDENADORES,$AMBITO_ORDENADORES); |
---|
| 115 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
[062b55a] | 116 | |
---|
| 117 | // Crea contextual de los asistentes para los distintosn ámbitos |
---|
| 118 | $XMLcontextual=ContextualXMLAsistentes($LITAMBITO_AULAS,$AMBITO_AULAS); |
---|
| 119 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
| 120 | $XMLcontextual=ContextualXMLAsistentes($LITAMBITO_ORDENADORES,$AMBITO_ORDENADORES); |
---|
| 121 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
| 122 | |
---|
[4329e85] | 123 | // Crea contextual de los comandos para los distintos ámbitos |
---|
| 124 | $XMLcontextual=ContextualXMLSincronizacion($LITAMBITO_AULAS,$AMBITO_AULAS); |
---|
| 125 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
| 126 | $XMLcontextual=ContextualXMLSincronizacion($LITAMBITO_ORDENADORES,$AMBITO_ORDENADORES); |
---|
| 127 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
[234a5ef] | 128 | |
---|
| 129 | // Crea contextual de los comandos para los distintos �bitos |
---|
| 130 | $XMLcontextual=ContextualXMLDiferenciacion($LITAMBITO_AULAS,$AMBITO_AULAS); |
---|
| 131 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
| 132 | $XMLcontextual=ContextualXMLDiferenciacion($LITAMBITO_ORDENADORES,$AMBITO_ORDENADORES); |
---|
| 133 | echo $flotante->CreaMenuContextual($XMLcontextual); |
---|
| 134 | |
---|
[3ec149c] | 135 | ?> |
---|
| 136 | <SCRIPT language="javascript"> |
---|
| 137 | Sondeo(); |
---|
| 138 | </SCRIPT> |
---|
| 139 | </BODY> |
---|
| 140 | </HTML> |
---|
[043e67d] | 141 | <?php |
---|
[3ec149c] | 142 | // ************************************************************************************************************************************************* |
---|
| 143 | function RecorreCentro($cmd){ |
---|
| 144 | global $AMBITO_GRUPOSAULAS; |
---|
| 145 | $rs=new Recordset; |
---|
| 146 | $rs->Comando=&$cmd; |
---|
| 147 | if (!$rs->Abrir()) return; // Error al abrir recordset |
---|
| 148 | $rs->Primero(); |
---|
| 149 | if(!$rs->EOF){ |
---|
| 150 | $idcentro=$rs->campos["idcentro"]; |
---|
| 151 | $cmd->texto="SELECT idgrupo,nombregrupo FROM grupos WHERE idcentro=".$idcentro." AND grupoid=0 AND tipo=".$AMBITO_GRUPOSAULAS." ORDER BY nombregrupo "; |
---|
| 152 | RecorreGruposAulas($cmd); |
---|
| 153 | $cmd->texto="SELECT idaula,nombreaula FROM aulas WHERE idcentro=".$idcentro." AND grupoid=0 ORDER BY nombreaula"; |
---|
| 154 | RecorreAulas($cmd); |
---|
| 155 | } |
---|
| 156 | $rs->Cerrar(); |
---|
| 157 | } |
---|
| 158 | //________________________________________________________________________________________________________ |
---|
| 159 | function RecorreGruposAulas($cmd){ |
---|
| 160 | global $AMBITO_GRUPOSAULAS; |
---|
| 161 | $rs=new Recordset; |
---|
| 162 | $rs->Comando=&$cmd; |
---|
| 163 | if (!$rs->Abrir()) return; // Error al abrir recordset |
---|
| 164 | $rs->Primero(); |
---|
| 165 | while (!$rs->EOF){ |
---|
| 166 | $idgrupo=$rs->campos["idgrupo"]; |
---|
| 167 | $cmd->texto="SELECT idgrupo,nombregrupo FROM grupos WHERE grupoid=".$idgrupo." AND tipo=".$AMBITO_GRUPOSAULAS." ORDER BY nombregrupo"; |
---|
| 168 | RecorreGruposAulas($cmd); |
---|
[aaf6857] | 169 | $cmd->texto="SELECT idaula,nombreaula,idordprofesor FROM aulas WHERE grupoid=".$idgrupo." ORDER BY nombreaula"; |
---|
[3ec149c] | 170 | RecorreAulas($cmd); |
---|
| 171 | $rs->Siguiente(); |
---|
| 172 | } |
---|
| 173 | $rs->Cerrar(); |
---|
| 174 | } |
---|
| 175 | //________________________________________________________________________________________________________ |
---|
| 176 | function RecorreAulas($cmd){ |
---|
| 177 | global $idaula; |
---|
| 178 | global $nombreaula; |
---|
[aaf6857] | 179 | global $idordprofesor; |
---|
[3ec149c] | 180 | global $k; // Indice de la Matriz |
---|
| 181 | global $cadenaip; |
---|
| 182 | |
---|
| 183 | $rs=new Recordset; |
---|
| 184 | $rs->Comando=&$cmd; |
---|
| 185 | if (!$rs->Abrir()) return; // Error al abrir recordset |
---|
| 186 | $rs->Primero(); |
---|
| 187 | while (!$rs->EOF){ |
---|
| 188 | $idaula=$rs->campos["idaula"]; |
---|
| 189 | $nombreaula=$rs->campos["nombreaula"]; |
---|
[820d4ca] | 190 | $idordprofesor=$rs->campos["idordprofesor"]??0; |
---|
| 191 | $cmd->texto="SELECT * FROM ordenadores WHERE idaula='$idaula'"; |
---|
[3ec149c] | 192 | $k=0; |
---|
| 193 | $cadenaip=""; |
---|
| 194 | RecorreOrdenadores($cmd); |
---|
| 195 | pintaordenadores(); |
---|
| 196 | $rs->Siguiente(); |
---|
| 197 | } |
---|
| 198 | $rs->Cerrar(); |
---|
| 199 | } |
---|
| 200 | //________________________________________________________________________________________________________ |
---|
| 201 | function RecorreGruposOrdenadores($cmd){ |
---|
| 202 | $rs=new Recordset; |
---|
| 203 | $rs->Comando=&$cmd; |
---|
| 204 | if (!$rs->Abrir()) return; // Error al abrir recordset |
---|
| 205 | $rs->Primero(); |
---|
| 206 | while (!$rs->EOF){ |
---|
| 207 | $idgrupo=$rs->campos["idgrupo"]; |
---|
| 208 | $cmd->texto="SELECT idgrupo,nombregrupoordenador FROM gruposOrdenadores WHERE grupoid=".$idgrupo." ORDER BY nombregrupoordenador"; |
---|
| 209 | RecorreGruposOrdenadores($cmd); |
---|
[820d4ca] | 210 | $cmd->texto="SELECT * FROM ordenadores WHERE grupoid='$idgrupo'"; |
---|
[3ec149c] | 211 | RecorreOrdenadores($cmd); |
---|
| 212 | $rs->Siguiente(); |
---|
| 213 | } |
---|
| 214 | $rs->Cerrar(); |
---|
| 215 | } |
---|
| 216 | //________________________________________________________________________________________________________ |
---|
| 217 | function RecorreOrdenadores($cmd){ |
---|
| 218 | global $Midordenador; |
---|
| 219 | global $Mnombreordenador; |
---|
| 220 | global $MimgOrdenador; |
---|
| 221 | global $Mip; |
---|
| 222 | global $Mmac; |
---|
[820d4ca] | 223 | global $Mmaintenance; |
---|
[3ec149c] | 224 | global $k; // Indice de la Matriz |
---|
| 225 | |
---|
| 226 | global $cadenaip; |
---|
| 227 | |
---|
| 228 | $cmd->texto.= " ORDER BY nombreordenador"; |
---|
| 229 | $rs=new Recordset; |
---|
| 230 | $rs->Comando=&$cmd; |
---|
| 231 | if (!$rs->Abrir()) return; // Error al abrir recordset |
---|
| 232 | $rs->Primero(); |
---|
| 233 | |
---|
| 234 | while (!$rs->EOF){ |
---|
| 235 | $idordenador=$rs->campos["idordenador"]; |
---|
| 236 | $Midordenador[$k]=$rs->campos["idordenador"]; |
---|
| 237 | $Mnombreordenador[$k]=$rs->campos["nombreordenador"]; |
---|
[8c9fcb2] | 238 | $MimgOrdenador[$k]="ordenador_OFF.png"; |
---|
[3ec149c] | 239 | $Mip[$k]=$rs->campos["ip"]; |
---|
| 240 | $Mmac[$k]=$rs->campos["mac"]; |
---|
| 241 | $cadenaip.=$rs->campos["ip"].";"; |
---|
[820d4ca] | 242 | $Mmaintenance[$k]=$rs->campos["maintenance"]??0; |
---|
[3ec149c] | 243 | $k++; |
---|
| 244 | $rs->Siguiente(); |
---|
| 245 | } |
---|
| 246 | $rs->Cerrar(); |
---|
| 247 | } |
---|
| 248 | //________________________________________________________________________________________________________ |
---|
| 249 | function pintaordenadores(){ |
---|
| 250 | global $AMBITO_AULAS; |
---|
| 251 | global $AMBITO_ORDENADORES; |
---|
| 252 | global $LITAMBITO_AULAS; |
---|
| 253 | global $LITAMBITO_ORDENADORES; |
---|
| 254 | global $LONCABECERA; |
---|
| 255 | global $Midordenador; |
---|
| 256 | global $Mnombreordenador; |
---|
| 257 | global $MimgOrdenador; |
---|
| 258 | global $Mip; |
---|
| 259 | global $Mmac; |
---|
[820d4ca] | 260 | global $Mmaintenance; |
---|
[3ec149c] | 261 | global $k; // Indice de la Matriz |
---|
| 262 | global $cadenaip; |
---|
| 263 | global $idaula; |
---|
| 264 | global $nombreaula; |
---|
[aaf6857] | 265 | global $idordprofesor; |
---|
[3ec149c] | 266 | global $servidorhidra,$hidraport; |
---|
| 267 | global $TbMsg; |
---|
| 268 | |
---|
| 269 | $ntr=0; // Numero de ordenadores por fila |
---|
| 270 | if ($nombreaula!=""){ |
---|
[820d4ca] | 271 | echo '<div>'; |
---|
[3ec149c] | 272 | echo '<p align=center class=cabeceras><img border=0 nod="'.$LITAMBITO_AULAS.'-'.$idaula.'" value="'.$nombreaula.'" |
---|
| 273 | style="cursor:pointer" src="../images/iconos/aula.gif" oncontextmenu="nwmenucontextual(this,' ."'flo_".$LITAMBITO_AULAS."'" .')" > '.$TbMsg[23].'</br><span id="'.$LITAMBITO_AULAS.'-'.$idaula.'" class=subcabeceras>'.$nombreaula.'</span></p>'; |
---|
| 274 | } |
---|
[0ebb81b] | 275 | echo '<TABLE style="border: 1px solid #d4d0c8;" align="center"><TR>'; |
---|
[3ec149c] | 276 | for($i=0;$i<$k;$i++){ // Vuelve a recorrer los datos de ordenadores para crear HTML |
---|
| 277 | $ntr++; |
---|
| 278 | echo '<TD>'; |
---|
| 279 | echo '<table border=0>'; |
---|
| 280 | echo '<tr>'; |
---|
| 281 | echo ' <td align=center width=70 height=40>'; |
---|
[820d4ca] | 282 | echo ' <a href="#"><img id="'.$Mip[$i].'" border=0 sondeo="" nod="'.$LITAMBITO_ORDENADORES.'-'.$Midordenador[$i].'" |
---|
| 283 | style="opacity: '.(1-0.5*$Mmaintenance[$i]).'" value="'.$Mnombreordenador[$i].'" src="../images/'.$MimgOrdenador[$i].'" oncontextmenu="nwmenucontextual(this,'."'flo_".$LITAMBITO_ORDENADORES."'" .')" width="32" height="32"></A>'; |
---|
[3ec149c] | 284 | echo ' </td>'; |
---|
| 285 | echo '</tr>'; |
---|
| 286 | echo '<tr>'; |
---|
| 287 | echo '<td align=center id="'.$LITAMBITO_ORDENADORES.'-'.$Midordenador[$i].'">'; |
---|
[aaf6857] | 288 | echo ' <font color="#003300" size="1" face="Arial, Helvetica, sans-serif">'.$Mnombreordenador[$i].($Midordenador[$i]==$idordprofesor?' *':'').'</font>'; |
---|
[3ec149c] | 289 | echo ' </br>'; |
---|
| 290 | echo ' <font color="#003300" size="1" face="Arial, Helvetica, sans-serif">'; |
---|
| 291 | echo ' <strong><font color="#D0A126">'.$Mip[$i].'</font></strong>'; |
---|
| 292 | echo ' </br>'; |
---|
| 293 | echo ' <font color="#003300" size="1" face="Arial, Helvetica, sans-serif">'.$Mmac[$i].'</font>'; |
---|
| 294 | echo '</td>'; |
---|
| 295 | echo '</tr>'; |
---|
| 296 | echo '</table>'; |
---|
| 297 | echo '</TD>'; |
---|
| 298 | if ($ntr>4){ |
---|
| 299 | $ntr=0; |
---|
| 300 | echo '</TR><TR>'; |
---|
| 301 | } |
---|
| 302 | } |
---|
| 303 | echo '</TABLE>'; |
---|
[83b9c80] | 304 | echo '<p>'; |
---|
| 305 | echo '<table style="border: #d4d0c8 1px solid; background: #eeeeee" align="center">'; |
---|
| 306 | echo ' <tr align="center" valign="top">'; |
---|
[ec529cc] | 307 | foreach (Array ("OPG", "WIN", "LNX", "OSX") as $status) { |
---|
[8c9fcb2] | 308 | echo ' <td><img src="../images/ordenador_'.$status.'.png" alt="'.$status.'" width="24" /><br /><font color="#003300" size="1" face="Arial, Helvetica, sans-serif">'.$TbMsg["STATUS_$status"].'</font></td>'; |
---|
[fe4f777] | 309 | } |
---|
[83b9c80] | 310 | echo ' <tr align="center" valign="top">'; |
---|
[69d48a9] | 311 | foreach (Array ("BSY", "WINS", "LNXS") as $status) { |
---|
[83b9c80] | 312 | echo ' <td><img src="../images/ordenador_'.$status.'.png" alt="'.$status.'" width="24" /><br /><font color="#003300" size="1" face="Arial, Helvetica, sans-serif">'.str_replace(" ", "<br>", $TbMsg["STATUS_$status"]).'</font></td>'; |
---|
| 313 | } |
---|
[69d48a9] | 314 | foreach (Array ("OFF", "MNT") as $status) { |
---|
| 315 | echo ' <td><img src="../images/ordenador_'.$status.'.png" alt="'.$status.'" width="24" style="opacity: '.(1-0.5*($status=="MNT")).'" /><br /><font color="#003300" size="1" face="Arial, Helvetica, sans-serif">'.str_replace(" ", "<br>", $TbMsg["STATUS_$status"]).'</font></td>'; |
---|
| 316 | } |
---|
[83b9c80] | 317 | echo ' </tr>'; |
---|
[fe4f777] | 318 | echo ' </tr>'; |
---|
| 319 | echo '</table>'; |
---|
[3ec149c] | 320 | if ($nombreaula!="") |
---|
[820d4ca] | 321 | echo '</div>'; |
---|
[3ec149c] | 322 | } |
---|
| 323 | //________________________________________________________________________________________________________ |
---|
| 324 | function ContextualXMLAulas(){ |
---|
| 325 | global $TbMsg; |
---|
| 326 | global $AMBITO_AULAS; |
---|
| 327 | global $LITAMBITO_AULAS; |
---|
| 328 | global $RESERVA_CONFIRMADA; |
---|
| 329 | global $OPERADOR; |
---|
| 330 | |
---|
| 331 | $layerXML='<MENUCONTEXTUAL'; |
---|
| 332 | $layerXML.=' idctx="flo_'.$LITAMBITO_AULAS.'"'; |
---|
| 333 | $layerXML.=' maxanchu=185'; |
---|
| 334 | $layerXML.=' swimg=1'; |
---|
| 335 | $layerXML.=' clase="menu_contextual"'; |
---|
| 336 | $layerXML.='>'; |
---|
| 337 | |
---|
| 338 | $layerXML.='<ITEM'; |
---|
| 339 | $layerXML.=' alpulsar="cola_acciones()"'; |
---|
| 340 | $layerXML.=' imgitem="../images/iconos/acciones.gif"'; |
---|
| 341 | $layerXML.=' textoitem='.$TbMsg[6]; |
---|
| 342 | $layerXML.='></ITEM>'; |
---|
| 343 | |
---|
| 344 | $layerXML.='<SEPARADOR>'; |
---|
| 345 | $layerXML.='</SEPARADOR>'; |
---|
[58d08a2] | 346 | |
---|
| 347 | |
---|
[3ec149c] | 348 | |
---|
| 349 | $layerXML.='<ITEM'; |
---|
| 350 | $layerXML.=' alpulsar="actualizar_ordenadores(this)"'; |
---|
| 351 | $layerXML.=' imgitem="../images/iconos/actualizar.gif"'; |
---|
| 352 | $layerXML.=' textoitem='.$TbMsg[4]; |
---|
| 353 | $layerXML.='></ITEM>'; |
---|
| 354 | |
---|
| 355 | $layerXML.='<ITEM'; |
---|
| 356 | $layerXML.=' alpulsar="purgar_ordenadores()"'; |
---|
| 357 | $layerXML.=' imgitem="../images/iconos/purgar.gif"'; |
---|
| 358 | $layerXML.=' textoitem='.$TbMsg[2]; |
---|
| 359 | $layerXML.='></ITEM>'; |
---|
| 360 | |
---|
| 361 | $layerXML.='<SEPARADOR>'; |
---|
| 362 | $layerXML.='</SEPARADOR>'; |
---|
| 363 | |
---|
| 364 | $layerXML.='<ITEM'; |
---|
| 365 | $layerXML.=' alpulsar="consola_remota()"'; |
---|
| 366 | $layerXML.=' imgitem="../images/iconos/shell.gif"'; |
---|
| 367 | $layerXML.=' textoitem='.$TbMsg[33]; |
---|
| 368 | $layerXML.='></ITEM>'; |
---|
| 369 | |
---|
| 370 | $layerXML.='<SEPARADOR>'; |
---|
| 371 | $layerXML.='</SEPARADOR>'; |
---|
| 372 | |
---|
| 373 | $layerXML.='<ITEM'; |
---|
| 374 | $layerXML.=' subflotante="flo_comandos_'.$LITAMBITO_AULAS.'"'; |
---|
| 375 | $layerXML.=' imgitem="../images/iconos/comandos.gif"'; |
---|
| 376 | $layerXML.=' textoitem='.$TbMsg[5]; |
---|
| 377 | $layerXML.='></ITEM>'; |
---|
[062b55a] | 378 | |
---|
| 379 | $layerXML.='<ITEM'; |
---|
[4329e85] | 380 | $layerXML.=' subflotante="flo_sincronizacion_'.$LITAMBITO_AULAS.'"'; |
---|
| 381 | $layerXML.=' imgitem="../images/iconos/comandos.gif"'; |
---|
| 382 | $layerXML.=' textoitem='.$TbMsg[49]; |
---|
| 383 | $layerXML.='></ITEM>'; |
---|
| 384 | |
---|
| 385 | $layerXML.='<ITEM'; |
---|
[062b55a] | 386 | $layerXML.=' subflotante="flo_asistentes_'.$LITAMBITO_AULAS.'"'; |
---|
| 387 | $layerXML.=' imgitem="../images/iconos/comandos.gif"'; |
---|
[77b4ec4] | 388 | $layerXML.=' textoitem='.$TbMsg[38]; |
---|
[062b55a] | 389 | $layerXML.='></ITEM>'; |
---|
[3ec149c] | 390 | |
---|
[4329e85] | 391 | $layerXML.='<SEPARADOR>'; |
---|
| 392 | $layerXML.='</SEPARADOR>'; |
---|
| 393 | |
---|
[3ec149c] | 394 | $layerXML.='<ITEM'; |
---|
| 395 | $layerXML.=' alpulsar="confirmarprocedimiento('.$AMBITO_AULAS.')"'; |
---|
| 396 | $layerXML.=' imgitem="../images/iconos/procedimiento.gif"'; |
---|
| 397 | $layerXML.=' textoitem='.$TbMsg[28]; |
---|
| 398 | $layerXML.='></ITEM>'; |
---|
| 399 | |
---|
| 400 | $layerXML.='<SEPARADOR>'; |
---|
| 401 | $layerXML.='</SEPARADOR>'; |
---|
| 402 | |
---|
| 403 | $layerXML.='<ITEM'; |
---|
| 404 | $layerXML.=' alpulsar="incorporarordenador()"'; |
---|
| 405 | $layerXML.=' imgitem="../images/iconos/aula.gif"'; |
---|
| 406 | $layerXML.=' textoitem='.$TbMsg[27]; |
---|
| 407 | $layerXML.='></ITEM>'; |
---|
| 408 | |
---|
| 409 | $layerXML.='<ITEM'; |
---|
| 410 | $layerXML.=' alpulsar="ordenador_estandar()"'; |
---|
| 411 | $layerXML.=' imgitem="../images/iconos/ordenadores.gif"'; |
---|
| 412 | $layerXML.=' textoitem='.$TbMsg[12]; |
---|
| 413 | $layerXML.='></ITEM>'; |
---|
| 414 | |
---|
| 415 | $layerXML.='<SEPARADOR>'; |
---|
| 416 | $layerXML.='</SEPARADOR>'; |
---|
| 417 | |
---|
| 418 | $layerXML.='<ITEM'; |
---|
| 419 | $layerXML.=' alpulsar="configuraciones('.$AMBITO_AULAS.')"'; |
---|
| 420 | $layerXML.=' textoitem='.$TbMsg[10]; |
---|
| 421 | $layerXML.=' imgitem="../images/iconos/configuraciones.gif"'; |
---|
| 422 | $layerXML.='></ITEM>'; |
---|
| 423 | |
---|
| 424 | $wLeft=170; |
---|
| 425 | $wTop=80; |
---|
| 426 | $wWidth=480; |
---|
| 427 | $wHeight=480; |
---|
| 428 | $wpages="../propiedades/propiedades_aulas.php"; |
---|
| 429 | $wParam=$wLeft .",".$wTop.",".$wWidth.",".$wHeight.",'". $wpages."'"; |
---|
| 430 | $layerXML.='<ITEM'; |
---|
| 431 | $layerXML.=' alpulsar="modificar('.$wParam.')"'; |
---|
| 432 | $layerXML.=' textoitem='.$TbMsg[13]; |
---|
| 433 | $layerXML.=' imgitem="../images/iconos/propiedades.gif"'; |
---|
| 434 | $layerXML.='></ITEM>'; |
---|
| 435 | |
---|
| 436 | $layerXML.='<SEPARADOR>'; |
---|
| 437 | $layerXML.='</SEPARADOR>'; |
---|
| 438 | |
---|
| 439 | // Crear operador |
---|
| 440 | $wLeft=140; |
---|
| 441 | $wTop=115; |
---|
| 442 | $wWidth=400; |
---|
| 443 | $wHeight=320; |
---|
| 444 | $wpages="../propiedades/propiedades_usuarios.php?idtipousuario=".$OPERADOR; |
---|
| 445 | $wParam=$wLeft .",".$wTop.",".$wWidth.",".$wHeight.",'". $wpages."'"; |
---|
| 446 | $layerXML.='<ITEM'; |
---|
| 447 | $layerXML.=' alpulsar="insertar('.$wParam.',3)"'; |
---|
| 448 | $layerXML.=' imgitem="../images/iconos/operadores.gif"'; |
---|
| 449 | $layerXML.=' textoitem='.$TbMsg[37]; |
---|
| 450 | $layerXML.='></ITEM>'; |
---|
| 451 | |
---|
| 452 | $layerXML.='<ITEM'; |
---|
| 453 | $layerXML.=' alpulsar="cola_reservas('.$RESERVA_CONFIRMADA.')"'; |
---|
| 454 | $layerXML.=' imgitem="../images/iconos/reservas.gif"'; |
---|
| 455 | $layerXML.=' textoitem='.$TbMsg[29]; |
---|
| 456 | $layerXML.='></ITEM>'; |
---|
[4329e85] | 457 | $layerXML.='<SEPARADOR>'; |
---|
| 458 | $layerXML.='</SEPARADOR>'; |
---|
[3ec149c] | 459 | $layerXML.='</MENUCONTEXTUAL>'; |
---|
| 460 | return($layerXML); |
---|
| 461 | } |
---|
| 462 | //________________________________________________________________________________________________________ |
---|
| 463 | function ContextualXMLOrdenadores(){ |
---|
| 464 | global $TbMsg; |
---|
| 465 | global $AMBITO_ORDENADORES; |
---|
| 466 | global $LITAMBITO_ORDENADORES; |
---|
| 467 | |
---|
| 468 | $layerXML='<MENUCONTEXTUAL'; |
---|
| 469 | $layerXML.=' idctx="flo_'.$LITAMBITO_ORDENADORES.'"'; |
---|
| 470 | $layerXML.=' maxanchu=140'; |
---|
| 471 | $layerXML.=' swimg=1'; |
---|
| 472 | $layerXML.=' clase="menu_contextual"'; |
---|
| 473 | $layerXML.='>'; |
---|
| 474 | |
---|
| 475 | $layerXML.='<ITEM'; |
---|
| 476 | $layerXML.=' alpulsar="cola_acciones()"'; |
---|
| 477 | $layerXML.=' imgitem="../images/iconos/acciones.gif"'; |
---|
| 478 | $layerXML.=' textoitem='.$TbMsg[6]; |
---|
| 479 | $layerXML.='></ITEM>'; |
---|
| 480 | |
---|
| 481 | $layerXML.='<SEPARADOR>'; |
---|
| 482 | $layerXML.='</SEPARADOR>'; |
---|
[58d08a2] | 483 | |
---|
| 484 | $layerXML.='<ITEM'; |
---|
| 485 | $layerXML.=' alpulsar="ver_log('.$AMBITO_ORDENADORES.')"'; |
---|
| 486 | $layerXML.=' imgitem="../images/iconos/acciones.gif"'; |
---|
[77b4ec4] | 487 | $layerXML.=' textoitem='.$TbMsg[47]; |
---|
[58d08a2] | 488 | $layerXML.='></ITEM>'; |
---|
| 489 | |
---|
| 490 | $layerXML.='<ITEM'; |
---|
| 491 | $layerXML.=' alpulsar="ver_log_seguimiento('.$AMBITO_ORDENADORES.')"'; |
---|
| 492 | $layerXML.=' imgitem="../images/iconos/acciones.gif"'; |
---|
[77b4ec4] | 493 | $layerXML.=' textoitem='.$TbMsg[48]; |
---|
[58d08a2] | 494 | $layerXML.='></ITEM>'; |
---|
[3ec149c] | 495 | |
---|
| 496 | $layerXML.='<ITEM'; |
---|
| 497 | $layerXML.=' alpulsar="actualizar_ordenadores()"'; |
---|
| 498 | $layerXML.=' imgitem="../images/iconos/actualizar.gif"'; |
---|
| 499 | $layerXML.=' textoitem='.$TbMsg[4]; |
---|
| 500 | $layerXML.='></ITEM>'; |
---|
| 501 | |
---|
| 502 | $layerXML.='<ITEM'; |
---|
| 503 | $layerXML.=' alpulsar="purgar_ordenadores()"'; |
---|
| 504 | $layerXML.=' imgitem="../images/iconos/purgar.gif"'; |
---|
| 505 | $layerXML.=' textoitem='.$TbMsg[2]; |
---|
| 506 | $layerXML.='></ITEM>'; |
---|
| 507 | |
---|
| 508 | $layerXML.='<SEPARADOR>'; |
---|
| 509 | $layerXML.='</SEPARADOR>'; |
---|
| 510 | |
---|
| 511 | $layerXML.='<ITEM'; |
---|
| 512 | $layerXML.=' alpulsar="consola_remota()"'; |
---|
| 513 | $layerXML.=' imgitem="../images/iconos/shell.gif"'; |
---|
| 514 | $layerXML.=' textoitem='.$TbMsg[33]; |
---|
| 515 | $layerXML.='></ITEM>'; |
---|
| 516 | |
---|
| 517 | $layerXML.='<ITEM'; |
---|
| 518 | $layerXML.=' alpulsar="eco_remoto()"'; |
---|
| 519 | $layerXML.=' imgitem="../images/iconos/ecocon.gif"'; |
---|
| 520 | $layerXML.=' textoitem='.$TbMsg[39]; |
---|
| 521 | $layerXML.='></ITEM>'; |
---|
| 522 | |
---|
| 523 | $layerXML.='<SEPARADOR>'; |
---|
| 524 | $layerXML.='</SEPARADOR>'; |
---|
| 525 | |
---|
| 526 | $layerXML.='<ITEM'; |
---|
| 527 | $layerXML.=' subflotante="flo_comandos_'.$LITAMBITO_ORDENADORES.'"'; |
---|
| 528 | $layerXML.=' imgitem="../images/iconos/comandos.gif"'; |
---|
| 529 | $layerXML.=' textoitem='.$TbMsg[5]; |
---|
| 530 | $layerXML.='></ITEM>'; |
---|
[062b55a] | 531 | |
---|
| 532 | $layerXML.='<ITEM'; |
---|
[4329e85] | 533 | $layerXML.=' subflotante="flo_sincronizacion_'.$LITAMBITO_ORDENADORES.'"'; |
---|
| 534 | $layerXML.=' imgitem="../images/iconos/comandos.gif"'; |
---|
| 535 | $layerXML.=' textoitem='.$TbMsg[49]; |
---|
| 536 | $layerXML.='></ITEM>'; |
---|
| 537 | |
---|
| 538 | $layerXML.='<ITEM'; |
---|
[062b55a] | 539 | $layerXML.=' subflotante="flo_asistentes_'.$LITAMBITO_ORDENADORES.'"'; |
---|
| 540 | $layerXML.=' imgitem="../images/iconos/comandos.gif"'; |
---|
[77b4ec4] | 541 | $layerXML.=' textoitem='.$TbMsg[38]; |
---|
[062b55a] | 542 | $layerXML.='></ITEM>'; |
---|
| 543 | |
---|
[4329e85] | 544 | $layerXML.='<SEPARADOR>'; |
---|
| 545 | $layerXML.='</SEPARADOR>'; |
---|
| 546 | |
---|
[3ec149c] | 547 | $layerXML.='<ITEM'; |
---|
| 548 | $layerXML.=' alpulsar="confirmarprocedimiento('.$AMBITO_ORDENADORES.')"'; |
---|
| 549 | $layerXML.=' imgitem="../images/iconos/procedimiento.gif"'; |
---|
| 550 | $layerXML.=' textoitem='.$TbMsg[28]; |
---|
| 551 | $layerXML.='></ITEM>'; |
---|
| 552 | |
---|
| 553 | $layerXML.='<SEPARADOR>'; |
---|
| 554 | $layerXML.='</SEPARADOR>'; |
---|
| 555 | |
---|
| 556 | $layerXML.='<ITEM'; |
---|
| 557 | $layerXML.=' alpulsar="configuraciones('.$AMBITO_ORDENADORES.')"'; |
---|
| 558 | $layerXML.=' textoitem='.$TbMsg[10]; |
---|
| 559 | $layerXML.=' imgitem="../images/iconos/configuraciones.gif"'; |
---|
| 560 | $layerXML.='></ITEM>'; |
---|
| 561 | |
---|
| 562 | $wLeft=170; |
---|
| 563 | $wTop=80; |
---|
| 564 | $wWidth=480; |
---|
| 565 | $wHeight=400; |
---|
| 566 | $wpages="../propiedades/propiedades_ordenadores.php"; |
---|
| 567 | $wParam=$wLeft .",".$wTop.",".$wWidth.",".$wHeight.",'". $wpages."'"; |
---|
| 568 | $layerXML.='<ITEM'; |
---|
| 569 | $layerXML.=' alpulsar="modificar('.$wParam.')"'; |
---|
| 570 | |
---|
| 571 | $layerXML.=' textoitem='.$TbMsg[13]; |
---|
| 572 | $layerXML.=' imgitem="../images/iconos/propiedades.gif"'; |
---|
| 573 | $layerXML.='></ITEM>'; |
---|
| 574 | |
---|
| 575 | $layerXML.='<ITEM'; |
---|
| 576 | $layerXML.=' alpulsar="eliminar('.$wParam.')"'; |
---|
| 577 | $layerXML.=' imgitem="../images/iconos/eliminar.gif"'; |
---|
| 578 | $layerXML.=' textoitem='.$TbMsg[18]; |
---|
| 579 | $layerXML.='></ITEM>'; |
---|
| 580 | |
---|
| 581 | $layerXML.='</MENUCONTEXTUAL>'; |
---|
| 582 | return($layerXML); |
---|
| 583 | } |
---|
| 584 | //________________________________________________________________________________________________________ |
---|
| 585 | function ContextualXMLComandos($litambito,$ambito){ |
---|
| 586 | global $cmd; |
---|
[4634acd] | 587 | global $TbMsg; |
---|
[3ec149c] | 588 | $maxlongdescri=0; |
---|
| 589 | $rs=new Recordset; |
---|
[4329e85] | 590 | $cmd->texto="SELECT idcomando,descripcion,pagina,gestor,funcion |
---|
| 591 | FROM comandos |
---|
| 592 | WHERE activo=1 AND submenu='' AND aplicambito & ".$ambito.">0 |
---|
| 593 | ORDER BY descripcion"; |
---|
[3ec149c] | 594 | $rs->Comando=&$cmd; |
---|
| 595 | if ($rs->Abrir()){ |
---|
| 596 | $layerXML=""; |
---|
| 597 | $rs->Primero(); |
---|
| 598 | while (!$rs->EOF){ |
---|
[4634acd] | 599 | $descrip=$TbMsg["COMMAND_".$rs->campos["funcion"]]; |
---|
| 600 | if (empty ($descrip)) { |
---|
[4329e85] | 601 | $descrip=$rs->campos["descripcion"]; |
---|
[4634acd] | 602 | } |
---|
[3ec149c] | 603 | $layerXML.='<ITEM'; |
---|
| 604 | $layerXML.=' alpulsar="confirmarcomando('."'".$ambito."'".','.$rs->campos["idcomando"].',\''.$rs->campos["descripcion"].'\',\''.$rs->campos["pagina"]. '\',\''.$rs->campos["gestor"]. '\',\''.$rs->campos["funcion"]. '\')"'; |
---|
[4634acd] | 605 | $layerXML.=' textoitem="'.$descrip.'"'; |
---|
[3ec149c] | 606 | $layerXML.='></ITEM>'; |
---|
[4329e85] | 607 | if ($maxlongdescri < strlen($descrip)) // Toma la Descripción de mayor longitud |
---|
| 608 | $maxlongdescri=strlen($descrip); |
---|
[3ec149c] | 609 | $rs->Siguiente(); |
---|
| 610 | } |
---|
| 611 | $layerXML.='</MENUCONTEXTUAL>'; |
---|
| 612 | $prelayerXML='<MENUCONTEXTUAL'; |
---|
| 613 | $prelayerXML.=' idctx="flo_comandos_'.$litambito.'"'; |
---|
| 614 | $prelayerXML.=' maxanchu='.$maxlongdescri*7; |
---|
| 615 | $prelayerXML.=' clase="menu_contextual"'; |
---|
| 616 | $prelayerXML.='>'; |
---|
| 617 | $finallayerXML=$prelayerXML.$layerXML; |
---|
| 618 | return($finallayerXML); |
---|
| 619 | } |
---|
| 620 | } |
---|
[4329e85] | 621 | //________________________________________________________________________________________________________ |
---|
| 622 | function ContextualXMLSincronizacion($litambito,$ambito){ |
---|
| 623 | global $cmd; |
---|
| 624 | global $TbMsg; |
---|
| 625 | $maxlongdescri=0; |
---|
| 626 | $rs=new Recordset; |
---|
| 627 | $cmd->texto="SELECT idcomando,descripcion,pagina,gestor,funcion |
---|
| 628 | FROM comandos |
---|
[d7a03be] | 629 | WHERE activo=1 AND submenu='Sincronizacion' AND aplicambito & ".$ambito.">0 |
---|
[4329e85] | 630 | ORDER BY descripcion"; |
---|
| 631 | $rs->Comando=&$cmd; |
---|
| 632 | if ($rs->Abrir()){ |
---|
| 633 | $layerXML=""; |
---|
| 634 | $rs->Primero(); |
---|
| 635 | while (!$rs->EOF){ |
---|
| 636 | $descrip=$TbMsg["COMMAND_".$rs->campos["funcion"]]; |
---|
| 637 | if (empty ($descrip)) { |
---|
| 638 | $descrip=$rs->campos["descripcion"]; |
---|
| 639 | } |
---|
| 640 | $layerXML.='<ITEM'; |
---|
| 641 | $layerXML.=' alpulsar="confirmarcomando('."'".$ambito."'".','.$rs->campos["idcomando"].',\''.$rs->campos["descripcion"].'\',\''.$rs->campos["pagina"]. '\',\''.$rs->campos["gestor"]. '\',\''.$rs->campos["funcion"]. '\')"'; |
---|
| 642 | $layerXML.=' textoitem="'.$descrip.'"'; |
---|
| 643 | $layerXML.='></ITEM>'; |
---|
| 644 | if ($maxlongdescri < strlen($descrip)) // Toma la Descripción de mayor longitud |
---|
| 645 | $maxlongdescri=strlen($descrip); |
---|
| 646 | $rs->Siguiente(); |
---|
| 647 | } |
---|
| 648 | $layerXML.='</MENUCONTEXTUAL>'; |
---|
| 649 | $prelayerXML='<MENUCONTEXTUAL'; |
---|
| 650 | $prelayerXML.=' idctx="flo_sincronizacion_'.$litambito.'"'; |
---|
| 651 | $prelayerXML.=' maxanchu='.$maxlongdescri*7; |
---|
| 652 | $prelayerXML.=' clase="menu_contextual"'; |
---|
| 653 | $prelayerXML.='>'; |
---|
| 654 | $finallayerXML=$prelayerXML.$layerXML; |
---|
| 655 | return($finallayerXML); |
---|
| 656 | } |
---|
| 657 | } |
---|
| 658 | //________________________________________________________________________________________________________ |
---|
[234a5ef] | 659 | function ContextualXMLDiferenciacion($litambito,$ambito){ |
---|
| 660 | global $cmd; |
---|
| 661 | global $TbMsg; |
---|
| 662 | $maxlongdescri=0; |
---|
| 663 | $rs=new Recordset; |
---|
| 664 | $cmd->texto="SELECT idcomando,descripcion,pagina,gestor,funcion |
---|
| 665 | FROM comandos |
---|
| 666 | WHERE activo=1 AND submenu='diferenciacion' AND aplicambito & ".$ambito.">0 |
---|
| 667 | ORDER BY descripcion"; |
---|
| 668 | $rs->Comando=&$cmd; |
---|
| 669 | if ($rs->Abrir()){ |
---|
| 670 | $layerXML=""; |
---|
| 671 | $rs->Primero(); |
---|
| 672 | while (!$rs->EOF){ |
---|
| 673 | $descrip=$TbMsg["COMMAND_".$rs->campos["funcion"]]; |
---|
| 674 | if (empty ($descrip)) { |
---|
| 675 | $descrip=$rs->campos["descripcion"]; |
---|
| 676 | } |
---|
| 677 | $layerXML.='<ITEM'; |
---|
| 678 | $layerXML.=' alpulsar="confirmarcomando('."'".$ambito."'".','.$rs->campos["idcomando"].',\''.$rs->campos["descripcion"].'\',\''.$rs->campos["pagina"]. '\',\''.$rs->campos["gestor"]. '\',\''.$rs->campos["funcion"]. '\')"'; |
---|
| 679 | $layerXML.=' textoitem="'.$descrip.'"'; |
---|
| 680 | $layerXML.='></ITEM>'; |
---|
| 681 | if ($maxlongdescri < strlen($descrip)) // Toma la Descripción de mayor longitud |
---|
| 682 | $maxlongdescri=strlen($descrip); |
---|
| 683 | $rs->Siguiente(); |
---|
| 684 | } |
---|
| 685 | $layerXML.='</MENUCONTEXTUAL>'; |
---|
| 686 | $prelayerXML='<MENUCONTEXTUAL'; |
---|
| 687 | $prelayerXML.=' idctx="flo_diferenciacion_'.$litambito.'"'; |
---|
| 688 | $prelayerXML.=' maxanchu='.$maxlongdescri*6; |
---|
| 689 | $prelayerXML.=' clase="menu_contextual"'; |
---|
| 690 | $prelayerXML.='>'; |
---|
| 691 | $finallayerXML=$prelayerXML.$layerXML; |
---|
| 692 | return($finallayerXML); |
---|
| 693 | } |
---|
| 694 | } |
---|
| 695 | //________________________________________________________________________________________________________ |
---|
[062b55a] | 696 | function ContextualXMLAsistentes($litambito,$ambito){ |
---|
| 697 | global $cmd; |
---|
[4634acd] | 698 | global $TbMsg; |
---|
[062b55a] | 699 | $maxlongdescri=0; |
---|
| 700 | $rs=new Recordset; |
---|
[4634acd] | 701 | $cmd->texto="SELECT idcomando,descripcion,pagina,gestor,funcion |
---|
| 702 | FROM asistentes |
---|
| 703 | WHERE activo=1 AND aplicambito & ".$ambito.">0 |
---|
| 704 | ORDER BY descripcion"; |
---|
[062b55a] | 705 | $rs->Comando=&$cmd; |
---|
| 706 | if ($rs->Abrir()){ |
---|
| 707 | $layerXML=""; |
---|
| 708 | $rs->Primero(); |
---|
| 709 | while (!$rs->EOF){ |
---|
[4634acd] | 710 | $descrip=$TbMsg["WIZARD_".$rs->campos["descripcion"]]; |
---|
| 711 | if (empty ($descrip)) { |
---|
| 712 | $descrip=$rs->campos["descripcion"]; |
---|
| 713 | } |
---|
[062b55a] | 714 | $layerXML.='<ITEM'; |
---|
| 715 | $layerXML.=' alpulsar="confirmarcomando('."'".$ambito."'".','.$rs->campos["idcomando"].',\''.$rs->campos["descripcion"].'\',\''.$rs->campos["pagina"]. '\',\''.$rs->campos["gestor"]. '\',\''.$rs->campos["funcion"]. '\')"'; |
---|
[4634acd] | 716 | $layerXML.=' textoitem="'.$descrip.'"'; |
---|
[062b55a] | 717 | $layerXML.='></ITEM>'; |
---|
[4634acd] | 718 | if($maxlongdescri<strlen($descrip)) // Toma la Descripción de mayor longitud |
---|
| 719 | $maxlongdescri=strlen($descrip); |
---|
[062b55a] | 720 | $rs->Siguiente(); |
---|
| 721 | } |
---|
| 722 | $layerXML.='</MENUCONTEXTUAL>'; |
---|
| 723 | $prelayerXML='<MENUCONTEXTUAL'; |
---|
| 724 | $prelayerXML.=' idctx="flo_asistentes_'.$litambito.'"'; |
---|
| 725 | $prelayerXML.=' maxanchu='.$maxlongdescri*7; |
---|
| 726 | $prelayerXML.=' clase="menu_contextual"'; |
---|
| 727 | $prelayerXML.='>'; |
---|
| 728 | $finallayerXML=$prelayerXML.$layerXML; |
---|
| 729 | return($finallayerXML); |
---|
| 730 | } |
---|
[fe4f777] | 731 | } |
---|