From 6570bb1afb477935066ed113c9f57071d97f2074 Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Fri, 19 Jan 2007 12:33:31 +0000 Subject: [PATCH] MOTD class --- ND/Web/Pages/Motd.pm | 22 ++++++++-------------- startup.pl | 2 +- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/ND/Web/Pages/Motd.pm b/ND/Web/Pages/Motd.pm index a0ad8a4..80a011b 100644 --- a/ND/Web/Pages/Motd.pm +++ b/ND/Web/Pages/Motd.pm @@ -24,23 +24,17 @@ use ND::Include; use CGI qw/:standard/; use ND::Web::Include; -$ND::PAGES{motd} = {parse => \&parse, process => \&process, render=> \&render}; +our @ISA = qw/ND::Web::XMLPage/; -sub parse { - my ($uri) = @_; -} - -sub process { - -} - -sub render { - my ($DBH,$BODY) = @_; - - $ND::TEMPLATE->param(TITLE => 'Edit MOTD'); +$ND::Web::Page::PAGES{motd} = __PACKAGE__; +sub render_body { + my $self = shift; + my ($BODY) = @_; + $self->{TITLE} = 'Edit MOTD'; + my $DBH = $self->{DBH}; - return $ND::NOACCESS unless isHC(); + return $self->noAccess unless $self->isHC; if (defined param 'cmd' and param('cmd') eq 'change'){ $DBH->begin_work; diff --git a/startup.pl b/startup.pl index dc3ab6c..62a89b5 100644 --- a/startup.pl +++ b/startup.pl @@ -44,7 +44,7 @@ use ND::Web::Pages::Alliances; use ND::Web::Pages::MemberIntel; use ND::Web::Pages::Resources; use ND::Web::Pages::PlanetNaps; -#use ND::Web::Pages::Motd; +use ND::Web::Pages::Motd; #use ND::Web::Pages::Forum; #use ND::Web::Pages::Settings; use ND::Web::Pages::Graph; -- 2.39.2