summaryrefslogtreecommitdiffstats
path: root/ldap-site-mngmt/webinterface/dhcp
diff options
context:
space:
mode:
authorTarik Gasmi2007-09-27 16:40:23 +0200
committerTarik Gasmi2007-09-27 16:40:23 +0200
commitecc473303fbee5f5466d2477157b5fd682357003 (patch)
tree2776e2d1d44543e60e15fba30d98d630a551c59c /ldap-site-mngmt/webinterface/dhcp
parentAdded text to PXE image "please select" and "use arrow keys". Dirks idea. (diff)
downloadcore-ecc473303fbee5f5466d2477157b5fd682357003.tar.gz
core-ecc473303fbee5f5466d2477157b5fd682357003.tar.xz
core-ecc473303fbee5f5466d2477157b5fd682357003.zip
Reorganized LSM Webinterface
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1353 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'ldap-site-mngmt/webinterface/dhcp')
-rw-r--r--ldap-site-mngmt/webinterface/dhcp/dhcp.php15
-rw-r--r--ldap-site-mngmt/webinterface/dhcp/dhcp_header.inc.php17
-rw-r--r--ldap-site-mngmt/webinterface/dhcp/dhcp_menu.php16
-rw-r--r--ldap-site-mngmt/webinterface/dhcp/dhcpnopool.dwt53
-rw-r--r--ldap-site-mngmt/webinterface/dhcp/dhcpnopool.php128
-rw-r--r--ldap-site-mngmt/webinterface/dhcp/dhcppool.dwt113
-rw-r--r--ldap-site-mngmt/webinterface/dhcp/dhcppool.php126
-rw-r--r--ldap-site-mngmt/webinterface/dhcp/dhcpservice.php16
-rw-r--r--ldap-site-mngmt/webinterface/dhcp/dhcpsubnet.php16
-rw-r--r--ldap-site-mngmt/webinterface/dhcp/dhcpsubnets.php17
-rw-r--r--ldap-site-mngmt/webinterface/dhcp/ip_blocks.inc.php68
-rw-r--r--ldap-site-mngmt/webinterface/dhcp/ipblocks.dwt11
-rw-r--r--ldap-site-mngmt/webinterface/dhcp/new_dhcpservice.php14
-rw-r--r--ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.php16
-rw-r--r--ldap-site-mngmt/webinterface/dhcp/no_dhcp.php16
15 files changed, 352 insertions, 290 deletions
diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcp.php b/ldap-site-mngmt/webinterface/dhcp/dhcp.php
index bd30ba4f..a54d5b17 100644
--- a/ldap-site-mngmt/webinterface/dhcp/dhcp.php
+++ b/ldap-site-mngmt/webinterface/dhcp/dhcp.php
@@ -1,26 +1,21 @@
<?php
+
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "DHCP Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 5;
-$mnr = 0;
-$sbmnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "dhcp_start.dwt";
-include("../class.FastTemplate.php");
-
include('dhcp_header.inc.php');
+$mnr = 0;
+$sbmnr = -1;
+
###################################################################################
# Menuleisten erstellen
createMainMenu($rollen, $mainnr);
createDhcpMenu($rollen, $mnr, $auDN, $sbmnr);
-include("ip_blocks.inc.php");
###################################################################################
diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcp_header.inc.php b/ldap-site-mngmt/webinterface/dhcp/dhcp_header.inc.php
index 783c86e6..8cd98c00 100644
--- a/ldap-site-mngmt/webinterface/dhcp/dhcp_header.inc.php
+++ b/ldap-site-mngmt/webinterface/dhcp/dhcp_header.inc.php
@@ -1,14 +1,18 @@
<?php
-include("dhcp_menu.php");
-$template = new FastTemplate(".");
+# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
+$titel = "DHCP Management";
+# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
+$mainnr = 2;
+
+$template = new FastTemplate(".");
# dem erstellten Template-Objekt eine Vorlage zuweisen
$definedTemplates = array("Vorlage" => "dhcp.dwt",
"Login" => "../logout_form.inc.dwt",
"Mmenu" => "../hauptmenue.dwt",
"Menu" => "menu.dwt",
- "IPBlocks" => "ipblocks.dwt",
+ "IPBlocks" => "../common/ipblocks.dwt",
"Webseite" => $webseite);
if (isset($additionalTemplates)) {
foreach ($additionalTemplates as $templateKey => $templateFile) {
@@ -16,7 +20,10 @@ if (isset($additionalTemplates)) {
}
}
$template->define($definedTemplates);
-
$template->assign(array("SEITENTITEL" => $titel, "ROLLE" => "mainadmin", "AU" => $au_ou, "DOMAIN" => $assocdom, "USERCN" => $usercn));
-
+
+
+include("dhcp_menu.php");
+include("../common/ip_blocks.inc.php");
+
?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcp_menu.php b/ldap-site-mngmt/webinterface/dhcp/dhcp_menu.php
index 3e9638ed..a51ee6d5 100644
--- a/ldap-site-mngmt/webinterface/dhcp/dhcp_menu.php
+++ b/ldap-site-mngmt/webinterface/dhcp/dhcp_menu.php
@@ -15,6 +15,14 @@ function createDhcpMenu($rollen , $mnr, $auDN, $sbmnr) {
"text" => "&Uuml;bersicht",
"zugriff" => "alle"));
}
+
+ $pools = get_dhcppools($auDN, array("dn"));
+ if (count($pools) == 0){
+ $poollink = "dhcpnopool.php";
+ }else{
+ $poollink = "dhcppool.php";
+ }
+
$i=1;
if ( $auDN == $rootAU ) {
$dhcpservice_array = get_dhcpservices($auDN,array("dn","cn"));
@@ -49,18 +57,18 @@ function createDhcpMenu($rollen , $mnr, $auDN, $sbmnr) {
"zugriff" => array("MainAdmin","DhcpAdmin"));
}
$i++;
- $hauptmenu [] = array("link" => "dhcppool.php?mnr=".$i,
+ $hauptmenu [] = array("link" => $poollink."?mnr=".$i,
"text" => "Dynamische DHCP Pools",
- "zugriff" => "alle");
+ "zugriff" => array("MainAdmin","DhcpAdmin"));
$submenu = array(array(),
$subnets,
array());
}else{
- $hauptmenu [] = array("link" => "dhcppool.php?mnr=".$i,
+ $hauptmenu [] = array("link" => $poollink."?mnr=".$i,
"text" => "Dynamische DHCP Pools",
- "zugriff" => "alle");
+ "zugriff" => array("MainAdmin","DhcpAdmin"));
}
}
diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpnopool.dwt b/ldap-site-mngmt/webinterface/dhcp/dhcpnopool.dwt
new file mode 100644
index 00000000..63047a9a
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/dhcp/dhcpnopool.dwt
@@ -0,0 +1,53 @@
+<table border='0' cellpadding='5' cellspacing='0' width='100%'>
+ <tr>
+ <td colspan='2'><h3>Dynamische DHCP Pools </h3></td>
+ </tr>
+
+ <tr>
+ <td>Noch keine dynamischen DHCP Pools angelegt</td>
+ </tr>
+
+ <tr>
+ <td height='30'></td>
+ </tr>
+
+ <tr>
+ <td colspan='2'><h4>Dynamischen DHCP Pool hinzuf&uuml;gen </h4></td>
+ </tr>
+ <tr>
+ <td>
+ <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'>
+ <form action='dhcppool_add.php' method='post'>
+
+ <tr valign='bottom'>
+ <td width='50%' class='tab_h'><b>IP Range (innerhalb eines Subnetzes)</b><br>
+ weitere Ranges k&ouml;nnen sp&auml;ter hinzugef&uuml;gt werden</td>
+ <td width='50%' class='tab_h'><b>Unknown Clients</b></td>
+ </tr>
+
+ <tr height='50' valign='top'>
+ <td class='tab_d'>
+ <input type='Text' name='addrange1' value='' size='15' maxlength='15' class='medium_form_field'>
+ &nbsp;&nbsp; - &nbsp;&nbsp;
+ <input type='Text' name='addrange2' value='' size='15' maxlength='15' class='medium_form_field'>
+ </td>
+ <td class='tab_d'>
+ <select name='unknownclients' size='3' class='small_form_selectbox'>
+ <option selected value='deny'> DENY </option>
+ <option value='allow'> ALLOW </option>
+ <option value='ignore'> IGNORE </option>
+ </select>
+ </td>
+ </tr>
+ <input type='hidden' name='mnr' value='{MNR}'>
+
+ </table></td>
+ </tr>
+ <tr>
+ <td>
+ <input type='Submit' name='apply' value='anlegen' class='small_loginform_button'>
+ </form></td>
+ </tr>
+
+
+</table> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpnopool.php b/ldap-site-mngmt/webinterface/dhcp/dhcpnopool.php
new file mode 100644
index 00000000..fd198bc1
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/dhcp/dhcpnopool.php
@@ -0,0 +1,128 @@
+<?php
+
+include('../standard_header.inc.php');
+
+# Dateiname und evtl. Pfad des Templates für die Webseite
+$webseite = "dhcpnopool.dwt";
+
+include('dhcp_header.inc.php');
+
+$mnr = 3;
+$sbmnr = -1;
+
+###################################################################################
+
+$mnr = $_GET['mnr'];
+$sbmnr = $_GET['sbmnr'];
+
+# Menuleisten erstellen
+createMainMenu($rollen, $mainnr);
+createDhcpMenu($rollen, $mnr, $auDN, $sbmnr);
+
+###################################################################################
+
+$template->assign(array("POOLDN" => "",
+ "CN" => "",
+ "SUBNETDN" => "",
+ "SUBNET" => "",
+ "RANGE1" => "",
+ "RANGE2" => "",
+ "DESCRIPTION" => "",
+ "STATEMENTS" => "",
+ "ALLOW" => "",
+ "DENY" => "",
+ "IGNORE" => "",
+ "DEFAULTLEASE" => "",
+ "MAXLEASE" => "",
+ "MNR" => $mnr));
+/*
+# DHCP Pools Daten holen
+$attributes = array("dn","cn","dhcphlpcont","dhcprange","description","dhcpstatements","dhcpoptallow",
+ "dhcpoptdefault-lease-time","dhcpoptdeny","dhcpoptignore","dhcpoptmax-lease-time",
+ "dhcpoptgeneric");
+$pools = get_dhcppools($auDN, $attributes);
+#print_r($pools);
+
+$template->define_dynamic("Dhcppools", "Webseite");
+$template->define_dynamic("Dhcpranges", "Webseite");
+
+# Für jeden Pool ...
+foreach ($pools as $pool){
+
+ # DHCP Subnet des Pools
+ $subnet = ldap_explode_dn($pool['dhcphlpcont'],1);
+ $subnetdnexp = ldap_explode_dn( $pool['dhcphlpcont'], 0);
+ $subnetauexp = array_slice($subnetdnexp, 3);
+ $subnetau = implode(',',$subnetauexp);
+
+
+ $template->clear_parse("DHCPRANGES_LIST");
+
+ # DHCP Ranges
+ if (count($pool['dhcprange']) != 0){
+ #$template->define_dynamic("Dhcpranges", "Webseite");
+ if (count($pool['dhcprange']) > 1){
+ foreach ($pool['dhcprange'] as $dhcprange){
+ $iprange = explode('_',$dhcprange);
+ $template->assign(array(
+ "RANGE1" => $iprange[0],
+ "RANGE2" => $iprange[1],
+ "RPOOLDN" => $pool['dn']));
+ $template->parse("DHCPRANGES_LIST", ".Dhcpranges");
+ $template->clear_dynamic("Dhcpranges");
+ }
+ }else{
+ $iprange = explode('_',$pool['dhcprange']);
+ $template->assign(array(
+ "RANGE1" => $iprange[0],
+ "RANGE2" => $iprange[1],
+ "RPOOLDN" => $pool['dn']));
+ $template->parse("DHCPRANGES_LIST", ".Dhcpranges");
+ $template->clear_dynamic("Dhcpranges");
+ }
+ }
+
+ # Unknown-Clients
+ if ($pool['dhcpoptallow'] == "unknown-clients"){
+ $unknownclients = "allow";
+ $ucselectbox = "<option selected value='allow'> ALLOW </option>
+ <option value='deny'> DENY </option>
+ <option value='ignore'> IGNORE </option>";
+ }
+ elseif ($pool['dhcpoptignore'] == "unknown-clients") {
+ $unknownclients = "ignore";
+ $ucselectbox = "<option selected value='ignore'> IGNORE </option>
+ <option value='allow'> ALLOW </option>
+ <option value='deny'> DENY </option>";
+ }
+ else{
+ $unknownclients = "deny";
+ $ucselectbox = "<option selected value='deny'> DENY </option>
+ <option value='allow'> ALLOW </option>
+ <option value='ignore'> IGNORE </option>";
+ }
+
+ $template->assign(array("POOLDN" => $pool['dn'],
+ "CN" => $pool['cn'],
+ "SUBNETDN" => $pool['dhcphlpcont'],
+ "SUBNET" => $subnet[0],
+ "SUBNETAU" => $subnetau,
+ "DESCRIPTION" => $pool['description'],
+ "STATEMENTS" => $pool['dhcpstatements'],
+ "UCSELECT" => $ucselectbox,
+ "UCNOW" => $unknownclients,
+ "ALLOW" => $pool['dhcpoptallow'],
+ "DENY" => $pool['dhcpoptdeny'],
+ "IGNORE" => $pool['dhcpoptignore'],
+ "DEFAULTLEASE" => $pool['dhcpoptdefault-lease-time'],
+ "MAXLEASE" => $pool['dhcpoptmax-lease-time'],
+ "MNR" => $mnr));
+ $template->parse("DHCPPOOLS_LIST", ".Dhcppools");
+
+}
+*/
+###################################################################################
+
+include("dhcp_footer.inc.php");
+
+?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcppool.dwt b/ldap-site-mngmt/webinterface/dhcp/dhcppool.dwt
index 8c9aefdc..f8dbe02d 100644
--- a/ldap-site-mngmt/webinterface/dhcp/dhcppool.dwt
+++ b/ldap-site-mngmt/webinterface/dhcp/dhcppool.dwt
@@ -1,21 +1,80 @@
<table border='0' cellpadding='5' cellspacing='0' width='100%'>
- <tr>
- <td colspan='2'><h3>Dynamische DHCP Pools </h3></td>
- </tr>
-
- <!-- BEGIN DYNAMIC BLOCK: Poolform -->
- {POOLFORMULAR}
- <!-- END DYNAMIC BLOCK: Poolform -->
+ <tr>
+ <td colspan='2'><h3>Dynamische DHCP Pools </h3></td>
+ </tr>
+
+ <tr><td>
+ <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'>
+
+ <form action='dhcppools_change.php' method='post'>
+
+ <tr>
+ <td width='30%' class='tab_h'><b>Subnetz</b></td>
+ <td width='50%' class='tab_h'><b>IP Ranges (innerhalb Subnetz)</b></td>
+ <td width='20%' class='tab_h'><b>Unknown Clients</b></td>
+ </tr>
+
+ <!-- BEGIN DYNAMIC BLOCK: Dhcppools -->
+
+ <tr height='50' valign='top'>
+ <td class='tab_d'><b>{SUBNET}/24</b><br><br>
+ <input type='checkbox' name='delpool[]' value='{POOLDN}' size='10' class='medium_form_field'>
+ Pool l&ouml;schen (H&auml;kchen setzen)</td>
+
+ <td class='tab_d'>
+
+ <!-- BEGIN DYNAMIC BLOCK: Dhcpranges -->
+
+ <input type='Text' name='range1[]' value='{RANGE1}' size='15' maxlength='15' class='medium_form_field'>
+ &nbsp;&nbsp; - &nbsp;&nbsp;
+ <input type='Text' name='range2[]' value='{RANGE2}' size='15' maxlength='15' class='medium_form_field'>
+ <input type='hidden' name='oldrange1[]' value='{RANGE1}'>
+ <input type='hidden' name='oldrange2[]' value='{RANGE2}'><br>
+ <input type='hidden' name='rangepooldn[]' value='{RPOOLDN}'>
+
+ <!-- END DYNAMIC BLOCK: Dhcpranges -->
+
+ <input type='Text' name='addrange1[]' value='' size='15' maxlength='15' class='medium_form_field'>
+ &nbsp;&nbsp; - &nbsp;&nbsp;
+ <input type='Text' name='addrange2[]' value='' size='15' maxlength='15' class='medium_form_field'>
+ </td>
+
+ <td class='tab_d'>
+ <select name='unknownclients[]' size='3' class='small_form_selectbox'>
+ {UCSELECT}
+ </select>
+ <input type='hidden' name='olduc[]' value='{UCNOW}'> &nbsp;
+ </td>
+ </tr>
+
+ <input type='hidden' name='pooldn[]' value='{POOLDN}'>
+ <input type='hidden' name='subnet[]' value='{SUBNET}'>
+ <input type='hidden' name='subnetau[]' value='{SUBNETAU}'>
+
+ <!-- END DYNAMIC BLOCK: Dhcppools -->
+
+ <input type='hidden' name='mnr' value='{MNR}'>
+ </table></td>
+ </tr>
+ <tr>
+ <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'>
+ </form></td>
+ </tr>
+
<tr>
- <td colspan='2'><h4>Dynamischen DHCP Pool hinzuf&uuml;gen </h4></td>
- </tr>
- <tr>
- <td>
- <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'>
- <form action='dhcppool_add.php' method='post'>
-
- <tr valign='bottom'>
+ <td height='50'></td>
+ </tr>
+ <tr>
+ <td colspan='2'><h4>Dynamischen DHCP Pool hinzuf&uuml;gen </h4></td>
+ </tr>
+
+ <tr>
+ <td>
+ <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'>
+ <form action='dhcppool_add.php' method='post'>
+
+ <tr valign='bottom'>
<td width='50%' class='tab_h'><b>IP Range (innerhalb eines Subnetzes)</b><br>
weitere Ranges k&ouml;nnen sp&auml;ter hinzugef&uuml;gt werden</td>
<td width='50%' class='tab_h'><b>Unknown Clients</b></td>
@@ -28,22 +87,22 @@
<input type='Text' name='addrange2' value='' size='15' maxlength='15' class='medium_form_field'>
</td>
<td class='tab_d'>
- <select name='unknownclients' size='3' class='small_form_selectbox'>
- <option selected value='deny'> DENY </option>
- <option value='allow'> ALLOW </option>
- <option value='ignore'> IGNORE </option>
- </select>
+ <select name='unknownclients' size='3' class='small_form_selectbox'>
+ <option selected value='deny'> DENY </option>
+ <option value='allow'> ALLOW </option>
+ <option value='ignore'> IGNORE </option>
+ </select>
</td>
</tr>
- <input type='hidden' name='mnr' value='{MNR}'>
-
- </table></td>
- </tr>
- <tr>
- <td>
+ <input type='hidden' name='mnr' value='{MNR}'>
+
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
<input type='Submit' name='apply' value='anlegen' class='small_loginform_button'>
</form></td>
</tr>
-
</table> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcppool.php b/ldap-site-mngmt/webinterface/dhcp/dhcppool.php
index 2d7da0ff..d35edd18 100644
--- a/ldap-site-mngmt/webinterface/dhcp/dhcppool.php
+++ b/ldap-site-mngmt/webinterface/dhcp/dhcppool.php
@@ -1,18 +1,14 @@
<?php
+
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "DHCP Service Management";
-# 2. Nummern der zugehörigen Menus.
-$mainnr = 5;
-$mnr = 3;
-$sbmnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "dhcppool.dwt";
-include("../class.FastTemplate.php");
include('dhcp_header.inc.php');
+$mnr = 3;
+$sbmnr = -1;
###################################################################################
@@ -23,110 +19,38 @@ $sbmnr = $_GET['sbmnr'];
createMainMenu($rollen, $mainnr);
createDhcpMenu($rollen, $mnr, $auDN, $sbmnr);
-include("ip_blocks.inc.php");
-
###################################################################################
-$template->define_dynamic("Poolform", "Webseite");
-$template->assign(array("POOLFORMULAR" => "",
- #"POOLDN" => "",
+# DHCP Pools Daten holen
+$attributes = array("dn","cn","dhcphlpcont","dhcprange","description","dhcpstatements","dhcpoptallow",
+ "dhcpoptdefault-lease-time","dhcpoptdeny","dhcpoptignore","dhcpoptmax-lease-time",
+ "dhcpoptgeneric");
+$pools = get_dhcppools($auDN, $attributes);
+#print_r($pools);
+if (count($pools) == 0){
+ redirect(0, "dhcpnopool.php?mnr=".$mnr, "", $addSessionId = TRUE);
+ die;
+}
+
+$template->assign(array("POOLDN" => "",
"CN" => "",
"SUBNETDN" => "",
- #"SUBNET" => "",
- #"RANGE1" => "",
- #"RANGE2" => "",
+ "SUBNET" => "",
+ "RANGE1" => "",
+ "RANGE2" => "",
"DESCRIPTION" => "",
"STATEMENTS" => "",
+ "ALLOW" => "",
+ "DENY" => "",
+ "IGNORE" => "",
"DEFAULTLEASE" => "",
"MAXLEASE" => "",
"MNR" => $mnr));
-# DHCP Pools Daten holen
-$attributes = array("dn","cn","dhcphlpcont","dhcprange","description","dhcpstatements","dhcpoptallow",
- "dhcpoptdefault-lease-time","dhcpoptdeny","dhcpoptignore","dhcpoptmax-lease-time",
- "dhcpoptgeneric");
-$pools = get_dhcppools($auDN, $attributes);
-#print_r($pools);
-
-if (count($pools) != 0){
-
-
-
-$poolform = "
- <tr><td>
- <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'>
-
- <form action='dhcppools_change.php' method='post'>
-
- <tr>
- <td width='30%' class='tab_h'><b>Subnetz</b></td>
- <td width='50%' class='tab_h'><b>IP Ranges (innerhalb Subnetz)</b></td>
- <td width='20%' class='tab_h'><b>Unknown Clients</b></td>
- </tr>
-
- <!-- BEGIN DYNAMIC BLOCK: Dhcppools -->
-
- <tr height='50' valign='top'>
- <td class='tab_d'><b>{SUBNET}/24</b><br><br>
- <input type='checkbox' name='delpool[]' value='{POOLDN}' size='10' class='medium_form_field'>
- Pool l&ouml;schen (H&auml;kchen setzen)</td>
-
- <td class='tab_d'>
-
- <!-- BEGIN DYNAMIC BLOCK: Dhcpranges -->
-
- <input type='Text' name='range1[]' value='{RANGE1}' size='15' maxlength='15' class='medium_form_field'>
- &nbsp;&nbsp; - &nbsp;&nbsp;
- <input type='Text' name='range2[]' value='{RANGE2}' size='15' maxlength='15' class='medium_form_field'>
- <input type='hidden' name='oldrange1[]' value='{RANGE1}'>
- <input type='hidden' name='oldrange2[]' value='{RANGE2}'><br>
- <input type='hidden' name='rangepooldn[]' value='{RPOOLDN}'>
-
- <!-- END DYNAMIC BLOCK: Dhcpranges -->
-
- <input type='Text' name='addrange1[]' value='' size='15' maxlength='15' class='medium_form_field'>
- &nbsp;&nbsp; - &nbsp;&nbsp;
- <input type='Text' name='addrange2[]' value='' size='15' maxlength='15' class='medium_form_field'>
- </td>
-
- <td class='tab_d'>
- <select name='unknownclients[]' size='3' class='small_form_selectbox'>
- {UCSELECT}
- </select>
- <input type='hidden' name='olduc[]' value='{UCNOW}'> &nbsp;
- </td>
- </tr>
- <!--<tr>
- <td colspan='3' class='tab_d'><input type='checkbox' name='delpool[]' value='{POOLDN}' size='10' class='medium_form_field'>
- Pool l&ouml;schen (H&auml;kchen setzen)</td>
- </tr>-->
-
- <input type='hidden' name='pooldn[]' value='{POOLDN}'>
- <input type='hidden' name='subnet[]' value='{SUBNET}'>
- <input type='hidden' name='subnetau[]' value='{SUBNETAU}'>
-
- <!-- END DYNAMIC BLOCK: Dhcppools -->
-
- <input type='hidden' name='mnr' value='{MNR}'>
-
- </table></td>
- </tr>
- <tr>
- <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'>
- </form></td>
- </tr>
-
- <tr>
- <td height='50'></td>
- </tr>";
-
-$template->assign(array("POOLFORMULAR" => $poolform));
-$template->parse("POOLFORM_LIST", "Poolform");
-#$template->clear_dynamic("Poolform");
-#$template->clear_parse("POOLFORM_LIST");
$template->define_dynamic("Dhcppools", "Webseite");
$template->define_dynamic("Dhcpranges", "Webseite");
+
# Für jeden Pool ...
foreach ($pools as $pool){
@@ -192,13 +116,15 @@ foreach ($pools as $pool){
"STATEMENTS" => $pool['dhcpstatements'],
"UCSELECT" => $ucselectbox,
"UCNOW" => $unknownclients,
+ "ALLOW" => $pool['dhcpoptallow'],
+ "DENY" => $pool['dhcpoptdeny'],
+ "IGNORE" => $pool['dhcpoptignore'],
"DEFAULTLEASE" => $pool['dhcpoptdefault-lease-time'],
"MAXLEASE" => $pool['dhcpoptmax-lease-time'],
"MNR" => $mnr));
$template->parse("DHCPPOOLS_LIST", ".Dhcppools");
}
-}
###################################################################################
diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpservice.php b/ldap-site-mngmt/webinterface/dhcp/dhcpservice.php
index 8ca55023..304739ca 100644
--- a/ldap-site-mngmt/webinterface/dhcp/dhcpservice.php
+++ b/ldap-site-mngmt/webinterface/dhcp/dhcpservice.php
@@ -1,19 +1,15 @@
<?php
+
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "DHCP Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 5;
-$mnr = 0;
-$sbmnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "dhcpservice.dwt";
-include("../class.FastTemplate.php");
-
include('dhcp_header.inc.php');
+$mnr = 0;
+$sbmnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
@@ -22,8 +18,6 @@ $mnr = $_GET['mnr'];
createMainMenu($rollen, $mainnr);
createDhcpMenu($rollen, $mnr, $auDN, $sbmnr);
-include("ip_blocks.inc.php");
-
###################################################################################
$template->assign(array("DHCPDN" => "",
diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet.php b/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet.php
index ee3338ef..a7da175d 100644
--- a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet.php
+++ b/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet.php
@@ -1,19 +1,15 @@
<?php
+
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "DHCP Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 5;
-$mnr = -1;
-$sbmnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "dhcpsubnet.dwt";
-include("../class.FastTemplate.php");
-
include('dhcp_header.inc.php');
+$mnr = -1;
+$sbmnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
@@ -23,8 +19,6 @@ $mnr = $_GET['mnr'];
createMainMenu($rollen, $mainnr);
createDhcpMenu($rollen, $mnr, $auDN, $sbmnr);
-include("ip_blocks.inc.php");
-
###################################################################################
$template->assign(array("SUBNETDN" => "",
diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnets.php b/ldap-site-mngmt/webinterface/dhcp/dhcpsubnets.php
index d0d61aa5..1bf6b2e1 100644
--- a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnets.php
+++ b/ldap-site-mngmt/webinterface/dhcp/dhcpsubnets.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "DHCP Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 5;
-$mnr = -1;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "dhcpsubnets.dwt";
-include("../class.FastTemplate.php");
-
include('dhcp_header.inc.php');
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
@@ -24,8 +19,6 @@ $mnr = $_GET['mnr'];
createMainMenu($rollen, $mainnr);
createDhcpMenu($rollen, $mnr, $auDN, $sbmnr);
-include("ip_blocks.inc.php");
-
###################################################################################
$template->assign(array("SUBNETDN" => "",
diff --git a/ldap-site-mngmt/webinterface/dhcp/ip_blocks.inc.php b/ldap-site-mngmt/webinterface/dhcp/ip_blocks.inc.php
deleted file mode 100644
index 8530e079..00000000
--- a/ldap-site-mngmt/webinterface/dhcp/ip_blocks.inc.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-# Max und Free IP Blocks
-$mipb_array = get_maxipblocks_au($auDN);
-$fipb_array = get_freeipblocks_au($auDN);
-#print_r(count($mipb_array)); echo "<br>";
-#print_r(count($fipb_array)); echo "<br>";
-$ipblocks = "";
-
-# print_r($mipb_array);
-if ($mipb_array[0] != "" ){
- if (count($mipb_array) > 1 ){
- $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'>
- <tr><td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>
- <h4>Zugewiesene IP Bereiche:</h4></td></tr>";
- foreach ($mipb_array as $mipb){
- $exp = explode('_',$mipb);
- $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0]&nbsp;</td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1]&nbsp;</td></td></tr>";
- }
- }
- elseif (count($mipb_array) == 1){
- $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'>
- <tr><td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>
- <h4>Zugewiesener IP Bereich:</h4></td></tr>";
- $exp = explode('_',$mipb_array[0]);
- $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0]&nbsp;</td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1]&nbsp;</td></tr>";
- }
- elseif( $fipb_array[0] == "" ){
- $ipblocks .= "<table border='0' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'>
- <tr><td><h4>Keine IP Adressen mehr verf&uuml;gbar</h4></td></tr>";
- }
- if (count($fipb_array) > 1 ){
- $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'>
- <tr valign='bottom' height='50'>
- <td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>
- <h4>Davon noch frei verf&uuml;gbar:</h4></td></tr>";
- foreach ($fipb_array as $fipb){
- $exp = explode('_',$fipb);
- $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0]&nbsp;</td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1]&nbsp;</td></tr>";
- }
- }
- elseif (count($fipb_array) == 1){
- $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'>
- <tr><td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>
- <h4>Davon noch frei verf&uuml;gbar:</h4></td></tr>";
- $exp = explode('_',$fipb_array[0]);
- $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0]&nbsp;</td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1]&nbsp;</td></tr>";
- }
-
-}
-
-if( $mipb_array[0] == "" ){
- $ipblocks .= "<table border='0' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'>
- <tr><td><h4>Ihnen wurden keine IP Adressen zugewiesen</h4></td></tr>";
-}
-$ipblocks .= "</table>";
-
-$template->assign(array("IPBLOCKS" => $ipblocks));
-
-?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/dhcp/ipblocks.dwt b/ldap-site-mngmt/webinterface/dhcp/ipblocks.dwt
deleted file mode 100644
index b77f53b3..00000000
--- a/ldap-site-mngmt/webinterface/dhcp/ipblocks.dwt
+++ /dev/null
@@ -1,11 +0,0 @@
-<table cellpadding='5' cellspacing='0' border='1' width='100%' style='border-width: 0 0 0 0;'>
-
- <tr align='left'>
- <td width='8%'></td>
- <td width='82%' style='border-color: black; border-style: solid; border-width: 1 1 1 1;'>{IPBLOCKS}</td>
- <td width='10%'></td>
-
- </tr>
- <tr height='5'></tr>
-
-</table> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/dhcp/new_dhcpservice.php b/ldap-site-mngmt/webinterface/dhcp/new_dhcpservice.php
index 83aa9cb5..622bff20 100644
--- a/ldap-site-mngmt/webinterface/dhcp/new_dhcpservice.php
+++ b/ldap-site-mngmt/webinterface/dhcp/new_dhcpservice.php
@@ -1,19 +1,15 @@
<?php
+
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "DHCP Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 5;
-$mnr = 0;
-$sbmnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "new_dhcpservice.dwt";
-include("../class.FastTemplate.php");
-
include('dhcp_header.inc.php');
+$mnr = 0;
+$sbmnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
diff --git a/ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.php b/ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.php
index adf7720f..2d2835ec 100644
--- a/ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.php
+++ b/ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.php
@@ -1,19 +1,15 @@
<?php
+
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "DHCP Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 5;
-$mnr = 0;
-$sbmnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "new_dhcpsubnet.dwt";
-include("../class.FastTemplate.php");
-
include('dhcp_header.inc.php');
+$mnr = 0;
+$sbmnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
@@ -23,8 +19,6 @@ $sbmnr = $_GET['sbmnr'];
createMainMenu($rollen, $mainnr);
createDhcpMenu($rollen, $mnr, $auDN, $sbmnr);
-include("ip_blocks.inc.php");
-
###################################################################################
$subnetcn = str_replace ( "_", " ", $_GET['subnetcn']);
diff --git a/ldap-site-mngmt/webinterface/dhcp/no_dhcp.php b/ldap-site-mngmt/webinterface/dhcp/no_dhcp.php
index 2a09a6e7..06fd226e 100644
--- a/ldap-site-mngmt/webinterface/dhcp/no_dhcp.php
+++ b/ldap-site-mngmt/webinterface/dhcp/no_dhcp.php
@@ -1,27 +1,21 @@
<?php
+
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "DHCP Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 5;
-$mnr = 0;
-$sbmnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "no_dhcp.dwt";
-include("../class.FastTemplate.php");
-
include('dhcp_header.inc.php');
+$mnr = 0;
+$sbmnr = -1;
+
###################################################################################
# Menuleisten erstellen
createMainMenu($rollen, $mainnr);
createDhcpMenu($rollen, $mnr, $auDN, $sbmnr);
-include("ip_blocks.inc.php");
-
###################################################################################
include("dhcp_footer.inc.php");