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';
} else {
# display summary info
$hostdetails = "<h1>Summary</h1>\n";
- $hostdetails .= "<table class="debform" border=\"1\" width=\"90%\">\n<tr>";
+ $hostdetails .= "<table id=\"machines\" class=\"tablesorter\" border=\"1\" cellpadding=\"0\" cellspacing=\"1\">\n<thead>\n<tr>";
foreach $key (@summaryorder) {
if ($sortby ne $key) {
- $hostdetails .= "<th><a href=\"machines.cgi?sortby=$key&sortorder=asc\">$summaryattrs{$key}</a></th>";
+ $hostdetails .= "<th><a class=\"sort\" href=\"machines.cgi?sortby=$key&sortorder=asc\">$summaryattrs{$key}</a></th>";
} else {
if ($sortorder ne "dsc") {
- $hostdetails .= "<th><a href=\"machines.cgi?sortby=$key&sortorder=dsc\">$summaryattrs{$key}</a></th>";
+ $hostdetails .= "<th><a class=\"sort\" href=\"machines.cgi?sortby=$key&sortorder=dsc\">$summaryattrs{$key}</a></th>";
} else {
- $hostdetails .= "<th><a href=\"machines.cgi?sortby=$key&sortorder=asc\">$summaryattrs{$key}</a></th>";
+ $hostdetails .= "<th><a class=\"sort\" href=\"machines.cgi?sortby=$key&sortorder=asc\">$summaryattrs{$key}</a></th>";
}
}
}
- $hostdetails .= "</tr>\n";
+ $hostdetails .= "</tr>\n</thead>\n<tbody>\n";
my @sorted;
if ($sortorder eq "asc") {
}
$hostdetails .= "</tr>\n";
}
- $hostdetails .= "</table>\n";
+ $hostdetails .= "</tbody>\n</table>\n";
}
# Finally, we can write the output... yuck...