]> ruin.nu Git - ndwebbie.git/commitdiff
covop class
authorMichael Andreen <harv@ruin.nu>
Thu, 18 Jan 2007 19:50:10 +0000 (19:50 +0000)
committerMichael Andreen <harv@ruin.nu>
Thu, 18 Jan 2007 19:50:10 +0000 (19:50 +0000)
ND/Web/Pages/CovOp.pm
startup.pl

index 5f1a59cb0ea68ea975b8d59ecbf23dd680c87785..2ce65b45bc42bdb8c065265fc05c3df8dc4cd347 100644 (file)
@@ -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;
index e40dc9f90f0784c0bf9c0928ebab2d2c013f34e5..4408122a42fa649e1c20bf8edb21f2634c062676 100644 (file)
@@ -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;