X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=ND%2FWeb%2FPages%2FCovOp.pm;h=2ce65b45bc42bdb8c065265fc05c3df8dc4cd347;hb=037c9a45c8dadcd59a7d8a6318101a8adbce3a51;hp=5f1a59cb0ea68ea975b8d59ecbf23dd680c87785;hpb=d263ed99d56be8a2c466da173a335eea9cb4793d;p=ndwebbie.git diff --git a/ND/Web/Pages/CovOp.pm b/ND/Web/Pages/CovOp.pm index 5f1a59c..2ce65b4 100644 --- a/ND/Web/Pages/CovOp.pm +++ b/ND/Web/Pages/CovOp.pm @@ -23,7 +23,9 @@ use warnings FATAL => 'all'; use CGI qw/:standard/; use ND::Web::Include; -$ND::PAGES{covop} = {parse => \&parse, process => \&process, render=> \&render}; +our @ISA = qw/ND::Web::XMLPage/; + +$ND::Web::Page::PAGES{covop} = __PACKAGE__; sub parse { my ($uri) = @_; @@ -32,15 +34,13 @@ sub parse { } } -sub process { - -} - -sub render { - my ($DBH,$BODY) = @_; - $ND::TEMPLATE->param(TITLE => 'CovOp Targets'); +sub render_body { + my $self = shift; + my ($BODY) = @_; + $self->{TITLE} = 'CovOp Targets'; + my $DBH = $self->{DBH}; - return $ND::NOACCESS unless isMember(); + 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')))}; $show = '' if defined param('show') && param('show') eq 'all'; @@ -69,7 +69,7 @@ sub render { FROM covop_targets c JOIN current_planet_stats p ON p.id = c.planet LEFT OUTER JOIN users u ON u.uid = c.covop_by) AS foo $where}); - $query->execute($ND::PLANET); + $query->execute($self->{PLANET}); my @targets; my $i = 0;