source: admin/WebConsole/gestores/gestor_pxe_grub4dos.php @ 20324f2

Last change on this file since 20324f2 was 1602040, checked in by ramon <ramongomez@…>, 11 years ago

Versión 1.0.5, #616: Integrar código de la versión 1.0.5 en rama principal.

git-svn-id: https://opengnsys.es/svn/trunk@4309 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100644
File size: 1.5 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("../includes/tftputils.php");
11include_once("../idiomas/php/".$idioma."/aulas_".$idioma.".php");
12
13$cmd=CreaComando($cadenaconexion);
14if (!$cmd)
15        Header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D.
16//________________________________________________________________________________________________________
17
18
19echo "<html>";
20echo "<head>";
21echo "<meta http-equiv='Refresh' content='1;URL=../principal/boot.php?idambito=". $_GET['idaula'] ."&nombreambito=" . $_GET['nombreambito'] . "&litambito=" . $_GET['litambito'] . "'>";
22echo "<title> gestion de equipos </title>";
23echo "<base target='principal'>";
24echo "</head>";
25echo "<body>";
26
27$lista = explode(";",$_POST['listOfItems']);
28foreach ($lista as $sublista) {
29        if (! empty ($sublista)) {
30                $elementos = explode("|",$sublista);
31                $hostname=$elementos[1];
32                $optboot=$elementos[0];
33                createBootMode ($cmd, $optboot, $hostname, $idioma);
34        }
35}
36echo " </body>";
37echo " </html> ";
38
39
40function netmask2cidr($netmask) {
41          $cidr = 0;
42          foreach (explode('.', $netmask) as $number) {
43              for (;$number> 0; $number = ($number <<1) % 256) {
44                  $cidr++;
45               }
46           }
47           return $cidr;
48}
49
Note: See TracBrowser for help on using the repository browser.