]> ruin.nu Git - ndwebbie.git/commitdiff
intel class
authorMichael Andreen <harv@ruin.nu>
Thu, 18 Jan 2007 21:19:59 +0000 (21:19 +0000)
committerMichael Andreen <harv@ruin.nu>
Thu, 18 Jan 2007 21:19:59 +0000 (21:19 +0000)
ND/Web/Pages/Check.pm
ND/Web/Pages/Intel.pm
startup.pl

index c37b7928bc81f0c0910ae1117703b164e4f87fef..8b5f621ea5903b2144f15aee4853ef43573b8768 100644 (file)
@@ -31,7 +31,6 @@ $ND::Web::Page::PAGES{check} = __PACKAGE__;
 
 sub parse {
        my $self = shift;
-       #TODO: Improved apache conf needed
        if ($self->{URI} =~ m{^/.*/((\d+)(?: |:)(\d+)(?:(?: |:)(\d+))?(?: |:(\d+))?)$}){
                param('coords',$1);
        }
index 5a4a47c91551263674aa09e01b99f68fa65c8a26..8abce3e79a1e8295819257d5b55423cb2630f55b 100644 (file)
@@ -25,28 +25,27 @@ use ND::Web::Include;
 use ND::Include;
 use CGI qw/:standard/;
 
-$ND::PAGES{intel} = {parse => \&parse, process => \&process, render=> \&render};
+our @ISA = qw/ND::Web::XMLPage/;
+
+$ND::Web::Page::PAGES{intel} = __PACKAGE__;
 
 sub parse {
-       my ($uri) = @_;
-       if ($uri =~ m{^/.*/(\w+)$}){
-               param('list',$1);
+       my $self = shift;
+       if ($self->{URI} =~ m{^/.*/((\d+)(?: |:)(\d+)(?: |:)(\d+))$}){
+               param('coords',$1);
        }
 }
 
-sub process {
-
-}
+sub render_body {
+       my $self = shift;
+       my ($BODY) = @_;
+       $self->{TITLE} = 'Intel';
+       my $DBH = $self->{DBH};
 
-sub render {
-       my ($DBH,$BODY) = @_;
+       return $self->noAccess unless $self->isIntel || $self->isHC;
 
        my $error;
 
-       $ND::TEMPLATE->param(TITLE => 'Intel');
-
-       return $ND::NOACCESS unless isIntel() || isHC();
-
        my $planet;
        if (defined param('coords') && param('coords') =~ /^(\d+)(?: |:)(\d+)(?: |:)(\d+)$/){
                my $query = $DBH->prepare(q{SELECT x,y,z,coords(x,y,z),id, nick, alliance,alliance_id, planet_status,channel,ftid FROM current_planet_stats
index b7920d52ebcaad401a9e92c26b6f30d30ff7cb1d..46d36322fb76b4cbf3e592eb4f51f111c06843d9 100644 (file)
@@ -39,7 +39,7 @@ use ND::Web::Pages::Raids;
 use ND::Web::Pages::EditRaid;
 use ND::Web::Pages::Calls;
 use ND::Web::Pages::Users;
-#use ND::Web::Pages::Intel;
+use ND::Web::Pages::Intel;
 #use ND::Web::Pages::Alliances;
 #use ND::Web::Pages::MemberIntel;
 #use ND::Web::Pages::Resources;