예제 #1
0
    }
    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;
            }
        }
    }
}
?>

<p>
<?php 
echo sprintf(_T("You will delete the host %s from the DHCP subnet."), "<strong>{$host}</strong>");
?>
</p>

예제 #2
0
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;
}