";
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 = 40;
$url = 'rbshost.php?dn='.$hostDN.'&sbmnr='.$sbmnr;
echo "
";
##########################################
# 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. Falls nicht, klicken Sie hier back"; redirect($seconds, $url, $mesg, $addSessionId = TRUE); echo " |