source: admin/WebConsole/gestores/gestor_pxe_grub4dos.php @ 5d05b06

Last change on this file since 5d05b06 was 3aadac3b, checked in by OpenGnSys Support Team <soporte-og@…>, 5 years ago

#980 Update POST /mode to the new ogServer API

This patch selects the machines whose modes need to be changed using the
client's IP rather than their scope names.

  • Property mode set to 100644
File size: 1.0 KB
Line 
1<?php
2// Version 1.1.1 - Se utiliza createBootMode para crear los archivos PXE (ticket #802 #888)
3// Autor: Irina Gomez - ETSII Universidad de Sevilla
4// Fecha: 2019/02/12
5
6include_once("../includes/ctrlacc.php");
7include_once("../includes/CreaComando.php");
8include_once("../includes/tftputils.php");
9
10// Recogemos los parametros
11$litambito=(isset($_REQUEST["litambito"])) ? $_REQUEST["litambito"] : "";
12$idambito=(isset($_REQUEST["idambito"])) ? $_REQUEST["idambito"] : "";
13$nombreambito=(isset($_REQUEST["nombreambito"])) ? $_REQUEST["nombreambito"] : "";
14$lista=(isset($_POST['listOfItems'])) ? explode(";",$_POST['listOfItems']) : "";
15
16// Crea objeto comando
17$cmd=CreaComando($cadenaconexion);
18
19foreach ($lista as $sublista) {
20    if (! empty ($sublista)) {
21        $elementos = explode("|",$sublista);
22        $ip = $elementos[1];
23        $optboot=$elementos[0];
24
25        createBootMode ($cmd, $optboot, $ip, $idioma);
26    }
27}
28
29header("Location: ../principal/boot.php?idambito=". $idambito ."&nombreambito=" . $nombreambito . "&litambito=" . $litambito);
30exit();
Note: See TracBrowser for help on using the repository browser.