From d70994d68636adec6d1a4e2f7bacf0e418a2493a Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Thu, 18 Jan 2007 20:53:53 +0000 Subject: [PATCH] editraid class --- ND/Web/Pages/EditRaid.pm | 26 +++++++++----------------- startup.pl | 2 +- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/ND/Web/Pages/EditRaid.pm b/ND/Web/Pages/EditRaid.pm index f7f8a9f..8b46508 100644 --- a/ND/Web/Pages/EditRaid.pm +++ b/ND/Web/Pages/EditRaid.pm @@ -23,27 +23,19 @@ use ND::Include; use CGI qw/:standard/; use ND::Web::Include; -$ND::PAGES{editRaid} = {parse => \&parse, process => \&process, render=> \&render}; +our @ISA = qw/ND::Web::XMLPage/; -sub parse { - my ($uri) = @_; - #if ($uri =~ m{^/.*/(\w+)$}){ - # param('list',$1); - #} -} - -sub process { +$ND::Web::Page::PAGES{editRaid} = __PACKAGE__; -} +sub render_body { + my $self = shift; + my ($BODY) = @_; + $self->{TITLE} = 'Create/Edit Raids'; + my $DBH = $self->{DBH}; -sub render { - my ($DBH,$BODY) = @_; + return $self->noAccess unless $self->isBC; my $error; - $ND::TEMPLATE->param(TITLE => 'Create/Edit Raids'); - - return $ND::NOACCESS unless isBC(); - my @alliances = alliances(); $BODY->param(Alliances => \@alliances); @@ -205,7 +197,7 @@ sub render { $BODY->param(Targets => \@targets); }else{ $BODY->param(Waves => 3); - $BODY->param(LandingTick => $ND::TICK+12); + $BODY->param(LandingTick => $self->{TICK}+12); } $BODY->param(Error => $error); return $BODY; diff --git a/startup.pl b/startup.pl index 677a880..97247ba 100644 --- a/startup.pl +++ b/startup.pl @@ -36,7 +36,7 @@ use ND::Web::Pages::Top100; use ND::Web::Pages::DefRequest; use ND::Web::Pages::Check; use ND::Web::Pages::Raids; -#use ND::Web::Pages::EditRaid; +use ND::Web::Pages::EditRaid; #use ND::Web::Pages::Calls; #use ND::Web::Pages::Users; #use ND::Web::Pages::Intel; -- 2.39.2