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