Example #1
0
 <?php 
include 'modules/imaging/includes/includes.php';
include 'modules/imaging/includes/xmlrpc.inc.php';
if (isset($_GET['gid'])) {
    $nb = extract($_GET);
} else {
    header("Location: " . urlStrRedirect("imaging/manage/index"));
    exit;
}
$label = urldecode($_GET['itemlabel']);
$params = getParams();
if ($_POST) {
    $nb = extract($_POST);
    $location = getCurrentLocation();
    $list = getRestrictedComputersList(0, -1, array('gid' => $gid, 'hostname' => '', 'location' => $location), False);
    list($count, $masters) = xmlrpc_getLocationImages($location);
    if (count($list) == 0) {
        $msg = _T("Multicast menu has not been created : there are no computers in the group", "imaging");
        new NotifyWidgetFailure($msg);
        header("Location: " . urlStrRedirect("imaging/manage/list_profiles"));
        exit;
    }
    if (!isset($numbercomputer)) {
        $msg = sprintf(_T("Multicast menu has not been created : number of computers missing"));
        new NotifyWidgetFailure($msg);
        header("Location: " . urlStrRedirect("imaging/manage/list_profiles"));
        exit;
    } else {
        $numbercomputer = intval($numbercomputer);
    }
    if (!(gettype($numbercomputer) == "integer")) {
Example #2
0
/* Get MMC includes */
require "../../../includes/config.inc.php";
require "../../../includes/i18n.inc.php";
require "../../../includes/acl.inc.php";
require "../../../includes/session.inc.php";
require "../../../includes/PageGenerator.php";
require "../includes/includes.php";
require '../includes/xmlrpc.inc.php';
$params = getParams();
$location = $_SESSION['imaging_location']['used'];
global $conf;
$maxperpage = $conf["global"]["maxperpage"];
$start = empty($_GET["start"]) || $_GET["start"] == '' ? 0 : $_GET["start"];
$end = empty($_GET["end"]) || $_GET["end"] == '' ? $maxperpage : $_GET["end"];
$filter = empty($_GET["filter"]) ? '' : $_GET['filter'];
list($count, $masters) = xmlrpc_getLocationImages($location, $start, $end, $filter);
if ($count == 0) {
    $l = new TitleElement(_T('No master available.', 'imaging'), 3);
    $l->display();
    print "<p>" . _T('To define a master, browse to the computers module ' . 'click on the imaging icon for the computer you wish to make a master from, then choose &quot;Images and ' . 'Masters&quot;, followed by clicking the edit button on a backup image to convert it to a master.', 'imaging') . "</p>";
    return;
}
// forge params
$addAction = new ActionPopupItem(_T("Add image to default boot menu", "imaging"), "master_add", "addbootmenu", "master", "imaging", "manage");
$delAction = new ActionPopupItem(_T("Remove from boot menu", "imaging"), "master_remove", "delbootmenu", "master", "imaging", "manage", $type . "tabbootmenu", 300, "delete");
$emptyAction = new EmptyActionItem();
$addActions = array();
$a_label = array();
$a_desc = array();
$a_date = array();
$a_size = array();