source: admin/WebConsole/gestores/gestor_ubicarordenadores.php @ 940b1c7f

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
Last change on this file since 940b1c7f was 5cef356, checked in by OpenGnSys Support Team <soporte-og@…>, 5 years ago

#915 Remove all references to SocketHidra?

This patch removes all remaining references to SocketHidra?. The existing
code uses the REST API ogAdmServer.

  • Property mode set to 100644
File size: 2.6 KB
Line 
1<?php
2include_once("../includes/ctrlacc.php");
3include_once("../clases/AdoPhp.php");
4include_once("../clases/XmlPhp.php");
5include_once("../clases/MenuContextual.php");
6include_once("../includes/constantes.php");
7include_once("../includes/comunes.php");
8include_once("../includes/CreaComando.php");
9include_once("../idiomas/php/".$idioma."/aulas_".$idioma.".php");
10
11$cmd=CreaComando($cadenaconexion);
12if (!$cmd)
13        Header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D.
14//________________________________________________________________________________________________________
15
16
17echo "<html>";
18echo "<head>";
19echo "<meta http-equiv='Refresh' content='1;URL=../principal/ubicarordenadores.php?idambito=". $_GET['idaula'] ."&nombreambito=" . $_GET['nombreambito'] . "&litambito=" . $_GET['litambito'] . "'>";
20echo "<title> gestion de equipos </title>";
21echo "<base target='principal'>";
22echo "</head>";
23echo "<body>";
24
25
26
27#echo('litambito con valor:     '. $_GET['litambito']);
28#echo ('idambito con valor:      ' . $_GET['idaula']);
29#echo ('nombreambito con valor:      ' . $_GET['nombreambito']);
30#echo "<br>";
31
32$lista = explode(";",$_POST['listOfItems']);
33foreach ($lista as $sublista) {
34        $elementos = explode("|",$sublista);
35        $hostname=$elementos[1];
36        $grupo=$elementos[0];
37        ReubicarOrdenador($cmd,$hostname,$grupo);
38    #echo $elementos[0] .  $elementos[1];
39    #echo "<br>";
40}
41echo " </body>";
42echo " </html> ";
43
44function ReubicarOrdenador($cmd,$hostname,$grupo)
45{
46global $cmd;
47global $hostname;
48global $grupo;
49if ($grupo == "pxe")
50{
51        $cmd->CreaParametro("@grupo","0",0);
52        $cmd->CreaParametro("@hostname",$hostname,0);
53        $cmd->texto="update ordenadores set grupoid=@grupo where nombreordenador=@hostname";
54}
55else
56{
57        $cmd->CreaParametro("@grupo",$grupo,0);
58        $cmd->CreaParametro("@hostname",$hostname,0);
59        #$cmd->texto="update ordenadores set grupoid=(Select idgrupo from gruposordenadores where nombregrupoordenador=@grupo) where nombreordenador=@hostname";
60        $cmd->texto="update ordenadores set grupoid=@grupo where nombreordenador=@hostname";
61       
62}
63$cmd->Ejecutar();
64#Update ordenadores Set grupoid=(Select idgrupo From gruposordenadores Where nombregrupoordenador="subgrupo1") where nombreordenador="prueba1"
65}
66
67
68#   <iframe src="frame_a.htm" name="frame1"></iframe>
69#   <iframe src="frame_b.htm" name="frame2"></iframe>
70
71?>
72
73<html> <head>
74   <script language="javascript">
75        function actualiza_frame_principal(){
76    window.parent.frames[1].location="../principal/aulas.php"
77   // window.location="../nada.php"
78}
79   </script>
80</head>
81 <body onunload="actualiza_frame_principal()"> </body>
82</html>
83
84
85
Note: See TracBrowser for help on using the repository browser.