summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2016-03-13 14:37:58 -0700
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2016-03-13 14:37:58 -0700
commit8f49cfc49cd71de07d48f10d5c3584e7834d9c17 (patch)
treefc61a28248e486e0f4da1be77fd879c59d53eb7c
parent374883557144bdfa642de89b663351f13291f27c (diff)
update showUsers.pl output format
-rwxr-xr-xcgi-bin/showUsers.pl51
1 files changed, 35 insertions, 16 deletions
diff --git a/cgi-bin/showUsers.pl b/cgi-bin/showUsers.pl
index 913ee22..3fb668e 100755
--- a/cgi-bin/showUsers.pl
+++ b/cgi-bin/showUsers.pl
@@ -23,7 +23,14 @@ print <<HTML;
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form></h3>
<table>
-<tr><th>NickServ account</th><th>h</th><th>s</th><th>a</th><th>d</th></tr>
+<tr>
+ <th>NickServ account</th>
+ <th style="width:20px">s</th>
+ <th style="width:20px">h</th>
+ <th style="width:20px">a</th>
+ <th style="width:20px">d</th>
+ <th style="width:20px">p</th>
+</tr>
HTML
my $xs1 = XML::Simple->new( KeyAttr => ['id'], Cache => [ qw/memcopy/ ]);
@@ -32,44 +39,56 @@ my $users = $xs1->XMLin( "/home/icxcnika/AntiSpamMeta/config-main/users.xml", Fo
sub printout
{
my ($user) = @_;
- print "<tr><td style=\"text-align:right\">$user</td>";
- print "<td>";
- print "x" if (index($users->{person}->{$user}->{flags}, 'h') != -1);
+ print "<tr><td style=\"text-align:right\"><b>$user</b></td>";
+ print "<td style=\"text-align:center\">";
+ print "s" if (index($users->{person}->{$user}->{flags}, 's') != -1);
print "</td>";
- print "<td>";
- print "x" if (index($users->{person}->{$user}->{flags}, 's') != -1);
+ print "<td style=\"text-align:center\">";
+ print "h" if (index($users->{person}->{$user}->{flags}, 'h') != -1);
print "</td>";
- print "<td>";
- print "x" if (index($users->{person}->{$user}->{flags}, 'a') != -1);
+ print "<td style=\"text-align:center\">";
+ print "a" if (index($users->{person}->{$user}->{flags}, 'a') != -1);
print "</td>";
- print "<td>";
- print "x" if (index($users->{person}->{$user}->{flags}, 'd') != -1);
+ print "<td style=\"text-align:center\">";
+ print "d" if (index($users->{person}->{$user}->{flags}, 'd') != -1);
+ print "</td>";
+ print "<td style=\"text-align:center\">";
+ print "p" if (index($users->{person}->{$user}->{flags}, 'p') != -1);
print "</td>";
print "</tr>\n";
}
-foreach my $user (keys %{$users->{person}}) {
+foreach my $user (sort keys %{$users->{person}}) {
if (index($users->{person}->{$user}->{flags}, 'd') != -1) {
printout($user);
delete $users->{person}->{$user};
}
}
-foreach my $user (keys %{$users->{person}}) {
+foreach my $user (sort keys %{$users->{person}}) {
if (index($users->{person}->{$user}->{flags}, 'a') != -1) {
printout($user);
delete $users->{person}->{$user};
}
}
-foreach my $user (keys %{$users->{person}}) {
+foreach my $user (sort keys %{$users->{person}}) {
+ if (index($users->{person}->{$user}->{flags}, 'h') != -1) {
+ printout($user);
+ delete $users->{person}->{$user}
+ }
+}
+foreach my $user (sort keys %{$users->{person}}) {
if (index($users->{person}->{$user}->{flags}, 's') != -1) {
printout($user);
delete $users->{person}->{$user}
}
}
-
-foreach my $user (keys %{$users->{person}}) {
- printout($user);
+foreach my $user (sort keys %{$users->{person}}) {
+# if (index($users->{person}->{$user}->{flags}, 's') != -1) {
+ printout($user);
+ delete $users->{person}->{$user}
+# }
}
+
print "</table></body></html>";
exit 0;