"; $dhcphlpcont = $host['dhcphlpcont']; $objectDN = $dhcphlpcont; $rbsDN = $host['hlprbservice']; $rbs_dhcpopt = ""; $host_dhcpopt = ""; # DHCP Daten if ($dhcphlpcont == ""){ $dhcp = "Rechner ist in keinem DHCP Dienst angemeldet
DHCP Dienst auswählen: "; $objecttype = "nodhcp"; $rbs = " Sie müssen den Rechner zuerst in einem DHCP Dienst anmelden, bevor Sie ihn einem Remote Boot Dienst zuordnen können
(DHCP Optionen!!).
"; }else{ # Subnet? $objecttype = "service"; $dhcp = ""; $ocarray = get_node_data($dhcphlpcont,array("objectclass","dhcphlpcont")); #print_r($ocarray); echo "
"; $sub = array_search('dhcpSubnet', $ocarray['objectclass']); #print_r($sub); if ($sub !== false ){ $objecttype = "subnet"; $exp0 = explode(',',$dhcphlpcont); $expsub = explode('=',$exp0[0]); $dhcpsub = $expsub[1]; $dhcp .= "Subnet ".$dhcpsub." / "; $dhcphlpcont = $ocarray['dhcphlpcont']; } $exp1 = explode(',',$dhcphlpcont); $expdhcp = explode('=',$exp1[0]); $dhcpserv = $expdhcp[1]; $expdhcpau = explode('=',$exp1[2]); $dhcpau = $expdhcpau[1]; $dhcp .= "Service ".$dhcpserv." / AU ".$dhcpau."
DHCP Dienst ändern: "; $fixedaddselopt = ""; switch ( $host['dhcpoptfixed-address'] ){ case "": $fixedaddress = " -
(dynamische Vergabe)"; if ( $hostip[0] != "" ){ $fixedaddselopt .= ""; } $fixedaddselopt .= ""; break; case "ip": $fixedaddress = "".$hostip[0]."
(Fixe IP Adresse)"; $fixedaddselopt .= " "; break; case "hostname": $fixedaddress = "".$host['hostname']."
(Fixe IP Adresse über Hostnamen aufgelöst)"; if ( $hostip[0] != "" ){ $fixedaddselopt .= ""; } $fixedaddselopt .= ""; break; } $host_dhcpopt = "DHCP Optionen: hardware ethernet:   ".$host['hwaddress']."    fixed-address:   ".$fixedaddress."  "; ########################################################### # RBS Setup $rbs_selectbox = ""; $rbs_dhcpopt = ""; $altrbs = alternative_rbservices($rbsDN); if (count($altrbs) != 0){ $rbs_selectbox .= " "; } # RBS Daten if ($rbsDN == ""){ $rbs = "Remote Boot Dienst:   Rechner ist in keinem Remote Boot Dienst angemeldet
RBS auswählen:
".$rbs_selectbox; }else{ $rbs = ""; $rbsdata = get_node_data($rbsDN,array("tftpserverip")); #print_r($rbsdata); echo "
"; $exp2 = explode(',',$host['hlprbservice']); $exprbs = explode('=',$exp2[0]); $rbserv = $exprbs[1]; $exprbsau = explode('=',$exp2[2]); $rbsau = $exprbsau[1]; $rbs .= "Remote Boot Dienst:   Remote Boot Service ".$rbserv." / AU ".$rbsau."
TFTP (Boot) Server: ".$rbsdata['tftpserverip']."
RBS ändern:
".$rbs_selectbox; $rbs_dhcpopt = "DHCP Optionen: next-server  (TFTP Server): ".$host['dhcpoptnext-server']."  filename  (initiale remote Bootdatei): ".$host['dhcpoptfilename']."  "; } } $template->assign(array("HOSTDN" => $hostDN, "HOSTNAME" => $host['hostname'], "DOMAINNAME" => $host['domainname'], "HWADDRESS" => $host['hwaddress'], "IPADDRESS" => $hostip[0], "DESCRIPTION" => $host['description'], "OLDDHCP" => $objectDN, "OLDFIXADD" => $host['dhcpoptfixed-address'], "OLDRBS" => $rbsDN, "DHCPCONT" => $dhcp, "HOST_DHCPOPT" => $host_dhcpopt, "RBS" => $rbs, "RBS_DHCPOPT" => $rbs_dhcpopt, "NEXTSERVER" => $host['dhcpoptnext-server'], "FILENAME" => $host['dhcpoptfilename'], "HOSTLINK" => "", "HWLINK" => "", "AUDN" => $auDN, "SBMNR" => $sbmnr)); ########################################################## # DHCP Setup $altdhcp = alternative_dhcpobjects($objecttype,$objectDN,$hostip[0]); #echo "

";print_r($altdhcp); $template->assign(array("ALTDN" => "", "ALTCN" => "", "ALTAU" => "")); if (count($altdhcp) != 0){ $template->define_dynamic("Altdhcp", "Webseite"); foreach ($altdhcp as $item){ $template->assign(array("ALTDN" => $item['dn'], "ALTCN" => $item['cn'], "ALTAU" => $item['au'],)); $template->parse("ALTDHCP_LIST", ".Altdhcp"); } } ########################################################### # RBS Setup /*$altrbs = alternative_rbservices($rbsDN); #print_r($altrbs); echo "

"; $template->assign(array("ALTRBSDN" => "", "ALTRBSCN" => "", "ALTRBSAU" => "")); if (count($altrbs) != 0){ $template->define_dynamic("Altrbs", "Webseite"); foreach ($altrbs as $item){ $template->assign(array("ALTRBSDN" => $item['dn'], "ALTRBSCN" => $item['cn'], "ALTRBSAU" => $item['au'],)); $template->parse("ALTRBS_LIST", ".Altrbs"); } }*/ ################################################################################### include("computers_footer.inc.php"); /* DHCP Option hardware ethernet:   {HWADDRESS}   DHCP Option fixed-address:   {IPADDRESS}   TFTP Server
DHCP Option next-server:
  {NEXTSERVER}   PXE initiale Bootdatei
DHCP Option filename:
  {FILENAME}   */ ?>