$self->{TITLE} = 'CovOp Targets';
my $DBH = $self->{DBH};
- return $self->noAccess unless $self->isHC;
+ return $self->noAccess unless $self->isMember;
- my $show = q{AND ((planet_status IS NULL OR NOT planet_status IN ('Friendly','NAP')) AND (relationship IS NULL OR NOT relationship IN ('Friendly','NAP')))};
+ my $show = q{AND (NOT planet_status IN ('Friendly','NAP')) AND (relationship IS NULL OR NOT relationship IN ('Friendly','NAP'))};
$show = '' if defined param('show') && param('show') eq 'all';
if (defined param('covop') && param('covop') =~ /^(\d+)$/){
my $update = $DBH->prepare('UPDATE covop_targets SET covop_by = ?, last_covop = tick() WHERE planet = ? ');
$query->execute($self->{PLANET});
my @targets;
- my $i = 0;
while (my ($id,$coords,$metal,$crystal,$eonium,$seccents,$dists,$max) = $query->fetchrow){
- $i++;
push @targets,{Target => $id, Coords => $coords
, Metal => $metal, Crystal => $crystal, Eonium => $eonium, SecCents => $seccents
- , Dists => $dists, MaxResHack => $max, List => $list, ODD => $i % 2};
+ , Dists => $dists, MaxResHack => $max, List => $list};
}
$BODY->param(Targets => \@targets);
return $BODY;