$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();
* 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(); }
$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(); }
* 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(); }
* 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(); }
*/ 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)); $f->add($hidden2, array("value" => $zone, "hide" => True));