print_r($entryrbs);
         echo "<br>";
         if ($result = ldap_mod_replace($ds, $hostDN, $entryrbs)) {
             update_dhcpmtime(array());
             rbs_adjust_host($hostDN, $rbs);
             $mesg = "Remote Boot Service erfolgreich zu <b>" . $rbscn . " [Abt.: " . $rbsau . "]</b> ge&auml;ndert<br><br>";
         } else {
             $mesg = "Fehler beim &auml;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)) {
             update_dhcpmtime(array());
             rbs_adjust_host($hostDN, $rbs);
             $mesg = "Remote Boot Service erfolgreich zu <b>" . $rbscn . " [Abt.: " . $rbsau . "]</b> ge&auml;ndert<br><br>";
         } else {
             $mesg = "Fehler beim &auml;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)) {
         update_dhcpmtime(array());
         $mesg = "Rechner erfolgreich aus RBS gel&ouml;scht<br><br>";
     } else {
            $rbsadd['hlprbservice'] = $rbs[$j];
            $rbsadd['dhcpoptnext-server'] = $rbsdhcpdata['tftpserverip'];
            $rbsadd['dhcpoptfilename'] = $rbsdhcpdata['initbootfile'];
            if ($oldrbs[$j] == "") {
                $result = ldap_mod_add($ds, $hostDN[$j], $rbsadd);
                if ($result) {
                    echo "erfolgreich eingetragen: <b>{$rbscn}</b> (Next-Server: ";
                    print $rbsadd['dhcpoptnext-server'] . " / Filename: " . $rbsadd['dhcpoptfilename'] . ")<br>";
                    rbs_adjust_host($hostDN[$j], $rbs[$j]);
                } else {
                    echo "Fehler beim eintragen in Remote Boot Dienst <b>{$rbscn}</b> <br>";
                }
            } else {
                if ($result = ldap_mod_replace($ds, $hostDN[$j], $rbsadd)) {
                    echo "Remote Boot Service erfolgreich ge&auml;ndert (<b>{$oldrbscn}</b> -> <b>{$rbscn}</b>)<br>";
                    rbs_adjust_host($hostDN[$j], $rbs[$j]);
                } else {
                    echo "Fehler beim &auml;ndern des Remote Boot Dienstes (<b>{$oldrbscn}</b> -> <b>{$rbscn}</b>)!<br>";
                }
            }
        }
        $dhcpchange = 1;
    } else {
        #	echo "kein &Auml;nderung <br>";
    }
}
echo "</td><td></tr><tr><td colspan='3'>";
#########
if ($dhcpchange) {
    update_dhcpmtime($auDN);
}