From b9d2bd338f68aace2eb9e999896a787014ac7e46 Mon Sep 17 00:00:00 2001
From: Tarik Gasmi
Date: Thu, 7 Jun 2007 17:49:06 +0000
Subject: Aktuelle Version LDAP-Site-Mngmt Webinterface
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1156 95ad53e4-c205-0410-b2fa-d234c58c8868
---
.../webinterface/computers/dhcphost_change.php | 56 ++--------------------
1 file changed, 3 insertions(+), 53 deletions(-)
(limited to 'ldap-site-mngmt/webinterface/computers/dhcphost_change.php')
diff --git a/ldap-site-mngmt/webinterface/computers/dhcphost_change.php b/ldap-site-mngmt/webinterface/computers/dhcphost_change.php
index 907fae8f..2a78f109 100644
--- a/ldap-site-mngmt/webinterface/computers/dhcphost_change.php
+++ b/ldap-site-mngmt/webinterface/computers/dhcphost_change.php
@@ -5,20 +5,17 @@ $syntax = new Syntaxcheck;
$dhcp = $_POST['dhcpcont'];
$olddhcp = $_POST['olddhcp'];
+
$hostip = $_POST['hostip'];
$fixedaddress = $_POST['fixadd'];
$oldfixedaddress = $_POST['oldfixadd'];
-$rbs = $_POST['rbs'];
-$oldrbs = $_POST['oldrbs'];
-
$hostDN = $_POST['hostdn'];
$sbmnr = $_POST['sbmnr'];
$dhcp = htmlentities($dhcp);
$olddhcp = htmlentities($olddhcp);
-$rbs = htmlentities($rbs);
-$oldrbs = htmlentities($oldrbs);
+
/*echo "new dhcp:"; print_r($dhcp); echo "
";
@@ -72,7 +69,7 @@ if ($dhcp != "none" && $dhcp != $olddhcp){
}
}else{
$entrydhcp ['dhcphlpcont'] = array();
- if ( $fixedaddress != "" ){
+ if ( $oldfixedaddress != "" ){
$entrydhcp ['dhcpoptfixed-address'] = array();
}
echo "DHCP delete "; echo "
";
@@ -119,53 +116,6 @@ if ($fixedaddress != "none" && $fixedaddress != $oldfixedaddress){
}
-##########################################
-# RBS
-
-if ($rbs != "none" && $rbs != $oldrbs){
- if ($rbs != ""){
- $exp = ldap_explode_dn($rbs, 1);
- $rbscn = $exp[0];
- $rbsau = $exp[2];
-
- $dhcpdata = get_node_data($rbs,array("tftpserverip","initbootfile"));
- $entryrbs ['hlprbservice'] = $rbs;
- $entryrbs ['dhcpoptnext-server'] = $dhcpdata['tftpserverip'];
- $entryrbs ['dhcpoptfilename'] = $dhcpdata['initbootfile'];
- if ($oldrbs != ""){
- echo "RBS replace "; print_r($oldrbs); echo " with "; print_r($entryrbs); echo "
";
- if ($result = ldap_mod_replace($ds,$hostDN,$entryrbs)){
- rbs_adjust_host($hostDN, $rbs);
- $mesg = "Remote Boot Service erfolgreich zu ".$rbscn." [Abt.: ".$rbsau."] geändert
";
- }else{
- $mesg = "Fehler beim ändern des Remote Boot Services zu ".$rbscn."!
";
- }
- }else{
- echo "RBS add "; print_r($entryrbs); echo "
";
- if ($result = ldap_mod_add($ds,$hostDN,$entryrbs)){
- rbs_adjust_host($hostDN, $rbs);
- $mesg = "Remote Boot Service erfolgreich zu ".$rbscn." [Abt.: ".$rbsau."] geändert
";
- }else{
- $mesg = "Fehler beim ändern des Remote Boot Services zu ".$rbscn."!
";
- }
- }
- }else{
- $entryrbs ['hlprbservice'] = array();
- $entryrbs ['dhcpoptnext-server'] = array();
- $entryrbs ['dhcpoptfilename'] = array();
- echo "RBS delete "; echo "
";
- if ($result = ldap_mod_del($ds,$hostDN,$entryrbs)){
- $mesg = "Rechner erfolgreich aus RBS gelöscht
";
- }else{
- $mesg = "Fehler beim löschen aus RBS!
";
- }
- }
-}
-if ($rbs == "none"){
- echo "RBS none
";
-}
-
-
#####################
$mesg .= "
Sie werden automatisch auf die vorherige Seite zurückgeleitet.
--
cgit v1.2.3-55-g7522