From cd46d68991f7ae0cf319f915c5fecdd71b78ee34 Mon Sep 17 00:00:00 2001
From: Lars Müller
Date: Sat, 1 Mar 2008 18:04:26 +0000
Subject: Reorganisation of the repo structure as discussed on the devel list.
- Move the majority of trunk and all branches to the new openslx/ dir.
- Move ldap-site-mngmt to contrib/.
- Move openslx/trunk/os-plugins/plugins/vmchooser/src/ to
openslx-src-tools/trunk/os-plugins/plugins/vmchooser/
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1591 95ad53e4-c205-0410-b2fa-d234c58c8868
---
.../webinterface/computers/dhcphost_change.php | 236 ---------------------
1 file changed, 236 deletions(-)
delete mode 100644 ldap-site-mngmt/webinterface/computers/dhcphost_change.php
(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
deleted file mode 100644
index cbfa7f9f..00000000
--- a/ldap-site-mngmt/webinterface/computers/dhcphost_change.php
+++ /dev/null
@@ -1,236 +0,0 @@
-
";
-$oldattribs = $_POST['oldattribs'];
-if (count($oldattribs) != 0){
- foreach (array_keys($oldattribs) as $key){
- $oldatts[$key] = htmlentities($oldattribs[$key]);
- }
-}
-#print_r($oldatts); echo "
";
-
-/*echo "new dhcp:"; print_r($dhcp); echo "
";
-echo "old dhcp:"; print_r($olddhcp); echo "
";
-echo "new rbs:"; print_r($rbs); echo "
";
-echo "old rbs:"; print_r($oldrbs); echo "
";
-echo "Host DN:"; print_r($hostDN); echo "
";
-echo "submenuNR:"; print_r($sbmnr); echo "
";*/
-
-
-$seconds = 2;
-$url = 'dhcphost.php?dn='.$hostDN.'&sbmnr='.$sbmnr;
-
-echo "
-
-
| ";
-
-##########################################
-# DHCP Einbindung
-
-if ($dhcp != "none" && $dhcp != $olddhcp){
- if ($dhcp != ""){
- $exp = ldap_explode_dn($dhcp, 1);
- $dhcpcn = $exp[0];
- $dhcpau = $exp[2];
-
- $entrydhcp ['dhcphlpcont'] = $dhcp;
- if ($olddhcp != ""){
- echo "DHCP replace "; print_r($olddhcp); echo " with "; print_r($entrydhcp); echo " "; - if ($result = ldap_mod_replace($ds,$hostDN,$entrydhcp)){ - update_dhcpmtime(array()); - $mesg = "Rechner erfolgreich in DHCP ".$dhcpcn." [Abt.: ".$dhcpau."] angemeldet "; - }else{ - $mesg = "Fehler beim ändern des DHCP Dienstes zu ".$dhcpcn."! "; - } - }else{ - if ( $hostmac != ""){ - if ( $hostip != "" ){ - $entrydhcp ['dhcpoptfixed-address'] = "ip"; - } - echo "DHCP add "; print_r($entrydhcp); echo " "; - if ($result = ldap_mod_add($ds,$hostDN,$entrydhcp)){ - update_dhcpmtime(array()); - $mesg = "Rechner erfolgreich in DHCP ".$dhcpcn." [Abt.: ".$dhcpau."] angemeldet "; - }else{ - $mesg = "Fehler beim ändern des DHCP Dienstes zu ".$dhcpcn."! "; - } - }else{ - $mesg = "Es ist keine MAC Adresse für den Rechner eingetragen. - Dies ist jedoch Voraussetzung für einen DHCP Eintrag. "; - } - } - }else{ - $entrydhcp ['dhcphlpcont'] = array(); - if ( $oldfixedaddress != "" ){ - $entrydhcp ['dhcpoptfixed-address'] = array(); - } - #if ( $oldrbs != "" ){ - # $entrydhcp ['hlprbservice'] = array(); - #} - echo "DHCP delete "; echo " "; - if ($result = ldap_mod_del($ds,$hostDN,$entrydhcp)){ - update_dhcpmtime(array()); - $mesg = "Rechner erfolgreich aus DHCP gelöscht "; - }else{ - $mesg = "Fehler beim löschen aus DHCP Dienst! "; - } - } - -} -if ($dhcp == "none"){ - echo " DHCP none "; -} - - -############################# -# DHCP Option fixed-address - -if ($fixedaddress != "none" && $fixedaddress != $oldfixedaddress){ - if ($fixedaddress != ""){ - $entryfixadd ['dhcpoptfixed-address'] = $fixedaddress; - if ($oldfixedaddress != ""){ - echo "Fixed Address ändern"; echo " "; - if ($result = ldap_mod_replace($ds,$hostDN,$entryfixadd)){ - update_dhcpmtime(array()); - $mesg = "Option Fixed-Address erfolgreich auf ".$fixedaddress." geändert "; - }else{ - $mesg = "Fehler beim ändern der Option Fixed-Address auf ".$fixedaddress."! "; - } - }else{ - echo "Fixed Address auf IP Adresse setzen"; echo " "; - if ($result = ldap_mod_add($ds,$hostDN,$entryfixadd)){ - update_dhcpmtime(array()); - $mesg = "Option Fixed-Address erfolgreich auf ".$fixedaddress." gesetzt "; - }else{ - $mesg = "Fehler beim setzen der Option Fixed-Address auf ".$fixedaddress."! "; - } - } - }else{ - $entryfixadd ['dhcpoptfixed-address'] = array(); - echo "No Fixed Address"; echo " "; - if ($result = ldap_mod_del($ds,$hostDN,$entryfixadd)){ - update_dhcpmtime(array()); - $mesg = "Option Fixed-Address erfolgreich gelöscht "; - }else{ - $mesg = "Fehler beim löschen der Option Fixed-Address! "; - } - } -} - -##################################### -# Restliche Attribute ... - -#if (count($atts) != 0){ - - $entryadd = array(); - $entrymod = array(); - $entrydel = array(); - - foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - - } - if ( $oldatts[$key] == "" && $atts[$key] != "" ){ - # hier noch Syntaxcheck - $entryadd[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] != "" && $oldatts[$key] != $atts[$key] ){ - # hier noch Syntaxcheck - $entrymod[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] == "" ){ - # hier noch Syntaxcheck - $entrydel[$key] = $oldatts[$key]; - } - } - - #print_r($entryadd); echo " "; - #print_r($entrymod); echo " "; - #print_r($entrydel); echo " "; - - - if (count($entryadd) != 0 ){ - #print_r($entryadd); echo " "; - #echo "neu anlegen "; - foreach (array_keys($entryadd) as $key){ - $addatts .= "".$key.","; - } - if(ldap_mod_add($ds,$hostDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen "; - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim eintragen der Attribute ".$addatts." "; - } - } - - if (count($entrymod) != 0 ){ - #print_r($entrymod); echo " "; - #echo "ändern "; - foreach (array_keys($entrymod) as $key){ - $modatts .= "".$key.","; - } - if(ldap_mod_replace($ds,$hostDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert "; - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim aendern der Attribute ".$modatts." "; - } - } - - if (count($entrydel) != 0 ){ - #print_r($entrydel); echo " "; - #echo "löschen "; - foreach (array_keys($entrydel) as $key){ - $delatts .= "".$key.","; - } - if(ldap_mod_del($ds,$hostDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht "; - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts." "; - } - } - -#} - -##################### - -$mesg .= " Sie werden automatisch auf die vorherige Seite zurückgeleitet. - Falls nicht, klicken Sie hier back"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo " |