summaryrefslogtreecommitdiffstats
path: root/ldap-site-mngmt
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
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')
-rwxr-xr-xldap-site-mngmt/webinterface/au/au.dwt15
-rw-r--r--ldap-site-mngmt/webinterface/au/au.php3
-rwxr-xr-xldap-site-mngmt/webinterface/au/au_childs.dwt19
-rw-r--r--ldap-site-mngmt/webinterface/au/au_childs.php7
-rw-r--r--ldap-site-mngmt/webinterface/au/au_footer.inc.php1
-rw-r--r--ldap-site-mngmt/webinterface/au/au_header.inc.php8
-rw-r--r--ldap-site-mngmt/webinterface/au/au_menu.php74
-rwxr-xr-xldap-site-mngmt/webinterface/au/au_show.dwt46
-rw-r--r--ldap-site-mngmt/webinterface/au/au_show.php4
-rwxr-xr-xldap-site-mngmt/webinterface/au/au_start.dwt7
-rwxr-xr-xldap-site-mngmt/webinterface/au/child_au.dwt87
-rw-r--r--ldap-site-mngmt/webinterface/au/child_au.php52
-rw-r--r--ldap-site-mngmt/webinterface/au/ip_deleg_change.php194
-rwxr-xr-xldap-site-mngmt/webinterface/au/menu.dwt2
-rwxr-xr-xldap-site-mngmt/webinterface/au/new_child.dwt48
-rw-r--r--ldap-site-mngmt/webinterface/au/new_child.php7
-rw-r--r--ldap-site-mngmt/webinterface/au/role_add.php53
-rw-r--r--ldap-site-mngmt/webinterface/au/role_delete.php57
-rw-r--r--ldap-site-mngmt/webinterface/au/role_show.dwt70
-rw-r--r--ldap-site-mngmt/webinterface/au/role_show.php114
-rw-r--r--ldap-site-mngmt/webinterface/au/roles.php24
-rw-r--r--ldap-site-mngmt/webinterface/au/roles_start.dwt41
-rw-r--r--ldap-site-mngmt/webinterface/common/ip_blocks.inc.php (renamed from ldap-site-mngmt/webinterface/dhcp/ip_blocks.inc.php)20
-rw-r--r--ldap-site-mngmt/webinterface/common/ipblocks.dwt (renamed from ldap-site-mngmt/webinterface/dhcp/ipblocks.dwt)0
-rw-r--r--ldap-site-mngmt/webinterface/computers/computers.dwt15
-rw-r--r--ldap-site-mngmt/webinterface/computers/computers.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/computers_footer.inc.php1
-rw-r--r--ldap-site-mngmt/webinterface/computers/computers_header.inc.php16
-rw-r--r--ldap-site-mngmt/webinterface/computers/computers_menu.php76
-rw-r--r--ldap-site-mngmt/webinterface/computers/dhcphost.php96
-rw-r--r--ldap-site-mngmt/webinterface/computers/group.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/groupoverview.php14
-rw-r--r--ldap-site-mngmt/webinterface/computers/host.dwt1
-rw-r--r--ldap-site-mngmt/webinterface/computers/host.php20
-rw-r--r--ldap-site-mngmt/webinterface/computers/host_change.php84
-rw-r--r--ldap-site-mngmt/webinterface/computers/hostoverview.dwt14
-rw-r--r--ldap-site-mngmt/webinterface/computers/hostoverview.php50
-rw-r--r--ldap-site-mngmt/webinterface/computers/hwhost.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/ip_rechner.dwt40
-rw-r--r--ldap-site-mngmt/webinterface/computers/ip_rechner.php69
-rw-r--r--ldap-site-mngmt/webinterface/computers/ip_rechner_change.php122
-rw-r--r--ldap-site-mngmt/webinterface/computers/machineconfig_default.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/mcdef.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/menuentry.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/new_group.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/new_host.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/new_mcdef.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/new_menuentry.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/new_pxe.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/no_ip.dwt11
-rw-r--r--ldap-site-mngmt/webinterface/computers/no_ip.php28
-rw-r--r--ldap-site-mngmt/webinterface/computers/pxe.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/pxe_globals.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/rbshost.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/showpxe.php16
-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/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
-rw-r--r--ldap-site-mngmt/webinterface/dns/dns.php11
-rw-r--r--ldap-site-mngmt/webinterface/dns/dns_header.inc.php14
-rw-r--r--ldap-site-mngmt/webinterface/home.dwt11
-rw-r--r--ldap-site-mngmt/webinterface/index.php3
-rw-r--r--ldap-site-mngmt/webinterface/ip/ip.php15
-rw-r--r--ldap-site-mngmt/webinterface/ip/ip_deleg.php2
-rw-r--r--ldap-site-mngmt/webinterface/ip/ip_deleg_change.php82
-rw-r--r--ldap-site-mngmt/webinterface/ip/ip_dhcp.php2
-rw-r--r--ldap-site-mngmt/webinterface/ip/ip_header.inc.php11
-rw-r--r--ldap-site-mngmt/webinterface/ip/ip_menu.php2
-rw-r--r--ldap-site-mngmt/webinterface/ip/ip_rechner.dwt19
-rw-r--r--ldap-site-mngmt/webinterface/ip/ip_rechner.php34
-rw-r--r--ldap-site-mngmt/webinterface/ip/ip_rechner_change.php3
-rw-r--r--ldap-site-mngmt/webinterface/ip/no_ip.php13
-rw-r--r--ldap-site-mngmt/webinterface/lib/au_management_functions.php244
-rw-r--r--ldap-site-mngmt/webinterface/lib/commonlib.inc.php20
-rw-r--r--ldap-site-mngmt/webinterface/lib/config.inc.php7
-rw-r--r--ldap-site-mngmt/webinterface/lib/host_management_functions.php8
-rw-r--r--ldap-site-mngmt/webinterface/lib/ip_management_functions.php376
-rw-r--r--ldap-site-mngmt/webinterface/lib/ldap.inc.php4
-rw-r--r--ldap-site-mngmt/webinterface/lib/syntax_check.php34
-rw-r--r--ldap-site-mngmt/webinterface/login_sicher.php9
-rw-r--r--ldap-site-mngmt/webinterface/rbs/gbm.php11
-rw-r--r--ldap-site-mngmt/webinterface/rbs/gbm_overview.php13
-rw-r--r--ldap-site-mngmt/webinterface/rbs/menuentry.php13
-rw-r--r--ldap-site-mngmt/webinterface/rbs/new_gbm.php11
-rw-r--r--ldap-site-mngmt/webinterface/rbs/new_menuentry.php13
-rw-r--r--ldap-site-mngmt/webinterface/rbs/new_pxe.php13
-rw-r--r--ldap-site-mngmt/webinterface/rbs/new_rbservice.php11
-rw-r--r--ldap-site-mngmt/webinterface/rbs/no_rbservice.php11
-rw-r--r--ldap-site-mngmt/webinterface/rbs/pxe.php13
-rw-r--r--ldap-site-mngmt/webinterface/rbs/pxeconfig_default.php13
-rw-r--r--ldap-site-mngmt/webinterface/rbs/rbs.php11
-rw-r--r--ldap-site-mngmt/webinterface/rbs/rbs_header.inc.php14
-rw-r--r--ldap-site-mngmt/webinterface/rbs/rbs_menu.php12
-rw-r--r--ldap-site-mngmt/webinterface/rbs/rbservice.php11
-rw-r--r--ldap-site-mngmt/webinterface/roles/role_add.php6
-rw-r--r--ldap-site-mngmt/webinterface/roles/role_delete.php8
-rw-r--r--ldap-site-mngmt/webinterface/roles/role_show.php25
-rw-r--r--ldap-site-mngmt/webinterface/roles/roles.php10
-rw-r--r--ldap-site-mngmt/webinterface/roles/roles_menu.php34
-rw-r--r--ldap-site-mngmt/webinterface/standard_header.inc.php1
-rw-r--r--ldap-site-mngmt/webinterface/start.php25
-rw-r--r--ldap-site-mngmt/webinterface/syntax_check.php36
113 files changed, 2379 insertions, 1274 deletions
diff --git a/ldap-site-mngmt/webinterface/au/au.dwt b/ldap-site-mngmt/webinterface/au/au.dwt
index 2156b7c0..0b2dbb60 100755
--- a/ldap-site-mngmt/webinterface/au/au.dwt
+++ b/ldap-site-mngmt/webinterface/au/au.dwt
@@ -53,11 +53,20 @@
<tr valign='top' height='100%'>
<td width='28%'>
<table cellpadding='5' cellspacing='0' border='0' width='100%'>
- <tr><td>
+ <tr>
+ <td>
- {NAVIGATION}
+ {NAVIGATION}
- </td></tr>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ {IPBLOCKS}
+
+ </td>
+ </tr>
</table>
</td>
diff --git a/ldap-site-mngmt/webinterface/au/au.php b/ldap-site-mngmt/webinterface/au/au.php
index ca732622..c66784b1 100644
--- a/ldap-site-mngmt/webinterface/au/au.php
+++ b/ldap-site-mngmt/webinterface/au/au.php
@@ -1,14 +1,12 @@
<?php
include('../standard_header.inc.php');
-include("../class.FastTemplate.php");
# Filename of Template
$webseite = "au_start.dwt";
include('au_header.inc.php');
-
###############################################################################
# Menus
@@ -20,7 +18,6 @@ $childauDN = $_GET['dn'];
createMainMenu($rollen, $mainnr);
createAUMenu($rollen, $mnr, $auDN, $sbmnr);
-
###############################################################################
# Footer
diff --git a/ldap-site-mngmt/webinterface/au/au_childs.dwt b/ldap-site-mngmt/webinterface/au/au_childs.dwt
index 92b28c2c..a9adbc83 100755
--- a/ldap-site-mngmt/webinterface/au/au_childs.dwt
+++ b/ldap-site-mngmt/webinterface/au/au_childs.dwt
@@ -1,6 +1,6 @@
<table border='0' cellpadding='5' cellspacing='0' width='100%'>
<tr>
- <td colspan='2'><h3>Untergeordnete AUs von - &nbsp;<i>{AU}</i>&nbsp; -</h3></td>
+ <td colspan='2'><h3>Untergeordnete AUs von - &nbsp;<code class='font_object'>{AU}</code></h3></td>
</tr>
<tr>
<td height='10'></td>
@@ -8,16 +8,16 @@
<tr><td>
<table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'>
<tr>
- <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Untergeordnete AU</b></td>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Domain</b></td>
+ <td width='55%' class='tab_h'><b>Untergeordnete AU</b></td>
+ <td width='45%' class='tab_h'><b>Domain</b></td>
</tr>
<!-- BEGIN DYNAMIC BLOCK: Childaus -->
<tr>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{CHILDOU} &nbsp;</td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{CHILDDOMAIN} &nbsp;</td>
+ <td class='tab_d'>{CHILDOU} &nbsp;</td>
+ <td class='tab_d'>{CHILDDOMAIN} &nbsp;</td>
</tr>
<!-- END DYNAMIC BLOCK: Childaus -->
@@ -34,4 +34,13 @@
</td>
</tr>
+ <tr>
+ <td height='40'></td>
+ </tr>
+ <tr>
+ <td colspan='2'><h4>Neue untergeordnete AU anlegen</h4> >>
+ <a href='new_child.php?sbmnr=0' style='color:#FFFFFF;' class='small_loginform_button'>&nbsp; zur Eingabemaske &nbsp;</a>
+ </td>
+ </tr>
+
</table> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/au/au_childs.php b/ldap-site-mngmt/webinterface/au/au_childs.php
index fe91a5c5..7aa5dcb3 100644
--- a/ldap-site-mngmt/webinterface/au/au_childs.php
+++ b/ldap-site-mngmt/webinterface/au/au_childs.php
@@ -1,14 +1,12 @@
<?php
include('../standard_header.inc.php');
-include("../class.FastTemplate.php");
# Filename of Template
$webseite = "au_childs.dwt";
include('au_header.inc.php');
-
###############################################################################
# Menus
@@ -18,7 +16,6 @@ $sbmnr = -1;
createMainMenu($rollen, $mainnr);
createAUMenu($rollen, $mnr, $auDN, $sbmnr);
-
###############################################################################
# Mainpage Data
@@ -33,7 +30,9 @@ $childau_array = get_childau($auDN,array("dn","cn","ou","associateddomain","desc
$template->define_dynamic("Childaus", "Webseite");
foreach ($childau_array as $childau){
- $template->assign(array("CHILDOU" => $childau['ou'],
+ $auname = "<a href='child_au.php?dn=".$childau['dn']."' class='headerlink'>".$childau['ou']."</a>";
+
+ $template->assign(array("CHILDOU" => $auname,
"CHILDCN" => $childau['cn'],
"CHILDDN" => $childau['dn'],
"CHILDDOMAIN" => $childau['associateddomain'],
diff --git a/ldap-site-mngmt/webinterface/au/au_footer.inc.php b/ldap-site-mngmt/webinterface/au/au_footer.inc.php
index 311721c5..7849823e 100644
--- a/ldap-site-mngmt/webinterface/au/au_footer.inc.php
+++ b/ldap-site-mngmt/webinterface/au/au_footer.inc.php
@@ -6,6 +6,7 @@ $template->assign(array("PFAD" => $START_PATH));
$template->parse("LOGIN", "Login");
$template->parse("MAINMENU", "Mmenu");
$template->parse("NAVIGATION", "Menu");
+$template->parse("IPBLOCKS", "IPBlocks");
$template->parse("HAUPTFENSTER", "Webseite");
$template->parse("PAGE", "Vorlage");
diff --git a/ldap-site-mngmt/webinterface/au/au_header.inc.php b/ldap-site-mngmt/webinterface/au/au_header.inc.php
index 3ba68fc9..40da6c72 100644
--- a/ldap-site-mngmt/webinterface/au/au_header.inc.php
+++ b/ldap-site-mngmt/webinterface/au/au_header.inc.php
@@ -1,8 +1,5 @@
<?php
-# standard header file for AU files
-
-include("au_menu.php");
# 1. Title
$titel = "Administrative Unit Management";
# 2. Mainmenu Number (starting with 0)
@@ -15,6 +12,7 @@ $definedTemplates = array("Vorlage" => "au.dwt",
"Login" => "../logout_form.inc.dwt",
"Mmenu" => "../hauptmenue.dwt",
"Menu" => "menu.dwt",
+ "IPBlocks" => "../common/ipblocks.dwt",
"Webseite" => $webseite);
if (isset($additionalTemplates)) {
@@ -30,4 +28,8 @@ $template->assign(array("SEITENTITEL" => $titel,
"DOMAIN" => $assocdom,
"USERCN" => $usercn));
+
+include("au_menu.php");
+include("../common/ip_blocks.inc.php");
+
?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/au/au_menu.php b/ldap-site-mngmt/webinterface/au/au_menu.php
index 3142c015..b9c7d8d6 100644
--- a/ldap-site-mngmt/webinterface/au/au_menu.php
+++ b/ldap-site-mngmt/webinterface/au/au_menu.php
@@ -10,29 +10,60 @@ function createAUMenu($rollen, $mnr, $auDN,$sbmnr) {
"zugriff" => "alle"),
array("link" => "au_show.php",
"text" => "Eigene AU",
- "zugriff" => array("MainAdmin")),
+ "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin")),
array("link" => "au_childs.php",
"text" => "Untergeordnete AUs",
"zugriff" => array("MainAdmin")),
- array("link" => "new_child.php",
- "text" => "Neue untergeordnete AU",
- "zugriff" => array("MainAdmin")));
+ array("link" => "roles.php",
+ "text" => "Admin Rollen Management",
+ "zugriff" => array("MainAdmin","DhcpAdmin")),
+ #array("link" => "new_child.php",
+ # "text" => "Neue untergeordnete AU",
+ # "zugriff" => array("MainAdmin"))
+ );
#echo "hauptmenu: ";print_r($hauptmenu);echo "<br><br>";
+
# Submenu
- $array = array();
- $childau_array = get_childau($auDN,array("dn","cn","ou"));
+ $childaus = array();
+ $n = 0;
+ #$childau_array = get_childau($auDN,array("dn","cn","ou"));
#echo "childau_array: ";print_r($childau_array);echo "<br><br>";
- if (count($childau_array)!= 0){
- for ($n=0;$n<count($childau_array);$n++) {
- $array[] = array("link" => "child_au.php?dn=".$childau_array[$n]['dn']."&sbmnr=".$n,
- "text" => $childau_array[$n]['ou'],
- "zugriff" => array("MainAdmin"));
- }
- }
+ #if (count($childau_array)!= 0){
+ # for ($n=0;$n<count($childau_array);$n++) {
+ # $childaus[] = array("link" => "child_au.php?dn=".$childau_array[$n]['dn']."&sbmnr=".$n,
+ # "text" => $childau_array[$n]['ou'],
+ # "zugriff" => array("MainAdmin"));
+ # }
+ # #$c=0+$n;
+ #}
+ #$c = $n;
+ $childaus[] = array("link" => "new_child.php?sbmnr=".$n,
+ "text" => "Neue untergeordnete AU",
+ "zugriff" => array("MainAdmin"));
+
+ $adminroles = array(array("link" => "role_show.php?role=MainAdmin&sbmnr=0",
+ "text" => "Main Admins",
+ "zugriff" => array("MainAdmin")),
+ array("link" => "role_show.php?role=DhcpAdmin&sbmnr=1",
+ "text" => "DHCP Admins",
+ "zugriff" => array("MainAdmin")),
+ array("link" => "role_show.php?role=HostAdmin&sbmnr=2",
+ "text" => "Host Admins",
+ "zugriff" => array("MainAdmin","DhcpAdmin")),
+ array("link" => "role_show.php?role=RbsAdmin&sbmnr=3",
+ "text" => "RBS Admins",
+ "zugriff" => array("MainAdmin","DhcpAdmin")),
+ #array("link" => "role_show.php?role=ZoneAdmin&mnr=4",
+ # "text" => "DNS Admins",
+ # "zugriff" => array("MainAdmin"))
+ );
+
+
$submenu = array(array(),
- array(),
- $array,
- array());
+ array(),
+ $childaus,
+ $adminroles
+ );
#echo "submenu: ";print_r($submenu);echo "<br><br>";
# Zusammenstellen der Menuleiste
$template->define_dynamic("Hauptmenu", "Menu");
@@ -45,6 +76,10 @@ function createAUMenu($rollen, $mnr, $auDN,$sbmnr) {
$template->clear_parse("SUBMENU_LIST");
#echo "item: "; print_r($item); echo "<br>";
if ($item['zugriff'] === "alle" || vergleicheArrays($rollen , $item['zugriff'])) {
+
+ #########################################################################
+ # SUBMENU
+
$subempty = 0;
$j=0;
$maxsub = count($submenu[$mnr]);
@@ -98,7 +133,7 @@ function createAUMenu($rollen, $mnr, $auDN,$sbmnr) {
<tr>
<td width='8%'>&nbsp;</td>
<td width='8%' align='right'><img src='../pics/".$zwisch.".gif'></td>
- <td width='74%' align='left' style='border-width:1 1 1 1;border-color:#000000;border-style:solid;padding:2;padding-left:30px;background-color:{FARBE_S}'>
+ <td width='74%' align='left' style='border-width:1 1 1 1;border-color:#000000;border-style:solid;padding:4;padding-left:25px;background-color:{FARBE_S}'>
<a href='".$item2['link']."' style='text-decoration:none'><b class='standard_schrift'>".$item2['text']."</b></a></td>
<td width='10%'>&nbsp;</td>
</tr>";
@@ -122,7 +157,10 @@ function createAUMenu($rollen, $mnr, $auDN,$sbmnr) {
$template->parse("SUBMENU_LIST", ".Submenu");
$template->clear_dynamic("Submenu");
}
-
+ # SUBMENU
+ #####################################################################
+
+
if ($i==0) {
if ($mnr==0) {
if (count($submenu[$i][0]) != 0) {
diff --git a/ldap-site-mngmt/webinterface/au/au_show.dwt b/ldap-site-mngmt/webinterface/au/au_show.dwt
index d48db3f9..f6bfe663 100755
--- a/ldap-site-mngmt/webinterface/au/au_show.dwt
+++ b/ldap-site-mngmt/webinterface/au/au_show.dwt
@@ -1,12 +1,12 @@
<table border='0' cellpadding='5' cellspacing='0' width='100%'>
<tr>
- <td colspan='2'><h3>Administrative Unit - &nbsp;<i>{AU}</i>&nbsp; -</h3></td>
+ <td colspan='2'><h3>Administrative Unit - &nbsp;<code class='font_object'>{AU}</code></h3></td>
</tr>
<tr>
<td height='10'></td>
</tr>
<tr>
- <td><h4>Im LDAP Verzeichnis gespeicherte Daten:</h4>
+ <td>
Sie k&ouml;nnen den Namen und die Beschreibung bearbeiten. Zur Verwaltung, der ihnen
zugeordneten IP Adressbereiche benutzen Sie bitte das Modul <b>IP Management</b>.<br>
Wollen Sie ihren DNS Domainnamen &auml;ndern so wenden Sie sich an den Haupt-Administrator
@@ -21,32 +21,32 @@
<form action='au_change.php' method='post'>
<tr height='45'>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td>
- <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td>
+ <td width='45%' class='tab_h'><b>Attribut</b></td>
+ <td width='55%' class='tab_h'><b>Wert</b></td>
</tr>
<tr height='45'>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Name: </b></td>
- <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <td width='45%' class='tab_d'><b>Name: </b></td>
+ <td width='55%' class='tab_d'>
<input type='Text' name='commonname' value='{CN}' size='40' class='medium_form_field'>
<input type='hidden' name='oldcn' value='{CN}'>
<input type='hidden' name='audn' value='{AUDN}'> &nbsp;
</td>
</tr>
<tr height='45'>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Bechreibung:</b></td>
- <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <td width='45%' class='tab_d'><b>Bechreibung:</b></td>
+ <td width='55%' class='tab_d'>
<input type='Text' name='description' value='{DSC}' size='40' class='medium_form_field'>
<input type='hidden' name='olddesc' value='{DSC}'>
<input type='hidden' name='audn' value='{AUDN}'> &nbsp;
</td>
</tr>
<tr height='45'>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>DNS Domain:</b></td>
- <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{DOMAIN} &nbsp;</td>
+ <td width='45%' class='tab_d'><b>DNS Domain:</b></td>
+ <td width='55%' class='tab_d'>{DOMAIN} &nbsp;</td>
</tr>
- <tr height='45'>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>IP Bereiche:</b></td>
- <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{MIPBS} &nbsp;</td>
+ <tr height='45' valign='top'>
+ <td width='45%' class='tab_d'><b>IP Bereiche:</b></td>
+ <td width='55%' class='tab_d'>{MIPBS} &nbsp;</td>
</tr>
</table></td>
@@ -55,6 +55,8 @@
<td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'>
</form></td>
</tr>
+
+ <!--
<tr>
<td height='40'></td>
</tr>
@@ -64,21 +66,23 @@
<tr><td>
<table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'>
<tr height='1'>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>&nbsp;</td>
- <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>&nbsp;</td>
+ <td width='45%' class='tab_h'>&nbsp;</td>
+ <td width='55%' class='tab_h'>&nbsp;</td>
</tr>
<tr height='45'>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Hauptadministratoren:</b></td>
- <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>...</td>
+ <td width='45%' class='tab_d'><b>Hauptadministratoren:</b></td>
+ <td width='55%' class='tab_d'>...</td>
</tr>
<tr height='45'>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Anzahl Rechner:</b></td>
- <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>...</td>
+ <td width='45%' class='tab_d'><b>Anzahl Rechner:</b></td>
+ <td width='55%' class='tab_d'>...</td>
</tr>
<tr height='45'>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>.... :</b></td>
- <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>...</td>
+ <td width='45%' class='tab_d'><b>.... :</b></td>
+ <td width='55%' class='tab_d'>...</td>
</tr>
</table></td>
</tr>
+ -->
+
</table> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/au/au_show.php b/ldap-site-mngmt/webinterface/au/au_show.php
index 2f29a1db..f29c1ef7 100644
--- a/ldap-site-mngmt/webinterface/au/au_show.php
+++ b/ldap-site-mngmt/webinterface/au/au_show.php
@@ -1,14 +1,11 @@
<?php
include('../standard_header.inc.php');
-include("../class.FastTemplate.php");
-
# Filename of Template
$webseite = "au_show.dwt";
include('au_header.inc.php');
-
###############################################################################
# Menus
@@ -18,7 +15,6 @@ $sbmnr = -1;
createMainMenu($rollen, $mainnr);
createAUMenu($rollen, $mnr, $auDN, $sbmnr);
-
###############################################################################
# MainpageData
diff --git a/ldap-site-mngmt/webinterface/au/au_start.dwt b/ldap-site-mngmt/webinterface/au/au_start.dwt
index 91ef90d4..aeee690f 100755
--- a/ldap-site-mngmt/webinterface/au/au_start.dwt
+++ b/ldap-site-mngmt/webinterface/au/au_start.dwt
@@ -18,11 +18,10 @@
</li>
<li><p><b>Untergeordnete AUs</b></p>
- Hier erhalten Sie eine &Uuml;bersicht Ihrer untergeordneten eigenst&auml;ndigen Administrativen
- Einheiten. Sie k&ouml;nnen diese bearbeiten und l&ouml;schen.
+ Hier erhalten Sie eine &Uuml;bersicht Ihrer untergeordneten eigenst&auml;ndigen Administrativen Einheiten. Sie k&ouml;nnen diese bearbeiten und l&ouml;schen. Hier k&ouml;nnen Sie auch neue untergeordnete AUs anlegen.
</li>
- <li><p><b>Neue untergeordnete AUs</b></p>
- Hier k&ouml;nnen Sie eine neue untergeordnete eigenst&auml;ndigen AU anlegen.
+ <li><p><b>Admin Rollen Management</b></p>
+ Hier k&ouml;nnen Sie den Administratoren Rollen ihrer AU Benutzer zuweisen.
</li>
</ul>
diff --git a/ldap-site-mngmt/webinterface/au/child_au.dwt b/ldap-site-mngmt/webinterface/au/child_au.dwt
index 0f5a2964..561d0b09 100755
--- a/ldap-site-mngmt/webinterface/au/child_au.dwt
+++ b/ldap-site-mngmt/webinterface/au/child_au.dwt
@@ -1,15 +1,14 @@
<table border='0' cellpadding='5' cellspacing='0' width='100%'>
+
+ <tr>
+ <td colspan='4' height='20'><h4><a href='au_childs.php?' class='headerlink'><< Zur&uuml;ck zur &Uuml;bersicht </a></h4></td>
+ </tr>
+
<tr>
- <td colspan='2'><h3>AU &nbsp;- &nbsp;<i>{CHILDCN}</i>&nbsp; - &nbsp;verwalten:</h3></td>
- </tr>
- <tr>
- <td height='20'></td>
- </tr>
- <tr>
- <td colspan='2'><h4>Daten bearbeiten:</h4></td>
+ <td colspan='2'><h3>AU &nbsp;- &nbsp;<code class='font_object'>{CHILDCN}</code>&nbsp; &nbsp;verwalten:</h3></td>
</tr>
<tr>
- <td height='5'></td>
+ <td height='10'></td>
</tr>
<tr><td>
<table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'>
@@ -17,36 +16,32 @@
<form action='childau_change.php' method='post'>
<tr>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td>
- <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td>
+ <td width='45%' class='tab_h'><b>Attribut</b></td>
+ <td width='55%' class='tab_h'><b>Wert</b></td>
</tr>
<tr height='50'>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger Name (ou):</b><br>(Teil des dn, ohne Leerzeichen eingeben) &nbsp;</td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <td class='tab_d'><b>Eindeutiger Name (ou):</b><br>(Teil des dn, ohne Leerzeichen eingeben) &nbsp;</td>
+ <td class='tab_d'>
<input type='Text' name='childou' value='{CHILDOU}' size='40' class='medium_form_field'>
<input type='hidden' name='oldchildou' value='{CHILDOU}'> &nbsp;
</td>
</tr>
<tr height='50'>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Name der Abteilung (cn): </b>&nbsp;</td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <td class='tab_d'><b>Name der Abteilung (cn): </b>&nbsp;</td>
+ <td class='tab_d'>
<input type='Text' name='childcn' value='{CHILDCN}' size='40' class='medium_form_field'>
<input type='hidden' name='oldchildcn' value='{CHILDCN}'> &nbsp;
</td>
</tr>
<tr height='50'>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>DNS Domain :</b> &nbsp;</td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <td class='tab_d'><b>DNS Domain :</b> &nbsp;</td>
+ <td class='tab_d'>
<input type='Text' name='childdomain' value='{CHILDDOMAIN}' size='25' class='medium_form_field'>
<input type='hidden' name='oldchilddomain' value='{CHILDDOMAIN}'>
<b><font size="+1">.uni-freiburg.de</font></b>
</td>
</tr>
- <tr height='50'>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Delegierte IP Bereiche:</b></td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{MIPBS} &nbsp;</td>
- </tr>
<input type='hidden' name='childdn' value='{CHILDDN}'>
<input type='hidden' name='submenu' value='{SBMNR}'>
@@ -58,15 +53,49 @@
</form></td>
</tr>
+
<tr>
- <td height='40'></td>
+ <td height='20'></td>
</tr>
- <tr>
- <td colspan='2'><h4>Untergeordnete AU - &nbsp;<i>{CHILDCN}</i>&nbsp; - l&ouml;schen:</h4></td>
+ <tr><td>
+ <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'>
+
+ <form action='ip_deleg_change.php' method='post'>
+ <tr>
+ <td class='tab_h'><b>Delegierte IP Bereiche</b></td>
+ </tr>
+ <tr>
+ <td class='tab_d'>
+
+ <!-- BEGIN DYNAMIC BLOCK: Delegs -->
+
+ <input type='Text' name='range1[]' value='{RANGE1}' size='15' class='medium_form_field'>
+ &nbsp;&nbsp;- &nbsp;&nbsp;
+ <input type='Text' name='range2[]' value='{RANGE2}' size='15' class='medium_form_field'><br>
+ <input type='hidden' name='oldrange1[]' value='{RANGE1}'>
+ <input type='hidden' name='oldrange2[]' value='{RANGE2}'>
+
+ <!-- END DYNAMIC BLOCK: Delegs -->
+
+ <input type='hidden' name='childdn' value='{CHILDDN}'>
+ <input type='hidden' name='submenu' value='{SBMNR}'>
+
+ </td>
+ </tr>
+ </table></td>
</tr>
<tr>
- <td height='5'></td>
+ <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'>
+ </form></td>
+ </tr>
+
+ <tr>
+ <td height='40'></td>
+ </tr>
+
+ <tr>
+ <td colspan='2'><h4>Untergeordnete AU &nbsp;<code class='font_object'>{CHILDCN}</code>&nbsp; l&ouml;schen:</h4></td>
</tr>
<tr>
<td>
@@ -74,20 +103,20 @@
<form action='childau_delete.php' method='post'>
<tr>
- <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>W&auml;hlen Sie einen Modus:<br></td>
+ <td colspan='2' class='tab_h'>W&auml;hlen Sie einen Modus:<br></td>
</tr>
<tr>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <td class='tab_d'>
<input type='radio' name='delmodus' value='integrate' checked></td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <td class='tab_d'>
Nur die untergeordnete AU l&ouml;schen (nur eine Ebene). <br>
Rechner und DHCP Objekte werden aus dieser in eigene AU integrieren</td>
</tr>
<tr>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <td class='tab_d'>
<input type='radio' name='delmodus' value='complete'></td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <td class='tab_d'>
Komplett l&ouml;schen: untergeordnete AU und alle darunter angelegten AUs</td>
</tr>
<input type='hidden' name='childdn' value='{CHILDDN}'>
diff --git a/ldap-site-mngmt/webinterface/au/child_au.php b/ldap-site-mngmt/webinterface/au/child_au.php
index bd8f1ebc..665f1da2 100644
--- a/ldap-site-mngmt/webinterface/au/child_au.php
+++ b/ldap-site-mngmt/webinterface/au/child_au.php
@@ -1,26 +1,23 @@
<?php
include('../standard_header.inc.php');
-include("../class.FastTemplate.php");
# Filename of Template
$webseite = "child_au.dwt";
include('au_header.inc.php');
-
###############################################################################
# Menus
$mnr = 2;
$sbmnr = -1;
-$sbmnr = $_GET['sbmnr'];
+#$sbmnr = $_GET['sbmnr'];
createMainMenu($rollen, $mainnr);
createAUMenu($rollen, $mnr, $auDN, $sbmnr);
-
###############################################################################
# MainPage Data
@@ -33,33 +30,40 @@ $domprefix = str_replace('.uni-freiburg.de','',$childau[0]['associateddomain']);
#print_r($domprefix);
$template->assign(array("CHILDOU" => $childau[0]['ou'],
- "CHILDCN" => $childau[0]['cn'],
- "CHILDDN" => $childauDN,
- "CHILDDOMAIN" => $domprefix,
- "CHILDDESC" => $childau[0]['description'],
- "AUDN" => $auDN,
- "SBMNR" => $sbmnr));
+ "CHILDCN" => $childau[0]['cn'],
+ "CHILDDN" => $childauDN,
+ "CHILDDOMAIN" => $domprefix,
+ "CHILDDESC" => $childau[0]['description'],
+ "RANGE1" => "",
+ "RANGE2" => "",
+ "AUDN" => $auDN,
+ "SBMNR" => $sbmnr));
# MaxIPBlocks
$mipb = $childau[0]['maxipblock'];
-$mipbs = "";
+
+# IP Delegs
+$template->define_dynamic("Delegs", "Webseite");
+#print_r($mipb);
if (count($mipb) > 1){
- for ($i=0; $i < count($mipb) - 1; $i++){
- $exp = explode('_',$mipb[$i]);
- $mipbs .= "$exp[0]&nbsp; - &nbsp;$exp[1]<br>";
+ foreach ($mipb as $block){
+ $exp = explode('_',$block);
+ $template->assign(array("RANGE1" => $exp[0],
+ "RANGE2" => $exp[1]));
+ $template->parse("DELEGS_LIST", ".Delegs");
}
- $exp = explode('_',$mipb[$i]);
- $mipbs .= "$exp[0]&nbsp; - &nbsp;$exp[1]";
- $template->assign(array("MIPBS" => $mipbs));
-}
-elseif(count($mipb) == 1){
+ $template->clear_dynamic("Delegs");
+}elseif(count($mipb) == 1){
$exp = explode('_',$mipb);
- $mipbs .= "$exp[0]&nbsp; - &nbsp;$exp[1]";
- $template->assign(array("MIPBS" => $mipbs));
-}
-else{
- $template->assign(array("MIPBS" => $mipbs));
+ $template->assign(array("RANGE1" => $exp[0],
+ "RANGE2" => $exp[1]));
+ $template->parse("DELEGS_LIST", ".Delegs");
+ $template->clear_dynamic("Delegs");
}
+$template->assign(array("RANGE1" => "",
+ "RANGE2" => ""));
+$template->parse("DELEGS_LIST", ".Delegs");
+#$template->clear_dynamic("Delegs");
###############################################################################
diff --git a/ldap-site-mngmt/webinterface/au/ip_deleg_change.php b/ldap-site-mngmt/webinterface/au/ip_deleg_change.php
new file mode 100644
index 00000000..19131837
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/au/ip_deleg_change.php
@@ -0,0 +1,194 @@
+<?php
+
+include('../standard_header.inc.php');
+
+#$auDN = $_POST['audn'];
+$childauDN = $_POST['childdn'];
+$oldrange1 = $_POST['oldrange1'];
+$oldrange2 = $_POST['oldrange2'];
+$newrange1 = $_POST['range1'];
+$newrange2 = $_POST['range2'];
+
+/*
+print_r($oldrange1);echo "<br>";
+print_r($newrange1);echo "<br><br>";
+print_r($oldrange2);echo "<br>";
+print_r($newrange2);echo "<br>";
+print_r($childauDN);echo "<br>";
+print_r($auDN);echo "<br><br>";
+*/
+
+$syntax = new Syntaxcheck;
+$url = "child_au.php?dn=".$childauDN."&sbmnr=".$sbmnr;
+$seconds = 200;
+
+echo "
+<html>
+<head>
+ <title>IP Address Management</title>
+ <link rel='stylesheet' href='../styles.css' type='text/css'>
+</head>
+<body>
+<table border='0' cellpadding='30' cellspacing='0'>
+<tr><td>";
+
+
+$diff1 = array_keys(array_diff_assoc($oldrange1,$newrange1));
+$diff2 = array_keys(array_diff_assoc($newrange1,$oldrange1));
+$tochange1 = array_unique(array_merge($diff1,$diff2));
+
+$diff3 = array_keys(array_diff_assoc($oldrange2,$newrange2));
+$diff4 = array_keys(array_diff_assoc($newrange2,$oldrange2));
+$tochange2 = array_unique(array_merge($diff3,$diff4));
+
+# print_r($tochange1);echo "<br><br>";
+# print_r($tochange2);echo "<br><br>";
+
+$tochange = array_unique(array_merge($tochange1,$tochange2));
+#print_r($tochange);echo "<br><br>";
+
+
+foreach ($tochange as $i){
+
+ $childaudnexp = ldap_explode_dn($childauDN, 1);
+ $childau = $childaudnexp[0];
+ #print_r($childau);
+
+ if ( $oldrange1[$i] == "" && $oldrange2[$i] == "" && $newrange1[$i] != "" && $newrange2[$i] != "" ){
+
+ echo "Neuen IP Bereich an <b>$childau</b> delegieren:";echo "<br>";echo "<br>";
+ echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>";
+
+ if ($syntax->check_ip_syntax($newrange1[$i]) && $syntax->check_ip_syntax($newrange2[$i])){
+ #echo "korrekte IP Syntax<br>";
+ $newrange1[$i] = htmlentities($newrange1[$i]);
+ $newrange2[$i] = htmlentities($newrange2[$i]);
+ $newrange_array = array($newrange1[$i],$newrange2[$i]);
+ #print_r($newrange_array);
+ $newrange = implode('_',$newrange_array);
+ #print_r($newrange);
+ # $oldip[$i] = htmlentities($oldip[$i]);
+ if (new_ip_delegation($newrange,$childauDN,$auDN)){
+ echo "<br>Neuer IP Bereich erfolgreich delegiert<br>";
+ }else{echo "<br>Fehler beim delegieren des neuen IP Bereichs<br>";}
+ }else{echo "falsche IP Syntax<br>";}
+
+ $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
+ Falls nicht, klicken Sie hier <a href=$url style='publink'>back</a>";
+ redirect($seconds, $url, $mesg, $addSessionId = TRUE);
+ }
+
+ elseif ( $oldrange1[$i] != "" && $oldrange2[$i] != "" && $newrange1[$i] == "" && $newrange2[$i] == "" ){
+
+ echo "IP Delegierung von <b>$childau</b> l&ouml;schen:";echo "<br>";echo "<br>";
+ echo "zu l&ouml;schende IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>";
+
+ $oldrange1[$i] = htmlentities($oldrange1[$i]);
+ $oldrange2[$i] = htmlentities($oldrange2[$i]);
+ $oldip_array = array($oldrange1[$i],$oldrange2[$i]);
+ $oldrange = implode('_',$oldip_array);
+ if (delete_ip_delegation($oldrange,$childauDN,$auDN)){
+ $mesg = "<br>IP Delegierung geloescht<br>";
+ }else{
+ $mesg = "<br>Fehler beim loeschen der IP Delegierung<br>";
+ }
+
+ $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
+ Falls nicht, klicken Sie hier <a href=$url style='publink'>back</a>";
+ redirect($seconds, $url, $mesg, $addSessionId = TRUE);
+ }
+
+ elseif ( $oldrange1[$i] != "" && $oldrange2[$i] != "" && $newrange1[$i] != "" && $newrange2[$i] != "" ){
+ $or1 = ip2long($oldrange1[$i]);
+ $or2 = ip2long($oldrange2[$i]);
+ $nr1 = ip2long($newrange1[$i]);
+ $nr2 = ip2long($newrange2[$i]);
+
+ if ( ($nr1 > $or1 || $nr2 < $or2) && !($nr1 < $or1 || $nr2 > $or2) ){
+
+ echo "IP Delegierung von <b>$childau</b> reduzieren:";echo "<br>";echo "<br>";
+ echo "alte IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>";
+ echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>";
+
+ if ($syntax->check_ip_syntax($newrange1[$i]) && $syntax->check_ip_syntax($newrange2[$i])){
+ #echo "korrekte IP Syntax<br>";
+
+ $newrange1[$i] = htmlentities($newrange1[$i]);
+ $newrange2[$i] = htmlentities($newrange2[$i]);
+ $newrange_array = array($newrange1[$i],$newrange2[$i]);
+ $newrange = implode('_',$newrange_array);
+ #print_r($newrange);
+
+ $oldrange1[$i] = htmlentities($oldrange1[$i]);
+ $oldrange2[$i] = htmlentities($oldrange2[$i]);
+ $oldip_array = array($oldrange1[$i],$oldrange2[$i]);
+ $oldrange = implode('_',$oldip_array);
+ #print_r($oldrange);
+
+ if (reduce_ip_delegation($oldrange,$newrange,$childauDN,$auDN)){
+ $mesg = "<br>IP Range verkleinert<br>";
+ }else{
+ $mesg = "<br>Fehler beim verkleinern der IP Range<br>";
+ }
+ }else{echo "falsche IP Syntax<br>";}
+
+ $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
+ Falls nicht, klicken Sie hier <a href=$url style='publink'>back</a>";
+ redirect($seconds, $url, $mesg, $addSessionId = TRUE);
+
+
+ }elseif( ($nr1 < $or1 || $nr2 > $or2) && !($nr1 > $or1 || $nr2 < $or2) ){
+
+ echo "IP Delegierung von <b>$childau</b> erweitern:";echo "<br>";echo "<br>";
+ echo "alte IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>";
+ echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>";
+
+ if ($syntax->check_ip_syntax($newrange1[$i]) && $syntax->check_ip_syntax($newrange2[$i])){
+ #echo "korrekte IP Syntax<br>";
+ $newrange1[$i] = htmlentities($newrange1[$i]);
+ $newrange2[$i] = htmlentities($newrange2[$i]);
+ $newrange_array = array($newrange1[$i],$newrange2[$i]);
+ $newrange = implode('_',$newrange_array);
+ #print_r($newrange);
+
+ $oldrange1[$i] = htmlentities($oldrange1[$i]);
+ $oldrange2[$i] = htmlentities($oldrange2[$i]);
+ $oldip_array = array($oldrange1[$i],$oldrange2[$i]);
+ $oldrange = implode('_',$oldip_array);
+ #print_r($oldrange);
+
+ if (expand_ip_delegation($oldrange,$newrange,$childauDN,$auDN)){
+ $mesg = "<br>IP Range erweitert<br>";
+ }else{
+ $mesg = "<br>Fehler beim erweitern der IP Range<br>";
+ }
+ }else{
+ echo "falsche IP Syntax<br>";
+ }
+ $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
+ Falls nicht, klicken Sie hier <a href=$url style='publink'>back</a>";
+ redirect($seconds, $url, $mesg, $addSessionId = TRUE);
+ }
+ else{
+ $mesg = "<br>Verschieben (Shiften) der Delegierung nicht moeglich!<br>
+ Nur Vergroessern und Verkleinern moeglich!<br>";
+ $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
+ Falls nicht, klicken Sie hier <a href=$url style='publink'>back</a>";
+ redirect($seconds, $url, $mesg, $addSessionId = TRUE);
+ }
+ }
+ else{
+ $mesg = "keine Aenderung<br>";
+ $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
+ Falls nicht, klicken Sie hier <a href=$url style='publink'>back</a>";
+ redirect($seconds, $url, $mesg, $addSessionId = TRUE);
+ }
+
+ echo "<br><br>";
+}
+
+echo "
+</td></tr></table>
+</head>
+</html>";
+?>
diff --git a/ldap-site-mngmt/webinterface/au/menu.dwt b/ldap-site-mngmt/webinterface/au/menu.dwt
index b130ebfa..9220c3b3 100755
--- a/ldap-site-mngmt/webinterface/au/menu.dwt
+++ b/ldap-site-mngmt/webinterface/au/menu.dwt
@@ -19,7 +19,7 @@
<!-- END DYNAMIC BLOCK: Submenu -->
- <tr height='5'>
+ <tr height='4'>
</tr>
<!-- END DYNAMIC BLOCK: Hauptmenu -->
diff --git a/ldap-site-mngmt/webinterface/au/new_child.dwt b/ldap-site-mngmt/webinterface/au/new_child.dwt
index 23c93de1..309737cc 100755
--- a/ldap-site-mngmt/webinterface/au/new_child.dwt
+++ b/ldap-site-mngmt/webinterface/au/new_child.dwt
@@ -1,10 +1,10 @@
<table border='0' cellpadding='5' cellspacing='0' width='100%'>
- <tr>
- <td colspan='2'><h3>Neue untergeordnete AU anlegen:</h3></td>
- </tr>
- <tr>
- <td height='20'></td>
- </tr>
+ <tr>
+ <td colspan='2'><h3>Neue untergeordnete AU anlegen:</h3></td>
+ </tr>
+ <tr>
+ <td height='20'></td>
+ </tr>
<tr>
<td colspan='2'><h4>Notwendige Attribute (m&uuml;ssen angegeben werden):</h3></td>
</tr>
@@ -15,20 +15,20 @@
<form action='childau_add.php' method='post'>
<tr>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td>
- <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td>
+ <td width='45%' class='tab_h'><b>Attribut</b></td>
+ <td width='55%' class='tab_h'><b>Wert</b></td>
</tr>
<tr height='50'>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger Name (ou):</b><br>(Teil des dn, ohne Leerzeichen eingeben) &nbsp;</td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <td class='tab_d'><b>Eindeutiger Name (ou):</b><br>(Teil des dn, ohne Leerzeichen eingeben) &nbsp;</td>
+ <td class='tab_d'>
<input type='Text' name='childou' value='{CHILDOU}' size='40' class='medium_form_field'> &nbsp;
</td>
</tr>
<tr height='50'>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>MainAdmin neue AU:</b><br>(W&auml;hlen Sie einen Benutzer aus)</td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <td class='tab_d'><b>MainAdmin neue AU:</b><br>(W&auml;hlen Sie einen Benutzer aus)</td>
+ <td class='tab_d'>
<select name='adduser' size='1' class='medium_form_selectbox'>
<option selected value='none'>----------</option>
@@ -52,26 +52,26 @@
<table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'>
<tr>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td>
- <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td>
+ <td width='45%' class='tab_h'><b>Attribut</b></td>
+ <td width='55%' class='tab_h'><b>Wert</b></td>
</tr>
<tr height='50'>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Name der Abteilung (cn): </b>&nbsp;</td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <td class='tab_d'><b>Name der Abteilung (cn): </b>&nbsp;</td>
+ <td class='tab_d'>
<input type='Text' name='childcn' value='{CHILDCN}' size='40' class='medium_form_field'>
</td>
</tr>
<tr height='50'>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>DNS Domain :</b> &nbsp;</td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <td class='tab_d'><b>DNS Domain :</b> &nbsp;</td>
+ <td class='tab_d'>
<input type='Text' name='childdomain' value='{CHILDDOMAIN}' size='24' class='medium_form_field'>
<b><font size="+1">.uni-freiburg.de</font></b>&nbsp;
</td>
</tr>
<tr height='50'>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Beschreibung der AU:</b> &nbsp;</td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <td class='tab_d'><b>Beschreibung der AU:</b> &nbsp;</td>
+ <td class='tab_d'>
<input type='Text' name='childdesc' value='{CHILDDESC}' size='40' class='medium_form_field'>
</td>
@@ -91,14 +91,14 @@
<table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'>
<tr>
- <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Objekt</b></td>
- <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Auswahl</b></td>
+ <td width='45%' class='tab_h'><b>Objekt</b></td>
+ <td width='55%' class='tab_h'><b>Auswahl</b></td>
</tr>
<tr height='50'>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Rechner:</b><br>
+ <td class='tab_d'><b>Rechner:</b><br>
(W&auml;hlen Sie die zu verschiebenden Rechner aus, <br>Mehrfachauswahl m&ouml;glich)</td>
- <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <td class='tab_d'>
<select name='addhost[]' size='{HOSTNUMBER}' class='medium_form_selectbox' multiple>
<option selected value='none'>----------</option>
diff --git a/ldap-site-mngmt/webinterface/au/new_child.php b/ldap-site-mngmt/webinterface/au/new_child.php
index 4f8839b4..f083050d 100644
--- a/ldap-site-mngmt/webinterface/au/new_child.php
+++ b/ldap-site-mngmt/webinterface/au/new_child.php
@@ -1,24 +1,23 @@
<?php
include('../standard_header.inc.php');
-include("../class.FastTemplate.php");
# Filename of Template
$webseite = "new_child.dwt";
include('au_header.inc.php');
-
###############################################################################
# Menus
-$mnr = 3;
+$mnr = 2;
$sbmnr = -1;
+$sbmnr = $_GET['sbmnr'];
+
createMainMenu($rollen, $mainnr);
createAUMenu($rollen, $mnr, $auDN, $sbmnr);
-
################################################################################
# Mainpage Data
diff --git a/ldap-site-mngmt/webinterface/au/role_add.php b/ldap-site-mngmt/webinterface/au/role_add.php
new file mode 100644
index 00000000..c1729ed1
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/au/role_add.php
@@ -0,0 +1,53 @@
+<?php
+
+include('../standard_header.inc.php');
+
+
+$adduser = $_POST['adduser'];
+$role = $_POST['role'];
+$menr = $_POST['menr'];
+
+$exp = explode('_',$adduser);
+$adduserDN = $exp[0];
+$adduserUID = $exp[1];
+
+echo "
+<html>
+<head>
+ <title>Administrative Unit Management</title>
+ <link rel='stylesheet' href='../styles.css' type='text/css'>
+</head>
+<body>
+<table border='0' cellpadding='30' cellspacing='0'>
+<tr><td>";
+
+# print_r($adduser);echo "<br>";
+# print_r($adduserDN);echo "<br>";
+# print_r($adduserUID);echo "<br>";
+# print_r($role);echo "<br>";
+# print_r($menr);echo "<br><br>";
+
+$url = 'role_show.php?role='.$role.'&sbmnr='.$menr;
+
+if ($adduser != 'none'){
+ $res = new_role_member($adduserDN,$role,$auDN,$domDN);
+ if ($res == 1){
+ $mesg = "Der Benutzer <b>".$adduserUID."</b> wurde erfolgreich als neuer <b>".$role."</b> aufgenommen.<br><br>";
+ }else{
+ $mesg = "Fehler! Der Benutzer <b>".$adduserUID."</b> konnte nicht aufgenommen werden<br><br>";
+ }
+ $mesg .= "Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
+ Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a>";
+ redirect(3, $url, $mesg, $addSessionId = TRUE);
+}
+
+else {
+ $mesg = "Sie haben keinen Benutzer ausgew&auml;hlt<br><br>
+ Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
+ Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a>";
+ redirect(3, $url, $mesg, $addSessionId = TRUE);
+}
+
+echo "</td></tr></table></body>
+</html>";
+?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/au/role_delete.php b/ldap-site-mngmt/webinterface/au/role_delete.php
new file mode 100644
index 00000000..eccd4ce4
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/au/role_delete.php
@@ -0,0 +1,57 @@
+<?php
+
+include('../standard_header.inc.php');
+
+
+$deluser = $_POST['deluser'];
+$role = $_POST['role'];
+$menr = $_POST['menr'];
+
+echo "
+<html>
+<head>
+ <title>Administrative Unit Management</title>
+ <link rel='stylesheet' href='../styles.css' type='text/css'>
+</head>
+<body>
+<table border='0' cellpadding='30' cellspacing='0'>
+<tr><td>";
+
+if (isset($_POST['deluser'])){
+
+ # print_r($deluser);echo "<br>";
+ # print_r($role);echo "<br>";
+ # print_r($menr);echo "<br>";
+
+ $url = 'role_show.php?role='.$role.'&sbmnr='.$menr;
+ $mesg = "";
+
+ foreach ($deluser as $item){
+ $exp = explode('_',$item);
+ $deluserDN = $exp[0];
+ $deluserUID = $exp[1];
+ # print_r($deluserDN);echo "<br>";
+ # print_r($deluserUID);echo "<br>";
+ $res = delete_role_member($deluserDN,$role,$auDN,$domDN);
+ if ($res == 1){
+ $mesg .= "Der Benutzer <b>".$deluserUID."</b> wurde erfolgreich aus der Rolle <b>".$role."</b> entfernt.<br>";
+ }else{
+ $mesg .= "<br><b>Fehler!</b> Der Benutzer <b>".$deluserUID."</b> konnte nicht entfernt werden<br>";
+ }
+ }
+ $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
+ Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a><br><br>";
+ redirect(3, $url, $mesg, $addSessionId = TRUE);
+
+}
+
+else {
+ $mesg .= "<br>Sie haben keinen Benutzer ausgew&auml;hlt<br><br>
+ Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
+ Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a>";
+ redirect(3, $url, $mesg, $addSessionId = TRUE);
+}
+
+echo "</td></tr></table></body>
+</html>";
+?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/au/role_show.dwt b/ldap-site-mngmt/webinterface/au/role_show.dwt
new file mode 100644
index 00000000..39c618c0
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/au/role_show.dwt
@@ -0,0 +1,70 @@
+<table border='0' cellpadding='5' cellspacing='0' width='100%'>
+ <tr>
+ <td colspan='2'><h3>{ROLE_DESC}</h3></td></tr><tr><td height='20'></td>
+ </tr>
+ <tr><td>
+ <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'>
+ <tr>
+ <td width='5%' class='tab_h'>&nbsp;</td>
+ <td width='25%' class='tab_h'><b>Benutzer</b></td>
+ <td width='25%' class='tab_h'><b>UID</b></td>
+ <td width='45%' class='tab_h'><b>Email</b></td>
+ </tr>
+
+ <form action='role_delete.php' method='post'>
+
+ <!-- BEGIN DYNAMIC BLOCK: Members -->
+ <tr>
+ <td class='tab_d'>
+ <input type='checkbox' name='deluser[]' value='{VALUE}_{UID}' size='15' class='medium_form_checkbox'></td>
+ <td class='tab_d'>{USERNAME} &nbsp;</td>
+ <td class='tab_d'>{UID} &nbsp;</td>
+ <td class='tab_d'><a href'mailto:{MAIL}' style='publink'>{MAIL}</a> &nbsp;</td>
+ </tr>
+ <!-- END DYNAMIC BLOCK: Members -->
+ <input type='hidden' name='role' value='{ROLE}'>
+ <input type='hidden' name='menr' value='{MENR}'>
+
+
+ <tr>
+ <td colspan='3' style='border-width: 0 0 0 0;'><input type='Submit' name='delete' value='entfernen' class='small_loginform_button'></td>
+
+ </form>
+ </tr>
+ </table></td>
+ </tr>
+
+ <tr height='30'></tr>
+ <tr>
+ <td colspan='2'><h4>Neuen Administrator anlegen:</h4></td>
+ </tr>
+ <tr><td height='10'></td></tr>
+ <tr><td>
+ <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'>
+ <tr>
+
+ <form action='role_add.php' method='post'>
+
+ <td width='60%' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'>
+ W&auml;hlen Sie einen Benutzer aus <br>
+ <select name='adduser' size='1' class='medium_form_selectbox'>
+ <option selected value='none'>----------</option>
+
+ <!-- BEGIN DYNAMIC BLOCK: Users -->
+ <option value='{UDN}_{USER}'>{USER}</option>
+ <!-- END DYNAMIC BLOCK: Users -->
+
+ </select>
+ <input type='hidden' name='role' value='{ROLE}'>
+ <input type='hidden' name='menr' value='{MENR}'>
+ </td>
+ </tr>
+ <tr>
+ <td style='border-width: 0 0 0 0;'><input type='Submit' name='add' value='anlegen' class='small_loginform_button'></td>
+
+ </form>
+ </tr>
+ </table></td>
+ </tr>
+
+</table> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/au/role_show.php b/ldap-site-mngmt/webinterface/au/role_show.php
new file mode 100644
index 00000000..8e94d7ed
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/au/role_show.php
@@ -0,0 +1,114 @@
+<?php
+include('../standard_header.inc.php');
+
+# Dateiname und evtl. Pfad des Templates für die Webseite
+$webseite = "role_show.dwt";
+
+include("au_header.inc.php");
+
+###############################################################################
+
+#$mnr = $_GET['mnr'];
+$mnr = 3;
+
+$sbmnr = $_GET['sbmnr'];
+
+# Menuleiste erstellen
+createMainMenu($rollen, $mainnr);
+createAUMenu($rollen, $mnr, $auDN, $sbmnr);
+
+###############################################################################
+# Admins anzeigen und loeschen
+
+$role = $_GET['role'];
+$roles_array = get_roles($auDN);
+# print_r($roles_array);
+
+# jeder Rolle entsprechend Members holen und Ãœberschrift setzen
+switch ($role){
+case 'MainAdmin':
+ $template->assign(array("ROLE" => "MainAdmin","ROLE_DESC" => "Haupt Administratoren","MENR" => $sbmnr));
+ $members = $roles_array['MainAdmin'];
+ break;
+case 'HostAdmin':
+ $template->assign(array("ROLE" => "HostAdmin","ROLE_DESC" => "Administratoren &nbsp;- &nbsp;Rechner","MENR" => $sbmnr));
+ $members = $roles_array['HostAdmin'];
+ break;
+case 'DhcpAdmin':
+ $template->assign(array("ROLE" => "DhcpAdmin","ROLE_DESC" => "Administratoren &nbsp;- &nbsp;DHCP","MENR" => $sbmnr));
+ $members = $roles_array['DhcpAdmin'];
+ break;
+case 'RbsAdmin':
+ $template->assign(array("ROLE" => "RbsAdmin","ROLE_DESC" => "Administratoren &nbsp;- &nbsp;Remote Boot Services","MENR" => $sbmnr));
+ $members = $roles_array['RbsAdmin'];
+ break;
+case 'ZoneAdmin':
+ $template->assign(array("ROLE" => "ZoneAdmin","ROLE_DESC" => "Administratoren &nbsp;- &nbsp;DNS Zone &nbsp;[ {DOM} ]","MENR" => $sbmnr));
+ $members = $roles_array['ZoneAdmin'];
+ break;
+}
+
+# print_r($members); echo "<br><br>";
+
+# für jedes Member Daten holen (Benutzername, UID)
+if ( count($members) != 0 ){
+ $members_data = array();
+ foreach ($members as $item){
+ $members_data[] = get_user_data($item,array("dn","cn","uid","mail"));
+ # print_r(get_user_data($item,array("dn","cn","uid"))); echo "<br>";
+ }
+}
+# echo "<br>";
+# print_r($members_data); echo "<br><br>";
+
+if (count($members_data) != 0){
+ $template->define_dynamic("Members", "Webseite");
+ foreach ($members_data as $item){
+ $template->assign(array("VALUE" => $item['dn'],
+ "USERNAME" => $item['cn'],
+ "UID" => $item['uid'],
+ "MAIL" => $item['mail']));
+ $template->parse("MEMBERS_LIST", ".Members");
+ }
+}else{
+ $template->assign(array("VALUE" => "","USERNAME" => "","UID" => "","MAIL" => ""));
+}
+
+
+##############################################
+# Admin anlegen ...
+$users_array = get_users();
+# print_r($users_array); echo "<br><br>";
+
+if (count($members_data) != 0){
+for ($i=0; $i < count($users_array); $i++){
+ foreach ($members_data as $item){
+ if ($users_array[$i]['uid'] == $item['uid']){
+ array_splice($users_array, $i, 1);
+ # break;
+ }
+ }
+}
+# print_r($users_array); echo "<br><br>";
+}
+
+# if (count($users_array) != 0){
+ $template->define_dynamic("Users", "Webseite");
+ foreach ($users_array as $item){
+ $template->assign(array("UDN" => $item['dn'],
+ "USER" => $item['uid']));
+ $template->parse("USERS_LIST", ".Users");
+ }
+#}else{
+# $template->assign(array("UDN" => "","USER" => ""));
+# }
+
+
+
+
+
+###############################################################################
+
+include("au_footer.inc.php");
+
+?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/au/roles.php b/ldap-site-mngmt/webinterface/au/roles.php
new file mode 100644
index 00000000..608b7e30
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/au/roles.php
@@ -0,0 +1,24 @@
+<?php
+include('../standard_header.inc.php');
+
+$mnr = 0;
+# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+$webseite = "roles_start.dwt";
+
+#include("roles_header.inc.php");
+include("au_header.inc.php");
+
+###################################################################################
+
+$mnr = 3;
+$sbmnr = -1;
+
+# Menuleiste erstellen
+createMainMenu($rollen, $mainnr);
+createAUMenu($rollen, $mnr, $auDN, $sbmnr);
+
+###################################################################################
+
+include("au_footer.inc.php");
+
+?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/au/roles_start.dwt b/ldap-site-mngmt/webinterface/au/roles_start.dwt
new file mode 100644
index 00000000..27f55a2f
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/au/roles_start.dwt
@@ -0,0 +1,41 @@
+<table border='0' cellpadding='5' cellspacing='0' width='90%'>
+ <tr>
+ <td colspan='2'><h3>Modul - Administratoren Rollen Management: </h3></td>
+ </tr>
+ <tr>
+ <td height='10'></td>
+ </tr>
+ <tr>
+ <td>
+ <p>Dieses Modul dient der Verwaltung von Administratoren Rollen in ihrer Abteilung.
+ Benutzen Sie die Navigation links, um die Verwaltungsbereiche der einzelnen Rollen anzusteuern.
+ Dort koennen Sie dann Benutzer den Rollen zuweisen oder wieder entziehen.</p>
+ <p>Folgende administrative Rollen stehen zur Verfuegung:</p>
+ <ul>
+ <li><p><b>Main Admins</b></p>
+ Hauptadministratoren, der AU mit uneingeschraenkten Rechten. Sie verwalten: u.a.
+ untergeordnete AUs (anlegen/loeschen/im DNS anmelden),
+ Rollen, IP Adressen und deren Delegierung, Rechner (Gruppen), deren Hardware-Profile und
+ PXE Boot Konfigurationen, sowie die Dienste DHCP und DNS.
+ </li>
+ <li><p><b>DHCP Admins</b></p>
+ Verwalten den DHCP Dienst, d.h. Subnetz-, Pool-, Class-Objekte.
+ </li>
+ <li><p><b>Host Admins</b></p>
+ Diese verwalten Rechner (Gruppen), deren Hardware-Profile und PXE Boot Konfigurationen,
+ und koennen diese im DHCP und DNS anmelden (verwalten im DNS nur deren Namenseintraege).
+ </li>
+ <li><p><b>RBS Admins</b></p>
+ Diese verwalten Remote Boot Services: TFTP/PXE Konfiguration der Dienste, Default PXE Boot Konfigurationen und Generische Bootmen&uuml;eintr&auml;ge.
+ </li>
+ <!--
+ <li><p><b>DNS Admins</b></p>
+ Sind die Administratoren der mit der AU assozierten DNS Zone. D.h. sie verwalten SOA,
+ Include Direktiven untergeordneter Include Files, sowie alle Nameneintraege der Zone.
+ </li> -->
+ </ul>
+
+ </td>
+ </tr>
+
+</table> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/dhcp/ip_blocks.inc.php b/ldap-site-mngmt/webinterface/common/ip_blocks.inc.php
index 8530e079..b1343d3b 100644
--- a/ldap-site-mngmt/webinterface/dhcp/ip_blocks.inc.php
+++ b/ldap-site-mngmt/webinterface/common/ip_blocks.inc.php
@@ -12,7 +12,7 @@ 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>";
+ <b>Zugewiesene IP Bereiche:</b></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>
@@ -23,7 +23,7 @@ if ($mipb_array[0] != "" ){
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>";
+ <b>Zugewiesener IP Bereich:</b></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>
@@ -31,13 +31,13 @@ if ($mipb_array[0] != "" ){
}
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>";
+ <tr><td><b>Keine IP Adressen mehr verf&uuml;gbar</b></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>";
+ <tr valign='bottom' height='40'>
+ <td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>
+ <b>Davon noch frei verf&uuml;gbar:</b></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>
@@ -47,8 +47,9 @@ if ($mipb_array[0] != "" ){
}
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>";
+ <tr valign='bottom' height='40'>
+ <td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>
+ <b>Davon noch frei verf&uuml;gbar:</b></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>
@@ -59,7 +60,8 @@ if ($mipb_array[0] != "" ){
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>";
+ <tr valign='bottom' height='40'>
+ <td><b>Ihnen wurden keine IP Adressen zugewiesen</b></td></tr>";
}
$ipblocks .= "</table>";
diff --git a/ldap-site-mngmt/webinterface/dhcp/ipblocks.dwt b/ldap-site-mngmt/webinterface/common/ipblocks.dwt
index b77f53b3..b77f53b3 100644
--- a/ldap-site-mngmt/webinterface/dhcp/ipblocks.dwt
+++ b/ldap-site-mngmt/webinterface/common/ipblocks.dwt
diff --git a/ldap-site-mngmt/webinterface/computers/computers.dwt b/ldap-site-mngmt/webinterface/computers/computers.dwt
index ec6d0cbc..8f52e884 100644
--- a/ldap-site-mngmt/webinterface/computers/computers.dwt
+++ b/ldap-site-mngmt/webinterface/computers/computers.dwt
@@ -53,11 +53,20 @@
<tr valign='top' height='100%'>
<td width='28%'>
<table cellpadding='5' cellspacing='0' border='0' width='100%'>
- <tr><td>
+ <tr>
+ <td>
- {NAVIGATION}
+ {NAVIGATION}
- </td></tr>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ {IPBLOCKS}
+
+ </td>
+ </tr>
</table>
</td>
diff --git a/ldap-site-mngmt/webinterface/computers/computers.php b/ldap-site-mngmt/webinterface/computers/computers.php
index 46b686df..ea365d76 100644
--- a/ldap-site-mngmt/webinterface/computers/computers.php
+++ b/ldap-site-mngmt/webinterface/computers/computers.php
@@ -1,20 +1,15 @@
<?php
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$mnr = 0;
-$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 = "computers_start.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 0;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
# Menuleisten erstellen
diff --git a/ldap-site-mngmt/webinterface/computers/computers_footer.inc.php b/ldap-site-mngmt/webinterface/computers/computers_footer.inc.php
index 311721c5..7849823e 100644
--- a/ldap-site-mngmt/webinterface/computers/computers_footer.inc.php
+++ b/ldap-site-mngmt/webinterface/computers/computers_footer.inc.php
@@ -6,6 +6,7 @@ $template->assign(array("PFAD" => $START_PATH));
$template->parse("LOGIN", "Login");
$template->parse("MAINMENU", "Mmenu");
$template->parse("NAVIGATION", "Menu");
+$template->parse("IPBLOCKS", "IPBlocks");
$template->parse("HAUPTFENSTER", "Webseite");
$template->parse("PAGE", "Vorlage");
diff --git a/ldap-site-mngmt/webinterface/computers/computers_header.inc.php b/ldap-site-mngmt/webinterface/computers/computers_header.inc.php
index d51a42d1..d6bc3746 100644
--- a/ldap-site-mngmt/webinterface/computers/computers_header.inc.php
+++ b/ldap-site-mngmt/webinterface/computers/computers_header.inc.php
@@ -1,13 +1,18 @@
<?php
-include("computers_menu.php");
-$template = new FastTemplate(".");
+# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
+$titel = "Computers Management";
+# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
+$mainnr = 1;
+
+$template = new FastTemplate(".");
# dem erstellten Template-Objekt eine Vorlage zuweisen
$definedTemplates = array("Vorlage" => "computers.dwt",
"Login" => "../logout_form.inc.dwt",
"Mmenu" => "../hauptmenue.dwt",
"Menu" => "menu.dwt",
+ "IPBlocks" => "../common/ipblocks.dwt",
"Webseite" => $webseite);
if (isset($additionalTemplates)) {
foreach ($additionalTemplates as $templateKey => $templateFile) {
@@ -15,7 +20,10 @@ if (isset($additionalTemplates)) {
}
}
$template->define($definedTemplates);
-
$template->assign(array("SEITENTITEL" => $titel, "AU" => $au_ou, "DOMAIN" => $assocdom, "USERCN" => $usercn));
-
+
+
+include("computers_menu.php");
+include("../common/ip_blocks.inc.php");
+
?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/computers/computers_menu.php b/ldap-site-mngmt/webinterface/computers/computers_menu.php
index 201192ab..97ff55fa 100644
--- a/ldap-site-mngmt/webinterface/computers/computers_menu.php
+++ b/ldap-site-mngmt/webinterface/computers/computers_menu.php
@@ -3,7 +3,15 @@
function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) {
global $template, $ds, $suffix, $START_PATH;
-
+
+ $mipb_array = get_maxipblocks_au($auDN);
+ #print_r($mipb_array);
+ if ( $mipb_array[0] == "" ){
+ $iprechnerlink = "no_ip.php?mnr=2";
+ }else{
+ $iprechnerlink = "ip_rechner.php";
+ }
+
# Struktur der Registerkartenleiste
# Hauptmenu
$hauptmenu = array(array("link" => "computers.php",
@@ -12,9 +20,12 @@ function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) {
array("link" => "hostoverview.php",
"text" => "Rechner",
"zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")),
- array("link" => "groupoverview.php",
- "text" => "Rechnergruppen",
- "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")),
+ array("link" => $iprechnerlink,
+ "text" => "IP Adressen Rechner",
+ "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin")),
+ #array("link" => "groupoverview.php",
+ # "text" => "Rechnergruppen",
+ # "zugriff" => array("MainAdmin")),
#array("link" => "machineconfig_default.php",
# "text" => "Default MachineConfigs",
# "zugriff" => array("MainAdmin","HostAdmin")),
@@ -23,7 +34,7 @@ function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) {
# "zugriff" => array("MainAdmin","HostAdmin")),
array("link" => "new_pxe.php",
"text" => "Neues PXE Bootmen&uuml;",
- "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")));
+ "zugriff" => array("MainAdmin")));
# Submenus
/*$computers_array = get_hosts($auDN,array("dn","hostname","ou"));
@@ -36,7 +47,7 @@ function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) {
}*/
$comps[] = array("link" => "new_host.php?sbmnr=0", #.$n,
"text" => "Neuen Rechner anlegen",
- "zugriff" => array("MainAdmin","HostAdmin"));
+ "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin"));
$groups_array = get_groups($auDN,array("dn","cn"));
for($n=0;$n<count($groups_array);$n++){
@@ -44,25 +55,26 @@ function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) {
$groups = array();
$groups[] = array("link" => "group.php?dn=".$groups_array[$n]['dn']."&sbmnr=".$n,
"text" => $groups_array[$n]['cn'],
- "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin"));
+ "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin"));
}
$groups[] = array("link" => "new_group.php?sbmnr=".$n,
"text" => "Neue Gruppe anlegen",
- "zugriff" => array("MainAdmin","HostAdmin"));
+ "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin"));
# default machine-configs
$mcdef_array = get_machineconfigs("cn=computers,".$auDN,array("dn","cn","timerange"));
for($n=0;$n<count($mcdef_array);$n++){
$defmc [] = array("link" => "mcdef.php?dn=".$mcdef_array[$n]['dn']."&mnr=3&sbmnr=".$n,
"text" => $mcdef_array[$n]['cn'],
- "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin"));
+ "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin"));
}
$submenu = array(array(),
$comps,
- $groups,
- $defmc,
+ array(),
+ #$groups,
+ #$defmc,
array());
#echo "submenu: ";print_r($submenu);echo "<br><br>";
@@ -100,47 +112,53 @@ function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) {
else{
if ($j==0) {
if ($sbmnr==0) {
- if($maxsub == 1){$zwisch2="";}
- else {$zwisch2="";}
+ if($maxsub == 1){$zwisch2="branchbottom2";}
+ else {$zwisch2="branch2";}
$lastaktive=true;
$farb="#505050";
}
else{
- if(count($subsubmenu[$i][$j][0]) != 0){
- if($maxsub == 1){$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'>
- <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";}
- else {$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'>
- <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";}
- }else{$zwisch2="";}
+ if ($maxsub == 1) {$zwisch2="branchbottom2";}
+ # Wenn Unter-Unter-Menu ...
+ #if(count($subsubmenu[$i][$j][0]) != 0){
+ #if($maxsub == 1){$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'>
+ # <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";}
+ #else {$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'>
+ # <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";}
+ #}
+ else{$zwisch2="branch2";}
$farb="#A0A0A0";
$lastaktive=false;
}
}
else {
if ($sbmnr==$j) {
- if($maxsub == $j+1){$zwisch2="";}
- else {$zwisch2="";}
+ if($maxsub == $j+1){$zwisch2="branchbottom2";}
+ else {$zwisch2="branch2";}
$lastaktive=true;
$farb="#505050";
}
else {
- if(count($subsubmenu[$i][$j][0]) != 0){
- if($maxsub == $i+1){$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'>
- <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";}
- else {$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'>
- <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";}
- }else{$zwisch2="";}
+ if ($maxsub == $j+1) {$zwisch2="branchbottom2";}
+ # Wenn Unter-Unter-Menu ...
+ #if(count($subsubmenu[$i][$j][0]) != 0){
+ # if($maxsub == $i+1){$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'>
+ # <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";}
+ # else {$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'>
+ # <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";}
+ #}
+ else{$zwisch2="branch2";}
$farb="#A0A0A0";
$lastaktive=false;
}
}
$htmlcode= "
<tr height='4'>
- <td></td><td></td><td></td><td></td>
+ <td></td><td align='right'><img src='../pics/line2.gif' height='4'></td><td></td><td></td>
</tr>
<tr>
<td width='8%'>&nbsp;</td>
- <td width='8%' align='right'>".$zwisch2."</td>
+ <td width='8%' align='right'><img src='../pics/".$zwisch2.".gif'></td>
<td width='5%' align='left' style='border-width:1 0 1 1;border-color:#000000;border-style:solid;padding:4;background-color:{FARBE_S}'>&nbsp;</td>
<td width='69%' align='left' style='border-width:1 1 1 0;border-color:#000000;border-style:solid;padding:4;padding-left:12px;background-color:{FARBE_S}'>
<a href='".$item2['link']."' style='text-decoration:none'><b class='standard_schrift'>".$item2['text']."</b></a></td>
diff --git a/ldap-site-mngmt/webinterface/computers/dhcphost.php b/ldap-site-mngmt/webinterface/computers/dhcphost.php
index 27ce686b..8a5f67fa 100644
--- a/ldap-site-mngmt/webinterface/computers/dhcphost.php
+++ b/ldap-site-mngmt/webinterface/computers/dhcphost.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$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 = "dhcphost.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
@@ -55,7 +50,7 @@ if ($dhcphlpcont == ""){
# DHCP Selectbox
$altdhcp = alternative_dhcpobjects($objecttype,$objectDN,$hostip[0]);
$dhcp_selectbox .= "<td class='tab_d'>
- <select name='dhcpcont' size='4' class='medium_form_selectbox'>
+ <select name='dhcpcont' size='3' class='medium_form_selectbox'>
<option selected value='none'>----------</option>";
if (count($altdhcp) != 0){
foreach ($altdhcp as $item){
@@ -101,7 +96,7 @@ if ($dhcphlpcont == ""){
# DHCP Selectbox
$altdhcp = alternative_dhcpobjects($objecttype,$objectDN,$hostip[0]);
$dhcp_selectbox .= "<td class='tab_d'>
- <select name='dhcpcont' size='4' class='medium_form_selectbox'>
+ <select name='dhcpcont' size='3' class='medium_form_selectbox'>
<option selected value='none'>----------</option>";
if (count($altdhcp) != 0){
foreach ($altdhcp as $item){
@@ -183,86 +178,9 @@ $template->assign(array("HOSTDN" => $hostDN,
"SBMNR" => $sbmnr));
-##########################################################
-# DHCP Setup
-
-/*$dhcp_selectbox = "";
-$altdhcp = alternative_dhcpobjects($objecttype,$objectDN,$hostip[0]);
-echo "<br><br>";print_r($altdhcp);
-
-$dhcp_selectbox .= "<td class='tab_d'>
- <select name='dhcpcont' size='4' class='medium_form_selectbox'>
- <option selected value='none'>----------</option>";
-
-if (count($altdhcp) != 0){
- foreach ($altdhcp as $item){
- $dhcp_selectbox .= "
- <option value='".$item['dn']."'>".$item['cn']." ".$item['au']."</option>";
- }
-}
-$dhcp_selectbox .= "<option value=''>Kein DHCP</option>
- </select></td>";*/
-
-###########################################################
-# RBS Setup
-
-/*$altrbs = alternative_rbservices($rbsDN);
-#print_r($altrbs); echo "<br><br>";
-$template->assign(array("ALTRBSDN" => "",
- "ALTRBSCN" => "",
- "ALTRBSAU" => ""));
-if (count($altrbs) != 0){
-$template->define_dynamic("Altrbs", "Webseite");
- foreach ($altrbs as $item){
- $template->assign(array("ALTRBSDN" => $item['dn'],
- "ALTRBSCN" => $item['cn'],
- "ALTRBSAU" => $item['au'],));
- $template->parse("ALTRBS_LIST", ".Altrbs");
- }
-}*/
-
###################################################################################
include("computers_footer.inc.php");
-
-
-/*
-<tr height='50'>
- <td class='tab_d'><b>DHCP Option hardware ethernet: </b>&nbsp;</td>
- <td class='tab_d'>{HWADDRESS} &nbsp;
- </td>
- </tr>
- <tr height='50'>
- <td class='tab_d'><b>DHCP Option fixed-address: &nbsp;</td>
- <td class='tab_d'>{IPADDRESS} &nbsp;
- </td>
- </tr>
-
-<td class='tab_d'>
- <select name='rbs' size='4' class='medium_form_selectbox'>
- <option selected value='none'>----------</option>
-
- <!-- BEGIN DYNAMIC BLOCK: Altrbs -->
- <option value='{ALTRBSDN}'>{ALTRBSCN} {ALTRBSAU}</option>
- <!-- END DYNAMIC BLOCK: Altrbs -->
-
- <option value=''>Kein RBS</option>
-
- </select>
- </td>
- <tr height='50'>
- <td class='tab_d'><b>TFTP Server <br>DHCP Option next-server: </b>&nbsp;</td>
- <td class='tab_d'>{NEXTSERVER} &nbsp;
- </td>
- </tr>
- <tr height='50'>
- <td class='tab_d'><b>PXE initiale Bootdatei <br>DHCP Option filename: </b>&nbsp;</td>
- <td class='tab_d'>{FILENAME} &nbsp;
- </td>
- </tr>
-
-
- */
?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/computers/group.php b/ldap-site-mngmt/webinterface/computers/group.php
index 13819e62..cfacd649 100644
--- a/ldap-site-mngmt/webinterface/computers/group.php
+++ b/ldap-site-mngmt/webinterface/computers/group.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$mnr = 2;
-$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 = "group.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 2;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/groupoverview.php b/ldap-site-mngmt/webinterface/computers/groupoverview.php
index 15424fbd..d14b9d0f 100644
--- a/ldap-site-mngmt/webinterface/computers/groupoverview.php
+++ b/ldap-site-mngmt/webinterface/computers/groupoverview.php
@@ -2,19 +2,13 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
+# Dateiname und evtl. Pfad des Templates für die Webseite
+$webseite = "groupoverview.dwt";
+include('computers_header.inc.php');
+
$mnr = 2;
$sbmnr = -1;
$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
-$webseite = "groupoverview.dwt";
-
-include("../class.FastTemplate.php");
-
-include('computers_header.inc.php');
###################################################################################
diff --git a/ldap-site-mngmt/webinterface/computers/host.dwt b/ldap-site-mngmt/webinterface/computers/host.dwt
index bd05e75b..729e6d64 100644
--- a/ldap-site-mngmt/webinterface/computers/host.dwt
+++ b/ldap-site-mngmt/webinterface/computers/host.dwt
@@ -59,6 +59,7 @@
<input type='hidden' name='dhcphlpcont' value='{DHCPCONT}'>
<input type='hidden' name='dhcptype' value='{DHCPTYPE}'>
+ <input type='hidden' name='fixadd' value='{FIXADD}'>
<input type='hidden' name='hostdn' value='{HOSTDN}'>
<input type='hidden' name='sbmnr' value='{SBMNR}'>
diff --git a/ldap-site-mngmt/webinterface/computers/host.php b/ldap-site-mngmt/webinterface/computers/host.php
index 2c522181..1778ffbb 100644
--- a/ldap-site-mngmt/webinterface/computers/host.php
+++ b/ldap-site-mngmt/webinterface/computers/host.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$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 = "host.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
@@ -28,7 +23,7 @@ createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr);
$hostDN = $_GET['dn'];
-$attributes = array("hostname","domainname","ipaddress","hwaddress","description","dhcphlpcont",
+$attributes = array("hostname","domainname","ipaddress","hwaddress","description","dhcphlpcont","dhcpoptfixed-address",
"hw-mouse","hw-graphic","hw-monitor");
$host = get_node_data($hostDN,$attributes);
$hostip = explode('_',$host['ipaddress']);
@@ -56,7 +51,8 @@ $template->assign(array("HOSTDN" => $hostDN,
"IPADDRESS" => $hostip[0],
"DESCRIPTION" => $host['description'],
"DHCPCONT" => $host['dhcphlpcont'],
- "DHCPTYPE" => $dhcptype,
+ "DHCPTYPE" => $dhcptype,
+ "FIXADD" => $host['dhcpoptfixed-address'] ,
"MOUSE" => $host['hw-mouse'],
"GRAPHIC" => $host['hw-graphic'],
"MONITOR" => $host['hw-monitor'],
diff --git a/ldap-site-mngmt/webinterface/computers/host_change.php b/ldap-site-mngmt/webinterface/computers/host_change.php
index 52df970f..f32daef3 100644
--- a/ldap-site-mngmt/webinterface/computers/host_change.php
+++ b/ldap-site-mngmt/webinterface/computers/host_change.php
@@ -12,6 +12,7 @@ $olddesc = $_POST['olddesc'];
$dhcphlpcont = $_POST['dhcphlpcont'];
$dhcptype = $_POST['dhcptype'];
+$fixadd = $_POST['fixadd'];
$hostDN = $_POST['hostdn'];
$sbmnr = $_POST['sbmnr'];
@@ -134,58 +135,66 @@ if ( $oldmac == $mac ){
if ( $oldmac == "" && $mac != "" ){
echo "MAC neu anlegen<br>";
# hier noch Syntaxcheck
- $entry['hwaddress'] = $mac;
- $result = ldap_mod_add($ds,$hostDN,$entry);
- if($result){
- $mesg = "MAC erfolgreich eingetragen<br><br>";
+ if( $syntax->check_mac_syntax($mac) ){
+ $entry['hwaddress'] = $mac;
+ $result = ldap_mod_add($ds,$hostDN,$entry);
+ if($result){
+ $mesg = "MAC erfolgreich eingetragen<br><br>";
+ }else{
+ $mesg = "Fehler beim eintragen der MAC<br><br>";
+ }
}else{
- $mesg = "Fehler beim eintragen der MAC<br><br>";
+ echo "Falsche MAC Syntax<br><br>";
}
}
if ( $oldmac != "" && $mac != "" && $oldmac != $mac ){
echo "MAC aendern<br>";
# hier noch Syntaxcheck
- $entry['hwaddress'] = $mac;
- $pxemac = str_replace (":","-",$mac);
- $pxeoldmac = str_replace (":","-",$oldmac);
- $result = ldap_mod_replace($ds,$hostDN,$entry);
- if($result){
- # in den PXEs auch ändern
- $pxes = get_pxeconfigs($hostDN,array("dn","filename"));
- if ( count($pxes) != 0 ){
- foreach ($pxes as $pxe){
- $entrynewmac ['filename'] = "01-".$pxemac;
- ldap_mod_replace($ds,$pxe['dn'],$entrynewmac);
- }
- }
- # und in Gruppen PXEs
- $groups = get_groups_member($auDN,array("dn"),$hostDN);
- if ( count($groups) != 0 ){
- $pxes = get_pxeconfigs($groups[0]['dn'],array("dn","filename"));
+ if( $syntax->check_mac_syntax($mac) ){
+ $entry['hwaddress'] = $mac;
+ $pxemac = str_replace (":","-",$mac);
+ $pxeoldmac = str_replace (":","-",$oldmac);
+ $result = ldap_mod_replace($ds,$hostDN,$entry);
+ if($result){
+ # in den PXEs auch ändern
+ $pxes = get_pxeconfigs($hostDN,array("dn","filename"));
if ( count($pxes) != 0 ){
foreach ($pxes as $pxe){
- if (count($pxe['filename']) > 1){
- for ($i=0; $i<count($pxe['filename']); $i++){
- if ($pxe['filename'][$i] == $pxeoldmac){
- $entrynewmac ['filename'][$i] = "01-".$pxemac;
- }else{
- $entrynewmac ['filename'][$i] = $pxe['filename'][$i];
+ $entrynewmac ['filename'] = "01-".$pxemac;
+ ldap_mod_replace($ds,$pxe['dn'],$entrynewmac);
+ }
+ }
+ # und in Gruppen PXEs
+ $groups = get_groups_member($auDN,array("dn"),$hostDN);
+ if ( count($groups) != 0 ){
+ $pxes = get_pxeconfigs($groups[0]['dn'],array("dn","filename"));
+ if ( count($pxes) != 0 ){
+ foreach ($pxes as $pxe){
+ if (count($pxe['filename']) > 1){
+ for ($i=0; $i<count($pxe['filename']); $i++){
+ if ($pxe['filename'][$i] == $pxeoldmac){
+ $entrynewmac ['filename'][$i] = "01-".$pxemac;
+ }else{
+ $entrynewmac ['filename'][$i] = $pxe['filename'][$i];
+ }
}
}
+ if (count($pxe['filename']) == 1 && $pxe['filename'][$i] == $pxeoldmac){
+ $entrynewmac ['filename'] = "01-".$pxemac;
+ }
+ ldap_mod_replace($ds,$pxe['dn'],$entrynewmac);
}
- if (count($pxe['filename']) == 1 && $pxe['filename'][$i] == $pxeoldmac){
- $entrynewmac ['filename'] = "01-".$pxemac;
- }
- ldap_mod_replace($ds,$pxe['dn'],$entrynewmac);
}
}
+ $mesg = "MAC erfolgreich geaendert<br><br>
+ Falls Rechner-Konfiguration via File, <b>Client-Conf</b> Dateiname in untergeordneten <br>
+ PXEs bitte auch &auml;ndern";
+ }else{
+ $mesg = "Fehler beim aendern der MAC<br><br>";
}
- $mesg = "MAC erfolgreich geaendert<br><br>
- Falls Rechner-Konfiguration via File, <b>Client-Conf</b> Dateiname in untergeordneten <br>
- PXEs bitte auch &auml;ndern";
}else{
- $mesg = "Fehler beim aendern der MAC<br><br>";
+ echo "Falsche MAC Syntax<br><br>";
}
}
@@ -204,7 +213,6 @@ if ( $oldmac != "" && $mac == "" ){
MAC nicht gel&ouml;scht!";
}
else{
- # hier noch Syntaxcheck
$entry['hwaddress'] = $oldmac;
$result = ldap_mod_del($ds,$hostDN,$entry);
if($result){
@@ -251,7 +259,7 @@ if ( $oldip != "" && $ip != "" && $oldip != $ip ){
# print_r($newip); echo "<br><br>";
$oldip_array = array($oldip,$oldip);
$oldipp = implode('_',$oldip_array);
- if (modify_ip_host($newip,$hostDN,$auDN)){
+ if (modify_ip_host($newip,$hostDN,$auDN,$fixadd)){
$mesg = "IP erfolgreich geaendert<br><br>";
if ($dhcptype == "subnet"){
adjust_hostip_dhcpsubnet($ip,$hostDN,$dhcphlpcont);
diff --git a/ldap-site-mngmt/webinterface/computers/hostoverview.dwt b/ldap-site-mngmt/webinterface/computers/hostoverview.dwt
index 51065a56..50694f46 100644
--- a/ldap-site-mngmt/webinterface/computers/hostoverview.dwt
+++ b/ldap-site-mngmt/webinterface/computers/hostoverview.dwt
@@ -8,11 +8,13 @@
<tr><td>
<table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'>
<tr>
- <td width='24%' class='tab_h'><b>Rechnername</b></td>
- <td width='19%' class='tab_h'><b>IP Adresse</b></td>
- <td width='19%' class='tab_h'><b>MAC Adresse</b></td>
- <td width='19%' class='tab_h'><b>DHCP</b></td>
- <td width='19%' class='tab_h'><b>RBS</b></td>
+ <td width='18%' class='tab_h'><b>Rechnername</b></td>
+ <td width='14%' class='tab_h'><b>IP Adresse</b></td>
+ <td width='20%' class='tab_h'><b>MAC Adresse</b></td>
+ <td width='15%' class='tab_h'><b>DHCP</b></td>
+ <td width='10%' class='tab_h'> &nbsp;</td>
+ <td width='13%' class='tab_h'><b>RBS</b></td>
+ <td width='10%' class='tab_h'> &nbsp;</td>
</tr>
<!-- BEGIN DYNAMIC BLOCK: Rechner -->
@@ -21,7 +23,9 @@
<td class='tab_d'>{IPADDRESS} &nbsp;</td>
<td class='tab_d'>{HWADDRESS} &nbsp;</td>
<td class='tab_d'>{DHCPCONT} &nbsp;</td>
+ <td class='tab_d'>{FIXADD} &nbsp;</td>
<td class='tab_d'>{RBSCONT} &nbsp;</td>
+ <td class='tab_d'>{NXTSRV} &nbsp;</td>
</tr>
<!-- END DYNAMIC BLOCK: Rechner -->
diff --git a/ldap-site-mngmt/webinterface/computers/hostoverview.php b/ldap-site-mngmt/webinterface/computers/hostoverview.php
index c2bec0a2..b59dbea6 100644
--- a/ldap-site-mngmt/webinterface/computers/hostoverview.php
+++ b/ldap-site-mngmt/webinterface/computers/hostoverview.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$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 = "hostoverview.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
# Menuleisten erstellen
@@ -30,9 +25,11 @@ $template->assign(array("DN" => "",
"HWADDRESS" => "",
"IPADDRESS" => "",
"DHCPCONT" => "",
- "RBSCONT" => ""));
+ "FIXADD" => "",
+ "RBSCONT" => "",
+ "NXTSRV" => ""));
-$attributes = array("dn","hostname","domainname","hwaddress","ipaddress","dhcphlpcont","hlprbservice");
+$attributes = array("dn","hostname","domainname","hwaddress","ipaddress","dhcphlpcont","dhcpoptfixed-address","hlprbservice","dhcpoptnext-server");
$host_array = get_hosts($auDN,$attributes);
$template->define_dynamic("Rechner", "Webseite");
@@ -44,22 +41,35 @@ foreach ($host_array as $host){
$hostip = explode('_',$host['ipaddress']);
$dhcpcont = "";
+ $dhcpfixadd = "";
if ( count($host['dhcphlpcont']) != 0 ){
$dhcpexpdn = ldap_explode_dn($host['dhcphlpcont'],1);
$dhcpcn = $dhcpexpdn[0];
- $ocarray = get_node_data($host['dhcphlpcont'],array("objectclass","dhcphlpcont"));
- $sub = array_search('dhcpSubnet', $ocarray['objectclass']);
- if ($sub !== false ){
- $dhcpcont = "Subnet ".$dhcpexpdn[0]." <br>[".$dhcpexpdn[2]."]";
- }else{
- $dhcpcont = "Service ".$dhcpexpdn[0]." <br>[".$dhcpexpdn[2]."]";
- }
+ #$ocarray = get_node_data($host['dhcphlpcont'],array("objectclass","dhcphlpcont"));
+ #$sub = array_search('dhcpSubnet', $ocarray['objectclass']);
+ #if ($sub !== false ){
+ # $dhcpcont = "Subnet ".$dhcpexpdn[0]." <br>[".$dhcpexpdn[2]."]";
+ #}else{
+ $dhcpcont = $dhcpexpdn[0]." <br>[".$dhcpexpdn[2]."]";
+ #}
+ $dhcpfixadd = "dyn";
+ if ( $host['dhcpoptfixed-address'] == "ip" ){
+ $dhcpfixadd = "fix";
+ }
+ if ( $host['dhcpoptfixed-address'] == "hostname" ){
+ $dhcpfixadd = "fix (DNS)";
+ }
}
+
+
$rbscont = "";
+ $dhcpnxtsrv = "";
if ( count($host['hlprbservice']) != 0 ){
$rbsexpdn = ldap_explode_dn($host['hlprbservice'],1);
$rbscont = $rbsexpdn[0]." <br>[".$rbsexpdn[2]."]";
+
+ $dhcpnxtsrv = $host['dhcpoptnext-server'];
}
$template->assign(array("DN" => $host['dn'],
@@ -68,7 +78,9 @@ foreach ($host_array as $host){
"HWADDRESS" => $host['hwaddress'],
"IPADDRESS" => $hostip[0],
"DHCPCONT" => $dhcpcont,
+ "FIXADD" => $dhcpfixadd,
"RBSCONT" => $rbscont,
+ "NXTSRV" => $dhcpnxtsrv,
"AUDN" => $auDN ));
$template->parse("RECHNER_LIST", ".Rechner");
diff --git a/ldap-site-mngmt/webinterface/computers/hwhost.php b/ldap-site-mngmt/webinterface/computers/hwhost.php
index 7a766266..0f6cc300 100644
--- a/ldap-site-mngmt/webinterface/computers/hwhost.php
+++ b/ldap-site-mngmt/webinterface/computers/hwhost.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$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 = "hwhost.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt b/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt
new file mode 100644
index 00000000..b300e88e
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt
@@ -0,0 +1,40 @@
+<table border='0' cellpadding='5' cellspacing='0' width='100%'>
+ <tr>
+ <td colspan='2'><h3>Folgende IP Adressen haben Sie an Rechner vergeben: </h3></td>
+ </tr>
+ <tr>
+ <td height='10'></td>
+ </tr>
+ <tr><td>
+ <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'>
+ <tr>
+ <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Rechner Name</b></td>
+ <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>IP Adresse</b></td>
+ <td width='50%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>DHCP</b></td>
+ </tr>
+
+ <form action='ip_rechner_change.php' method='post'>
+
+ <!-- BEGIN DYNAMIC BLOCK: Hosts -->
+
+ <tr>
+ <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{HOSTNAME} &nbsp;</td>
+ <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
+ <input type='Text' name='newip[]' value='{IP}' size='15' class='medium_form_field'></td>
+ <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> {DHCPCONT} &nbsp;</td>
+ </tr>
+ <input type='hidden' name='oldip[]' value='{OLDIP}'>
+ <input type='hidden' name='hostdn[]' value='{HOSTDN}'>
+ <input type='hidden' name='fixadd[]' value='{FIXADD}'>
+ <input type='hidden' name='audn[]' value='{AUDN}'>
+
+ <!-- END DYNAMIC BLOCK: Hosts -->
+
+ </table></td>
+ </tr>
+ <tr>
+ <td>
+ <input type='Submit' name='apply' value='anwenden' class='small_loginform_button'></form>
+ </td>
+ </tr>
+</table> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/computers/ip_rechner.php b/ldap-site-mngmt/webinterface/computers/ip_rechner.php
new file mode 100644
index 00000000..5870f503
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/computers/ip_rechner.php
@@ -0,0 +1,69 @@
+<?php
+
+include('../standard_header.inc.php');
+
+# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+$webseite = "ip_rechner.dwt";
+
+include('computers_header.inc.php');
+
+#############################################################################
+
+$mnr = 2;
+$sbmnr = -1;
+$mcnr = -1;
+
+# Menuleiste erstellen
+createMainMenu($rollen, $mainnr);
+createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr);
+
+#############################################################################
+
+$template->assign(array("IP" => "",
+ "OLDIP" => "",
+ "DHCPCONT" => "",
+ "FIXADD" => "",
+ "HOSTNAME" => "Noch keine Rechner angelegt",
+ "HOSTDN" => ""));
+
+$host_array = get_hosts($auDN,array("dn","hostname","ipaddress","dhcphlpcont","dhcpoptfixed-address"));
+# print_r ($host_array);
+
+$template->define_dynamic("Hosts", "Webseite");
+
+foreach ($host_array as $host){
+ $hostip = explode('_',$host['ipaddress']);
+
+ $dhcpcont = "";
+ $fixadd = "";
+ if ( count($host['dhcphlpcont']) != 0 ){ #&& $host['ipaddress'] == "" ){
+ $dhcpcont = " dynamisch";
+ #$fixadd = $host['dhcpoptfixed-address'];
+ #}elseif( count($host['dhcphlpcont']) != 0 && $host['ipaddress'] != "" ){
+ if ( $host['dhcpoptfixed-address'] == "ip") {
+ $dhcpcont = " fix";
+ #$fixadd = $host['dhcpoptfixed-address'];
+ }
+ if ( $host['dhcpoptfixed-address'] == "hostname") {
+ $dhcpcont = " fix (&uuml;ber DNS Name)";
+ #$fixadd = $host['dhcpoptfixed-address'];
+ }
+ $fixadd = $host['dhcpoptfixed-address'];
+ }
+
+ $template->assign(array("IP" => $hostip[0],
+ "OLDIP" => $hostip[0],
+ "DHCPCONT" => $dhcpcont,
+ "FIXADD" => $fixadd,
+ "HOSTNAME" => $host['hostname'],
+ "HOSTDN" => $host['dn'],
+ "AUDN" => $auDN ));
+ $template->parse("HOSTS_LIST", ".Hosts");
+}
+
+
+#####################################################################################
+
+include("computers_footer.inc.php");
+
+?>
diff --git a/ldap-site-mngmt/webinterface/computers/ip_rechner_change.php b/ldap-site-mngmt/webinterface/computers/ip_rechner_change.php
new file mode 100644
index 00000000..4db8bed0
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/computers/ip_rechner_change.php
@@ -0,0 +1,122 @@
+<?php
+
+include('../standard_header.inc.php');
+
+$hostDN = $_POST['hostdn'];
+$oldip = $_POST['oldip'];
+$newip = $_POST['newip'];
+$fixadd = $_POST['fixadd'];
+
+$syntax = new Syntaxcheck;
+$url = "ip_rechner.php";
+
+echo "
+<html>
+<head>
+ <title>IP Address Management</title>
+ <link rel='stylesheet' href='../styles.css' type='text/css'>
+</head>
+<body>
+<table border='0' cellpadding='30' cellspacing='0'>
+<tr><td>";
+
+
+$diff1 = array_keys(array_diff_assoc($oldip,$newip));
+$diff2 = array_keys(array_diff_assoc($newip,$oldip));
+$tochange = array_unique(array_merge($diff1,$diff2));
+
+foreach ($tochange as $i){
+
+ if ( $oldip[$i] == "" && $newip[$i] != "" ){
+ echo "neue IP";echo "<br>";echo "<br>";
+ echo "<br>";
+ echo "alte IP: ";print_r($oldip[$i]);echo "<br>";
+ echo "neue IP: ";print_r($newip[$i]);echo "<br>";
+
+ if ($syntax->check_ip_syntax($newip[$i])){
+ echo "korrekte IP Syntax";
+ $newip[$i] = htmlentities($newip[$i]);
+ $newip_array = array($newip[$i],$newip[$i]);
+ #print_r($newip_array);
+ $newipp = implode('_',$newip_array);
+ #print_r($newipp);
+ $oldip[$i] = htmlentities($oldip[$i]);
+ if (new_ip_host($newipp,$hostDN[$i],$auDN)){
+ $mesg = "Neue IP Adresse eingetragen<br>";
+ # falls Rechner in DHCP -> fixed-address auf IP Setzen...
+ # und update_dhcpmtime(array());
+ }else{$mesg = "Fehler beim eintragen der neuen IP Adresse<br>";}
+ }else{echo "falsche IP Syntax";}
+
+ $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
+ Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>";
+ redirect(4, $url, $mesg, $addSessionId = TRUE);
+ }
+
+ elseif ( $oldip[$i] != "" && $newip[$i] != "" ){
+ echo "aendern IP";echo "<br>";echo "<br>";
+ echo "<br>";
+ echo "alte IP: ";print_r($oldip[$i]);echo "<br>";
+ echo "neue IP: ";print_r($newip[$i]);echo "<br>";
+
+ if ($syntax->check_ip_syntax($newip[$i])){
+ echo "korrekte IP Syntax";
+ $newip[$i] = htmlentities($newip[$i]);
+ $newip_array = array($newip[$i],$newip[$i]);
+ #print_r($newip_array);
+ $newipp = implode('_',$newip_array);
+ #print_r($newipp);
+ $oldip[$i] = htmlentities($oldip[$i]);
+ $oldip_array = array($oldip[$i],$oldip[$i]);
+ $oldipp = implode('_',$oldip_array);
+ if (modify_ip_host($newipp,$hostDN[$i],$auDN,$fixadd[$i])){
+ $mesg = "IP Adresse geaendert<br>";
+ adjust_hostip_tftpserverip($oldip[$i],$newip[$i]);
+ # Falls Rechner in DHCP
+ update_dhcpmtime(array());
+ }else{
+ $mesg = "Fehler beim aendern der IP Adresse<br>";
+ # oldip die schon gelöscht wurde wieder einfügen
+ new_ip_host($oldipp,$hostDN[$i],$auDN);}
+ }else{echo "falsche IP Syntax";}
+
+ $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
+ Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>";
+ redirect(4, $url, $mesg, $addSessionId = TRUE);
+ }
+
+ elseif ( $oldip[$i] != "" && $newip[$i] == "" ){
+ echo "loeschen IP";echo "<br>";echo "<br>";
+ echo "<br>";
+ echo "alte IP: ";print_r($oldip[$i]);echo "<br>";
+ echo "neue IP: ";print_r($newip[$i]);echo "<br>";
+
+ echo "korrekte IP Syntax";
+ $newip[$i] = htmlentities($newip[$i]);
+ $oldip[$i] = htmlentities($oldip[$i]);
+ if (delete_ip_host($hostDN[$i],$auDN)){
+ $mesg = "IP Adresse geloescht<br>";
+ adjust_hostip_tftpserverip($oldip[$i],"");
+ # falls Rechner in DHCP -> fixed-address auf dynamic/Hostname setzen
+ update_dhcpmtime(array());
+ }else{$mesg = "Fehler beim loeschen der IP Adresse<br>";}
+
+ $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
+ Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>";
+ redirect(4, $url, $mesg, $addSessionId = TRUE);
+ }
+
+ else{
+ $mesg = "keine Aenderung<br>";
+ $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
+ Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>";
+ redirect(3, $url, $mesg, $addSessionId = TRUE);
+ }
+
+}
+
+echo "
+</td></tr></table>
+</head>
+</html>";
+?>
diff --git a/ldap-site-mngmt/webinterface/computers/machineconfig_default.php b/ldap-site-mngmt/webinterface/computers/machineconfig_default.php
index ac386a57..ff52ced8 100644
--- a/ldap-site-mngmt/webinterface/computers/machineconfig_default.php
+++ b/ldap-site-mngmt/webinterface/computers/machineconfig_default.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$mnr = 3;
-$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 = "machineconfig_default.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 3;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
# Menuleisten erstellen
diff --git a/ldap-site-mngmt/webinterface/computers/mcdef.php b/ldap-site-mngmt/webinterface/computers/mcdef.php
index 18e7a0aa..51a760ba 100644
--- a/ldap-site-mngmt/webinterface/computers/mcdef.php
+++ b/ldap-site-mngmt/webinterface/computers/mcdef.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$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 = "mcdef.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/menuentry.php b/ldap-site-mngmt/webinterface/computers/menuentry.php
index 81e1dc63..386178a3 100644
--- a/ldap-site-mngmt/webinterface/computers/menuentry.php
+++ b/ldap-site-mngmt/webinterface/computers/menuentry.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$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 = "menuentry.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/new_group.php b/ldap-site-mngmt/webinterface/computers/new_group.php
index 0fcd8bcc..6d5f4257 100644
--- a/ldap-site-mngmt/webinterface/computers/new_group.php
+++ b/ldap-site-mngmt/webinterface/computers/new_group.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$mnr = 2;
-$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 = "new_group.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 2;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/new_host.php b/ldap-site-mngmt/webinterface/computers/new_host.php
index 507fc0ac..ad20b092 100644
--- a/ldap-site-mngmt/webinterface/computers/new_host.php
+++ b/ldap-site-mngmt/webinterface/computers/new_host.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$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 = "new_host.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/new_mcdef.php b/ldap-site-mngmt/webinterface/computers/new_mcdef.php
index eec7a3dd..e36c76bb 100644
--- a/ldap-site-mngmt/webinterface/computers/new_mcdef.php
+++ b/ldap-site-mngmt/webinterface/computers/new_mcdef.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$mnr = 4;
-$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 = "new_mcdef.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 4;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/new_menuentry.php b/ldap-site-mngmt/webinterface/computers/new_menuentry.php
index 155ed245..c407f5e7 100644
--- a/ldap-site-mngmt/webinterface/computers/new_menuentry.php
+++ b/ldap-site-mngmt/webinterface/computers/new_menuentry.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$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 = "new_menuentry.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/new_pxe.php b/ldap-site-mngmt/webinterface/computers/new_pxe.php
index 8eef2888..a6f479e3 100644
--- a/ldap-site-mngmt/webinterface/computers/new_pxe.php
+++ b/ldap-site-mngmt/webinterface/computers/new_pxe.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$mnr = 3;
-$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 = "new_pxe.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 2;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/no_ip.dwt b/ldap-site-mngmt/webinterface/computers/no_ip.dwt
new file mode 100644
index 00000000..5bc09796
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/computers/no_ip.dwt
@@ -0,0 +1,11 @@
+<table border='0' cellpadding='5' cellspacing='0' width='100%'>
+ <tr>
+ <td colspan='2'><h3>Diese Funktion steht Ihnen nicht zur Verf&uuml;gung. </h3>
+ Sie verf&uuml;gen &uuml;ber keine IP Adressen, die Sie an Rechner, DHCP Subnetze vergeben,
+ bzw. an untergeordnete AUs delegieren k&ouml;nnen.</td>
+ </tr>
+ <tr>
+ <td height='10'></td>
+ </tr>
+
+</table> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/computers/no_ip.php b/ldap-site-mngmt/webinterface/computers/no_ip.php
new file mode 100644
index 00000000..bfda6f02
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/computers/no_ip.php
@@ -0,0 +1,28 @@
+<?php
+
+include('../standard_header.inc.php');
+
+# Dateiname und evtl. Pfad des Templates für die Webseite
+$webseite = "no_ip.dwt";
+
+include("computers_header.inc.php");
+
+###############################################################################
+
+$mnr = 2;
+$sbmnr = -1;
+$mcnr = -1;
+
+$mnr = $_GET['mnr'];
+
+# Menuleiste erstellen
+createMainMenu($rollen, $mainnr);
+createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr);
+
+###############################################################################
+
+###############################################################################
+
+include("computers_footer.inc.php");
+
+?>
diff --git a/ldap-site-mngmt/webinterface/computers/pxe.php b/ldap-site-mngmt/webinterface/computers/pxe.php
index 26712077..d4f86026 100644
--- a/ldap-site-mngmt/webinterface/computers/pxe.php
+++ b/ldap-site-mngmt/webinterface/computers/pxe.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$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 = "pxe.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php b/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php
index 3bd34305..e916048b 100644
--- a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php
+++ b/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$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 = "pxe_bootmenue.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/pxe_globals.php b/ldap-site-mngmt/webinterface/computers/pxe_globals.php
index 7ab7892f..0bfdaee6 100644
--- a/ldap-site-mngmt/webinterface/computers/pxe_globals.php
+++ b/ldap-site-mngmt/webinterface/computers/pxe_globals.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$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 = "pxe_globals.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/rbshost.php b/ldap-site-mngmt/webinterface/computers/rbshost.php
index 3d53ba0a..101c5171 100644
--- a/ldap-site-mngmt/webinterface/computers/rbshost.php
+++ b/ldap-site-mngmt/webinterface/computers/rbshost.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$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 = "rbshost.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/showpxe.php b/ldap-site-mngmt/webinterface/computers/showpxe.php
index 8ed9b70d..7386aa83 100644
--- a/ldap-site-mngmt/webinterface/computers/showpxe.php
+++ b/ldap-site-mngmt/webinterface/computers/showpxe.php
@@ -2,27 +2,21 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Computers Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 3;
-$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 = "showpxe.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
$sbmnr = $_GET['sbmnr'];
$mcnr = $_GET['mcnr'];
-
# Menuleisten erstellen
createMainMenu($rollen, $mainnr);
createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr);
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/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");
diff --git a/ldap-site-mngmt/webinterface/dns/dns.php b/ldap-site-mngmt/webinterface/dns/dns.php
index 99fef1fb..4368d6a9 100644
--- a/ldap-site-mngmt/webinterface/dns/dns.php
+++ b/ldap-site-mngmt/webinterface/dns/dns.php
@@ -1,20 +1,15 @@
<?php
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "DNS Zone Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mnr = 0;
-$mainnr = 6;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "dns_inwork.dwt";
-include("../class.FastTemplate.php");
-
include('dns_header.inc.php');
###################################################################################
+$mnr = 0;
+
# Menuleisten erstellen
createMainMenu($rollen, $mainnr);
createDNSMenu($rollen, $mnr);
diff --git a/ldap-site-mngmt/webinterface/dns/dns_header.inc.php b/ldap-site-mngmt/webinterface/dns/dns_header.inc.php
index 34632b37..b6dfd984 100644
--- a/ldap-site-mngmt/webinterface/dns/dns_header.inc.php
+++ b/ldap-site-mngmt/webinterface/dns/dns_header.inc.php
@@ -1,8 +1,12 @@
<?php
-include("dns_menu.php");
-$template = new FastTemplate(".");
+# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
+$titel = "DNS Zone Management";
+# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
+$mainnr = 4;
+
+$template = new FastTemplate(".");
# dem erstellten Template-Objekt eine Vorlage zuweisen
$definedTemplates = array("Vorlage" => "dns.dwt",
"Login" => "../logout_form.inc.dwt",
@@ -15,7 +19,9 @@ if (isset($additionalTemplates)) {
}
}
$template->define($definedTemplates);
-
$template->assign(array("SEITENTITEL" => $titel, "ROLLE" => "mainadmin", "AU" => $au_ou, "DOMAIN" => $assocdom, "USERCN" => $usercn));
-
+
+
+include("dns_menu.php");
+
?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/home.dwt b/ldap-site-mngmt/webinterface/home.dwt
index 4ffe69e9..1b25eaf8 100644
--- a/ldap-site-mngmt/webinterface/home.dwt
+++ b/ldap-site-mngmt/webinterface/home.dwt
@@ -64,19 +64,16 @@
<td>
<table cellpadding='7' cellspacing='0' border='1' align='left' width='100%' style='border-width: 0 0 0 0;'>
<tr>
- <td width='25%' colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Administrative Einheiten</b></td>
- <td width='10%' colspan='4' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Rollen</b></td>
+ <td width='70%' colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Administrative Einheiten</b></td>
+ <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Rolle</b></td>
</tr>
<!-- BEGIN DYNAMIC BLOCK: Aus -->
<tr>
<td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
<a href='zwischen.php?audn={AUDN}&rollen={ROLLEN}' class='headerlink'>{AU}</a> </td>
- <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{AUDN} </td>
- <td width='10%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{MA} &nbsp;</td>
- <td width='10%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{HA} &nbsp;</td>
- <td width='10%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{DA} &nbsp;</td>
- <td width='10%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{ZA} &nbsp;</td>
+ <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{AUDN} </td>
+ <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{MA} &nbsp;</td>
</tr>
<!-- END DYNAMIC BLOCK: Aus -->
diff --git a/ldap-site-mngmt/webinterface/index.php b/ldap-site-mngmt/webinterface/index.php
index 83938ae7..a519479d 100644
--- a/ldap-site-mngmt/webinterface/index.php
+++ b/ldap-site-mngmt/webinterface/index.php
@@ -16,9 +16,6 @@ include('standard_header.inc.php');
$titel = "Rechner und IP Management Startseite";
$webseite = "start.dwt";
-# Einbinden der Template-Funktionen
-
-include("class.FastTemplate.php");
# neues Template-Objekt erstellen
$template = new FastTemplate(".");
diff --git a/ldap-site-mngmt/webinterface/ip/ip.php b/ldap-site-mngmt/webinterface/ip/ip.php
index 8a435442..9566d124 100644
--- a/ldap-site-mngmt/webinterface/ip/ip.php
+++ b/ldap-site-mngmt/webinterface/ip/ip.php
@@ -1,27 +1,20 @@
<?php
include('../standard_header.inc.php');
-
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "IP Address Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 2;
-$mnr = 0;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "ip_start.dwt";
-include("../class.FastTemplate.php");
-
include("ip_header.inc.php");
###################################################################################
+$mnr = 0;
+
# Menuleiste erstellen
createMainMenu($rollen, $mainnr);
createIPMenu($rollen, $mnr);
-include("ip_blocks.inc.php");
-
###################################################################################
include("ip_footer.inc.php");
diff --git a/ldap-site-mngmt/webinterface/ip/ip_deleg.php b/ldap-site-mngmt/webinterface/ip/ip_deleg.php
index 6b1cf3ed..6e15b6f2 100644
--- a/ldap-site-mngmt/webinterface/ip/ip_deleg.php
+++ b/ldap-site-mngmt/webinterface/ip/ip_deleg.php
@@ -5,7 +5,7 @@ include('../standard_header.inc.php');
# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
$titel = "IP Address Management";
# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 2;
+$mainnr = 1;
$mnr = 2;
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "ip_deleg.dwt";
diff --git a/ldap-site-mngmt/webinterface/ip/ip_deleg_change.php b/ldap-site-mngmt/webinterface/ip/ip_deleg_change.php
index d3fddc03..d9122eb0 100644
--- a/ldap-site-mngmt/webinterface/ip/ip_deleg_change.php
+++ b/ldap-site-mngmt/webinterface/ip/ip_deleg_change.php
@@ -20,6 +20,7 @@ print_r($auDN);echo "<br><br>";
$syntax = new Syntaxcheck;
$url = "ip_deleg.php";
+$seconds = 200;
echo "
<html>
@@ -44,59 +45,57 @@ $tochange2 = array_unique(array_merge($diff3,$diff4));
# print_r($tochange2);echo "<br><br>";
$tochange = array_unique(array_merge($tochange1,$tochange2));
-print_r($tochange);echo "<br><br>";
+#print_r($tochange);echo "<br><br>";
foreach ($tochange as $i){
+ $childaudnexp = ldap_explode_dn($childauDN[$i], 1);
+ $childau = $childaudnexp[0];
+ #print_r($childau);
+
if ( $oldrange1[$i] == "" && $oldrange2[$i] == "" && $newrange1[$i] != "" && $newrange2[$i] != "" ){
- echo "neuer IP Bereich delegieren ...";echo "<br>";echo "<br>";
- print_r($auDN[$i]);echo "<br>";
- print_r($childauDN[$i]);echo "<br>";
- echo "<br>";
- # echo "alte IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>";
+
+ echo "Neuen IP Bereich an <b>$childau</b> delegieren:";echo "<br>";echo "<br>";
echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>";
if ($syntax->check_ip_syntax($newrange1[$i]) && $syntax->check_ip_syntax($newrange2[$i])){
- echo "korrekte IP Syntax<br>";
+ #echo "korrekte IP Syntax<br>";
$newrange1[$i] = htmlentities($newrange1[$i]);
$newrange2[$i] = htmlentities($newrange2[$i]);
$newrange_array = array($newrange1[$i],$newrange2[$i]);
- print_r($newrange_array);
+ #print_r($newrange_array);
$newrange = implode('_',$newrange_array);
- print_r($newrange);
+ #print_r($newrange);
# $oldip[$i] = htmlentities($oldip[$i]);
if (new_ip_delegation($newrange,$childauDN[$i],$auDN[$i])){
- echo "Neuer IP Bereich delegiert eingetragen<br>";
- }else{echo "Fehler beim delegieren des neuen IP Bereichs<br>";}
+ echo "<br>Neuer IP Bereich erfolgreich delegiert<br>";
+ }else{echo "<br>Fehler beim delegieren des neuen IP Bereichs<br>";}
}else{echo "falsche IP Syntax<br>";}
$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
Falls nicht, klicken Sie hier <a href='ip_deleg.php' style='publink'>back</a>";
- redirect(2, $url, $mesg, $addSessionId = TRUE);
+ redirect($seconds, $url, $mesg, $addSessionId = TRUE);
}
elseif ( $oldrange1[$i] != "" && $oldrange2[$i] != "" && $newrange1[$i] == "" && $newrange2[$i] == "" ){
- echo "loeschen IP Delegierung ...";echo "<br>";echo "<br>";
- print_r($auDN[$i]);echo "<br>";
- print_r($childauDN[$i]);echo "<br>";
- echo "<br>";
- echo "alte IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>";
- echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>";
+
+ echo "IP Delegierung von <b>$childau</b> l&ouml;schen:";echo "<br>";echo "<br>";
+ echo "zu l&ouml;schende IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>";
$oldrange1[$i] = htmlentities($oldrange1[$i]);
$oldrange2[$i] = htmlentities($oldrange2[$i]);
$oldip_array = array($oldrange1[$i],$oldrange2[$i]);
$oldrange = implode('_',$oldip_array);
if (delete_ip_delegation($oldrange,$childauDN[$i],$auDN[$i])){
- $mesg = "IP Delegierung geloescht<br>";
+ $mesg = "<br>IP Delegierung geloescht<br>";
}else{
- $mesg = "Fehler beim loeschen der IP Delegierung<br>";
+ $mesg = "<br>Fehler beim loeschen der IP Delegierung<br>";
}
$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
Falls nicht, klicken Sie hier <a href='ip_deleg.php' style='publink'>back</a>";
- redirect(2, $url, $mesg, $addSessionId = TRUE);
+ redirect($seconds, $url, $mesg, $addSessionId = TRUE);
}
elseif ( $oldrange1[$i] != "" && $oldrange2[$i] != "" && $newrange1[$i] != "" && $newrange2[$i] != "" ){
@@ -107,88 +106,85 @@ foreach ($tochange as $i){
if ( ($nr1 > $or1 || $nr2 < $or2) && !($nr1 < $or1 || $nr2 > $or2) ){
- echo "reduzieren IP Delegierung";echo "<br>";echo "<br>";
- print_r($auDN[$i]);echo "<br>";
- print_r($childauDN[$i]);echo "<br>";
+ echo "IP Delegierung von <b>$childau</b> reduzieren:";echo "<br>";echo "<br>";
echo "alte IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>";
echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>";
if ($syntax->check_ip_syntax($newrange1[$i]) && $syntax->check_ip_syntax($newrange2[$i])){
- echo "korrekte IP Syntax<br>";
+ #echo "korrekte IP Syntax<br>";
$newrange1[$i] = htmlentities($newrange1[$i]);
$newrange2[$i] = htmlentities($newrange2[$i]);
$newrange_array = array($newrange1[$i],$newrange2[$i]);
$newrange = implode('_',$newrange_array);
- print_r($newrange);
+ #print_r($newrange);
$oldrange1[$i] = htmlentities($oldrange1[$i]);
$oldrange2[$i] = htmlentities($oldrange2[$i]);
$oldip_array = array($oldrange1[$i],$oldrange2[$i]);
$oldrange = implode('_',$oldip_array);
- print_r($oldrange);
+ #print_r($oldrange);
if (reduce_ip_delegation($oldrange,$newrange,$childauDN[$i],$auDN[$i])){
- $mesg = "IP Range verkleinert<br>";
+ $mesg = "<br>IP Range verkleinert<br>";
}else{
- $mesg = "Fehler beim verkleinern der IP Range<br>";
+ $mesg = "<br>Fehler beim verkleinern der IP Range<br>";
}
}else{echo "falsche IP Syntax<br>";}
$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
Falls nicht, klicken Sie hier <a href='ip_deleg.php' style='publink'>back</a>";
- redirect(2, $url, $mesg, $addSessionId = TRUE);
+ redirect($seconds, $url, $mesg, $addSessionId = TRUE);
}elseif( ($nr1 < $or1 || $nr2 > $or2) && !($nr1 > $or1 || $nr2 < $or2) ){
- echo "vergroessern IP Delegierung";echo "<br>";echo "<br>";
- print_r($auDN[$i]);echo "<br>";
- print_r($childauDN[$i]);echo "<br>";
- echo "<br>";
+ echo "IP Delegierung von <b>$childau</b> erweitern:";echo "<br>";echo "<br>";
echo "alte IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>";
echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>";
if ($syntax->check_ip_syntax($newrange1[$i]) && $syntax->check_ip_syntax($newrange2[$i])){
- echo "korrekte IP Syntax<br>";
+ #echo "korrekte IP Syntax<br>";
$newrange1[$i] = htmlentities($newrange1[$i]);
$newrange2[$i] = htmlentities($newrange2[$i]);
$newrange_array = array($newrange1[$i],$newrange2[$i]);
$newrange = implode('_',$newrange_array);
- print_r($newrange);
+ #print_r($newrange);
$oldrange1[$i] = htmlentities($oldrange1[$i]);
$oldrange2[$i] = htmlentities($oldrange2[$i]);
$oldip_array = array($oldrange1[$i],$oldrange2[$i]);
$oldrange = implode('_',$oldip_array);
- print_r($oldrange);
+ #print_r($oldrange);
if (expand_ip_delegation($oldrange,$newrange,$childauDN[$i],$auDN[$i])){
- $mesg = "IP Range erweitert<br>";
+ $mesg = "<br>IP Range erweitert<br>";
}else{
- $mesg = "Fehler beim erweitern der IP Range<br>";
+ $mesg = "<br>Fehler beim erweitern der IP Range<br>";
}
}else{
echo "falsche IP Syntax<br>";
}
$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
Falls nicht, klicken Sie hier <a href='ip_deleg.php' style='publink'>back</a>";
- redirect(2, $url, $mesg, $addSessionId = TRUE);
+ redirect($seconds, $url, $mesg, $addSessionId = TRUE);
}
else{
$mesg = "<br>Verschieben (Shiften) der Delegierung nicht moeglich!<br>
Nur Vergroessern und Verkleinern moeglich!<br>";
$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
Falls nicht, klicken Sie hier <a href='ip_deleg.php' style='publink'>back</a>";
- redirect(2, $url, $mesg, $addSessionId = TRUE);
+ redirect($seconds, $url, $mesg, $addSessionId = TRUE);
}
}
else{
$mesg = "keine Aenderung<br>";
$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
Falls nicht, klicken Sie hier <a href='ip_deleg.php' style='publink'>back</a>";
- redirect(2, $url, $mesg, $addSessionId = TRUE);
- }
+ redirect($seconds, $url, $mesg, $addSessionId = TRUE);
+ }
+
+ echo "<br><br>";
}
echo "
diff --git a/ldap-site-mngmt/webinterface/ip/ip_dhcp.php b/ldap-site-mngmt/webinterface/ip/ip_dhcp.php
index b89d6506..a1c2eea0 100644
--- a/ldap-site-mngmt/webinterface/ip/ip_dhcp.php
+++ b/ldap-site-mngmt/webinterface/ip/ip_dhcp.php
@@ -5,7 +5,7 @@ include('../standard_header.inc.php');
# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
$titel = "IP Address Management";
# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 2;
+$mainnr = 1;
$mnr = 2;
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "ip_dhcp.dwt";
diff --git a/ldap-site-mngmt/webinterface/ip/ip_header.inc.php b/ldap-site-mngmt/webinterface/ip/ip_header.inc.php
index 96029f43..a07c513e 100644
--- a/ldap-site-mngmt/webinterface/ip/ip_header.inc.php
+++ b/ldap-site-mngmt/webinterface/ip/ip_header.inc.php
@@ -1,5 +1,10 @@
<?php
-include("ip_menu.php");
+
+# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
+$titel = "IP Address Management";
+# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
+$mainnr = 1;
+
$template = new FastTemplate(".");
@@ -19,4 +24,8 @@ $template->define($definedTemplates);
$template->assign(array("SEITENTITEL" => $titel, "ROLLE" => "mainadmin", "AU" => $au_ou, "DOMAIN" => $assocdom, "USERCN" => $usercn));
+
+include("ip_menu.php");
+include("ip_blocks.inc.php");
+
?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/ip/ip_menu.php b/ldap-site-mngmt/webinterface/ip/ip_menu.php
index 459e47e8..8b1ebd4c 100644
--- a/ldap-site-mngmt/webinterface/ip/ip_menu.php
+++ b/ldap-site-mngmt/webinterface/ip/ip_menu.php
@@ -22,7 +22,7 @@ function createIPMenu($rollen , $mnr) {
"zugriff" => "alle"),
array("link" => $iprechnerlink,
"text" => "IP Adressen Rechner",
- "zugriff" => array("MainAdmin","HostAdmin")),
+ "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin")),
#array("link" => $ipdhcplink,
# "text" => "IP Adressen DHCP",
# "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")),
diff --git a/ldap-site-mngmt/webinterface/ip/ip_rechner.dwt b/ldap-site-mngmt/webinterface/ip/ip_rechner.dwt
index ecadf98a..b300e88e 100644
--- a/ldap-site-mngmt/webinterface/ip/ip_rechner.dwt
+++ b/ldap-site-mngmt/webinterface/ip/ip_rechner.dwt
@@ -8,8 +8,9 @@
<tr><td>
<table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'>
<tr>
- <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Rechner Name</b></td>
- <td width='70%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>IP Adresse</b></td>
+ <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Rechner Name</b></td>
+ <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>IP Adresse</b></td>
+ <td width='50%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>DHCP</b></td>
</tr>
<form action='ip_rechner_change.php' method='post'>
@@ -19,14 +20,14 @@
<tr>
<td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{HOSTNAME} &nbsp;</td>
<td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>
- <input type='Text' name='newip[]' value='{IP}' size='15' class='medium_form_field'> &nbsp;&nbsp;{DHCPCONT}
- <input type='hidden' name='oldip[]' value='{OLDIP}'>
- <input type='hidden' name='hostdn[]' value='{HOSTDN}'>
- <input type='hidden' name='audn[]' value='{AUDN}'>
- &nbsp;
- </td>
+ <input type='Text' name='newip[]' value='{IP}' size='15' class='medium_form_field'></td>
+ <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> {DHCPCONT} &nbsp;</td>
</tr>
-
+ <input type='hidden' name='oldip[]' value='{OLDIP}'>
+ <input type='hidden' name='hostdn[]' value='{HOSTDN}'>
+ <input type='hidden' name='fixadd[]' value='{FIXADD}'>
+ <input type='hidden' name='audn[]' value='{AUDN}'>
+
<!-- END DYNAMIC BLOCK: Hosts -->
</table></td>
diff --git a/ldap-site-mngmt/webinterface/ip/ip_rechner.php b/ldap-site-mngmt/webinterface/ip/ip_rechner.php
index 66ea23ee..e49c6a40 100644
--- a/ldap-site-mngmt/webinterface/ip/ip_rechner.php
+++ b/ldap-site-mngmt/webinterface/ip/ip_rechner.php
@@ -5,7 +5,7 @@ include('../standard_header.inc.php');
# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
$titel = "IP Address Management";
# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 2;
+$mainnr = 1;
$mnr = 1;
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "ip_rechner.dwt";
@@ -27,30 +27,44 @@ include("ip_blocks.inc.php");
$template->assign(array("IP" => "",
"OLDIP" => "",
"DHCPCONT" => "",
+ "FIXADD" => "",
"HOSTNAME" => "Noch keine Rechner angelegt",
"HOSTDN" => ""));
-$host_array = get_hosts($auDN,array("dn","hostname","ipaddress","dhcphlpcont"));
+$host_array = get_hosts($auDN,array("dn","hostname","ipaddress","dhcphlpcont","dhcpoptfixed-address"));
# print_r ($host_array);
$template->define_dynamic("Hosts", "Webseite");
foreach ($host_array as $host){
$hostip = explode('_',$host['ipaddress']);
-
+
+ $dhcpcont = "";
+ $fixadd = "";
if ( count($host['dhcphlpcont']) != 0 && $host['ipaddress'] == "" ){
- $subnetCN = explode('cn=',$host['dhcphlpcont']);
- $dynsubnet = explode(',', $subnetCN[1]);
- $dhcpcont = " DYNAMISCH &nbsp;&nbsp;(DHCP, Subnet $dynsubnet[0])";
+ #$subnetCN = explode('cn=',$host['dhcphlpcont']);
+ #$dynsubnet = explode(',', $subnetCN[1]);
+ #$dhcpcont = " DYNAMISCH &nbsp;&nbsp;(DHCP, Subnet $dynsubnet[0])";
+ $dhcpcont = " dynamisch";
+ $fixadd = $host['dhcpoptfixed-address'];
}elseif( count($host['dhcphlpcont']) != 0 && $host['ipaddress'] != "" ){
- $subnetCN = explode('cn=',$host['dhcphlpcont']);
- $dynsubnet = explode(',', $subnetCN[1]);
- $dhcpcont = " STATISCH &nbsp;&nbsp;(DHCP, Subnet $dynsubnet[0])";
- }else{$dhcpcont = "";}
+ #$subnetCN = explode('cn=',$host['dhcphlpcont']);
+ #$dynsubnet = explode(',', $subnetCN[1]);
+ #$dhcpcont = " STATISCH &nbsp;&nbsp;(DHCP, Subnet $dynsubnet[0])";
+ if ( $host['dhcpoptfixed-address'] == "ip") {
+ $dhcpcont = " fix";
+ $fixadd = $host['dhcpoptfixed-address'];
+ }
+ if ( $host['dhcpoptfixed-address'] == "hostname") {
+ $dhcpcont = " fix (&uuml;ber DNS Name)";
+ $fixadd = $host['dhcpoptfixed-address'];
+ }
+ }
$template->assign(array("IP" => $hostip[0],
"OLDIP" => $hostip[0],
"DHCPCONT" => $dhcpcont,
+ "FIXADD" => $fixadd,
"HOSTNAME" => $host['hostname'],
"HOSTDN" => $host['dn'],
"AUDN" => $auDN ));
diff --git a/ldap-site-mngmt/webinterface/ip/ip_rechner_change.php b/ldap-site-mngmt/webinterface/ip/ip_rechner_change.php
index 851eb77f..4db8bed0 100644
--- a/ldap-site-mngmt/webinterface/ip/ip_rechner_change.php
+++ b/ldap-site-mngmt/webinterface/ip/ip_rechner_change.php
@@ -5,6 +5,7 @@ include('../standard_header.inc.php');
$hostDN = $_POST['hostdn'];
$oldip = $_POST['oldip'];
$newip = $_POST['newip'];
+$fixadd = $_POST['fixadd'];
$syntax = new Syntaxcheck;
$url = "ip_rechner.php";
@@ -68,7 +69,7 @@ foreach ($tochange as $i){
$oldip[$i] = htmlentities($oldip[$i]);
$oldip_array = array($oldip[$i],$oldip[$i]);
$oldipp = implode('_',$oldip_array);
- if (modify_ip_host($newipp,$hostDN[$i],$auDN)){
+ if (modify_ip_host($newipp,$hostDN[$i],$auDN,$fixadd[$i])){
$mesg = "IP Adresse geaendert<br>";
adjust_hostip_tftpserverip($oldip[$i],$newip[$i]);
# Falls Rechner in DHCP
diff --git a/ldap-site-mngmt/webinterface/ip/no_ip.php b/ldap-site-mngmt/webinterface/ip/no_ip.php
index 3cf62d81..51a4b030 100644
--- a/ldap-site-mngmt/webinterface/ip/no_ip.php
+++ b/ldap-site-mngmt/webinterface/ip/no_ip.php
@@ -2,28 +2,21 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "IP Address Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 2;
-$mnr = 1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "no_ip.dwt";
-include("../class.FastTemplate.php");
-
include("ip_header.inc.php");
###############################################################################
+$mnr = 1;
+
$mnr = $_GET['mnr'];
# Menuleiste erstellen
createMainMenu($rollen, $mainnr);
createIPMenu($rollen, $mnr);
-include("ip_blocks.inc.php");
-
###############################################################################
###############################################################################
diff --git a/ldap-site-mngmt/webinterface/lib/au_management_functions.php b/ldap-site-mngmt/webinterface/lib/au_management_functions.php
index 0f725198..35881fec 100644
--- a/ldap-site-mngmt/webinterface/lib/au_management_functions.php
+++ b/ldap-site-mngmt/webinterface/lib/au_management_functions.php
@@ -68,12 +68,12 @@ function new_childau($childDN,$childou,$childcn,$childdesc,$mainadmin){
$entryMA ['cn'] = "MainAdmin";
$entryMA ['member'] = $mainadmin;
if ($resultMA = ldap_add($ds,"cn=MainAdmin,cn=roles,".$childDN,$entryMA)){
- $admins = array("HostAdmin","DhcpAdmin","ZoneAdmin");
- foreach ($admins as $admin){
- $entryAdmin ['objectclass'] = "Admins";
- $entryAdmin ['cn'] = $admin;
- ldap_add($ds,"cn=".$admin.",cn=roles,".$childDN,$entryAdmin);
- }
+ #$admins = array("HostAdmin","DhcpAdmin","ZoneAdmin");
+ #foreach ($admins as $admin){
+ # $entryAdmin ['objectclass'] = "Admins";
+ # $entryAdmin ['cn'] = $admin;
+ # ldap_add($ds,"cn=".$admin.",cn=roles,".$childDN,$entryAdmin);
+ #}
return 1;
}
else{
@@ -124,6 +124,8 @@ function delete_childau($childDN,$childou,$delmodus){
# ChildAU-Rollen unterhalb dc-Knoten löschen (nur diese)(oder übernehmen: MA zu HA, HA zu HA)
$roles = get_roles($childDN);
#print_r($roles); echo "<br>";
+
+ # was ist wenn rollen nur noch ein member haben ... fehler
if(count($roles['MainAdmin']) != 0){
$mainadmins = $roles['MainAdmin'];
for ($i=0; $i<count($mainadmins); $i++){
@@ -281,14 +283,16 @@ function new_child_domain($childdomain, $childDN, $assocdom, $domDN){
#print_r($entryRoleHost); echo "<br>";
$resultMA = ldap_mod_add($ds,"cn=MainAdmin,cn=roles,".$domDN,$entryRoleMain);
}
- if(count($roles['HostAdmin']) != 0){
- $hostadmins = $roles['HostAdmin'];
- for ($i=0; $i<count($hostadmins); $i++){
- $entryRoleHost ['member'][$i] = $hostadmins[$i];
- }
- #print_r($entryRoleHost); echo "<br>";
- $resultHA = ldap_mod_add($ds,"cn=HostAdmin,cn=roles,".$domDN,$entryRoleHost);
- }
+ #if(count($roles['HostAdmin']) != 0){
+ # $dnsroles = get_roles($domDN);
+ # ...
+ # $hostadmins = $roles['HostAdmin'];
+ # for ($i=0; $i<count($hostadmins); $i++){
+ # $entryRoleHost ['member'][$i] = $hostadmins[$i];
+ # }
+ # #print_r($entryRoleHost); echo "<br>";
+ # $resultHA = ldap_mod_add($ds,"cn=HostAdmin,cn=roles,".$domDN,$entryRoleHost);
+ #}
# Domainname zu associatedDomain der ChildAU
$entryAD['objectclass'] = "domainRelatedObject";
$entryAD['associateddomain'] = $assocdom;
@@ -348,20 +352,20 @@ function new_child_domain($childdomain, $childDN, $assocdom, $domDN){
#print_r($entryRoleMain); echo "<br>";
$resultMA = ldap_add($ds,"cn=MainAdmin,cn=roles,".$dcDN,$entryRoleMain);
- $entryRoleHost ['objectclass'] = "Admins";
- $entryRoleHost ['cn'] = "HostAdmin";
if(count($roles['HostAdmin']) != 0){
+ $entryRoleHost ['objectclass'] = "groupOfNames";
+ $entryRoleHost ['cn'] = "HostAdmin";
$hostadmins = $roles['HostAdmin'];
for ($i=0; $i<count($hostadmins); $i++){
$entryRoleHost ['member'][$i] = $hostadmins[$i];
}
#print_r($entryRoleHost); echo "<br>";
- }
- $resultHA = ldap_add($ds,"cn=HostAdmin,cn=roles,".$dcDN,$entryRoleHost);
+ $resultHA = ldap_add($ds,"cn=HostAdmin,cn=roles,".$dcDN,$entryRoleHost);
+ }
- $entryRoleZone ['objectclass'] = "Admins";
- $entryRoleZone ['cn'] = "ZoneAdmin";
- $resultZA = ldap_add($ds,"cn=ZoneAdmin,cn=roles,".$dcDN,$entryRoleZone);
+ #$entryRoleZone ['objectclass'] = "Admins";
+ #$entryRoleZone ['cn'] = "ZoneAdmin";
+ #$resultZA = ldap_add($ds,"cn=ZoneAdmin,cn=roles,".$dcDN,$entryRoleZone);
if ($resultMA){$resultsum = true;}
}
@@ -431,7 +435,7 @@ function change_child_domain($childdomain, $oldchilddomain, $childDN, $assocdom,
#print_r($entryAN); echo "<br>";
$result = ldap_mod_del($ds,$domDN,$entryAN);
- # Eigene Rollen aus dc-Knoten enrfernen
+ # Eigene Rollen aus dc-Knoten entfernen
$roles = get_roles($childDN);
if(count($roles['MainAdmin']) != 0){
$mainadmins = $roles['MainAdmin'];
@@ -976,9 +980,12 @@ function new_role_member($userDN,$role,$auDN,$domDN){
global $ds, $suffix, $ldapError;
+ $actroles = get_roles($auDN);
+
$entry['member'] = $userDN;
if ($domDN != ""){
+ $actdnsroles = get_roles_dns($domDN);
switch ($role){
case 'MainAdmin':
$roleDN1 = "cn=".$role.",cn=roles,".$auDN;
@@ -993,10 +1000,18 @@ function new_role_member($userDN,$role,$auDN,$domDN){
break;
case 'HostAdmin':
$roleDN1 = "cn=".$role.",cn=roles,".$auDN;
- $roleDN2 = "cn=".$role.",cn=roles,".$domDN;
- $results1 = ldap_mod_add($ds,$roleDN1,$entry);
- $results2 = ldap_mod_add($ds,$roleDN2,$entry);
- if ($results1 && $results2){
+ #$roleDN2 = "cn=".$role.",cn=roles,".$domDN;
+ if ( count($actroles['HostAdmin']) != 0 ){
+ $results1 = ldap_mod_add($ds,$roleDN1,$entry);
+ #$results2 = ldap_mod_add($ds,$roleDN2,$entry);
+ }else{
+ $entrynew ['objectclass'] = "groupOfNames";
+ $entrynew ['cn'] = $role;
+ $entrynew ['member'] = $userDN;
+ $results1 = ldap_add($ds,$roleDN1,$entrynew);
+ #$results2 = ldap_add($ds,$roleDN2,$entryHA);
+ }
+ if ($results1){ #&& $results2){
return 1;
}else{
return 0;
@@ -1004,7 +1019,30 @@ function new_role_member($userDN,$role,$auDN,$domDN){
break;
case 'DhcpAdmin':
$roleDN = "cn=".$role.",cn=roles,".$auDN;
- $results = ldap_mod_add($ds,$roleDN,$entry);
+ if ( count($actroles['DhcpAdmin']) != 0 ){
+ $results = ldap_mod_add($ds,$roleDN,$entry);
+ }else{
+ $entrynew ['objectclass'] = "groupOfNames";
+ $entrynew ['cn'] = $role;
+ $entrynew ['member'] = $userDN;
+ $results = ldap_add($ds,$roleDN,$entrynew);
+ }
+ if ($results){
+ return 1;
+ }else{
+ return 0;
+ }
+ break;
+ case 'RbsAdmin':
+ $roleDN = "cn=".$role.",cn=roles,".$auDN;
+ if ( count($actroles['RbsAdmin']) != 0 ){
+ $results = ldap_mod_add($ds,$roleDN,$entry);
+ }else{
+ $entrynew ['objectclass'] = "groupOfNames";
+ $entrynew ['cn'] = $role;
+ $entrynew ['member'] = $userDN;
+ $results = ldap_add($ds,$roleDN,$entrynew);
+ }
if ($results){
return 1;
}else{
@@ -1013,10 +1051,17 @@ function new_role_member($userDN,$role,$auDN,$domDN){
break;
case 'ZoneAdmin':
$roleDN1 = "cn=".$role.",cn=roles,".$auDN;
- $roleDN2 = "cn=".$role.",cn=roles,".$domDN;
- $results1 = ldap_mod_add($ds,$roleDN1,$entry);
- $results2 = ldap_mod_add($ds,$roleDN2,$entry);
- if ($results1 && $results2){
+ #$roleDN2 = "cn=".$role.",cn=roles,".$domDN;
+ if ( count($actroles['ZoneAdmin']) != 0 ){
+ $results1 = ldap_mod_add($ds,$roleDN1,$entry);
+ #$results2 = ldap_mod_add($ds,$roleDN2,$entry);
+ }else{
+ $entrynew ['objectclass'] = "groupOfNames";
+ $entrynew ['cn'] = $role;
+ $entrynew ['member'] = $userDN;
+ $results = ldap_add($ds,$roleDN1,$entrynew);
+ }
+ if ($results1){ #&& $results2){
return 1;
}else{
return 0;
@@ -1036,7 +1081,14 @@ function new_role_member($userDN,$role,$auDN,$domDN){
break;
case 'HostAdmin':
$roleDN = "cn=".$role.",cn=roles,".$auDN;
- $results = ldap_mod_add($ds,$roleDN,$entry);
+ if ( count($actroles['HostAdmin']) != 0 ){
+ $results = ldap_mod_add($ds,$roleDN,$entry);
+ }else{
+ $entrynew ['objectclass'] = "groupOfNames";
+ $entrynew ['cn'] = $role;
+ $entrynew ['member'] = $userDN;
+ $results = ldap_add($ds,$roleDN,$entrynew);
+ }
if ($results){
return 1;
}else{
@@ -1045,7 +1097,30 @@ function new_role_member($userDN,$role,$auDN,$domDN){
break;
case 'DhcpAdmin':
$roleDN = "cn=".$role.",cn=roles,".$auDN;
- $results = ldap_mod_add($ds,$roleDN,$entry);
+ if ( count($actroles['DhcpAdmin']) != 0 ){
+ $results = ldap_mod_add($ds,$roleDN,$entry);
+ }else{
+ $entrynew ['objectclass'] = "groupOfNames";
+ $entrynew ['cn'] = $role;
+ $entrynew ['member'] = $userDN;
+ $results = ldap_add($ds,$roleDN,$entrynew);
+ }
+ if ($results){
+ return 1;
+ }else{
+ return 0;
+ }
+ break;
+ case 'RbsAdmin':
+ $roleDN = "cn=".$role.",cn=roles,".$auDN;
+ if ( count($actroles['RbsAdmin']) != 0 ){
+ $results = ldap_mod_add($ds,$roleDN,$entry);
+ }else{
+ $entrynew ['objectclass'] = "groupOfNames";
+ $entrynew ['cn'] = $role;
+ $entrynew ['member'] = $userDN;
+ $results = ldap_add($ds,$roleDN,$entrynew);
+ }
if ($results){
return 1;
}else{
@@ -1054,7 +1129,14 @@ function new_role_member($userDN,$role,$auDN,$domDN){
break;
case 'ZoneAdmin':
$roleDN = "cn=".$role.",cn=roles,".$auDN;
- $results = ldap_mod_add($ds,$roleDN,$entry);
+ if ( count($actroles['ZoneAdmin']) != 0 ){
+ $results = ldap_mod_add($ds,$roleDN,$entry);
+ }else{
+ $entrynew ['objectclass'] = "groupOfNames";
+ $entrynew ['cn'] = $role;
+ $entrynew ['member'] = $userDN;
+ $results = ldap_add($ds,$roleDN,$entrynew);
+ }
if ($results){
return 1;
}else{
@@ -1070,15 +1152,24 @@ function delete_role_member($userDN,$role,$auDN,$domDN){
global $ds, $suffix, $ldapError;
+ $actroles = get_roles($auDN);
+
$entry['member'] = $userDN;
if ($domDN != ""){
+ $actdnsroles = get_roles_dns($domDN);
+
switch ($role){
case 'MainAdmin':
$roleDN1 = "cn=".$role.",cn=roles,".$auDN;
$roleDN2 = "cn=".$role.",cn=roles,".$domDN;
- $results1 = ldap_mod_del($ds,$roleDN1,$entry);
- $results2 = ldap_mod_del($ds,$roleDN2,$entry);
+ if ( count($actroles['MainAdmin']) == 1 || count($actdnsroles['MainAdmin']) == 1 ){
+ echo "Rolle <b>MainAdmin</b> muss mindestens ein Mitglied haben!<br>
+ <b>$userDN</b> wird nicht gel&ouml;scht.<br><br>";
+ }else{
+ $results1 = ldap_mod_del($ds,$roleDN1,$entry);
+ $results2 = ldap_mod_del($ds,$roleDN2,$entry);
+ }
if ($results1 && $results2){
return 1;
}else{
@@ -1087,10 +1178,14 @@ function delete_role_member($userDN,$role,$auDN,$domDN){
break;
case 'HostAdmin':
$roleDN1 = "cn=".$role.",cn=roles,".$auDN;
- $roleDN2 = "cn=".$role.",cn=roles,".$domDN;
- $results1 = ldap_mod_del($ds,$roleDN1,$entry);
- $results2 = ldap_mod_del($ds,$roleDN2,$entry);
- if ($results1 && $results2){
+ #$roleDN2 = "cn=".$role.",cn=roles,".$domDN;
+ if ( count($actroles['HostAdmin']) == 1 ){
+ $results1 = ldap_delete($ds,$roleDN1);
+ }else{
+ $results1 = ldap_mod_del($ds,$roleDN1,$entry);
+ }
+ #$results2 = ldap_mod_del($ds,$roleDN2,$entry);
+ if ($results1){ #&& $results2){
return 1;
}else{
return 0;
@@ -1098,7 +1193,24 @@ function delete_role_member($userDN,$role,$auDN,$domDN){
break;
case 'DhcpAdmin':
$roleDN = "cn=".$role.",cn=roles,".$auDN;
- $results = ldap_mod_del($ds,$roleDN,$entry);
+ if ( count($actroles['DhcpAdmin']) == 1 ){
+ $results = ldap_delete($ds,$roleDN);
+ }else{
+ $results = ldap_mod_del($ds,$roleDN,$entry);
+ }
+ if ($results){
+ return 1;
+ }else{
+ return 0;
+ }
+ break;
+ case 'RbsAdmin':
+ $roleDN = "cn=".$role.",cn=roles,".$auDN;
+ if ( count($actroles['RbsAdmin']) == 1 ){
+ $results = ldap_delete($ds,$roleDN);
+ }else{
+ $results = ldap_mod_del($ds,$roleDN,$entry);
+ }
if ($results){
return 1;
}else{
@@ -1107,10 +1219,14 @@ function delete_role_member($userDN,$role,$auDN,$domDN){
break;
case 'ZoneAdmin':
$roleDN1 = "cn=".$role.",cn=roles,".$auDN;
- $roleDN2 = "cn=".$role.",cn=roles,".$domDN;
- $results1 = ldap_mod_del($ds,$roleDN1,$entry);
- $results2 = ldap_mod_del($ds,$roleDN2,$entry);
- if ($results1 && $results2){
+ #$roleDN2 = "cn=".$role.",cn=roles,".$domDN;
+ if ( count($actroles['ZoneAdmin']) == 1 ){
+ $results1 = ldap_delete($ds,$roleDN1);
+ }else{
+ $results1 = ldap_mod_del($ds,$roleDN1,$entry);
+ }
+ #$results2 = ldap_mod_del($ds,$roleDN2,$entry);
+ if ($results1){ #&& $results2){
return 1;
}else{
return 0;
@@ -1121,7 +1237,12 @@ function delete_role_member($userDN,$role,$auDN,$domDN){
switch ($role){
case 'MainAdmin':
$roleDN = "cn=".$role.",cn=roles,".$auDN;
- $results = ldap_mod_del($ds,$roleDN,$entry);
+ if ( count($actroles['MainAdmin']) == 1 ){
+ echo "Rolle <b>MainAdmin</b> muss mindestens ein Mitglied haben!<br>
+ <b>$userDN</b> wird nicht gel&oumlscht.<br><br>";
+ }else{
+ $results = ldap_mod_del($ds,$roleDN,$entry);
+ }
if ($results){
return 1;
}else{
@@ -1130,7 +1251,11 @@ function delete_role_member($userDN,$role,$auDN,$domDN){
break;
case 'HostAdmin':
$roleDN = "cn=".$role.",cn=roles,".$auDN;
- $results = ldap_mod_del($ds,$roleDN,$entry);
+ if ( count($actroles['HostAdmin']) == 1 ){
+ $results = ldap_delete($ds,$roleDN);
+ }else{
+ $results = ldap_mod_del($ds,$roleDN,$entry);
+ }
if ($results){
return 1;
}else{
@@ -1139,7 +1264,24 @@ function delete_role_member($userDN,$role,$auDN,$domDN){
break;
case 'DhcpAdmin':
$roleDN = "cn=".$role.",cn=roles,".$auDN;
- $results = ldap_mod_del($ds,$roleDN,$entry);
+ if ( count($actroles['DhcpAdmin']) == 1 ){
+ $results = ldap_delete($ds,$roleDN);
+ }else{
+ $results = ldap_mod_del($ds,$roleDN,$entry);
+ }
+ if ($results){
+ return 1;
+ }else{
+ return 0;
+ }
+ break;
+ case 'RbsAdmin':
+ $roleDN = "cn=".$role.",cn=roles,".$auDN;
+ if ( count($actroles['RbsAdmin']) == 1 ){
+ $results = ldap_delete($ds,$roleDN);
+ }else{
+ $results = ldap_mod_del($ds,$roleDN,$entry);
+ }
if ($results){
return 1;
}else{
@@ -1148,7 +1290,11 @@ function delete_role_member($userDN,$role,$auDN,$domDN){
break;
case 'ZoneAdmin':
$roleDN = "cn=".$role.",cn=roles,".$auDN;
- $results = ldap_mod_del($ds,$roleDN,$entry);
+ if ( count($actroles['ZoneAdmin']) == 1 ){
+ $results = ldap_delete($ds,$roleDN);
+ }else{
+ $results = ldap_mod_del($ds,$roleDN,$entry);
+ }
if ($results){
return 1;
}else{
diff --git a/ldap-site-mngmt/webinterface/lib/commonlib.inc.php b/ldap-site-mngmt/webinterface/lib/commonlib.inc.php
index 7fb68395..e827c811 100644
--- a/ldap-site-mngmt/webinterface/lib/commonlib.inc.php
+++ b/ldap-site-mngmt/webinterface/lib/commonlib.inc.php
@@ -187,24 +187,24 @@ function createMainMenu($rollen , $mainnr) {
$mainmenu = array(array("link" => "au/au.php",
"text" => "AU Home",
"zugriff" => "alle"),
- array("link" => "roles/roles.php",
- "text" => "Admin Rollen",
- "zugriff" => array("MainAdmin")),
- array("link" => "ip/ip.php",
- "text" => "IP Management",
- "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")),
+ #array("link" => "roles/roles.php",
+ # "text" => "Admin Rollen",
+ # "zugriff" => array("MainAdmin","DhcpAdmin")),
+ #array("link" => "ip/ip.php",
+ # "text" => "IP Management",
+ # "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")),
array("link" => "computers/computers.php",
"text" => "Rechner",
"zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")),
- array("link" => "rbs/rbs.php",
- "text" => "RemoteBoot/PXE",
- "zugriff" => array("MainAdmin","HostAdmin")),
array("link" => $dhcplink,
"text" => "DHCP",
"zugriff" => array("MainAdmin","DhcpAdmin")),
+ array("link" => "rbs/rbs.php",
+ "text" => "RemoteBoot/PXE",
+ "zugriff" => array("MainAdmin","RbsAdmin")),
array("link" => "dns/dns.php",
"text" => "DNS",
- "zugriff" => array("MainAdmin","ZoneAdmin","HostAdmin")));
+ "zugriff" => array("MainAdmin","ZoneAdmin")));
# Zusammenstellen der Menuleiste
diff --git a/ldap-site-mngmt/webinterface/lib/config.inc.php b/ldap-site-mngmt/webinterface/lib/config.inc.php
index fe76a958..cc26d0fc 100644
--- a/ldap-site-mngmt/webinterface/lib/config.inc.php
+++ b/ldap-site-mngmt/webinterface/lib/config.inc.php
@@ -1,8 +1,7 @@
<?php
#Pfad festlegen wo die Anwendungsskripte sich befinden
- #$START_PATH="http://132.230.4.150/test/";
- #$START_PATH="https://132.230.9.56/lsm/";
+ #$START_PATH="http://localhost/lsm/";
$START_PATH="https://dhcp.uni-freiburg.de/";
# Anlegen einer Variablen für den Speicherort von den CSVs
@@ -19,8 +18,8 @@
$rootAU = "ou=UniFreiburg,ou=RIPM,dc=uni-freiburg,dc=de";
# der LDAP-Server für die Authentisierung der User
- #define('LDAP_HOST_RZ', '132.230.1.61');
- #define('LDAP_PORT_RZ', 636);
+ #define('LDAP_HOST', 'localhost');
+ #define('LDAP_PORT', 389);
#$suffix_rz = "dc=uni-freiburg,dc=de";
# einige Sachen, die aus Sicherheitsgründen in produktiven Umgebungen geändert werden sollten!!!
diff --git a/ldap-site-mngmt/webinterface/lib/host_management_functions.php b/ldap-site-mngmt/webinterface/lib/host_management_functions.php
index 8534371e..a45304bc 100644
--- a/ldap-site-mngmt/webinterface/lib/host_management_functions.php
+++ b/ldap-site-mngmt/webinterface/lib/host_management_functions.php
@@ -15,6 +15,7 @@
# Konfiguration laden
require_once("config.inc.php");
+
$ldapError = null;
###################################################################################################
@@ -66,6 +67,8 @@ function add_host($hostDN,$hostname,$hostdesc,$mac,$ip,$atts,$dhcp){
global $ds, $suffix, $auDN, $assocdom, $ldapError;
+ $syntax = new Syntaxcheck;
+
$entryhost ['objectclass'][0] = "Host";
$entryhost ['objectclass'][1] = "dhcpHost";
$entryhost ['objectclass'][2] = "dhcpOptions";
@@ -73,11 +76,13 @@ function add_host($hostDN,$hostname,$hostdesc,$mac,$ip,$atts,$dhcp){
$entryhost ["hostname"] = $hostname;
$entryhost ["domainname"] = $assocdom;
if ($hostdesc != ""){$entryhost ["description"] = $hostdesc;}
- if ($mac != ""){
+ if ($mac != "" && $syntax->check_mac_syntax($mac) ){
$entryhost ["hwaddress"] = $mac;
if ($dhcp != "none" && $dhcp != ""){
$entryhost ["dhcphlpcont"] = $dhcp;
}
+ }else{
+ echo "Keine MAC Adresse angelegt. Kein Eintrag im DHCP.<br>";
}
foreach (array_keys($atts) as $key){
if ($atts[$key] != ""){
@@ -89,7 +94,6 @@ function add_host($hostDN,$hostname,$hostdesc,$mac,$ip,$atts,$dhcp){
if ($result = ldap_add($ds, $hostDN, $entryhost)){
if($ip != ""){
- $syntax = new Syntaxcheck;
if( $syntax->check_ip_syntax($ip) ){
$newip_array = array($ip,$ip);
$newip = implode('_',$newip_array);
diff --git a/ldap-site-mngmt/webinterface/lib/ip_management_functions.php b/ldap-site-mngmt/webinterface/lib/ip_management_functions.php
index b158e35b..e5c30eca 100644
--- a/ldap-site-mngmt/webinterface/lib/ip_management_functions.php
+++ b/ldap-site-mngmt/webinterface/lib/ip_management_functions.php
@@ -455,13 +455,13 @@ function merge_ipranges($auDN)
}
}
}
- print_r($fipb_array);printf("<br>");
+ #print_r($fipb_array);printf("<br>");
foreach ( $fipb_array as $item ){
$entry ['FreeIPBlock'][] = $item;
}
$results = ldap_mod_replace($ds,$auDN,$entry);
- if ($results) echo "<br>FIPBs erfolgreich zusammengefasst!<br><br>" ;
- else echo "<br>Fehler beim eintragen der FIPBs!<br><br>";
+ if ($results) echo "FIPBs erfolgreich zusammengefasst!<br>" ;
+ else echo "Fehler beim eintragen der FIPBs!<br>";
$d = count($mipb_array);
for ($i=0; $i < $d; $i++){
@@ -475,13 +475,13 @@ function merge_ipranges($auDN)
}
}
}
- print_r($mipb_array);printf("<br>");
+ #print_r($mipb_array);printf("<br>");
foreach ( $mipb_array as $item ){
$entry2 ['MaxIPBlock'][] = $item;
}
$results = ldap_mod_replace($ds,$auDN,$entry2);
- if ($results) echo "<br>MIPBs erfolgreich zusammengefasst!<br><br>" ;
- else echo "<br>Fehler beim eintragen der MIPBs!<br><br>";
+ if ($results) echo "MIPBs erfolgreich zusammengefasst!<br>" ;
+ else echo "Fehler beim eintragen der MIPBs!<br>";
}
function merge_dhcpranges($dhcpobjectDN)
@@ -805,12 +805,16 @@ function delete_ip_dhcprange($dhcpobjectDN,$auDN)
*
* @author Tarik Gasmi
*/
-function modify_ip_host($ip,$hostDN,$auDN)
+function modify_ip_host($ip,$hostDN,$auDN,$fixadd)
{
global $ds, $suffix, $ldapError;
if ( delete_ip_host($hostDN,$auDN) ){
if ( new_ip_host($ip,$hostDN,$auDN) ){
+ if ( $fixadd != ""){
+ $fa_entry ['dhcpoptfixed-address'] = $fixadd;
+ ldap_mod_add($ds,$hostDN,$fa_entry);
+ }
echo "<br>IP Adresse erfolgeich geaendert!<br>";
return 1;
}else{
@@ -873,7 +877,7 @@ function new_ip_delegation($ip,$childauDN,$auDN)
global $ds, $suffix, $ldapError;
$fipb_array = get_freeipblocks_au($auDN);
- echo "<br>---<br>";print_r($fipb_array);echo "<br>---<br>";
+ #echo "<br>---<br>";print_r($fipb_array);echo "<br>---<br>";
for ($i=0; $i < count($fipb_array); $i++){
if ( split_iprange($ip,$fipb_array[$i]) != 0 ){
$ipranges = split_iprange($ip,$fipb_array[$i]);
@@ -895,13 +899,12 @@ function new_ip_delegation($ip,$childauDN,$auDN)
# ldap_mod_add -> IPAddress = $ip , in Host mit $hostDN
$mipbentry['MaxIPBlock'] = $ip;
$mipbentry['FreeIPBlock'] = $ip;
- print_r($mipbentry);
+ #print_r($mipbentry);
$results = ldap_mod_add($ds,$childauDN,$mipbentry);
if ($results){
echo "<br>IP Adressblock erfolgreich delegiert!<br>" ;
merge_ipranges($childauDN);
-
return 1;
}else{
echo "<br>Fehler beim eintragen der IP Adresse!<br>";
@@ -937,7 +940,7 @@ function delete_ip_delegation($oldmipb,$childauDN,$auDN)
# Durch Reduzierung zu loeschende IP Ranges (Array)
$delip[] = $oldmipb;
- print_r($delip);printf("<br><br>");
+ #print_r($delip);printf("<br><br>");
# Finde unter allen Child-AUs diejenigen, die von Reduzierung betroffene Child-Child-AUs haben
# Diese sind werden rekursiv abgearbeitet
@@ -964,39 +967,49 @@ function delete_ip_delegation($oldmipb,$childauDN,$auDN)
}
}
}
- print_r($cchild_todo);printf("<br><br>");
+ #print_r($cchild_todo);printf("<br><br>");
+ ###################
# Rekursionsaufruf (für jede Child-AU, die betroffene Child-Child-AU hat)
foreach ($cchild_todo as $item){
delete_ip_delegation($item['coldmipb'],$item['ccauDN'],$item['childauDN']);
}
+ ###################
# Ab hier: alles was bei jedem Fkt.Aufruf zu machen ist (in Ebene AU und Child-AU)
# in CAU Check ob RechnerIPs oder DhcpIPs betroffen:
$del_objects = objects_to_delete($delip,$childauDN,$cchild_array);
# print_r($del_objects);printf("<br><br>");
- printf("<br>Host IP Addresses that will be deleted: <br>");
- foreach ($del_objects['hostips'] as $item){
- printf("HostDN: %s &nbsp;&nbsp; IP Address: %s <br>",$item['dn'],$item['ip']);
- }
- printf("<br>Subnet IP Ranges that will be adjusted: <br>");
- foreach ($del_objects['dhcpranges'] as $item){
- printf("DhcpObjectDN: %s &nbsp;&nbsp; Zu loeschende IP Range: %s <br>",$item['dn'],$item['delrange']);
+ if ( count($del_objects['hostips']) != 0 ){
+ printf("<br>Host IP Addresses that will be deleted: <br>");
+ foreach ($del_objects['hostips'] as $item){
+ printf("HostDN: %s &nbsp;&nbsp; IP Address: %s <br>",$item['dn'],$item['ip']);
+ }
}
+ if ( count($del_objects['dhcpranges']) != 0 ){
+ printf("<br>Subnet IP Ranges that will be adjusted: <br>");
+ foreach ($del_objects['dhcpranges'] as $item){
+ printf("DhcpObjectDN: %s &nbsp;&nbsp; Zu loeschende IP Range: %s <br>",$item['dn'],$item['delrange']);
+ }
+ }
# hier kommte Abfrage ob wirklich Aenderung ausfuehren, ja dann weiter mit loeschen
# sonst Abbruch
- # momentan: einfach loeschen
- foreach ($del_objects['hostips'] as $item){
- delete_ip_host($item['dn'],$item['auDN']);
+ # momentan: einfach loeschen
+ if ( count($del_objects['hostips']) != 0 ){
+ foreach ($del_objects['hostips'] as $item){
+ delete_ip_host($item['dn'],$item['auDN']);
+ }
}
- foreach ($del_objects['dhcpranges'] as $item){
- delete_ip_dhcprange($item['dn'],$item['auDN']);
- }
+ if ( count($del_objects['dhcpranges']) != 0 ){
+ foreach ($del_objects['dhcpranges'] as $item){
+ delete_ip_dhcprange($item['dn'],$item['auDN']);
+ }
+ }
# in Child-AU: oldmipb loeschen
$mipb_array = get_maxipblocks_au($childauDN);
- print_r($mipb_array);printf("<br><br>");
+ #print_r($mipb_array);printf("<br><br>");
foreach ($delip as $delipitem){
# if ( count($mipb_array) > 1 ){
for ($i=0; $i < count($mipb_array); $i++){
@@ -1016,16 +1029,17 @@ function delete_ip_delegation($oldmipb,$childauDN,$auDN)
# for ($i=0; $i < count($mipb_array); $i++){
# if ($mipb_array[$i] == false){array_splice($mipb_array, $i, 1);}
# }
- print_r($mipb_array);printf("<br><br>");
+
+ #print_r($mipb_array);printf("<br><br>");
if (count($mipb_array) == 0){
$entry ['MaxIPBlock'] = array();
- print_r($entry);printf("<br><br>");
+ #print_r($entry);printf("<br><br>");
$results = ldap_mod_del($ds,$childauDN,$entry);
}else{
foreach ( $mipb_array as $item ){
$entry ['MaxIPBlock'][] = $item;
}
- print_r($entry);printf("<br><br>");
+ #print_r($entry);printf("<br><br>");
$results = ldap_mod_replace($ds,$childauDN,$entry);
}
@@ -1034,7 +1048,7 @@ function delete_ip_delegation($oldmipb,$childauDN,$auDN)
# in Child-AU: FIPBs anpassen
$fipb_array = get_freeipblocks_au($childauDN);
- print_r($fipb_array);printf("<br><br>");
+ #print_r($fipb_array);printf("<br><br>");
foreach ($delip as $delipitem){
# if ( count($fipb_array) > 1 ){
for ($i=0; $i < count($fipb_array); $i++){
@@ -1055,45 +1069,46 @@ function delete_ip_delegation($oldmipb,$childauDN,$auDN)
# for ($i=0; $i < count($fipb_array); $i++){
# if ($fipb_array[$i] == false){array_splice($fipb_array, $i, 1);}
# }
- print_r($fipb_array);printf("<br><br>");
+
+ #print_r($fipb_array);printf("<br><br>");
if (count($fipb_array) == 0){
$entry1 ['FreeIPBlock'] = array();
- print_r($entry1);printf("<br><br>");
+ #print_r($entry1);printf("<br><br>");
$results = ldap_mod_del($ds,$childauDN,$entry1);
}else{
foreach ( $fipb_array as $item ){
$entry1 ['FreeIPBlock'][] = $item;
}
- print_r($entry1);printf("<br><br>");
+ #print_r($entry1);printf("<br><br>");
$results = ldap_mod_replace($ds,$childauDN,$entry1);
}
if ($results){
- echo "<br>FIPBs in Child-AU erfolgreich geloescht!<br>" ;
+ echo "FIPBs in Child-AU erfolgreich geloescht!<br>" ;
# in AU: Geloeschte IP Bereiche als neue FIPBs aufnehmen
foreach ($delip as $item){
$entry2 ['FreeIPBlock'][] = $item;
}
- print_r($entry2);printf("<br><br>");
+ #print_r($entry2);printf("<br><br>");
$results = ldap_mod_add($ds,$auDN,$entry2);
if ($results){
- echo "<br>FIPBs in AU erfolgreich aktualisiert!<br>" ;
+ echo "FIPBs in AU erfolgreich aktualisiert!<br>" ;
# IP Bloecke aufraeumen in Child-AU und AU (Merging)
merge_ipranges($auDN);
merge_ipranges($childauDN);
return 1;
}else{
- echo "<br>Fehler beim aktualisieren!<br>";
+ echo "Fehler beim aktualisieren der FIPBs in AU!<br>";
return 0;
}
}else{
- echo "<br>Fehler beim loeschen!<br>";
+ echo "Fehler beim loeschen der FIPBs in Child-AU!<br>";
return 0;
}
}else{
- echo "<br>Fehler beim loeschen!<br>";
+ echo "<br>Fehler beim loeschen der MIPBs in Child-AU!<br>";
return 0;
}
}
@@ -1120,7 +1135,7 @@ function reduce_ip_delegation($oldmipb,$newmipb,$childauDN,$auDN)
# Durch Reduzierung zu loeschende IP Ranges (Array)
$delip = split_iprange($newmipb,$oldmipb);
- print_r($delip);printf("<br><br>");
+ #print_r($delip);printf("<br><br>");
# Finde unter allen Child-AUs diejenigen, die von Reduzierung betroffene Child-Child-AUs haben
# Diese sind werden rekursiv abgearbeitet
@@ -1149,9 +1164,9 @@ function reduce_ip_delegation($oldmipb,$newmipb,$childauDN,$auDN)
}
}
}
- print_r($cchild_todo);printf("<br><br>");
-
+ #print_r($cchild_todo);printf("<br><br>");
+ ######################
# Rekursionsaufruf (für jede Child-AU, die betroffene Child-Child-AU hat)
foreach ($cchild_todo as $item){
if ($item['cnewmipb'] == false ){
@@ -1161,6 +1176,7 @@ function reduce_ip_delegation($oldmipb,$newmipb,$childauDN,$auDN)
reduce_ip_delegation($item['coldmipb'],$item['cnewmipb'],$item['ccauDN'],$item['childauDN']);
}
}
+ ######################
# Ab hier: alles was bei jedem Fkt.Aufruf zu machen ist (auf Ebene AU und Child-AU)
@@ -1172,27 +1188,34 @@ function reduce_ip_delegation($oldmipb,$newmipb,$childauDN,$auDN)
# - falls nein: fuer jedes FIPB in CAU intersect(FIPB,newmipb)-> Schnittmengen bilden die neuen FIPB
$del_objects = objects_to_adjust($newmipb,$delip,$childauDN,$cchild_array);
# print_r($del_objects);printf("<br><br>");
- printf("<br>Host IP Addresses that will be deleted: <br>");
- foreach ($del_objects['hostips'] as $item){
- printf("HostDN: %s &nbsp;&nbsp; IP Address: %s <br>",$item['dn'],$item['ip']);
+ if ( count($del_objects['hostips']) != 0 ){
+ printf("<br>Host IP Addresses that will be deleted: <br>");
+ foreach ($del_objects['hostips'] as $item){
+ printf("HostDN: %s &nbsp;&nbsp; IP Address: %s <br>",$item['dn'],$item['ip']);
+ }
}
- printf("<br>Subnet IP Ranges that will be adjusted: <br>");
- foreach ($del_objects['dhcpranges'] as $item){
- printf("DhcpObjectDN: %s &nbsp;&nbsp; New IP Range: %s <br>",$item['dn'],$item['newrange']);
+ if ( count($del_objects['dhcpranges']) != 0 ){
+ printf("<br>Subnet IP Ranges that will be adjusted: <br>");
+ foreach ($del_objects['dhcpranges'] as $item){
+ printf("DhcpObjectDN: %s &nbsp;&nbsp; New IP Range: %s <br>",$item['dn'],$item['newrange']);
+ }
}
# momentan wird einfach geloescht:
- foreach ($del_objects['hostips'] as $item){
- delete_ip_host($item['dn'],$item['auDN']);
+ if ( count($del_objects['hostips']) != 0 ){
+ foreach ($del_objects['hostips'] as $item){
+ delete_ip_host($item['dn'],$item['auDN']);
+ }
+ }
+ if ( count($del_objects['dhcpranges']) != 0 ){
+ foreach ($del_objects['dhcpranges'] as $item){
+ if ( count($item['newrange']) >= 1 ){
+ modify_ip_dhcprange($item['newrange'],$item['dn'],$item['auDN']);
+ }else{
+ delete_ip_dhcprange($item['dn'],$item['auDN']);
+ }
+ }
}
- foreach ($del_objects['dhcpranges'] as $item){
- if ( count($item['newrange']) >= 1 ){
- modify_ip_dhcprange($item['newrange'],$item['dn'],$item['auDN']);
- }else{
- delete_ip_dhcprange($item['dn'],$item['auDN']);
- }
- }
-
# in Child-AU: oldmipb -> newmipb
$mipb_array = get_maxipblocks_au($childauDN);
@@ -1209,16 +1232,16 @@ function reduce_ip_delegation($oldmipb,$newmipb,$childauDN,$auDN)
for ($i=0; $i < count($mipb_array); $i++){
if ($mipb_array[$i] == false){array_splice($mipb_array, $i, 1);}
}
- print_r($mipb_array);printf("<br><br>");
+ #print_r($mipb_array);printf("<br><br>");
if (count($mipb_array) == 0){
$entry ['MaxIPBlock'] = array();
- print_r($entry);printf("<br><br>");
+ #print_r($entry);printf("<br><br>");
$results = ldap_mod_del($ds,$childauDN,$entry);
}else{
foreach ( $mipb_array as $item ){
$entry ['MaxIPBlock'][] = $item;
}
- print_r($entry);printf("<br><br>");
+ #print_r($entry);printf("<br><br>");
$results = ldap_mod_replace($ds,$childauDN,$entry);
}
@@ -1240,30 +1263,30 @@ function reduce_ip_delegation($oldmipb,$newmipb,$childauDN,$auDN)
for ($i=0; $i < count($fipb_array); $i++){
if ($fipb_array[$i] == false){array_splice($fipb_array, $i, 1);}
}
- print_r($fipb_array);printf("<br><br>");
+ #print_r($fipb_array);printf("<br><br>");
if (count($fipb_array) == 0){
$entry1 ['FreeIPBlock'] = array();
- print_r($entry1);printf("<br><br>");
+ #print_r($entry1);printf("<br><br>");
$results = ldap_mod_del($ds,$childauDN,$entry1);
}else{
foreach ( $fipb_array as $item ){
$entry1 ['FreeIPBlock'][] = $item;
}
- print_r($entry1);printf("<br><br>");
+ #print_r($entry1);printf("<br><br>");
$results = ldap_mod_replace($ds,$childauDN,$entry1);
}
if ($results){
- echo "<br>FIPBs in Child-AU erfolgreich aktualisiert!<br>" ;
+ echo "FIPBs in Child-AU erfolgreich aktualisiert!<br>" ;
# in AU: Geloeschte IP Bereiche als neue FIPBs aufnehmen
foreach ($delip as $item){
$entry2 ['FreeIPBlock'][] = $item;
}
- print_r($entry2);printf("<br><br>");
+ #print_r($entry2);printf("<br><br>");
$results = ldap_mod_add($ds,$auDN,$entry2);
if ($results){
- echo "<br>FIPBs in AU erfolgreich aktualisiert!<br>" ;
+ echo "FIPBs in AU erfolgreich aktualisiert!<br>" ;
# IP Bloecke aufraeumen in Child-AU und AU (Merging)
merge_ipranges($auDN);
@@ -1271,15 +1294,15 @@ function reduce_ip_delegation($oldmipb,$newmipb,$childauDN,$auDN)
return 1;
}else{
- echo "<br>Fehler beim aktualisieren!<br>";
+ echo "Fehler beim aktualisieren der FIPBs in AU!<br>";
return 0;
}
}else{
- echo "<br>Fehler beim aktualisieren!<br>";
+ echo "Fehler beim aktualisieren der FIPBs in Child-AU!<br>";
return 0;
}
}else{
- echo "<br>Fehler beim aktualisieren!<br>";
+ echo "<br>Fehler beim aktualisieren der MIPBs in Child-AU!<br>";
return 0;
}
}
@@ -1305,7 +1328,11 @@ function expand_ip_delegation($oldmipb,$newmipb,$childauDN,$auDN)
global $ds, $suffix, $ldapError;
$difference = split_iprange($oldmipb,$newmipb);
- new_ip_delegation($difference[0],$childauDN,$auDN);
+ if ( new_ip_delegation($difference[0],$childauDN,$auDN) ){
+ return 1;
+ }else{
+ return 0;
+ }
}
@@ -1331,6 +1358,7 @@ function objects_to_delete($delip,$childauDN,$cchild_array)
# Hosts von child-AU, child-child-AU
$chosts = get_hosts($childauDN,array("dn","ipaddress"));
# print_r($chosts);printf("<br><br>");
+ $cchosts = array();
foreach ($cchild_array as $item){
$cchostsitem = get_hosts($item['dn'],array("dn","ipaddress"));
foreach ($cchostsitem as $item2){
@@ -1340,9 +1368,10 @@ function objects_to_delete($delip,$childauDN,$cchild_array)
$chosts = array_merge($chosts,$cchosts);
# print_r($chosts);printf("<br><br>");
- # Subnets von child-AU, child-child-AU
- $csubnets = get_subnets($childauDN,array("dn","dhcprange"));
+ # Pools von child-AU, child-child-AU
+ $csubnets = get_dhcppools($childauDN,array("dn","dhcprange"));
# print_r($csubnets);printf("<br><br>");
+ $ccsubnets = array();
foreach ($cchild_array as $item){
$ccsubnetsitem = get_hosts($item['dn'],array("dn","dhcprange"));
foreach ($ccsubnetsitem as $item2){
@@ -1352,98 +1381,63 @@ function objects_to_delete($delip,$childauDN,$cchild_array)
$csubnets = array_merge($csubnets,$ccsubnets);
# print_r($csubnets);printf("<br><br>");
- # Pools von child-AU, child-child-AU
- /*$cpools = get_pools($childauDN,array("dn","dhcprange"));
- # print_r($cpools);printf("<br>");
- foreach ($cchild_array as $item){
- $ccpoolsitem = get_hosts($item['dn'],array("dn","dhcprange"));
- foreach ($ccpoolsitem as $item2){
- $ccpools[] = $item2;
- }
- }
- $cpools = array_merge($cpools,$ccpools);
- # print_r($cpools);printf("<br><br>");
- */
# Zu loeschende Hosts bestimmen
$chosts_todo = array();
foreach ($delip as $delipitem){
- foreach ($chosts as $item){
- if( count($item['ipaddress']) > 1 ){
- foreach ($item['ipaddress'] as $item2 ){
- if ( intersect_ipranges($delipitem,$item2) != false ){
+ if ( count($chosts) != 0 ){
+ foreach ($chosts as $item){
+ if( count($item['ipaddress']) > 1 ){
+ foreach ($item['ipaddress'] as $item2 ){
+ if ( intersect_ipranges($delipitem,$item2) != false ){
+ $chosts_todo[] = array('dn' => $item['dn'],
+ 'ip' => $item['ipaddress'],
+ 'auDN' => $item['auDN']);
+ }
+ }
+ }
+ elseif ( count($item['ipaddress']) == 1 ){
+ if ( intersect_ipranges($delipitem,$item['ipaddress']) != false ){
$chosts_todo[] = array('dn' => $item['dn'],
'ip' => $item['ipaddress'],
'auDN' => $item['auDN']);
}
}
}
- elseif ( count($item['ipaddress']) == 1 ){
- if ( intersect_ipranges($delipitem,$item['ipaddress']) != false ){
- $chosts_todo[] = array('dn' => $item['dn'],
- 'ip' => $item['ipaddress'],
- 'auDN' => $item['auDN']);
- }
- }
}
}
# print_r($chosts_todo);printf("<br><br>");
- # Zu loeschende Subnets bestimmen, und wie IP Range anzupassen ist
+ # Zu loeschende Pools bestimmen, und wie IP Range anzupassen ist
$csubnets_todo = array();
foreach ($delip as $delipitem){
- foreach ($csubnets as $item){
- if( count($item['dhcprange']) > 1 ){
- foreach ($item['dhcprange'] as $item2 ){
- # print_r(intersect_ipranges($delipitem,$item2));
- if ( intersect_ipranges($delipitem,$item2) != false ){
- $csubnets_todo[] = array('dn'=> $item['dn'],
- 'delrange' => $item2['dhcprange'],
- 'auDN' => $item['auDN']);
+ if ( count($csubnets) != 0 ){
+ foreach ($csubnets as $item){
+ if( count($item['dhcprange']) > 1 ){
+ foreach ($item['dhcprange'] as $item2 ){
+ # print_r(intersect_ipranges($delipitem,$item2));
+ if ( intersect_ipranges($delipitem,$item2) != false ){
+ $csubnets_todo[] = array('dn'=> $item['dn'],
+ 'delrange' => $item2['dhcprange'],
+ 'auDN' => $item['auDN']);
+ }
}
}
- }
- elseif ( count($item['dhcprange']) == 1 ){
- # print_r(intersect_ipranges($delipitem,$item['dhcprange']));
- if ( intersect_ipranges($delipitem,$item['dhcprange']) != false ){
- $csubnets_todo[] = array('dn'=> $item['dn'],
- 'delrange' => $item['dhcprange'],
- 'auDN' => $item['auDN']);
- }
- }
- }
- }
- # print_r($csubnets_todo);printf("<br><br>");
-
- # Zu loeschende Pools bestimmen, und wie IP Range anzupassen ist
- /*$cpools_todo = array();
- foreach ($delip as $delipitem){
- foreach ($cpools as $item){
- if( count($item['dhcprange']) > 1 ){
- foreach ($item['dhcprange'] as $item2 ){
- if ( intersect_ipranges($delipitem,$item2) != false ){
- $cpools_todo[] = array('dn'=> $item['dn'],
- 'delrange' => $item2['dhcprange'],
- 'auDN' => $item['auDN']);
+ elseif ( count($item['dhcprange']) == 1 ){
+ # print_r(intersect_ipranges($delipitem,$item['dhcprange']));
+ if ( intersect_ipranges($delipitem,$item['dhcprange']) != false ){
+ $csubnets_todo[] = array('dn'=> $item['dn'],
+ 'delrange' => $item['dhcprange'],
+ 'auDN' => $item['auDN']);
}
}
}
- elseif ( count($item['dhcprange']) == 1 ){
- if ( intersect_ipranges($delipitem,$item['dhcprange']) != false ){
- $cpools_todo[] = array('dn'=> $item['dn'],
- 'delrange' => $item['dhcprange'],
- 'auDN' => $item['auDN']);
- }
- }
}
}
- # print_r($cpools_todo);printf("<br><br>");
- */
-
- $dhcps_todo = array_merge($csubnets_todo,$cpools_todo);
+ # print_r($csubnets_todo);printf("<br><br>");
$objects_to_delete = array('hostips' => $chosts_todo,
- 'dhcpranges' => $dhcps_todo);
+ 'dhcpranges' => $csubnets_todo);
return $objects_to_delete;
}
@@ -1471,6 +1465,7 @@ function objects_to_adjust($newmipb,$delip,$childauDN,$cchild_array)
# Hosts von child-AU, child-child-AU
$chosts = get_hosts($childauDN,array("dn","ipaddress"));
# print_r($chosts);printf("<br><br>");
+ $cchosts = array();
foreach ($cchild_array as $item){
$cchostsitem = get_hosts($item['dn'],array("dn","ipaddress"));
foreach ($cchostsitem as $item2){
@@ -1480,9 +1475,10 @@ function objects_to_adjust($newmipb,$delip,$childauDN,$cchild_array)
$chosts = array_merge($chosts,$cchosts);
# print_r($chosts);printf("<br><br>");
- # Subnets von child-AU, child-child-AU
- $csubnets = get_subnets($childauDN,array("dn","dhcprange"));
+ # Pools von child-AU, child-child-AU
+ $csubnets = get_dhcppools($childauDN,array("dn","dhcprange"));
# print_r($csubnets);printf("<br><br>");
+ $ccsubnets = array();
foreach ($cchild_array as $item){
$ccsubnetsitem = get_hosts($item['dn'],array("dn","dhcprange"));
foreach ($ccsubnetsitem as $item2){
@@ -1492,39 +1488,29 @@ function objects_to_adjust($newmipb,$delip,$childauDN,$cchild_array)
$csubnets = array_merge($csubnets,$ccsubnets);
# print_r($csubnets);printf("<br><br>");
- # Pools von child-AU, child-child-AU
- /*$cpools = get_pools($childauDN,array("dn","dhcprange"));
- # print_r($cpools);printf("<br>");
- foreach ($cchild_array as $item){
- $ccpoolsitem = get_hosts($item['dn'],array("dn","dhcprange"));
- foreach ($ccpoolsitem as $item2){
- $ccpools[] = $item2;
- }
- }
- $cpools = array_merge($cpools,$ccpools);
- # print_r($cpools);printf("<br><br>");
- */
# Zu loeschende Hosts bestimmen
$chosts_todo = array();
foreach ($delip as $delipitem){
- foreach ($chosts as $item){
- if( count($item['ipaddress']) > 1 ){
- foreach ($item['ipaddress'] as $item2 ){
- if ( intersect_ipranges($delipitem,$item2) != false ){
+ if ( count($chosts) != 0 ){
+ foreach ($chosts as $item){
+ if( count($item['ipaddress']) > 1 ){
+ foreach ($item['ipaddress'] as $item2 ){
+ if ( intersect_ipranges($delipitem,$item2) != false ){
+ $chosts_todo[] = array('dn' => $item['dn'],
+ 'ip' => $item['ipaddress'],
+ 'auDN' => $item['auDN']);
+ }
+ }
+ }
+ elseif ( count($item['ipaddress']) == 1 ){
+ if ( intersect_ipranges($delipitem,$item['ipaddress']) != false ){
$chosts_todo[] = array('dn' => $item['dn'],
'ip' => $item['ipaddress'],
'auDN' => $item['auDN']);
}
}
}
- elseif ( count($item['ipaddress']) == 1 ){
- if ( intersect_ipranges($delipitem,$item['ipaddress']) != false ){
- $chosts_todo[] = array('dn' => $item['dn'],
- 'ip' => $item['ipaddress'],
- 'auDN' => $item['auDN']);
- }
- }
}
}
# print_r($chosts_todo);printf("<br><br>");
@@ -1532,58 +1518,34 @@ function objects_to_adjust($newmipb,$delip,$childauDN,$cchild_array)
# Zu loeschende Subnets bestimmen, und wie IP Range anzupassen ist
$csubnets_todo = array();
foreach ($delip as $delipitem){
- foreach ($csubnets as $item){
- if( count($item['dhcprange']) > 1 ){
- foreach ($item['dhcprange'] as $item2 ){
- # print_r(intersect_ipranges($delipitem,$item2));
- if ( intersect_ipranges($delipitem,$item2) != false ){
- $csubnets_todo[] = array('dn'=> $item['dn'],
- 'newrange' => intersect_ipranges($newmipb,$item2),
- 'auDN' => $item['auDN']);
+ if ( count($csubnets) != 0 ){
+ foreach ($csubnets as $item){
+ if( count($item['dhcprange']) > 1 ){
+ foreach ($item['dhcprange'] as $item2 ){
+ # print_r(intersect_ipranges($delipitem,$item2));
+ if ( intersect_ipranges($delipitem,$item2) != false ){
+ $csubnets_todo[] = array('dn'=> $item['dn'],
+ 'newrange' => intersect_ipranges($newmipb,$item2),
+ 'auDN' => $item['auDN']);
+ }
}
}
- }
- elseif ( count($item['dhcprange']) == 1 ){
- # print_r(intersect_ipranges($delipitem,$item['dhcprange']));
- if ( intersect_ipranges($delipitem,$item['dhcprange']) != false ){
- $csubnets_todo[] = array('dn'=> $item['dn'],
- 'newrange' => intersect_ipranges($newmipb,$item['dhcprange']),
- 'auDN' => $item['auDN']);
- }
- }
- }
- }
- # print_r($csubnets_todo);printf("<br><br>");
-
- # Zu loeschende Pools bestimmen, und wie IP Range anzupassen ist
- /*$cpools_todo = array();
- foreach ($delip as $delipitem){
- foreach ($cpools as $item){
- if( count($item['dhcprange']) > 1 ){
- foreach ($item['dhcprange'] as $item2 ){
- if ( intersect_ipranges($delipitem,$item2) != false ){
- $cpools_todo[] = array('dn'=> $item['dn'],
- 'newrange' => intersect_ipranges($newmipb,$item2),
- 'auDN' => $item['auDN']);
+ elseif ( count($item['dhcprange']) == 1 ){
+ # print_r(intersect_ipranges($delipitem,$item['dhcprange']));
+ if ( intersect_ipranges($delipitem,$item['dhcprange']) != false ){
+ $csubnets_todo[] = array('dn'=> $item['dn'],
+ 'newrange' => intersect_ipranges($newmipb,$item['dhcprange']),
+ 'auDN' => $item['auDN']);
}
}
}
- elseif ( count($item['dhcprange']) == 1 ){
- if ( intersect_ipranges($delipitem,$item['dhcprange']) != false ){
- $cpools_todo[] = array('dn'=> $item['dn'],
- 'newrange' => intersect_ipranges($newmipb,$item['dhcprange']),
- 'auDN' => $item['auDN']);
- }
- }
}
}
- # print_r($cpools_todo);printf("<br><br>");
- */
+ # print_r($csubnets_todo);printf("<br><br>");
- $dhcps_todo = array_merge($csubnets_todo,$cpools_todo);
$objects_to_adjust = array('hostips' => $chosts_todo,
- 'dhcpranges' => $dhcps_todo);
+ 'dhcpranges' => $csubnets_todo);
return $objects_to_adjust;
}
diff --git a/ldap-site-mngmt/webinterface/lib/ldap.inc.php b/ldap-site-mngmt/webinterface/lib/ldap.inc.php
index 292529a6..f7f6be07 100644
--- a/ldap-site-mngmt/webinterface/lib/ldap.inc.php
+++ b/ldap-site-mngmt/webinterface/lib/ldap.inc.php
@@ -404,6 +404,10 @@ function get_hosts($auDN,$attributes)
{
global $ds, $suffix, $ldapError;
+ #if ( $sortattr == ""){
+ # $sortattr = "hostname";
+ #}
+
if(!($result = uniLdapSearch($ds, "cn=computers,".$auDN, "(objectclass=Host)", $attributes, "hostname", "sub", 0, 0))) {
# redirect(5, "", $ldapError, FALSE);
echo "no search";
diff --git a/ldap-site-mngmt/webinterface/lib/syntax_check.php b/ldap-site-mngmt/webinterface/lib/syntax_check.php
index 35924e3c..48926260 100644
--- a/ldap-site-mngmt/webinterface/lib/syntax_check.php
+++ b/ldap-site-mngmt/webinterface/lib/syntax_check.php
@@ -88,6 +88,40 @@ function check_netip_syntax($IP)
}
# MAC Adresse
+function check_mac_syntax($MAC)
+{
+ if($this->CLEAR) { $this->clear_error();}
+
+ $len = strlen($MAC);
+ if( $len != 17 ){
+ $this->ERROR = "check_mac_syntax: too long [$MAC][$len]";
+ return false;
+ }
+
+ $badcharacter = eregi_replace("([0-9a-fA-F\:]+)","",$MAC);
+ if(!empty($badcharacter)){
+ $this->ERROR = "check_mac_syntax: Bad data in MAC address [$badcharacter]";
+ return false;
+ }
+
+ $chunks = explode(":",$MAC);
+ $count = count($chunks);
+ if ($count != 6){
+ $this->ERROR = "check_mac_syntax: not in format hx:hx:hx:hx:hx:hx [$MAC]";
+ return false;
+ }
+ foreach ($chunks as $chunk){
+ $chunklen = strlen($chunk);
+ if( $len != 2 ){
+ $this->ERROR = "check_mac_syntax: too long [$MAC][$len]";
+ return false;
+ }
+ }
+
+ return true;
+
+}
+
# Domainname
diff --git a/ldap-site-mngmt/webinterface/login_sicher.php b/ldap-site-mngmt/webinterface/login_sicher.php
index 3dd2af46..93676837 100644
--- a/ldap-site-mngmt/webinterface/login_sicher.php
+++ b/ldap-site-mngmt/webinterface/login_sicher.php
@@ -314,14 +314,14 @@ function userLogin($uid, $userPassword) {
global $userDN, $suffix, $ldapError;
# Verbindung mit der Datenbank herstellen
if(($uid == "") || ($userPassword == "") || !($ds = uniLdapConnect($uid,$userPassword))) {
- redirect(5, "index.php", "Falscher Login<br>".$ldapError, FALSE);
+ redirect(3, "index.php", "Falscher Login<br>".$ldapError, FALSE);
die;
}
# cn abfragen
$cn = "Gast";
if(!($person_daten = uniLdapSearch($ds, "ou=people,".$suffix, "uid=$uid", array("cn"), "", "list", 0, 0))) {
- redirect(5, "index.php", $ldapError, FALSE);
+ redirect(3, "index.php", $ldapError, FALSE);
die;
} else {
$cn = str_replace('\"', '', $person_daten[0]['cn'][0]);
@@ -351,8 +351,9 @@ function userLogin($uid, $userPassword) {
</table>
</body>
</html>";
- # Aufruf der Startseite:
- redirect(0, "start.php", $mesg, TRUE);
+ # Aufruf der Startseite:
+
+ redirect(0, "start.php", $mesg, TRUE);
# nichtmehr benötigte CSV-Dateien im tmp-Verzeichnis löschen
# listen_sauber();
diff --git a/ldap-site-mngmt/webinterface/rbs/gbm.php b/ldap-site-mngmt/webinterface/rbs/gbm.php
index f0cfbb25..9f822840 100644
--- a/ldap-site-mngmt/webinterface/rbs/gbm.php
+++ b/ldap-site-mngmt/webinterface/rbs/gbm.php
@@ -1,21 +1,16 @@
<?php
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Remote Boot Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 4;
-$mnr = -1;
-$sbmnr = -1;
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "gbm.dwt";
-include("../class.FastTemplate.php");
-
include('rbs_header.inc.php');
###################################################################################
+$mnr = -1;
+$sbmnr = -1;
+
$mnr = $_GET['mnr'];
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/rbs/gbm_overview.php b/ldap-site-mngmt/webinterface/rbs/gbm_overview.php
index bb0ebb83..bd99cc55 100644
--- a/ldap-site-mngmt/webinterface/rbs/gbm_overview.php
+++ b/ldap-site-mngmt/webinterface/rbs/gbm_overview.php
@@ -2,22 +2,17 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Remote Boot Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 4;
-$mnr = -1;
-$sbmnr = -1;
-$mcnr = -1;
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "gbm_overview.dwt";
-include("../class.FastTemplate.php");
-
include('rbs_header.inc.php');
###################################################################################
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
$mnr = $_GET['mnr'];
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/rbs/menuentry.php b/ldap-site-mngmt/webinterface/rbs/menuentry.php
index 83396ec8..44eb17d9 100644
--- a/ldap-site-mngmt/webinterface/rbs/menuentry.php
+++ b/ldap-site-mngmt/webinterface/rbs/menuentry.php
@@ -2,22 +2,17 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Remote Boot Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 4;
-$mnr = 3;
-$sbmnr = -1;
-$mcnr = -1;
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "menuentry.dwt";
-include("../class.FastTemplate.php");
-
include('rbs_header.inc.php');
###################################################################################
+$mnr = 3;
+$sbmnr = -1;
+$mcnr = -1;
+
$sbmnr = $_GET['sbmnr'];
# Menuleisten erstellen
diff --git a/ldap-site-mngmt/webinterface/rbs/new_gbm.php b/ldap-site-mngmt/webinterface/rbs/new_gbm.php
index 3300ffb0..0e674399 100644
--- a/ldap-site-mngmt/webinterface/rbs/new_gbm.php
+++ b/ldap-site-mngmt/webinterface/rbs/new_gbm.php
@@ -1,21 +1,16 @@
<?php
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Remote Boot Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 4;
-$mnr = -1;
-$sbmnr = -1;
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "new_gbm.dwt";
-include("../class.FastTemplate.php");
-
include('rbs_header.inc.php');
###################################################################################
+$mnr = -1;
+$sbmnr = -1;
+
$mnr = $_GET['mnr'];
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/rbs/new_menuentry.php b/ldap-site-mngmt/webinterface/rbs/new_menuentry.php
index a6ee6e3e..a77f1129 100644
--- a/ldap-site-mngmt/webinterface/rbs/new_menuentry.php
+++ b/ldap-site-mngmt/webinterface/rbs/new_menuentry.php
@@ -2,22 +2,17 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Remote Boot Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 4;
-$mnr = 3;
-$sbmnr = -1;
-$mcnr = -1;
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "new_menuentry.dwt";
-include("../class.FastTemplate.php");
-
include('rbs_header.inc.php');
###################################################################################
+$mnr = 3;
+$sbmnr = -1;
+$mcnr = -1;
+
$sbmnr = $_GET['sbmnr'];
# Menuleisten erstellen
diff --git a/ldap-site-mngmt/webinterface/rbs/new_pxe.php b/ldap-site-mngmt/webinterface/rbs/new_pxe.php
index 338f5d48..e51d21ec 100644
--- a/ldap-site-mngmt/webinterface/rbs/new_pxe.php
+++ b/ldap-site-mngmt/webinterface/rbs/new_pxe.php
@@ -2,22 +2,17 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Remote Boot Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 4;
-$mnr = -1;
-$sbmnr = -1;
-$mcnr = -1;
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "new_pxe.dwt";
-include("../class.FastTemplate.php");
-
include('rbs_header.inc.php');
###################################################################################
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
$mnr = $_GET['mnr'];
$sbmnr = $_GET['sbmnr'];
$mcnr = $_GET['mcnr'];
diff --git a/ldap-site-mngmt/webinterface/rbs/new_rbservice.php b/ldap-site-mngmt/webinterface/rbs/new_rbservice.php
index 2882ebda..29d6a947 100644
--- a/ldap-site-mngmt/webinterface/rbs/new_rbservice.php
+++ b/ldap-site-mngmt/webinterface/rbs/new_rbservice.php
@@ -1,21 +1,16 @@
<?php
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Remote Boot Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 4;
-$mnr = 0;
-$sbmnr = -1;
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "new_rbservice.dwt";
-include("../class.FastTemplate.php");
-
include('rbs_header.inc.php');
###################################################################################
+$mnr = 0;
+$sbmnr = -1;
+
$mnr = $_GET['mnr'];
# Menuleisten erstellen
diff --git a/ldap-site-mngmt/webinterface/rbs/no_rbservice.php b/ldap-site-mngmt/webinterface/rbs/no_rbservice.php
index 657e3738..5c527bab 100644
--- a/ldap-site-mngmt/webinterface/rbs/no_rbservice.php
+++ b/ldap-site-mngmt/webinterface/rbs/no_rbservice.php
@@ -1,21 +1,16 @@
<?php
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Remote Boot Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 4;
-$mnr = 1;
-$sbmnr = -1;
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "no_rbservice.dwt";
-include("../class.FastTemplate.php");
-
include('rbs_header.inc.php');
###################################################################################
+$mnr = 1;
+$sbmnr = -1;
+
$mnr = $_GET['mnr'];
# Menuleisten erstellen
diff --git a/ldap-site-mngmt/webinterface/rbs/pxe.php b/ldap-site-mngmt/webinterface/rbs/pxe.php
index 11f25875..d1785081 100644
--- a/ldap-site-mngmt/webinterface/rbs/pxe.php
+++ b/ldap-site-mngmt/webinterface/rbs/pxe.php
@@ -2,22 +2,17 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Remote Boot Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 4;
-$mnr = -1;
-$sbmnr = -1;
-# $mcnr = -1;
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "pxe.dwt";
-include("../class.FastTemplate.php");
-
include('rbs_header.inc.php');
###################################################################################
+$mnr = -1;
+$sbmnr = -1;
+# $mcnr = -1;
+
$mnr = $_GET['mnr'];
$sbmnr = $_GET['sbmnr'];
$mcnr = $_GET['mcnr'];
diff --git a/ldap-site-mngmt/webinterface/rbs/pxeconfig_default.php b/ldap-site-mngmt/webinterface/rbs/pxeconfig_default.php
index 243c647b..b6d495d9 100644
--- a/ldap-site-mngmt/webinterface/rbs/pxeconfig_default.php
+++ b/ldap-site-mngmt/webinterface/rbs/pxeconfig_default.php
@@ -2,22 +2,17 @@
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Remote Boot Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 4;
-$mnr = -1;
-$sbmnr = -1;
-$mcnr = -1;
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "pxeconfig_default.dwt";
-include("../class.FastTemplate.php");
-
include('rbs_header.inc.php');
###################################################################################
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
$mnr = $_GET['mnr'];
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/rbs/rbs.php b/ldap-site-mngmt/webinterface/rbs/rbs.php
index 3460afa0..ce1553e2 100644
--- a/ldap-site-mngmt/webinterface/rbs/rbs.php
+++ b/ldap-site-mngmt/webinterface/rbs/rbs.php
@@ -1,21 +1,16 @@
<?php
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Remote Boot Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 4;
-$mnr = -1;
-$sbmnr = -1;
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "rbs_start.dwt";
-include("../class.FastTemplate.php");
-
include('rbs_header.inc.php');
###################################################################################
+$mnr = -1;
+$sbmnr = -1;
+
$mnr = $_GET['mnr'];
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/rbs/rbs_header.inc.php b/ldap-site-mngmt/webinterface/rbs/rbs_header.inc.php
index fb7e0751..b663a2e4 100644
--- a/ldap-site-mngmt/webinterface/rbs/rbs_header.inc.php
+++ b/ldap-site-mngmt/webinterface/rbs/rbs_header.inc.php
@@ -1,8 +1,12 @@
<?php
-include("rbs_menu.php");
-$template = new FastTemplate(".");
+# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
+$titel = "Remote Boot Service Management";
+# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
+$mainnr = 3;
+
+$template = new FastTemplate(".");
# dem erstellten Template-Objekt eine Vorlage zuweisen
$definedTemplates = array("Vorlage" => "rbs.dwt",
"Login" => "../logout_form.inc.dwt",
@@ -15,7 +19,9 @@ if (isset($additionalTemplates)) {
}
}
$template->define($definedTemplates);
-
$template->assign(array("SEITENTITEL" => $titel, "ROLLE" => "mainadmin", "AU" => $au_ou, "DOMAIN" => $assocdom, "USERCN" => $usercn));
-
+
+
+include("rbs_menu.php");
+
?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/rbs/rbs_menu.php b/ldap-site-mngmt/webinterface/rbs/rbs_menu.php
index 814282cf..63b3fa52 100644
--- a/ldap-site-mngmt/webinterface/rbs/rbs_menu.php
+++ b/ldap-site-mngmt/webinterface/rbs/rbs_menu.php
@@ -19,27 +19,27 @@ function createRBSMenu($rollen, $mnr, $auDN, $sbmnr) {
$hauptmenu [] = array("link" => "rbservice.php?rbsdn=".$rbs_array[$i]['dn']."&mnr=".$n,
"text" => $rbs_array[$i]['cn'],
- "zugriff" => array("MainAdmin","HostAdmin"));
+ "zugriff" => array("MainAdmin","RbsAdmin"));
$submenu [] = array(
array("link" => "gbm_overview.php?rbsdn=".$rbs_array[$i]['dn']."&mnr=".$n."&sbmnr=0",
"text" => "Generische Bootmen&uuml;s",
- "zugriff" => array("MainAdmin","HostAdmin")),
+ "zugriff" => array("MainAdmin","RbsAdmin")),
array("link" => "pxeconfig_default.php?rbsdn=".$rbs_array[$i]['dn']."&mnr=".$n."&sbmnr=1",
"text" => "Default PXE Configs",
- "zugriff" => array("MainAdmin","HostAdmin")),
+ "zugriff" => array("MainAdmin","RbsAdmin")),
array("link" => "new_gbm.php?rbsdn=".$rbs_array[$i]['dn']."&mnr=".$n."&sbmnr=2",
"text" => "Neues GBM anlegen",
- "zugriff" => array("MainAdmin","HostAdmin")),
+ "zugriff" => array("MainAdmin","RbsAdmin")),
array("link" => "new_pxe.php?rbsdn=".$rbs_array[$i]['dn']."&mnr=".$n."&sbmnr=3",
"text" => "Neue PXE Config anlegen",
- "zugriff" => array("MainAdmin","HostAdmin")),
+ "zugriff" => array("MainAdmin","RbsAdmin")),
);
$n++;
}
}
$hauptmenu [] = array("link" => "new_rbservice.php?&mnr=".$n,
"text" => "Neuen RBS anlegen",
- "zugriff" => array("MainAdmin","HostAdmin"));
+ "zugriff" => array("MainAdmin","RbsAdmin"));
$submenu [] = array();
#print_r($hauptmenu); echo "<br><br>";
diff --git a/ldap-site-mngmt/webinterface/rbs/rbservice.php b/ldap-site-mngmt/webinterface/rbs/rbservice.php
index b6b7162d..e3df1efb 100644
--- a/ldap-site-mngmt/webinterface/rbs/rbservice.php
+++ b/ldap-site-mngmt/webinterface/rbs/rbservice.php
@@ -1,21 +1,16 @@
<?php
include('../standard_header.inc.php');
-# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt.
-$titel = "Remote Boot Service Management";
-# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
-$mainnr = 4;
-$mnr = 0;
-$sbmnr = -1;
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "rbservice.dwt";
-include("../class.FastTemplate.php");
-
include('rbs_header.inc.php');
###################################################################################
+$mnr = 0;
+$sbmnr = -1;
+
$mnr = $_GET['mnr'];
# Menuleisten erstellen
diff --git a/ldap-site-mngmt/webinterface/roles/role_add.php b/ldap-site-mngmt/webinterface/roles/role_add.php
index 3c628066..f4b80506 100644
--- a/ldap-site-mngmt/webinterface/roles/role_add.php
+++ b/ldap-site-mngmt/webinterface/roles/role_add.php
@@ -27,7 +27,7 @@ echo "
# print_r($role);echo "<br>";
# print_r($menr);echo "<br><br>";
-$url = 'role_show.php?role='.$role.'&mnr='.$menr;
+$url = 'role_show.php?role='.$role.'&sbmnr='.$menr;
if ($adduser != 'none'){
$res = new_role_member($adduserDN,$role,$auDN,$domDN);
@@ -37,14 +37,14 @@ if ($adduser != 'none'){
$mesg = "Fehler! Der Benutzer <b>".$adduserUID."</b> konnte nicht aufgenommen werden<br><br>";
}
$mesg .= "Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
- Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&mnr=$menr' style='publink'>back</a>";
+ Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a>";
redirect(3, $url, $mesg, $addSessionId = TRUE);
}
else {
$mesg = "Sie haben keinen Benutzer ausgew&auml;hlt<br><br>
Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
- Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&mnr=$menr' style='publink'>back</a>";
+ Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a>";
redirect(3, $url, $mesg, $addSessionId = TRUE);
}
diff --git a/ldap-site-mngmt/webinterface/roles/role_delete.php b/ldap-site-mngmt/webinterface/roles/role_delete.php
index 297136e0..7a585331 100644
--- a/ldap-site-mngmt/webinterface/roles/role_delete.php
+++ b/ldap-site-mngmt/webinterface/roles/role_delete.php
@@ -23,7 +23,7 @@ if (isset($_POST['deluser'])){
# print_r($role);echo "<br>";
# print_r($menr);echo "<br>";
- $url = 'role_show.php?role='.$role.'&mnr='.$menr;
+ $url = 'role_show.php?role='.$role.'&sbmnr='.$menr;
$mesg = "";
foreach ($deluser as $item){
@@ -36,11 +36,11 @@ if (isset($_POST['deluser'])){
if ($res == 1){
$mesg .= "Der Benutzer <b>".$deluserUID."</b> wurde erfolgreich aus der Rolle <b>".$role."</b> entfernt.<br>";
}else{
- $mesg .= "<b>Fehler!</b> Der Benutzer <b>".$deluserUID."</b> konnte nicht entfernt werden<br>";
+ $mesg .= "<br><b>Fehler!</b> Der Benutzer <b>".$deluserUID."</b> konnte nicht entfernt werden<br>";
}
}
$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
- Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&mnr=$menr' style='publink'>back</a><br><br>";
+ Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a><br><br>";
redirect(3, $url, $mesg, $addSessionId = TRUE);
}
@@ -48,7 +48,7 @@ if (isset($_POST['deluser'])){
else {
$mesg .= "<br>Sie haben keinen Benutzer ausgew&auml;hlt<br><br>
Sie werden automatisch auf die vorherige Seite zur&uuml;ckgeleitet. <br>
- Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&mnr=$menr' style='publink'>back</a>";
+ Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a>";
redirect(3, $url, $mesg, $addSessionId = TRUE);
}
diff --git a/ldap-site-mngmt/webinterface/roles/role_show.php b/ldap-site-mngmt/webinterface/roles/role_show.php
index d209d3e9..c60b7fb2 100644
--- a/ldap-site-mngmt/webinterface/roles/role_show.php
+++ b/ldap-site-mngmt/webinterface/roles/role_show.php
@@ -12,16 +12,19 @@ $role = "MainAdmin";
include("../class.FastTemplate.php");
-include("roles_header.inc.php");
-
+#include("roles_header.inc.php");
+include("au_header.inc.php");
###############################################################################
-$mnr = $_GET['mnr'];
+#$mnr = $_GET['mnr'];
+$mnr = 3;
+
+$sbmnr = $_GET['sbmnr'];
# Menuleiste erstellen
createMainMenu($rollen, $mainnr);
-createRolesMenu($rollen, $mnr, $assocdom);
+createAUMenu($rollen, $mnr, $auDN, $sbmnr);
####################################
# Admins anzeigen und loeschen
@@ -33,19 +36,23 @@ $roles_array = get_roles($auDN);
# jeder Rolle entsprechend Members holen und Ãœberschrift setzen
switch ($role){
case 'MainAdmin':
- $template->assign(array("ROLE" => "MainAdmin","ROLE_DESC" => "Haupt Administratoren","MENR" => $mnr));
+ $template->assign(array("ROLE" => "MainAdmin","ROLE_DESC" => "Haupt Administratoren","MENR" => $sbmnr));
$members = $roles_array['MainAdmin'];
break;
case 'HostAdmin':
- $template->assign(array("ROLE" => "HostAdmin","ROLE_DESC" => "Administratoren &nbsp;- &nbsp;Rechner, Rechnergruppen, Remote Boot Services (PXE)","MENR" => $mnr));
+ $template->assign(array("ROLE" => "HostAdmin","ROLE_DESC" => "Administratoren &nbsp;- &nbsp;Rechner, Rechnergruppen, Remote Boot Services (PXE)","MENR" => $sbmnr));
$members = $roles_array['HostAdmin'];
break;
case 'DhcpAdmin':
- $template->assign(array("ROLE" => "DhcpAdmin","ROLE_DESC" => "Administratoren &nbsp;- &nbsp;DHCP","MENR" => $mnr));
+ $template->assign(array("ROLE" => "DhcpAdmin","ROLE_DESC" => "Administratoren &nbsp;- &nbsp;DHCP","MENR" => $sbmnr));
$members = $roles_array['DhcpAdmin'];
break;
+case 'RbsAdmin':
+ $template->assign(array("ROLE" => "RbsAdmin","ROLE_DESC" => "Administratoren &nbsp;- &nbsp;Remote Boot Services","MENR" => $sbmnr));
+ $members = $roles_array['RbsAdmin'];
+ break;
case 'ZoneAdmin':
- $template->assign(array("ROLE" => "ZoneAdmin","ROLE_DESC" => "Administratoren &nbsp;- &nbsp;DNS Zone &nbsp;[ {DOM} ]","MENR" => $mnr,"DOM" => $assocdom));
+ $template->assign(array("ROLE" => "ZoneAdmin","ROLE_DESC" => "Administratoren &nbsp;- &nbsp;DNS Zone &nbsp;[ {DOM} ]","MENR" => $sbmnr));
$members = $roles_array['ZoneAdmin'];
break;
}
@@ -111,6 +118,6 @@ for ($i=0; $i < count($users_array); $i++){
###############################################################################
-include("roles_footer.inc.php");
+include("au_footer.inc.php");
?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/roles/roles.php b/ldap-site-mngmt/webinterface/roles/roles.php
index 0ae79cf9..8d418add 100644
--- a/ldap-site-mngmt/webinterface/roles/roles.php
+++ b/ldap-site-mngmt/webinterface/roles/roles.php
@@ -11,16 +11,20 @@ $webseite = "roles_start.dwt";
include("../class.FastTemplate.php");
-include("roles_header.inc.php");
+#include("roles_header.inc.php");
+include("au_header.inc.php");
###################################################################################
+$mnr = 3;
+$sbmnr = -1;
+
# Menuleiste erstellen
createMainMenu($rollen, $mainnr);
-createRolesMenu($rollen, $mnr, $assocdom);
+createAUMenu($rollen, $mnr, $auDN, $sbmnr);
###################################################################################
-include("roles_footer.inc.php");
+include("au_footer.inc.php");
?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/roles/roles_menu.php b/ldap-site-mngmt/webinterface/roles/roles_menu.php
index 62abf05c..246601e8 100644
--- a/ldap-site-mngmt/webinterface/roles/roles_menu.php
+++ b/ldap-site-mngmt/webinterface/roles/roles_menu.php
@@ -8,16 +8,19 @@ function createRolesMenu($rollen , $mnr, $assocdom) {
if ($assocdom != ""){
$hauptmenu = array(array("link" => "roles.php",
"text" => "&Uuml;bersicht",
- "zugriff" => array("MainAdmin")),
+ "zugriff" => array("MainAdmin","DhcpAdmin")),
array("link" => "role_show.php?role=MainAdmin&mnr=1",
"text" => "Main Admins",
"zugriff" => array("MainAdmin")),
- #array("link" => "role_show.php?role=HostAdmin&mnr=2",
- # "text" => "Host Admins",
- # "zugriff" => array("MainAdmin")),
- #array("link" => "role_show.php?role=DhcpAdmin&mnr=3",
- # "text" => "DHCP Admins",
- # "zugriff" => array("MainAdmin")),
+ array("link" => "role_show.php?role=DhcpAdmin&mnr=2",
+ "text" => "DHCP Admins",
+ "zugriff" => array("MainAdmin")),
+ array("link" => "role_show.php?role=HostAdmin&mnr=3",
+ "text" => "Host Admins",
+ "zugriff" => array("MainAdmin","DhcpAdmin")),
+ array("link" => "role_show.php?role=RbsAdmin&mnr=4",
+ "text" => "RBS Admins",
+ "zugriff" => array("MainAdmin","DhcpAdmin")),
#array("link" => "role_show.php?role=ZoneAdmin&mnr=4",
# "text" => "DNS Admins",
# "zugriff" => array("MainAdmin"))
@@ -25,16 +28,19 @@ function createRolesMenu($rollen , $mnr, $assocdom) {
}else{
$hauptmenu = array(array("link" => "roles.php",
"text" => "&Uuml;bersicht",
- "zugriff" => array("MainAdmin")),
+ "zugriff" => array("MainAdmin","DhcpAdmin")),
array("link" => "role_show.php?role=MainAdmin&mnr=1",
"text" => "Main Admins",
"zugriff" => array("MainAdmin")),
- #array("link" => "role_show.php?role=HostAdmin&mnr=2",
- # "text" => "Host Admins",
- # "zugriff" => array("MainAdmin")),
- #array("link" => "role_show.php?role=DhcpAdmin&mnr=3",
- # "text" => "DHCP Admins",
- # "zugriff" => array("MainAdmin"))
+ array("link" => "role_show.php?role=DhcpAdmin&mnr=2",
+ "text" => "DHCP Admins",
+ "zugriff" => array("MainAdmin")),
+ array("link" => "role_show.php?role=HostAdmin&mnr=3",
+ "text" => "Host Admins",
+ "zugriff" => array("MainAdmin","DhcpAdmin")),
+ array("link" => "role_show.php?role=RbsAdmin&mnr=4",
+ "text" => "RBS Admins",
+ "zugriff" => array("MainAdmin","DhcpAdmin"))
);
}
# $rollen = array_keys($roles);
diff --git a/ldap-site-mngmt/webinterface/standard_header.inc.php b/ldap-site-mngmt/webinterface/standard_header.inc.php
index f86de2a0..bf975c90 100644
--- a/ldap-site-mngmt/webinterface/standard_header.inc.php
+++ b/ldap-site-mngmt/webinterface/standard_header.inc.php
@@ -12,6 +12,7 @@ include('lib/ip_management_functions.php');
include('lib/host_management_functions.php');
include('lib/dhcp_management_functions.php');
include('lib/rbs_management_functions.php');
+include("class.FastTemplate.php");
$uid = $_SESSION['uid'];
diff --git a/ldap-site-mngmt/webinterface/start.php b/ldap-site-mngmt/webinterface/start.php
index f64005e5..413d1e4a 100644
--- a/ldap-site-mngmt/webinterface/start.php
+++ b/ldap-site-mngmt/webinterface/start.php
@@ -5,9 +5,6 @@ include('standard_header.inc.php');
$titel = "Rechner und IP Management Startseite";
$webseite = "home.dwt";
-# Einbinden der Template-Funktionen
-
-include("class.FastTemplate.php");
# neues Template-Objekt erstellen
$template = new FastTemplate(".");
@@ -24,7 +21,16 @@ $template->define_dynamic("Aus", "Webseite");
#$template->define_dynamic("Roles", "Webseite");
$roles = getRoles($ds, $userDN);
-#print_r($roles); echo "<br><br>";
+#print_r($roles); echo "<br><br>";
+if (count($roles) == 1 ){
+ $mesg = "";
+ $rollenurlstring = implode('_',$roles[0]['role']);
+ $url = "zwischen.php?audn=".$roles[0]['au']."&rollen=".$rollenurlstring;
+ redirect(0, $url, $mesg, $addSessionId = TRUE);
+ die;
+}
+
+
foreach ($roles as $item){
$auDN = $item['au'];
@@ -32,11 +38,15 @@ foreach ($roles as $item){
$expOU = explode('=',$expDN[0]);
$au = $expOU[1];
- $template->assign(array( "MA" => "", "HA" => "", "DA" => "", "ZA" => ""));
+ $template->assign(array( "MA" => "", "HA" => "", "DA" => "", "ZA" => "", "RA" => ""));
$template->assign(array( "AU" => $au, "AUDN" => $auDN, "ROLLEN" => implode('_',$item['role'])));
+ $rollen = "";
foreach ($item['role'] as $role){
- if ($role == MainAdmin){
+ $rollen .= $role." &nbsp;";
+ $template->assign(array( "MA" => $rollen));
+
+ /*if ($role == MainAdmin){
$template->assign(array( "MA" => $role));
}
if ($role == HostAdmin){
@@ -48,6 +58,9 @@ foreach ($roles as $item){
if ($role == ZoneAdmin){
$template->assign(array( "ZA" => $role));
}
+ if ($role == RbsAdmin){
+ $template->assign(array( "RA" => $role));
+ }*/
}
$template->parse("AUS_LIST", ".Aus");
$template->clear_dynamic("Aus");
diff --git a/ldap-site-mngmt/webinterface/syntax_check.php b/ldap-site-mngmt/webinterface/syntax_check.php
index 4784d6d3..5d714122 100644
--- a/ldap-site-mngmt/webinterface/syntax_check.php
+++ b/ldap-site-mngmt/webinterface/syntax_check.php
@@ -88,6 +88,42 @@ function check_netip_syntax($IP)
}
# MAC Adresse
+function check_mac_syntax($MAC)
+{
+ if($this->CLEAR) { $this->clear_error();}
+
+ $len = strlen($MAC);
+ if( $len != 17 ){
+ $this->ERROR = "check_mac_syntax: too long [$MAC][$len]";
+ return false;
+ }
+
+ $badcharacter = eregi_replace("([0-9a-fA-F\:]+)","",$MAC);
+ #echo "badcharacter: ".$badcharacter."<br>";
+ if(!empty($badcharacter)){
+ $this->ERROR = "check_mac_syntax: Bad data in MAC address [$badcharacter]";
+ return false;
+ }
+
+ $chunks = explode(":",$MAC);
+ #print_r($chunks)."<br>";
+ $count = count($chunks);
+ if ($count != 6){
+ $this->ERROR = "check_mac_syntax: not in format hx:hx:hx:hx:hx:hx [$MAC]";
+ return false;
+ }
+ foreach ($chunks as $chunk){
+ $chunklen = strlen($chunk);
+ if( $chunklen != 2 ){
+ $this->ERROR = "check_mac_syntax: too long [$MAC][$len]";
+ return false;
+ }
+ }
+
+ return true;
+
+}
+
# Domainname