#**************************************************************************/
use strict;
-use POSIX;
+use warnings FATAL => 'all';
our $BODY;
our $DBH;
our $LOG;
die "You don't have access" unless isHC();
my $order = "respplanet DESC";
-if (param('order') =~ /^(score|resources|respplanet|nscore|nscore2|nscore3)$/){
+if (defined param('order') && param('order') =~ /^(size|score|resources|respplanet|nscore|nscore2|nscore3)$/){
$order = "$1 DESC";
}
my @alliances;
my $i = 0;
while (my $alliance = $query->fetchrow_hashref){
+ $i++;
$alliance->{ODD} = $i % 2;
push @alliances,$alliance;
- $i++
}
$BODY->param(Alliances => \@alliances);