From 59cf91925ca8da43d2427331b23e4673b0e53095 Mon Sep 17 00:00:00 2001 From: Tarik Gasmi Date: Mon, 14 May 2007 08:03:48 +0000 Subject: Other webinterface data. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1077 95ad53e4-c205-0410-b2fa-d234c58c8868 --- ldap-site-mngmt/webinterface/ip/ip_rechner.php | 65 ++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 ldap-site-mngmt/webinterface/ip/ip_rechner.php (limited to 'ldap-site-mngmt/webinterface/ip/ip_rechner.php') diff --git a/ldap-site-mngmt/webinterface/ip/ip_rechner.php b/ldap-site-mngmt/webinterface/ip/ip_rechner.php new file mode 100644 index 00000000..66ea23ee --- /dev/null +++ b/ldap-site-mngmt/webinterface/ip/ip_rechner.php @@ -0,0 +1,65 @@ +assign(array("IP" => "", + "OLDIP" => "", + "DHCPCONT" => "", + "HOSTNAME" => "Noch keine Rechner angelegt", + "HOSTDN" => "")); + +$host_array = get_hosts($auDN,array("dn","hostname","ipaddress","dhcphlpcont")); +# print_r ($host_array); + +$template->define_dynamic("Hosts", "Webseite"); + +foreach ($host_array as $host){ + $hostip = explode('_',$host['ipaddress']); + + if ( count($host['dhcphlpcont']) != 0 && $host['ipaddress'] == "" ){ + $subnetCN = explode('cn=',$host['dhcphlpcont']); + $dynsubnet = explode(',', $subnetCN[1]); + $dhcpcont = " DYNAMISCH   (DHCP, Subnet $dynsubnet[0])"; + }elseif( count($host['dhcphlpcont']) != 0 && $host['ipaddress'] != "" ){ + $subnetCN = explode('cn=',$host['dhcphlpcont']); + $dynsubnet = explode(',', $subnetCN[1]); + $dhcpcont = " STATISCH   (DHCP, Subnet $dynsubnet[0])"; + }else{$dhcpcont = "";} + + $template->assign(array("IP" => $hostip[0], + "OLDIP" => $hostip[0], + "DHCPCONT" => $dhcpcont, + "HOSTNAME" => $host['hostname'], + "HOSTDN" => $host['dn'], + "AUDN" => $auDN )); + $template->parse("HOSTS_LIST", ".Hosts"); +} + + +##################################################################################### + +include("ip_footer.inc.php"); + +?> -- cgit v1.2.3-55-g7522