assign(array("IP" => "", "OLDIP" => "", "DHCPCONT" => "", "FIXADD" => "", "HOSTNAME" => "Noch keine Rechner angelegt", "HOSTDN" => "")); $host_array = get_hosts($auDN,array("dn","hostname","ipaddress","dhcphlpcont","dhcpoptfixed-address")); # print_r ($host_array); $template->define_dynamic("Hosts", "Webseite"); foreach ($host_array as $host){ $hostip = explode('_',$host['ipaddress']); $dhcpcont = ""; $fixadd = ""; if ( count($host['dhcphlpcont']) != 0 ){ #&& $host['ipaddress'] == "" ){ $dhcpcont = " dynamisch"; #$fixadd = $host['dhcpoptfixed-address']; #}elseif( count($host['dhcphlpcont']) != 0 && $host['ipaddress'] != "" ){ if ( $host['dhcpoptfixed-address'] == "ip") { $dhcpcont = " fix"; #$fixadd = $host['dhcpoptfixed-address']; } if ( $host['dhcpoptfixed-address'] == "hostname") { $dhcpcont = " fix (über DNS Name)"; #$fixadd = $host['dhcpoptfixed-address']; } $fixadd = $host['dhcpoptfixed-address']; } $template->assign(array("IP" => $hostip[0], "OLDIP" => $hostip[0], "DHCPCONT" => $dhcpcont, "FIXADD" => $fixadd, "HOSTNAME" => $host['hostname'], "HOSTDN" => $host['dn'], "AUDN" => $auDN )); $template->parse("HOSTS_LIST", ".Hosts"); } ##################################################################################### include("computers_footer.inc.php"); ?>