diff options
| author | Tarik Gasmi | 2007-06-07 19:49:06 +0200 |
|---|---|---|
| committer | Tarik Gasmi | 2007-06-07 19:49:06 +0200 |
| commit | b9d2bd338f68aace2eb9e999896a787014ac7e46 (patch) | |
| tree | c17514d270e5e01c22f1ffdb54bed6789efaba4b /ldap-site-mngmt/webinterface/computers/dhcphost_change.php | |
| parent | * fixed incorrectly generated exportURI (still used the export-name instead (diff) | |
| download | core-b9d2bd338f68aace2eb9e999896a787014ac7e46.tar.gz core-b9d2bd338f68aace2eb9e999896a787014ac7e46.tar.xz core-b9d2bd338f68aace2eb9e999896a787014ac7e46.zip | |
Aktuelle Version LDAP-Site-Mngmt Webinterface
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1156 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'ldap-site-mngmt/webinterface/computers/dhcphost_change.php')
| -rw-r--r-- | ldap-site-mngmt/webinterface/computers/dhcphost_change.php | 56 |
1 files changed, 3 insertions, 53 deletions
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 "<br>"; @@ -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 "<br>"; @@ -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 "<br>"; - if ($result = ldap_mod_replace($ds,$hostDN,$entryrbs)){ - rbs_adjust_host($hostDN, $rbs); - $mesg = "Remote Boot Service erfolgreich zu <b>".$rbscn." [Abt.: ".$rbsau."]</b> geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern des Remote Boot Services zu <b>".$rbscn."</b>!<br><br>"; - } - }else{ - echo "RBS add "; print_r($entryrbs); echo "<br>"; - if ($result = ldap_mod_add($ds,$hostDN,$entryrbs)){ - rbs_adjust_host($hostDN, $rbs); - $mesg = "Remote Boot Service erfolgreich zu <b>".$rbscn." [Abt.: ".$rbsau."]</b> geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern des Remote Boot Services zu <b>".$rbscn."</b>!<br><br>"; - } - } - }else{ - $entryrbs ['hlprbservice'] = array(); - $entryrbs ['dhcpoptnext-server'] = array(); - $entryrbs ['dhcpoptfilename'] = array(); - echo "RBS delete "; echo "<br>"; - if ($result = ldap_mod_del($ds,$hostDN,$entryrbs)){ - $mesg = "Rechner erfolgreich aus RBS gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen aus RBS!<br><br>"; - } - } -} -if ($rbs == "none"){ - echo "RBS none <br>"; -} - - ##################### $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> |
