예제 #1
0
파일: location.php 프로젝트: neoclust/mmc
        /* insert notification code here if needed */
    } elseif (!$ret[0] and !isXMLRPCError()) {
        new NotifyWidgetFailure(sprintf(_T("Boot menu generation failed for package server: %s<br /><br />Check /var/log/mmc/pulse2-package-server.log", "imaging"), implode(', ', $ret[1])));
    }
    elseif (isXMLRPCError()) {
        new NotifyWidgetFailure(sprintf(_T("Boot menu generation failed for package server: %s<br /><br />Check /var/log/mmc/pulse2-package-server.log", "imaging"), implode(', ', $ret[1])));
    }
}

# needed in the case we have to go back to the good list.
$params['from'] = $_GET['action'];
$params['module'] = $_GET['module'];
$params['submod'] = $_GET['submod'];
$params['action'] = $_GET['action'];

if (displayLocalisationBar()) {
    $location = getCurrentLocation();

    $ajax = new AjaxLocation("modules/imaging/manage/$page.php", "container_$page", "location", $params);
    $list = array();
    $values = array();
    $locations = getUserLocations();
    /*if (count($locations) > 1) {
        $list['Pulse2ALL'] = _T('All my entities', 'pulse2');
        $values['Pulse2ALL'] = '';
    }*/
    foreach ($locations as $loc) {
        $values[$loc['uuid']] = $loc['uuid'];
        if (isset($loc['altname'])) {
            $list[$loc['uuid']] = $loc['altname'];
        } else {
예제 #2
0
    $param['gid'] = urlencode($_GET['gid']);
}
if (isset($_GET['groupname'])) {
    $param['groupname'] = urlencode($_GET['groupname']);
}
//if (isset($_GET['request'])) { $param['request'] = $_SESSION['request'];}
/* if (isset($_GET['request'])) {
  $_SESSION['request'] = $_GET['request'];
  } */
if (isset($_GET['equ_bool'])) {
    $param['equ_bool'] = urlencode($_GET['equ_bool']);
}
if (isset($_GET['imaging_server'])) {
    $param['imaging_server'] = urlencode($_GET['imaging_server']);
}
if (displayLocalisationBar() && (isset($_GET['imaging_server']) && $_GET['imaging_server'] == '' || !isset($_GET['imaging_server']))) {
    $ajax = new AjaxFilterLocation(urlStrRedirect("base/computers/ajaxComputersList"), "container", 'location', $param);
    list($list, $values) = getEntitiesSelectableElements(True);
    $ajax->setElements($list);
    $ajax->setElementsVal($values);
    if (!empty($param['gid'])) {
        if (!empty($_SESSION["computers.selected_location." . $param['gid']])) {
            $ajax->setSelected($_SESSION["computers.selected_location." . $param['gid']]);
        }
    } else {
        if (!empty($_SESSION["computers.selected_location"])) {
            $ajax->setSelected($_SESSION["computers.selected_location"]);
        }
    }
} else {
    $ajax = new AjaxFilter(urlStrRedirect("base/computers/ajaxComputersList"), "container", $param);