diff options
| author | Tarik Gasmi | 2007-07-31 09:29:53 +0200 |
|---|---|---|
| committer | Tarik Gasmi | 2007-07-31 09:29:53 +0200 |
| commit | c7b4e4a81d7f38c0f1f927f6804ef281c4f67dcd (patch) | |
| tree | 974eb0c95d0ff2678439b161246433cde972564d /ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.php | |
| parent | * more work towards Debian & Ubuntu support, Debian-4.0, Ubuntu-6.10 (diff) | |
| download | core-c7b4e4a81d7f38c0f1f927f6804ef281c4f67dcd.tar.gz core-c7b4e4a81d7f38c0f1f927f6804ef281c4f67dcd.tar.xz core-c7b4e4a81d7f38c0f1f927f6804ef281c4f67dcd.zip | |
Actualized LDAP SiteManagement Code - Web Interface, DHCP Generationscript
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1284 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.php')
| -rw-r--r-- | ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.php | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.php b/ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.php index a7697c14..adf7720f 100644 --- a/ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.php +++ b/ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.php @@ -23,14 +23,14 @@ $sbmnr = $_GET['sbmnr']; createMainMenu($rollen, $mainnr); createDhcpMenu($rollen, $mnr, $auDN, $sbmnr); +include("ip_blocks.inc.php"); + ################################################################################### $subnetcn = str_replace ( "_", " ", $_GET['subnetcn']); $netmask = str_replace ( "_", " ", $_GET['netmask']); $template->assign(array("CN" => $subnetcn, "NETMASK" => $netmask, - "RANGE1" => "", - "RANGE2" => "", "DESCRIPTION" => "", "STATEMENTS" => "", "ALLOW" => "", @@ -57,6 +57,30 @@ $template->assign(array("CN" => $subnetcn, +$freenets = get_networks(); +#print_r($freenets); +$subnets = array(); +if (count($freenets) != 0){ + $template->define_dynamic("Dhcpsubnets", "Webseite"); + + foreach ($freenets as $subnet){ + $netexp = explode(".",$subnet); + $mask = array(255,255,255,255); + for ($i=0; $i<count($netexp); $i++){ + if ($netexp[$i] == "0"){ + $mask[$i] = "0"; + } + } + $netmask = implode(".", $mask); + $subnets[] = $subnet."|".$netmask; + + $template->assign(array("SUBNET" => $subnet."|".$netmask, + "CN" => $subnet, + "NETMASK" => $netmask)); + $template->parse("DHCPSUBNETS_LIST", ".Dhcpsubnets"); + } + #print_r($subnets); + # DHCP Services $dhcpservices = get_dhcpoffers($auDN); #print_r($dhcpservices); echo "<br>"; @@ -76,6 +100,13 @@ $template->define_dynamic("Dhcpservices", "Webseite"); } } +$template->assign(array("SUBLIST" => count($freenets)+1, + "SRVLIST" => count($dhcpservices)+1)); + +}else{ + # keine freie Netze mehr zur Verfügung + # wird schon über das DHCP Menu abgefangen ... +} ################################################################################### |
