$cible = $group->getName(); } $params["papi"] = $p_api; $params["name"] = $hostname; $params["hostname"] = $hostname; $params["uuid"] = $uuid; $params["gid"] = $gid; $params["from"] = $from; $params["pid"] = $pid; $params["ltitle"] = get_def_package_label($name, $version); $params["create_directory"] = 'on'; $params["start_script"] = 'on'; $params["clean_on_success"] = 'on'; $params["do_reboot"] = getPackageHasToReboot($p_api, $_GET["pid"]) == 1 ? 'on' : ''; $params["do_wol"] = web_def_awake() == 1 ? 'on' : ''; $params["do_inventory"] = web_def_inventory() == 1 ? 'on' : ''; $params["next_connection_delay"] = web_def_delay(); $params["max_connection_attempt"] = web_def_attempts(); $params["maxbw"] = web_def_maxbw(); $params["deployment_intervals"] = web_def_deployment_intervals(); $prefix = ''; if (strlen($_POST["gid"])) { $prefix = 'group'; } $params['tab'] = $prefix . 'tablaunch'; $halt_to = array(); foreach ($_POST as $p => $v) { if (preg_match('/^issue_halt_to_/', $p)) { $p = preg_replace('/^issue_halt_to_/', '', $p); if ($v == 'on') { $halt_to[] = $p;
function display_options($f) { $f->add(new HiddenTpl("lmembers"), array("value" => base64_encode(serialize($this->members)), "hide" => True)); $f->add(new HiddenTpl("create_directory"), array("value" => 'on', "hide" => True)); $f->add(new HiddenTpl("start_script"), array("value" => 'on', "hide" => True)); $f->add(new HiddenTpl("clean_on_success"), array("value" => 'on', "hide" => True)); $f->add(new HiddenTpl("do_reboot"), array("value" => web_def_reboot() ? "on" : "")); $f->add(new HiddenTpl("bundle_title"), array("value" => get_new_bundle_title(count($this->members)), "hide" => True)); $f->add(new HiddenTpl("maxbw"), array("value" => web_def_maxbw(), "hide" => True)); $f->add(new HiddenTpl("copy_mode"), array("value" => web_def_mode(), "hide" => True)); $f->add(new HiddenTpl("deployment_intervals"), array("value" => web_def_deployment_intervals(), "hide" => True)); $halt = web_def_issue_halt_to(); foreach ($halt as $h) { $f->add(new HiddenTpl("issue_halt_to_" . $h), array("value" => 'on', "hide" => True)); } $check = new TrFormElement(_T('awake', 'msc'), new CheckboxTpl("do_wol")); $f->add($check, array("value" => web_def_awake() ? "checked" : "")); $check = new TrFormElement(_T('invent.', 'msc'), new CheckboxTpl("do_inventory")); $f->add($check, array("value" => web_def_inventory() ? "checked" : "")); }