示例#1
0
require "localSidebar.php";
$p = new PageGenerator(_T("Pending packages list", 'pkgs'));
$p->setSideMenu($sidemenu);
$p->display();
require_once "modules/pkgs/includes/xmlrpc.php";
$ajax = new AjaxFilterLocation(urlStrRedirect("pkgs/pkgs/ajaxPendingPackageList"));
$res = getUserPackageApi();
$list = array();
if (!isset($_SESSION['PACKAGEAPI'])) {
    $_SESSION['PACKAGEAPI'] = array();
}
foreach ($res as $mirror) {
    $list_val[$mirror['uuid']] = base64_encode($mirror['uuid']);
    $list[$mirror['uuid']] = $mirror['mountpoint'];
    $_SESSION['PACKAGEAPI'][$mirror['uuid']] = $mirror;
}
if (isset($_GET['location'])) {
    $ajax->setSelected($list_val[base64_decode($_GET['location'])]);
}
$ajax->setElements($list);
$ajax->setElementsVal($list_val);
$ajax->display();
$ajax->displayDivToUpdate();
?>

<style>
    .noborder { border:0px solid blue; }
</style>


示例#2
0
/* 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);
}
right_top_shortcuts_display();
print "<br/><br/><br/>";
$ajax->display();
print "<br/><br/>";
$ajax->displayDivToUpdate();
示例#3
0
    $_SESSION['PACKAGEAPI'] = array();
}
$err = array();
foreach ($res as $mirror) {
    if (isset($mirror['ERR']) && $mirror['ERR'] == 'PULSE2ERROR_GETUSERPACKAGEAPI') {
        $err[] = sprintf(_T("MMC failed to contact package server %s.", "pkgs"), $mirror['mirror']);
    } else {
        $list_val[$mirror['uuid']] = base64_encode($mirror['uuid']);
        $list[$mirror['uuid']] = $mirror['mountpoint'];
        $_SESSION['PACKAGEAPI'][$mirror['uuid']] = $mirror;
    }
}
if ($err) {
    new NotifyWidgetFailure(implode('<br/>', array_merge($err, array(_T("Please contact your administrator.", "pkgs")))));
}
$ajax = new AjaxFilterLocation(urlStrRedirect("pkgs/pkgs/ajaxPackageList"));
if (isset($_GET['location'])) {
    $ajax->setSelected($list_val[base64_decode($_GET['location'])]);
} elseif (isset($_SESSION['pkgs_selected'])) {
    $ajax->setSelected($list_val[$_SESSION['pkgs_selected']]);
}
$ajax->setElements($list);
$ajax->setElementsVal($list_val);
$ajax->display();
$ajax->displayDivToUpdate();
?>

<style>
    .noborder { border:0px solid blue; }
</style>