our $LOG = $DBH->prepare('INSERT INTO log (uid,text) VALUES(?,?)');
my $page = 'main';
-if (param('page') =~ /^(main|check|motd|points|covop)$/){
+if (param('page') =~ /^(main|check|motd|points|covop|top100|launchConfirmation)$/){
$page = $1;
}
$TEMPLATE->param(isDC => isDC());
$TEMPLATE->param(isBC => isBC());
$TEMPLATE->param(isAttacker => $ATTACKER && (!isMember() || ((($TICK - $fleetupdate < 24) || isScanner()) && $PLANET)));
+if ($ATTACKER && (!isMember() || ((($TICK - $fleetupdate < 24) || isScanner()) && $PLANET))){
+ my $query = $DBH->prepare(qq{SELECT t.id, r.id AS raid, r.tick+c.wave-1 AS landingtick, released_coords, coords(x,y,z),c.launched
+FROM raid_claims c
+ JOIN raid_targets t ON c.target = t.id
+ JOIN raids r ON t.raid = r.id
+ JOIN current_planet_stats p ON t.planet = p.id
+WHERE c.uid = ? AND r.tick+c.wave > ? AND r.open AND not r.removed
+ORDER BY r.tick+c.wave,x,y,z});
+ $query->execute($UID,$TICK);
+ my @targets;
+ while (my $target = $query->fetchrow_hashref){
+ my $coords = "Target $target->{id}";
+ $coords = $target->{coords} if $target->{released_coords};
+ push @targets,{Coords => $coords, Launched => $target->{launched}, Raid => $target->{raid}
+ , Target => $target->{id}, Tick => $target->{landingtick}};
+ }
+ $ND::TEMPLATE->param(Targets => \@targets);
+}
$ND::TEMPLATE->param(BODY => $ND::BODY->output);
print $TEMPLATE->output;