#**************************************************************************/
use strict;
+use warnings FATAL => 'all';
-$ND::TEMPLATE->param(TITLE => 'Edit MOTD');
+$ND::TEMPLATE->param(TITLE => 'Top Members');
our $BODY;
our $DBH;
-our $LOG;
die "You don't have access" unless isMember();
my $type = "total";
-if (param('type') =~ /^(defense|attack|total|humor|scan|rank)$/){
+if (defined param('type') && param('type') =~ /^(defense|attack|total|humor|scan|rank)$/){
$type = $1;
}
$type .= '_points' unless ($type eq 'rank');
$query->execute;
my @members;
+my $i = 0;
while (my ($username,$defense,$attack,$scan,$humor,$total,$rank) = $query->fetchrow){
+ $i++;
push @members,{Username => $username, Defense => $defense, Attack => $attack
- , Scan => $scan, Humor => $humor, Total => $total, Rank => $rank};
+ , Scan => $scan, Humor => $humor, Total => $total, Rank => $rank, ODD => $i % 2};
}
$BODY->param(Members => \@members);