X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=machines.cgi;h=bbfdb5819273c4300474ca1694c3865004d4f45f;hb=6406c438e799f1e0b2591c0d87800de48ade1eda;hp=b1951faad7700b8b383ae4824be7625f45c855f3;hpb=564e86b5e750fb3f448a336fdd7f441b6e57e4ed;p=mirror%2Fuserdir-ldap-cgi.git diff --git a/machines.cgi b/machines.cgi index b1951fa..bbfdb58 100755 --- a/machines.cgi +++ b/machines.cgi @@ -51,12 +51,12 @@ my (%attrs, @attrorder, %summaryattrs, @summaryorder, %summarylistitems); # ditto for summary %summaryattrs = ('hostname' => 'Host name', 'host' => 'just for a link', - 'architecture' => 'Architecture', + 'description' => 'Description', 'status' => 'Status', 'access' => 'Access', 'sponsor' => 'Sponsor', 'purpose' => 'Purpose'); -@summaryorder = qw{hostname architecture sponsor purpose status access}; +@summaryorder = qw{hostname description sponsor purpose status access}; %summarylistitems = map {$_=>1} qw{purpose sponsor}; # Global settings... @@ -120,13 +120,14 @@ sub item_uplist($) { return $out; } -$SIG{__DIE__} = \&DieHandler; +#$SIG{__DIE__} = \&DieHandler; my $query = new CGI; my $host = lc($query->param('host')); my $sortby = lc($query->param('sortby')) || "host"; my $sortorder = lc($query->param('sortorder')) || "asc"; + &Util::HTMLSendHeader; $ldap = Net::LDAP->new($config{ldaphost}) || &Util::HTMLError($!); &Util::UpgradeConnection($ldap) unless $config{usessl} eq 'False'; @@ -204,26 +205,26 @@ if ($output{havehostdata}) { $hostdetails .= "\n"; } else { # display summary info $hostdetails = "

Summary

\n"; - $hostdetails .= "\n"; + $hostdetails .= "
\n\n"; foreach $key (@summaryorder) { if ($sortby ne $key) { - $hostdetails .= ""; + $hostdetails .= ""; } else { if ($sortorder ne "dsc") { - $hostdetails .= ""; + $hostdetails .= ""; } else { - $hostdetails .= ""; + $hostdetails .= ""; } } } - $hostdetails .= "\n"; + $hostdetails .= "\n\n\n"; my @sorted; if ($sortorder eq "asc") { @@ -239,7 +240,7 @@ if ($output{havehostdata}) { } $hostdetails .= "\n"; } - $hostdetails .= "
$summaryattrs{$key}$summaryattrs{$key}$summaryattrs{$key}$summaryattrs{$key}$summaryattrs{$key}$summaryattrs{$key}
\n"; + $hostdetails .= "\n\n"; } # Finally, we can write the output... yuck...