X-Git-Url: https://ruin.nu/git/?p=ndwebbie.git;a=blobdiff_plain;f=lib%2FNDWeb%2FController%2FAlliances.pm;fp=lib%2FNDWeb%2FController%2FAlliances.pm;h=70c6340419e077844d1f4fd531e6d9eeabc0d37d;hp=8f0b6c67555203131bbcb25b828e7978945eb6a8;hb=1d5acf5ba24af54ebce139cddd4aa720847357f5;hpb=7510a73591d06ced24af063d598029fd9d1bce8a diff --git a/lib/NDWeb/Controller/Alliances.pm b/lib/NDWeb/Controller/Alliances.pm index 8f0b6c6..70c6340 100644 --- a/lib/NDWeb/Controller/Alliances.pm +++ b/lib/NDWeb/Controller/Alliances.pm @@ -107,6 +107,23 @@ ORDER BY tick DESC, mission $c->stash(intel => $query->fetchall_arrayref({}) ); } + +sub pscans : Local { + my ( $self, $c, $id ) = @_; + my $dbh = $c->model; + + my $members = $dbh->prepare(q{ + SELECT pid AS id, coords(x,y,z), metal, crystal, eonium, ps.tick + ,planet_status,hit_us, sizerank, scorerank, valuerank, xprank + FROM current_planet_stats p left outer join current_planet_scans ps using (pid) + WHERE p.aid = ? + ORDER BY x,y,z + }); + $members->execute($id); + $c->stash(members => $members->fetchall_arrayref({}) ); + +} + sub postallianceupdate : Local { my ( $self, $c, $id, $order ) = @_; my $dbh = $c->model;