summaryrefslogtreecommitdiffstats
path: root/ldap-site-mngmt/webinterface/computers/hostoverview.php
diff options
context:
space:
mode:
authorTarik Gasmi2007-10-26 10:41:22 +0200
committerTarik Gasmi2007-10-26 10:41:22 +0200
commit310554c02e4b51c5300f8bdf8ad15e3f0520bc53 (patch)
tree277727e7c13eeaec94fe8089f547f3108b727bcc /ldap-site-mngmt/webinterface/computers/hostoverview.php
parentThis should fix a small bug reported by Reiner for SuSE10.3 in stage3. (diff)
downloadcore-310554c02e4b51c5300f8bdf8ad15e3f0520bc53.tar.gz
core-310554c02e4b51c5300f8bdf8ad15e3f0520bc53.tar.xz
core-310554c02e4b51c5300f8bdf8ad15e3f0520bc53.zip
LSM Webinterface, new actualized Version
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1401 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'ldap-site-mngmt/webinterface/computers/hostoverview.php')
-rw-r--r--ldap-site-mngmt/webinterface/computers/hostoverview.php34
1 files changed, 21 insertions, 13 deletions
diff --git a/ldap-site-mngmt/webinterface/computers/hostoverview.php b/ldap-site-mngmt/webinterface/computers/hostoverview.php
index b59dbea6..b1728002 100644
--- a/ldap-site-mngmt/webinterface/computers/hostoverview.php
+++ b/ldap-site-mngmt/webinterface/computers/hostoverview.php
@@ -7,7 +7,7 @@ $webseite = "hostoverview.dwt";
include('computers_header.inc.php');
-$mnr = 1;
+$mnr = 0;
$sbmnr = -1;
$mcnr = -1;
@@ -19,18 +19,26 @@ createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr);
###################################################################################
+$sort = "hostname";
+$sort = $_GET['sort'];
+
$template->assign(array("DN" => "",
"HOSTNAME" => "Noch keine Rechner angelegt",
"DOMAINNAME" => "",
"HWADDRESS" => "",
- "IPADDRESS" => "",
+ "IPADDRESS" => "",
"DHCPCONT" => "",
"FIXADD" => "",
- "RBSCONT" => "",
- "NXTSRV" => ""));
+ "DESC" => "",
+ "RBSCONT" => ""));
+
+$attributes = array("dn","hostname","domainname","hwaddress","ipaddress","description","dhcphlpcont","dhcpoptfixed-address","hlprbservice","dhcpoptnext-server");
+$host_array = get_hosts($auDN,$attributes,$sort);
+#print_r($host_array);
-$attributes = array("dn","hostname","domainname","hwaddress","ipaddress","dhcphlpcont","dhcpoptfixed-address","hlprbservice","dhcpoptnext-server");
-$host_array = get_hosts($auDN,$attributes);
+if ($sort == "ipaddress"){
+ $host_array = array_natsort($host_array, "ipaddress", "ipaddress");
+}
$template->define_dynamic("Rechner", "Webseite");
@@ -41,7 +49,7 @@ foreach ($host_array as $host){
$hostip = explode('_',$host['ipaddress']);
$dhcpcont = "";
- $dhcpfixadd = "";
+ $dhcpfixadd = "-";
if ( count($host['dhcphlpcont']) != 0 ){
$dhcpexpdn = ldap_explode_dn($host['dhcphlpcont'],1);
$dhcpcn = $dhcpexpdn[0];
@@ -62,25 +70,25 @@ foreach ($host_array as $host){
}
-
- $rbscont = "";
+ $rbscont = "-";
$dhcpnxtsrv = "";
if ( count($host['hlprbservice']) != 0 ){
$rbsexpdn = ldap_explode_dn($host['hlprbservice'],1);
- $rbscont = $rbsexpdn[0]." <br>[".$rbsexpdn[2]."]";
+ $dhcpnxtsrv = $host['dhcpoptnext-server'];
+ $rbscont = $rbsexpdn[0]." <br>[".$dhcpnxtsrv."]";
+
- $dhcpnxtsrv = $host['dhcpoptnext-server'];
}
$template->assign(array("DN" => $host['dn'],
"HOSTNAME" => $hostname,
"DOMAINNAME" => $host['domainname'],
"HWADDRESS" => $host['hwaddress'],
- "IPADDRESS" => $hostip[0],
+ "IPADDRESS" => $hostip[0],
"DHCPCONT" => $dhcpcont,
"FIXADD" => $dhcpfixadd,
"RBSCONT" => $rbscont,
- "NXTSRV" => $dhcpnxtsrv,
+ "DESC" => $host['description'],
"AUDN" => $auDN ));
$template->parse("RECHNER_LIST", ".Rechner");