$result = _T("The host has been deleted."); if (isset($_POST["updatedns"]) & isset($_POST["zone"])) { delRecord($_POST["zone"], $host); $result .= " " . _T("The DNS record has been deleted."); } if (!isXMLRPCError()) { new NotifyWidgetSuccess($result); } header("Location: main.php?module=network&submod=network&action=subnetmembers&subnet={$subnet}"); exit; } else { $subnet = urldecode($_GET["subnet"]); $host = urldecode($_GET["host"]); $askupdatedns = False; $domain = ""; $options = getSubnetOptions(getSubnet($subnet)); if (isset($options["primarydomainname"])) { /* If the DHCP domain name option is set, and corresponds to an existing DNS zone we ask the user if she/he wants to remove the A record in the DNS zone too. */ $domain = $options["primarydomainname"]; if (zoneExists($domain)) { if (hostExists($domain, $host)) { $askupdatedns = True; } } } } ?>
handleServicesModule($n, array($services[1] => "DHCP")); redirectTo(urlStrRedirect("network/network/subnetindex")); } } if (isset($error)) { new NotifyWidgetFailure($error); $subnet = $_POST["subnet"]; $netmask = $_POST["netmask"]; $hasSubnetPools = count($poolsRanges) ? "checked" : ""; } if ($_GET["action"] == "subnetedit" && !isset($error)) { $subnetInfos = getSubnet($_GET["subnet"]); $subnet = $subnetInfos[0][1]["cn"][0]; $netmask = $subnetInfos[0][1]["dhcpNetMask"][0]; $description = $subnetInfos[0][1]["dhcpComments"][0]; $options = getSubnetOptions($subnetInfos); $statements = getSubnetStatements($subnetInfos); if (isAuthoritative($subnetInfos)) { $authoritative = "CHECKED"; } else { $authoritative = ""; } $poolsRanges = getPoolsRanges($subnet); $hasSubnetPools = count($poolsRanges) ? "checked" : ""; } if ($_GET["action"] == "subnetadd") { $formElt = new IPInputTpl("subnet"); $authoritative = ""; } else { $formElt = new HiddenTpl("subnet"); }