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