function image_add($type, $target_uuid) { $params = getParams(); $item_uuid = $_GET['itemid']; $label = urldecode($_GET['itemlabel']); $f = new PopupForm(sprintf(_T("Add the image <b>%s</b> to <b>%s</b>", "imaging"), $label, $params['hostname'])); # Need to get the name of the target $f->push(new Table()); // form preseeding $f->add(new HiddenTpl("itemid"), array("value" => $item_uuid, "hide" => True)); $f->add(new HiddenTpl("itemlabel"), array("value" => $label, "hide" => True)); $f->add(new HiddenTpl("gid"), array("value" => $_GET['gid'], "hide" => True)); $f->add(new HiddenTpl("uuid"), array("value" => $_GET['uuid'], "hide" => True)); /*$input = new TrFormElement(_T('Default menu item label', 'imaging'), new InputTpl("default_mi_label")); $f->add($input, array("value" => '')); */ $check = new TrFormElement(_T('Selected by default', 'imaging'), new CheckboxTpl("do_default")); $f->add($check, array("value" => web_def_image_default() ? "checked" : "")); $check = new TrFormElement(_T('Displayed', 'imaging'), new CheckboxTpl("do_display")); $f->add($check, array("value" => web_def_image_hidden() ? "checked" : "")); $check = new TrFormElement(_T('Selected by default on WOL', 'imaging'), new CheckboxTpl("do_default_WOL")); $f->add($check, array("value" => web_def_image_default_WOL() ? "checked" : "")); $check = new TrFormElement(_T('Displayed on WOL', 'imaging'), new CheckboxTpl("do_display_WOL")); $f->add($check, array("value" => web_def_image_hidden_WOL() ? "checked" : "")); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display(); }
function service_add($location) { $params = getParams(); $item_uuid = $_GET['itemid']; $label = urldecode($_GET['itemlabel']); $f = new PopupForm(sprintf(_T("Add the boot service <b>%s</b> to the default boot menu", "imaging"), $label)); $f->push(new Table()); // form preseeding $f->add(new HiddenTpl("location"), array("value" => $location, "hide" => True)); $f->add(new HiddenTpl("itemlabel"), array("value" => $label, "hide" => True)); $f->add(new HiddenTpl("itemid"), array("value" => $item_uuid, "hide" => True)); $f->add(new HiddenTpl("default_mi_label"), array("value" => $label, "hide" => True)); # $input = new TrFormElement(_T('Default menu item label', 'imaging'), new InputTpl("default_mi_label")); #$f->add($input, array("value" => '')); $check = new TrFormElement(_T('Selected by default', 'imaging'), new CheckboxTpl("do_default")); $f->add($check, array("value" => web_def_service_default() ? "checked" : "")); $check = new TrFormElement(_T('Displayed', 'imaging'), new CheckboxTpl("do_display")); $f->add($check, array("value" => web_def_service_hidden() ? "checked" : "")); $check = new TrFormElement(_T('Selected by default on WOL', 'imaging'), new CheckboxTpl("do_default_WOL")); $f->add($check, array("value" => web_def_service_default_WOL() ? "checked" : "")); $check = new TrFormElement(_T('Displayed on WOL', 'imaging'), new CheckboxTpl("do_display_WOL")); $f->add($check, array("value" => web_def_service_hidden_WOL() ? "checked" : "")); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display(); }
$str = "<h2>" . _T("Share backup") . "</h2>"; $str .= '<p>'; $str .= sprintf(_T("Backup of share <b>%s</b> has been launched in background."), $share); $str .= "</p><p>"; $str .= sprintf(_("The files will be stored in the directory %s of the server at the end of the backup."), $backuppath); $str .= "</p><p>"; $str .= _T("Please go to the status page to check the backup status."); $str .= "</p><p>"; $str .= _T("This operation will last according to the amount of data to backup."); $str .= "</p>"; new NotifyWidgetSuccess($str); } else { new NotifyWidgetFailure(_T("Can't launch backup")); } header("Location: " . urlStrRedirect("samba/shares/index")); exit; } else { $share = urldecode($_GET["share"]); $f = new PopupForm(_T("Share backup")); $f->addText(sprintf(_T("The share %s will be archived."), $share)); $f->addText(_T("Please select media size. If your data exceed volume size, several files with your media size will be created.")); $select = new SelectItem("media"); $select->setElements(array("CD (650 Mo)", "DVD (4.7 Go)")); $select->setElementsVal(array(600, 4200)); $f->add($select); $hidden = new HiddenTpl("share"); $f->add($hidden, array("value" => $share, "hide" => True)); $f->addValidateButton("bgo"); $f->addCancelButton("bback"); $f->display(); }
* GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require "modules/base/includes/users.inc.php"; if (isset($_GET["user"])) { $user = urldecode($_GET["user"]); } if (isset($_POST["user"])) { $user = $_POST["user"]; } if (isset($_POST["bdeluser"])) { del_user($user, $_POST["delfiles"]); if (!isXMLRPCError()) { new NotifyWidgetSuccess(sprintf(_("User %s has been successfully deleted"), $user)); } header("Location: " . urlStrRedirect("base/users/index")); exit; } else { $f = new PopupForm(_("Delete user")); $f->addText(sprintf(_("You will delete user <b>%s</b>."), $user)); $cb = new CheckboxTpl("delfiles", _("Delete all user's files")); $f->add($cb, array("value" => "")); $hidden = new HiddenTpl("user"); $f->add($hidden, array("value" => $user, "hide" => True)); $f->addValidateButton("bdeluser"); $f->addCancelButton("bback"); $f->display(); }
// ========================================================== // Status lines // ========================================================== $status_strings = array('no ping' => '<span style="color:red">' . _T('No ping response', 'backuppc') . '</span>', 'backup failed' => '<span style="color:red">' . _T('Backup failed', 'backuppc') . '</span>', 'restore failed' => '<span style="color:red">' . _T('Restore failed', 'backuppc') . '</span>', 'backup_done' => '<span style="color:green">' . _T('Backup up to date', 'backuppc') . '</span>', 'restore done' => '<span style="color:green">' . _T('Restore done', 'backuppc') . '</span>', 'nothing' => '<span style="color:red">' . _T('This computer has never been backed up', 'backuppc') . '</span>', 'idle' => '<span style="color:black">' . _T('Idle', 'backuppc') . '</span>', 'canceled' => '<span style="color:black">' . _T('Cancelled by user', 'backuppc') . '</span>', 'in progress' => '<img src="modules/msc/graph/images/status/inprogress.gif" width="14" alt="" /> <span style="color:orange">' . _T('Backup in progress') . '</span>'); print '<table><tr><td width="130" valign="top">' . _T('Current state: ', 'backuppc') . '</td><td><b id="statustext">'; foreach ($response['status'] as $line) { print $status_strings[$line] . '<br/>'; } if ($line == 'nothing') { $nerverbackuped = 1; } print "</b></td></tr></table>"; // ========================================================== // User actions Form // ========================================================== $f = new PopupForm(""); $hidden = new HiddenTpl("host"); $f->add($hidden, array("value" => $uuid, "hide" => True)); $f->addButton("startFullBackup", _T("Start Full Backup", 'backuppc')); if (!isset($nerverbackuped)) { $f->addButton("startIncrBackup", _T("Sart Incr Backup", 'backuppc')); } $f->addButton("stopBackup", _T("Stop Backup", 'backuppc')); $f->display(); // ========================================================== // Backup status table // ========================================================== if ($response['data']) { $backup_nums = $response['data']['backup_nums']; $types = $response['data']['type']; $ages = $response['data']['ages'];
// goto images list if ($ret[0] and !isXMLRPCError()) { $str = sprintf(_T("Service <strong>%s</strong> removed from default boot menu", "imaging"), $label); new NotifyWidgetSuccess($str); // Synchronize boot menu $ret = xmlrpc_synchroLocation($location); if (isXMLRPCError()) { new NotifyWidgetFailure(sprintf(_T("Boot menu generation failed for package server: %s", "imaging"), implode(', ', $ret[1]))); } header("Location: " . urlStrRedirect("imaging/manage/service", $params)); exit; } elseif ($ret[0]) { header("Location: " . urlStrRedirect("imaging/manage/service", $params)); exit; } else { new NotifyWidgetFailure($ret[1]); } } $params = getParams(); $item_uuid = $_GET['itemid']; $label = urldecode($_GET['itemlabel']); $f = new PopupForm(sprintf(_T("Remove the boot service <b>%s</b> from the default boot menu", "imaging"), $label)); $f->push(new Table()); // form preseeding $f->add(new HiddenTpl("location"), array("value" => $location, "hide" => True)); $f->add(new HiddenTpl("itemlabel"), array("value" => $label, "hide" => True)); $f->add(new HiddenTpl("itemid"), array("value" => $item_uuid, "hide" => True)); $f->add(new HiddenTpl("default_mi_label"), array("value" => $label, "hide" => True)); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display();
* along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require_once 'modules/msc/includes/scheduler_xmlrpc.php'; require_once 'modules/msc/includes/commands_xmlrpc.inc.php'; require_once "modules/msc/includes/mscoptions_xmlrpc.php"; if (isset($_POST["bconfirm"])) { // $cmd_id = $_POST['cmd_id']; $start_date = $_POST['start_date']; $end_date = $_POST['end_date']; extend_command($cmd_id, $start_date, $end_date); return; } /* Form displaying */ $f = new PopupForm(_T('Reschedule this command', 'msc'), 'reschedulePopupForm'); $f->add(new HiddenTpl("cmd_id"), array("value" => $_GET['cmd_id'], "hide" => True)); $f->add(new TrFormElement(_T('Start date', 'msc'), new DateTimeTpl('start_date')), array('value' => date("Y-m-d H:i:s"))); $f->add(new TrFormElement(_T('<br/>End date', 'msc'), new DateTimeTpl('end_date')), array('value' => date("Y-m-d H:i:s", time() + web_def_coh_life_time() * 60 * 60))); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display(); ?> <script type="text/javascript"> jQuery(function() { var $ = jQuery; $('form#reschedulePopupForm').submit(function() { $.ajax($(this).attr('action'), { type: $(this).attr('method'), data: $(this).serialize() + '&bconfirm=1' }).success(function() {
* (at your option) any later version. * * MMC is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require_once 'modules/imaging/includes/includes.php'; require_once 'modules/imaging/includes/xmlrpc.inc.php'; if (isset($_POST["bconfirm"])) { header("Location: " . urlStrRedirect("imaging/manage/service")); exit; } $params = getParams(); $item_uuid = $_GET['itemid']; $label = urldecode($_GET['itemlabel']); $f = new PopupForm(sprintf(_T("<b>%s</b> was already added to Boot Services", "imaging"), $label)); $f->push(new Table()); // form preseeding $f->add(new HiddenTpl("location"), array("value" => $location, "hide" => True)); $f->add(new HiddenTpl("itemlabel"), array("value" => $label, "hide" => True)); $f->add(new HiddenTpl("itemid"), array("value" => $item_uuid, "hide" => True)); $f->add(new HiddenTpl("default_mi_label"), array("value" => $label, "hide" => True)); // TODO: Add a validate button to redirect to boot services page ? //$f->addValidateButton("bconfirm"); //$f->addCancelButton("bback"); $f->display();
} if (isset($tab)) { $url['tab'] = $tab; } if (isset($_POST['coh_id']) && $_POST['coh_id'] != "") { delete_command_on_host($_POST['coh_id']); } elseif (isset($_POST['cmd_id']) && $_POST['cmd_id'] != "") { delete_command($_POST['cmd_id']); } elseif (isset($_POST['bundle_id']) && $_POST['bundle_id'] != "") { delete_bundle($_POST['bundle_id']); } header("Location: " . urlStrRedirect("{$module}/{$submod}/{$page}", $url)); exit; } /* Form displaying */ $f = new PopupForm(_T('Delete this command', 'msc'), 'deletePopupForm'); if (isset($_GET['coh_id'])) { $f->add(new HiddenTpl("coh_id"), array("value" => $_GET['coh_id'], "hide" => True)); } if (isset($_GET['cmd_id'])) { $f->add(new HiddenTpl("cmd_id"), array("value" => $_GET['cmd_id'], "hide" => True)); } if (isset($_GET['bundle_id'])) { $f->add(new HiddenTpl("bundle_id"), array("value" => $_GET['bundle_id'], "hide" => True)); } if (isset($_GET['from'])) { $f->add(new HiddenTpl("from"), array("value" => $_GET['from'], "hide" => True)); } $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display();
$uuid = $_POST["objectUUID"]; $backup = $_POST["backup"] ? True : False; if (in_array("imaging", $_SESSION["modulesList"])) { //$dede = xmlrpc_imagingClearMenuFromUuid($uuid); $dede = xmlrpc_imagingClearMenuFromUuidAllLocation($uuid); } delComputer($uuid, $backup); if (!isXMLRPCError()) { new NotifyWidgetSuccess(_("The computer has been deleted.")); } header("Location: " . urlStrRedirect("base/computers/index")); exit; } } else { $uuid = urldecode($_GET["objectUUID"]); $f = new PopupForm(_("Delete this computer")); $f->push(new Table()); $tr = new TrFormElement(_("Do you want a backup to be done ?"), new CheckBoxTpl("backup"), array("value" => '')); // Set first column to 100%, because without this setting, checkbox width is too large $tr->setFirstColWidth('100%'); $f->add($tr); // this checkbox has to be checked to delete a computer $tr = new TrFormElement(_("I am aware that <b>all related images (non-master)</b> will be <b>DELETED</b>.<br />Check this box if it is what you want."), new CheckBoxTpl("imageWarning"), array("value" => '')); $tr->setFirstColWidth('100%'); $f->add($tr); $hidden = new HiddenTpl("objectUUID"); $f->add($hidden, array("value" => $uuid, "hide" => True)); $f->pop(); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display();
* Author(s): * Miguel Julián <*****@*****.**> */ require "modules/samba4/includes/shares-xmlrpc.inc.php"; if (isset($_POST["bdeleteshare"])) { $share = $_POST["share"]; $deleteFiles = isset($_POST["deleteFiles"]) ? True : False; $deletionSuccess = deleteShare($share, $deleteFiles); if (!isXMLRPCError() and $deletionSuccess) { $successMessage = sprintf(_T("Share %s deleted", "samba4"), $share); new NotifyWidgetSuccess($successMessage); } else { $failureMessage = sprintf(_T("An error has occured during delete process on %s", "samba4"), $share); new NotifyWidgetFailure($failureMessage); } redirectTo(urlStrRedirect('samba4/shares/index')); exit; } else { $share = urldecode($_GET["share"]); $form = new PopupForm(_T("Delete a share", "samba4")); $form->addText(sprintf(_T("You will delete the share <b>%s</b>", "samba4"), $share)); $form->push(new Table()); $tr = new TrFormElement(_T("Delete data", "samba4"), new CheckboxTpl("deleteFiles")); $form->add($tr, array("value" => "")); $form->pop(); $hidden = new HiddenTpl("share"); $form->add($hidden, array("value" => $share, "hide" => True)); $form->addValidateButton("bdeleteshare"); $form->addCancelButton("bback"); $form->display(); }
$p_api = $_GET["p_api"]; $pid = $_GET["pid"]; $from = $_GET["from"]; $ret = dropPackage(base64_decode($p_api), base64_decode($pid)); $expire_result = expire_all_package_commands($ret); if (!isXMLRPCError() and $ret != -1) { new NotifyWidgetSuccess(_T("The package has been deleted.", "pkgs")); } if ($ret == -1) { new NotifyWidgetFailure(_T("The package failed to delete", "pkgs")); } $to = "bundleList"; if ($from) { $to = $from; } header("Location: " . urlStrRedirect("pkgs/pkgs/{$to}", array('p_api' => $p_api))); exit; } else { $p_api = $_GET["p_api"]; $pid = $_GET["pid"]; $from = $_GET["from"]; $f = new PopupForm(_T("Delete this package")); $hidden = new HiddenTpl("p_api"); $f->add($hidden, array("value" => $p_api, "hide" => True)); $hidden = new HiddenTpl("pid"); $f->add($hidden, array("value" => $pid, "hide" => True)); $f->add(new HiddenTpl("from"), array("value" => $from, "hide" => True)); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display(); }
} header("Location: ".urlStrRedirect("base/computers/$actionpage", array('tab'=>$tab, 'uuid'=>$_GET['uuid'], 'hostname'=>$_GET['hostname'], 'cmd_id'=>$id, 'gid'=>$_GET['gid']))); exit; } } } $action = $_GET['launchAction']; if (isset($_POST["bconfirm"]) || isset($_POST["badvanced"])) { $is_advanced = isset($_POST["badvanced"]); /* quick action on a single target */ if (isset($_GET['uuid'])) { $machine = getMachine(array('uuid'=>$_GET['uuid']), True); action($_GET['launchAction'], array($machine->uuid), $is_advanced); } /* single action post on a group */ if (isset($_GET['gid'])) { $group = new Group($_GET['gid'], true); action($_GET['launchAction'], null, $is_advanced); } } else { $f = new PopupForm(_T("Please confirm you really want to perform this action", "msc")); $f->addValidateButton("bconfirm"); $f->addButton("badvanced", _T('Advanced', 'msc')); $f->addCancelButton("bback"); $f->display(); } ?>
$serial = urldecode($_GET["serial"]); $reverse = urldecode($_GET["reverse"]); $curzone = $zone; if ($reverse) { $rzone = getReverseZone($zone); if (count($rzone)) { $curzone = $rzone[0]; } } $soa = getSOARecord($curzone); if ($soa["serial"] != $serial) { new NotifyWidgetFailure(_T("Zone data was updated. Selected record may be incorrect.")); header("Location: main.php?module=network&submod=network&action=zonerecords&zone={$zone}&reverse={$reverse}"); exit; } if (isset($_POST["bconfirm"])) { delRecordById($curzone, $id); if (!isXMLRPCError()) { new NotifyWidgetSuccess(_T("The record has been deleted.")); } header("Location: main.php?module=network&submod=network&action=zonerecords&zone={$zone}&reverse={$reverse}"); exit; } $record = getZoneRecordById($curzone, $id); $hostname = $record["hostname"]; $type = $record["type"]; $f = new PopupForm(_T("Delete a DNS record")); $f->addText(sprintf(_T("You will delete the %s record for %s host"), "<strong>{$type}</strong>", "<strong>{$hostname}</strong>")); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display();
header("Location: " . urlStrRedirect("imaging/manage/{$from}", $params)); exit; } } $locations = getUserLocations(); foreach ($locations as $loc) { if ($location == $loc['uuid']) { $loc_name = $loc['name']; } } $params = getParams(); $item_uuid = $_GET['itemid']; $label = urldecode($_GET['itemlabel']); $loc_id = $_GET['loc_id']; $from = $_GET['from']; $f = new PopupForm(sprintf(_T("Do you really want to link the Imaging Server '<b>%s</b>' to the entity '<b>%s</b>'", "imaging"), $label, $loc_name)); // form preseeding*/ $f->add(new HiddenTpl("location"), array("value" => $location, "hide" => True)); $f->add(new HiddenTpl("loc_id"), array("value" => $loc_id, "hide" => True)); $f->add(new HiddenTpl("loc_name"), array("value" => $loc_name, "hide" => True)); $f->add(new HiddenTpl("itemlabel"), array("value" => $label, "hide" => True)); $f->add(new HiddenTpl("itemid"), array("value" => $item_uuid, "hide" => True)); $f->add(new HiddenTpl("from"), array("value" => $from, "hide" => True)); /* $input = new TrFormElement(_T('Default menu label', 'imaging'), new InputTpl("default_m_label")); $f->add($input, array("value" => '')); $input = new TrFormElement(_T('timeout', 'imaging'), new InputTpl("timeout")); $f->add($input, array("value" => web_def_menu_timeout())); $input = new TrFormElement(_T('Background URI', 'imaging'), new InputTpl("background_uri")); $f->add($input, array("value" => ''));
} // Deleting fileset or period according to type if ($type == 0) { $ret = delete_backup_profile($id); } else { $ret = delete_period_profile($id); } if (!isXMLRPCError() and $ret != -1) { new NotifyWidgetSuccess(_T("The profile has been deleted successfully.", "backuppc")); } if ($ret == -1) { new NotifyWidgetFailure(_T("Failed to delete the selected profile", "backuppc")); } header("Location: " . urlStrRedirect("backuppc/backuppc/ViewProfiles")); return; } else { $id = $_GET["id"]; $type = $_GET["type"]; // If default profile, we can't delete if ($id < 1000) { print _T('Error : Default profiles cannot be deleted', 'backuppc'); } $f = new PopupForm(_T("Delete this profile")); $hidden = new HiddenTpl("id"); $f->add($hidden, array("value" => $id, "hide" => True)); $hidden = new HiddenTpl("type"); $f->add($hidden, array("value" => $type, "hide" => True)); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display(); }
* GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require "modules/samba4/includes/machines-xmlrpc.inc.php"; if (isset($_GET["machine"])) { $machine = urldecode($_GET["machine"]); } if (isset($_POST["machine"])) { $machine = $_POST["machine"]; } if (isset($_POST["bdeleletemachine"])) { $deleteActionSuccess = deleteMachine($machine); if (!isXMLRPCError() and $deleteActionSuccess) { $computerDeletedMessage = sprintf(_T("Computer <strong>%s</strong> deleted.", "samba4"), $machine); new NotifyWidgetSuccess($computerDeletedMessage); } else { $computerDeletedMessage = sprintf(_T("There has been a problem while deleting <strong>%s</strong> computer.", "samba4"), $machine); new NotifyWidgetFailure($computerDeletedMessage); } header("location: " . urlStrRedirect('samba4/machines/index')); exit; } else { $form = new PopupForm(_T("Delete a computer", "samba4")); $form->addText(sprintf(_T("You will delete the %s computer", "samba4"), "<strong>{$machine}</strong>")); $form->addValidateButton("bdeleletemachine"); $form->addCancelButton("bback"); $form->display(); }
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require_once "includes/xmlrpc.inc.php"; require_once 'modules/backuppc/includes/xmlrpc.php'; if (isset($_POST["bfull"], $_POST["uuid"])) { // Starting Full backup start_full_backup($_POST["uuid"]); return; } elseif (isset($_POST["bincr"], $_POST["uuid"])) { // Starting Full backup start_incr_backup($_POST["uuid"]); return; } else { /* Form displaying */ $title = _T("Choose the backup type.", 'backuppc'); $f = new PopupForm($title, 'backupManualAction'); $f->add(new HiddenTpl("uuid"), array("value" => $_GET['objectUUID'], "hide" => True)); $f->addButton("bfull", _T('Full backup', 'backuppc')); $f->addButton("bincr", _T('Incremental backup', 'backuppc')); //$f->addCancelButton("bback"); $f->display(); } ?> <script type="text/javascript"> jQuery(function() { var $ = jQuery; $('form#backupManualAction').find('input[type=submit]').click(function() { var form = $('form#backupManualAction'); $.ajax(form.attr('action'), { type: form.attr('method'), data: form.serialize() + '&' + $(this).attr('name') + '=' + $(this).val()
$cmd_id = $_GET["cmd_id"]; $coh_id = $_GET["coh_id"]; $gid = $_GET["gid"]; $bundle_id = $_GET['bundle_id']; $cmd = command_detail($cmd_id); $name = $cmd['title']; if (!$name && $_GET['title']) { $name = $_GET['title']; } $action_type = _T('action', 'msc'); if (strlen($bundle_id)) { $action_type = _T('bundle', 'msc'); } if (strlen($gid) && !strlen($coh_id)) { $title = sprintf(_T("Stop %s %s on this group", 'msc'), $action_type, $name); } else { $title = sprintf(_T("Stop %s %s on host %s", 'msc'), $action_type, $name, $hostname); } $f = new PopupForm($title); $f->add(new HiddenTpl("name"), array("value" => $hostname, "hide" => True)); $f->add(new HiddenTpl("from"), array("value" => $from, "hide" => True)); $f->add(new HiddenTpl("cmd_id"), array("value" => $cmd_id, "hide" => True)); $f->add(new HiddenTpl("coh_id"), array("value" => $coh_id, "hide" => True)); $f->add(new HiddenTpl("uuid"), array("value" => $uuid, "hide" => True)); $f->add(new HiddenTpl("gid"), array("value" => $gid, "hide" => True)); $f->add(new HiddenTpl("bundle_id"), array("value" => $bundle_id, "hide" => True)); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display(); #DEBUG print "u:$uuid - g:$gid || b:$bundle_id - c:$cmd_id - h:$coh_id"; }
* GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* $Id$ */ require "modules/samba/includes/shares.inc.php"; if (isset($_POST["bdelshare"])) { $share = $_POST["share"]; del_share($share, $_POST["delFiles"]); if (!isXMLRPCError()) { $str = sprintf(_T("Share %s deleted"), $share); new NotifyWidgetSuccess($str); } else { $str = sprintf(_T("An error has occured during delete process on %s", $share)); new NotifyWidgetFailure($str); } header("location: " . urlStrRedirect('samba/shares/index')); } else { $share = urldecode($_GET["share"]); $f = new PopupForm(_T("Delete a share")); $f->addText(sprintf(_T("You will delete the share <b>%s</b>"), $share)); $cb = new CheckboxTpl("delFiles", _T("Delete all data")); $f->add($cb, array("value" => "")); $hidden = new HiddenTpl("share"); $f->add($hidden, array("value" => $share, "hide" => True)); $f->addValidateButton("bdelshare"); $f->addCancelButton("bback"); $f->display(); }
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require_once "modules/update/includes/xmlrpc.inc.php"; // Disabling Multiple updates if (isset($_POST["selected_updates"])) { set_update_status($_POST["selected_updates"], 2); return; } if (isset($_POST["bconfirm"], $_POST["id"])) { // Setting update status set_update_status($_POST["id"], 2); return; } else { /* Form displaying */ $title = _T("Disable this update?", 'update'); $f = new PopupForm($title, 'enableUpdateForm'); $f->add(new HiddenTpl("id"), array("value" => $_GET['id'], "hide" => True)); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display(); } ?> <script type="text/javascript"> jQuery(function() { var $ = jQuery; $('form#enableUpdateForm').submit(function() { $.ajax($(this).attr('action'), { type: $(this).attr('method'), data: $(this).serialize() + '&bconfirm=1' }).success(function() { pushSearch();
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require_once "modules/pkgs/includes/xmlrpc.php"; if (isset($_POST["bconfirm"])) { activateAppstreamFlow($_POST['id'], $_POST['package_name'], $_POST['package_label'], $_POST['duration']); if (!isXMLRPCError() and $ret != -1) { new NotifyWidgetSuccess(_T("The stream has been added successfully. You will receive the latest updates of this stream directly in your package list.", "pkgs")); } if ($ret == -1) { new NotifyWidgetFailure(_T("Unable to add stream.", "pkgs")); } header("Location: " . urlStrRedirect("pkgs/pkgs/appstreamSettings", array())); exit; } else { $id = $_GET['id']; $package_name = $_GET['package_name']; $package_label = $_GET['package_label']; $duration = $_GET['duration']; $f = new PopupForm(_T("Activate this Appstream stream?")); $hidden = new HiddenTpl("id"); $f->add($hidden, array("value" => $id, "hide" => True)); $hidden = new HiddenTpl("package_name"); $f->add($hidden, array("value" => $package_name, "hide" => True)); $hidden = new HiddenTpl("package_label"); $f->add($hidden, array("value" => $package_label, "hide" => True)); $hidden = new HiddenTpl("duration"); $f->add($hidden, array("value" => $duration, "hide" => True)); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display(); }
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ if (isset($_POST["bconfirm"])) { $host = $_POST["host"]; $zone = $_POST["zone"]; delRecord($zone, $host); if (!isXMLRPCError()) { new NotifyWidgetSuccess(_T("The record has been deleted.")); } header("Location: main.php?module=network&submod=network&action=zonemembers&zone={$zone}"); exit; } else { $host = urldecode($_GET["host"]); $zone = urldecode($_GET["zone"]); $rr = getResourceRecord($zone, $host); $f = new PopupForm(_T("Delete a DNS record")); $f->addText(sprintf(_T("You will delete the %s record"), "<strong>{$host}</strong>")); /* If the deleted record is a A record, CNAME may be linked to it */ if (isset($rr[0][1]["aRecord"])) { $cnames = getCNAMEs($zone, $host); if (!empty($cnames)) { $msg = _T("The linked CNAME records will also be deleted:"); foreach ($cnames as $cname) { $msg .= " <strong>" . $cname[1]["relativeDomainName"][0] . "</strong>"; } $f->addText($msg); } } $hidden1 = new HiddenTpl("host"); $hidden2 = new HiddenTpl("zone"); $f->add($hidden1, array("value" => $host, "hide" => True));