setZoneDescription($zonename, $description); if (!isXMLRPCError()) { new NotifyWidgetSuccess(_T("DNS zone successfully modified.")); header("Location: " . urlStrRedirect("network/network/index")); exit; } } else { new NotifyWidgetFailure($error); $mxservers = $mxserverstmp; $nameservers = $nameserverstmp; } } } if ($_GET["action"] == "edit" && !isset($error)) { $zonename = $_GET["zone"]; $soa = getSOARecord($zonename); $nameserver = trim($soa["nameserver"], "."); $nameservers = array(); foreach (getNSRecords($zonename) as $ns) { if ($ns != $soa["nameserver"]) { $nameservers[] = trim($ns, '.'); } } if (empty($nameservers)) { $nameservers = array(''); } $mxservers = array(); foreach (getMXRecords($zonename) as $mx) { $mxservers[] = trim($mx, '.'); } if (empty($mxservers)) {
$asc = $_SESSION["network"]["asc"]; } } if ($asc == "") { $asc = "1"; } $addresses = array(); $curzone = $zone; if ($reverse) { $rzone = getReverseZone($zone); if (count($rzone)) { $curzone = $rzone[0]; } } $records = getZoneRecords($curzone, ""); $soa = getSOARecord($curzone); $serial = $soa["serial"]; if ($filter) { $tmprecords = array(); foreach ($records as $r) { if (strpos($r["hostname"], $filter) !== False || strpos($r["type"], $filter) !== False) { $tmprecords[] = $r; } } $records = $tmprecords; } function getRecordValueDescription($zone, $type, $value) { $typeToLoad = in_array(strtoupper($type), supportedRecordsTypes()) ? strtolower($type) : "custom"; $RecordClass = $typeToLoad . "Record"; require_once "../../../modules/network/network/dnsrecords/" . $typeToLoad . ".php";
function getZone($zone) { if (zoneExists($zone)) { $html .= "<table class=\"editable_table\" border=\"0\">\n"; $html .= "<tr class=\"yellow\"><th>Edit Zone [" . $zone . "]</th></tr>\n"; $html .= "</table>\n"; $html .= "<div id=\"div_soa_records\">" . getSOARecord($zone) . "</div>"; $html .= "<div id=\"div_ns_records\">" . getNSRecords($zone) . "</div>"; $html .= "<div id=\"div_mx_records\">" . getMXRecords($zone) . "</div>"; $html .= "<div id=\"div_a_records\">" . getARecords($zone) . "</div>"; $html .= '<div id="div_cname_records">' . getCNAMERecords($zone) . '</div>'; $html .= '<div id="div_txt_records">' . getTXTRecords($zone) . '</div>'; } else { $html .= "<h2>Zone [{$zone}] does not exist.</h2>"; } if (mysql_error()) { $html .= "<div id=\"mysql_error\">MySql Error:<br>" . mysql_error() . "</div>"; } return $html; }