source: admin/WebConsole/gestores/gestor_ubicarordenadores.php @ 7caf5a7c

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since 7caf5a7c was 4d28cf7, checked in by adv <adv@…>, 14 years ago

version 1.0.1 #387 reubicador de ordenadores dentro de un aula

git-svn-id: https://opengnsys.es/svn/branches/version1.0@1940 a21b9725-9963-47de-94b9-378ad31fedc9

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