$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; } } } } ?>
$n = new NotifyWidgetSuccess(_T("Subnet successfully modified. You must restart the DHCP service.")); } } $services = getServicesNames(); 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");
<?php require "modules/network/includes/network.inc.php"; $filter = $_GET["filter"]; $subnet = $_GET["subnet"]; $subnetInfos = getSubnet($subnet); $netmask = $subnetInfos[0][1]["dhcpNetMask"][0]; $lines = array(); foreach (getSubnetHosts($subnet, "") as $dn => $entry) { $hostname = $entry[1]["cn"][0]; $ipaddress = null; foreach ($entry[1]["dhcpStatements"] as $statements) { list($name, $value) = explode(" ", $statements, 2); if ($name == "fixed-address") { /* Convert to long for easy sorting */ $ipaddress = ip2long($value); $lines[$ipaddress]["hostname"] = $hostname; break; } } if (!$ipaddress) { unset($lines[$ipaddress]); continue; /* We don't support displaying DHCP host with no fixed IP address */ } list($tmp, $lines[$ipaddress]["macaddress"]) = explode(" ", strtoupper($entry[1]["dhcpHWAddress"][0])); $lines[$ipaddress]["type"] = _T("Static", "network"); if ($filter) { /* Don't display a host if filtered */ if (stripos($hostname, $filter) === False && strpos(long2ip($ipaddress), $filter) === False && stripos($lines[$ipaddress]["macaddress"], $filter) === False && stripos($lines[$ipaddress]["type"], $filter) === False) { unset($lines[$ipaddress]);
if (is_active_sidebar('rb_footer_widget_6')) { dynamic_sidebar('rb_footer_widget_6'); } ?> </div> </div> </footer> <!-- Footer #2 Wrapper End --> <div id="scripts"> <?php $userType = getSubnet(); /* for Google Analytics custom dimension */ ?> <script><?php echo "\n var userType='" . $userType . "';\n"; ?> </script><?php wp_register_script('theme_plugins', get_template_directory_uri() . '/js/plugins.min.js', array('jquery'), NULL, true); wp_register_script('theme_scripts', get_template_directory_uri() . '/js/scripts.min.js', array('theme_plugins'), NULL, true); wp_enqueue_script('theme_plugins'); wp_enqueue_script('theme_scripts'); if (is_page('2')) { $base = get_stylesheet_directory_uri(); wp_register_script('superfish_hoverIntent', get_stylesheet_directory_uri() . '/superfish/js/hoverIntent.js'); wp_register_script('superfish', get_stylesheet_directory_uri() . '/superfish/js/superfish.js'); wp_enqueue_script('superfish_hoverIntent');