From: Michael Andreen Date: Thu, 18 Jan 2007 19:50:10 +0000 (+0000) Subject: covop class X-Git-Url: https://ruin.nu/git/?a=commitdiff_plain;h=037c9a45c8dadcd59a7d8a6318101a8adbce3a51;p=ndwebbie.git covop class --- 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; diff --git a/startup.pl b/startup.pl index e40dc9f..4408122 100644 --- a/startup.pl +++ b/startup.pl @@ -31,7 +31,7 @@ use ND::Web::Pages::Main; use ND::Web::Pages::AddIntel; use ND::Web::Pages::Points; use ND::Web::Pages::LaunchConfirmation; -#use ND::Web::Pages::CovOp; +use ND::Web::Pages::CovOp; #use ND::Web::Pages::Top100; #use ND::Web::Pages::DefRequest; #use ND::Web::Pages::Check;