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 --- .../webinterface/computers/hostoverview.php | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 ldap-site-mngmt/webinterface/computers/hostoverview.php (limited to 'ldap-site-mngmt/webinterface/computers/hostoverview.php') diff --git a/ldap-site-mngmt/webinterface/computers/hostoverview.php b/ldap-site-mngmt/webinterface/computers/hostoverview.php new file mode 100644 index 00000000..c2bec0a2 --- /dev/null +++ b/ldap-site-mngmt/webinterface/computers/hostoverview.php @@ -0,0 +1,82 @@ +assign(array("DN" => "", + "HOSTNAME" => "Noch keine Rechner angelegt", + "DOMAINNAME" => "", + "HWADDRESS" => "", + "IPADDRESS" => "", + "DHCPCONT" => "", + "RBSCONT" => "")); + +$attributes = array("dn","hostname","domainname","hwaddress","ipaddress","dhcphlpcont","hlprbservice"); +$host_array = get_hosts($auDN,$attributes); + +$template->define_dynamic("Rechner", "Webseite"); + +$i = 0; +foreach ($host_array as $host){ + + $hostname = "".$host['hostname'].""; + $hostip = explode('_',$host['ipaddress']); + + $dhcpcont = ""; + if ( count($host['dhcphlpcont']) != 0 ){ + $dhcpexpdn = ldap_explode_dn($host['dhcphlpcont'],1); + $dhcpcn = $dhcpexpdn[0]; + $ocarray = get_node_data($host['dhcphlpcont'],array("objectclass","dhcphlpcont")); + $sub = array_search('dhcpSubnet', $ocarray['objectclass']); + if ($sub !== false ){ + $dhcpcont = "Subnet ".$dhcpexpdn[0]."
[".$dhcpexpdn[2]."]"; + }else{ + $dhcpcont = "Service ".$dhcpexpdn[0]."
[".$dhcpexpdn[2]."]"; + } + } + + $rbscont = ""; + if ( count($host['hlprbservice']) != 0 ){ + $rbsexpdn = ldap_explode_dn($host['hlprbservice'],1); + $rbscont = $rbsexpdn[0]."
[".$rbsexpdn[2]."]"; + } + + $template->assign(array("DN" => $host['dn'], + "HOSTNAME" => $hostname, + "DOMAINNAME" => $host['domainname'], + "HWADDRESS" => $host['hwaddress'], + "IPADDRESS" => $hostip[0], + "DHCPCONT" => $dhcpcont, + "RBSCONT" => $rbscont, + "AUDN" => $auDN )); + $template->parse("RECHNER_LIST", ".Rechner"); + + $i++; +} + +################################################################################### + +include("computers_footer.inc.php"); + +?> \ No newline at end of file -- cgit v1.2.3-55-g7522