diff options
Diffstat (limited to 'ldap-site-mngmt/webinterface/dhcp/dhcppool.php')
-rw-r--r-- | ldap-site-mngmt/webinterface/dhcp/dhcppool.php | 43 |
1 files changed, 38 insertions, 5 deletions
diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcppool.php b/ldap-site-mngmt/webinterface/dhcp/dhcppool.php index d35edd18..aa58201f 100644 --- a/ldap-site-mngmt/webinterface/dhcp/dhcppool.php +++ b/ldap-site-mngmt/webinterface/dhcp/dhcppool.php @@ -24,9 +24,9 @@ createDhcpMenu($rollen, $mnr, $auDN, $sbmnr); # DHCP Pools Daten holen $attributes = array("dn","cn","dhcphlpcont","dhcprange","description","dhcpstatements","dhcpoptallow", "dhcpoptdefault-lease-time","dhcpoptdeny","dhcpoptignore","dhcpoptmax-lease-time", - "dhcpoptgeneric"); + "dhcpoptgeneric","hlprbservice","dhcpoptfilename","dhcpoptnext-server"); $pools = get_dhcppools($auDN, $attributes); -#print_r($pools); + if (count($pools) == 0){ redirect(0, "dhcpnopool.php?mnr=".$mnr, "", $addSessionId = TRUE); die; @@ -43,6 +43,8 @@ $template->assign(array("POOLDN" => "", "ALLOW" => "", "DENY" => "", "IGNORE" => "", + "RBS" => "", + "RBSSELECT" => "", "DEFAULTLEASE" => "", "MAXLEASE" => "", "MNR" => $mnr)); @@ -59,7 +61,8 @@ foreach ($pools as $pool){ $subnetdnexp = ldap_explode_dn( $pool['dhcphlpcont'], 0); $subnetauexp = array_slice($subnetdnexp, 3); $subnetau = implode(',',$subnetauexp); - + $rbsDN = $pool['hlprbservice']; + $template->clear_parse("DHCPRANGES_LIST"); @@ -105,8 +108,34 @@ foreach ($pools as $pool){ $ucselectbox = "<option selected value='deny'> DENY </option> <option value='allow'> ALLOW </option> <option value='ignore'> IGNORE </option>"; - } - + } + + # RBS Setup + $rbs_selectbox = ""; + $rbs_addselectbox = ""; + $altrbs = alternative_rbservices($rbsDN); + + $rbs_selectbox .= "<select name='rbs[]' size='4' class='tftp_form_selectbox'> + <option selected value='none'>----------</option>"; + $rbs_addselectbox = "<select name='rbs' size='3' class='tftp_form_selectbox'> + <option selected value='none'>----------</option>"; + if (count($altrbs) != 0){ + foreach ($altrbs as $item){ + $rbs_selectbox .= "<option value='".$item['dn']."'>".$item['cn']." ".$item['au']."</option>"; + $rbs_addselectbox .= "<option value='".$item['dn']."'>".$item['cn']." ".$item['au']."</option>"; + } + } + $rbs_selectbox .= "<option value=''>Kein RBS</option></select>"; + $rbs_addselectbox .= "</select>"; + + if ($rbsDN == ""){ + $rbs = "Keine Einbindung"; + }else{ + $rbsdnexp = ldap_explode_dn($pool['hlprbservice'],1); + $rbs = $rbsdnexp[0]."<br>DHCP Next-Server: ".$pool['dhcpoptnext-server']."<br>DHCP Filename: ".$pool['dhcpoptfilename']; + } + + $template->assign(array("POOLDN" => $pool['dn'], "CN" => $pool['cn'], "SUBNETDN" => $pool['dhcphlpcont'], @@ -119,6 +148,10 @@ foreach ($pools as $pool){ "ALLOW" => $pool['dhcpoptallow'], "DENY" => $pool['dhcpoptdeny'], "IGNORE" => $pool['dhcpoptignore'], + "RBS" => $rbs, + "RBSSELECT" => $rbs_selectbox, + "RBSADD" => $rbs_addselectbox, + "OLDRBS" => $rbsDN, "DEFAULTLEASE" => $pool['dhcpoptdefault-lease-time'], "MAXLEASE" => $pool['dhcpoptmax-lease-time'], "MNR" => $mnr)); |