} elseif ($ret['id'] == $SYNCHROSTATE_INIT_ERROR) { $p = new PageGenerator(sprintf(_T("%s's computer imaging", 'imaging'), $hostname)); $sidemenu->forceActiveItem("index"); $p->setSideMenu($sidemenu); $p->display(); print _T("The registering in the imaging server has failed.", "imaging"); } else { # do nothing special if $SYNCHROSTATE_DONE $p = new TabbedPageGenerator(); $sidemenu->forceActiveItem("index"); $p->setSideMenu($sidemenu); global $stateid; $stateid = $ret['id']; # check if we are in a profile $in_profile = xmlrpc_isComputerInProfileRegistered($params['target_uuid']); if ($in_profile) { $p->addTop(sprintf(_T("%s's computer imaging (in profile)", 'imaging'), $hostname), "modules/imaging/imaging/header.php"); } else { $p->addTop(sprintf(_T("%s's computer imaging", 'imaging'), $hostname), "modules/imaging/imaging/header.php"); } $p->addTab("tabbootmenu", _T("Boot menu", 'imaging'), _T("Current boot menu", "imaging"), "modules/imaging/imaging/bootmenu.php", $params); $p->addTab("tabimages", _T("Images and Masters", 'imaging'), "", "modules/imaging/imaging/images.php", $params); $p->addTab("tabservices", _T("Boot services", 'imaging'), _T("Available boot menu services", "imaging"), "modules/imaging/imaging/services.php", $params); $p->addTab("tabimlogs", _T("Imaging log", 'imaging'), "",
if (isset($_GET['gid']) && $_GET['gid'] != '') { $type = 'group'; $target_uuid = isset($_GET['gid']) ? $_GET['gid'] : ""; $target_name = isset($_GET['groupname']) ? $_GET['groupname'] : ""; } else { $type = ''; $target_uuid = isset($_GET['uuid']) ? $_GET['uuid'] : ""; if (isset($_GET['hostname'])) { $target_name = $_GET['hostname']; } elseif (isset($_GET['target_name'])) { $target_name = $_GET['target_name']; } else { $target_name = ''; } } if ($type == '' && (xmlrpc_isComputerRegistered($target_uuid) || xmlrpc_isComputerInProfileRegistered($target_uuid)) || $type == 'group' && xmlrpc_isProfileRegistered($target_uuid)) { if (isset($_GET['mod'])) { $mod = $_GET['mod']; } else { $mod = "none"; } switch ($mod) { case 'details': log_details(); break; default: log_list(); break; } } else { # register the target (computer or profile)
} else { new NotifyWidgetFailure(sprintf(_T("Failed to unregister the computer %s", 'imaging'), $target_name)); } $is_unregistering = True; } else { /* * type: 'group' for a profile, '' for a single computer */ $type = $_GET["type"]; $target_uuid = $_GET['target_uuid']; $target_name = $_GET['target_name']; $f = new ValidatingForm(); // Set title if ($type == '') { // Computer if (!xmlrpc_isComputerRegistered($target_uuid) && !xmlrpc_isComputerInProfileRegistered($target_uuid)) { $f->add(new TitleElement(sprintf(_T("Register computer '%s'", "imaging"), $target_name))); } } else { // Profile if (!xmlrpc_isProfileRegistered($target_uuid)) { $f->add(new TitleElement(sprintf(_T("Imaging activation for group '%s'", "imaging"), $target_name))); } } // Get boot menu if ($type == '') { // Computer $ret = xmlrpc_getMyMenuComputer($target_uuid); } else { // Profile $ret = xmlrpc_getMyMenuProfile($target_uuid);