Example #1
0
<?php

require_once '/var/www/html/app/library/function.php';
if (!isset($_SESSION['current_user_name']) && !isset($_COOKIE[$cookie_name])) {
    header('Location: ../login.php');
    exit;
}
if (isset($_POST['addZoneSubmit']) && !empty($_POST['zoneNameValueForAddZone'])) {
    //zoneTypeValueForAddZone
    addZone();
}
?>

<html lang="en">

<head>
</head>

										<form method="post" name="zoneSubmitForm">
										<td><b>Add Zone</b></td>
										<td>
											<select class='form-control' name='zoneTypeValueForAddZone'>
												<?php 
include 'EmpSelectAdd.php';
?>
											</select>
										</td>
										<select class='form-control' name='zoneNameValueForAddZone'>
                                    	<?php 
include 'ZoneSelectAdd.php';
?>
Example #2
0
            if (ipInNetwork($netaddress, $subnet, $mask, True)) {
                $error .= " " . sprintf(_T("The given network address belongs to the already existing DHCP subnet %s / %s."), $subnet, $mask);
                break;
            }
        }
    }
    if (!isset($error)) {
        $result = "";
        $servicesNames = getServicesNames();
        if ($dhcpsubnet) {
            addZoneWithSubnet($zonename, $netaddress, $netmask, $reverse, $description, $nameserver, $nameserverip);
            $result .= _T("DHCP subnet and DNS zone successfully added.");
            $result .= "<br />" . _T("The DHCP and DNS services must be restarted.");
            $services = array($servicesNames[0] => "DNS", $servicesNames[1] => "DHCP");
        } else {
            addZone($zonename, $netaddress, $netmask, $reverse, $description, $nameserver, $nameserverip);
            $result .= _T("DNS zone successfully added.");
            $result .= "<br />" . _T("The DNS service must be restarted.");
            $services = array($servicesNames[0] => "DNS");
        }
        if (!isXMLRPCError()) {
            $n = new NotifyWidgetSuccess($result);
            handleServicesModule($n, $services);
            header("Location: " . urlStrRedirect("network/network/index"));
            exit;
        }
    } else {
        new NotifyWidgetFailure($error);
    }
} else {
    if (isset($_POST["bedit"])) {