"; 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 " AU Management
"; ########################################## # DHCP 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(); $mesg = "Rechner erfolgreich in DHCP ".$dhcpcn." [Abt.: ".$dhcpau."] angemeldet

"; }else{ $mesg = "Fehler beim ändern des DHCP Dienstes zu ".$dhcpcn."!

"; } }else{ if ( $hostip != "" ){ $entrydhcp ['dhcpoptfixed-address'] = "ip"; } echo "DHCP add "; print_r($entrydhcp); echo "
"; if ($result = ldap_mod_add($ds,$hostDN,$entrydhcp)){ update_dhcpmtime(); $mesg = "Rechner erfolgreich in DHCP ".$dhcpcn." [Abt.: ".$dhcpau."] angemeldet

"; }else{ $mesg = "Fehler beim ändern des DHCP Dienstes zu ".$dhcpcn."!

"; } } }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(); $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(); $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(); $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(); $mesg = "Option Fixed-Address erfolgreich gelöscht

"; }else{ $mesg = "Fehler beim löschen der Option Fixed-Address!

"; } } } ##################### $mesg .= "
Sie werden automatisch auf die vorherige Seite zurückgeleitet.
Falls nicht, klicken Sie hier back"; redirect($seconds, $url, $mesg, $addSessionId = TRUE); echo "
"; ?>