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