From e62a2e21e15217c470f90ee506feba521d52249e Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Sun, 20 Jul 2008 14:27:31 +0200 Subject: [PATCH] Motd isn't used anymore --- NDWeb/Pages/Motd.pm | 54 --------------------------------------------- templates/motd.tmpl | 6 ----- templates/xml.tmpl | 3 --- 3 files changed, 63 deletions(-) delete mode 100644 NDWeb/Pages/Motd.pm delete mode 100644 templates/motd.tmpl delete mode 100644 templates/xml.tmpl diff --git a/NDWeb/Pages/Motd.pm b/NDWeb/Pages/Motd.pm deleted file mode 100644 index 5e7889d..0000000 --- a/NDWeb/Pages/Motd.pm +++ /dev/null @@ -1,54 +0,0 @@ -#************************************************************************** -# Copyright (C) 2006 by Michael Andreen * -# * -# This program is free software; you can redistribute it and/or modify * -# it under the terms of the GNU General Public License as published by * -# the Free Software Foundation; either version 2 of the License, or * -# (at your option) any later version. * -# * -# This program is distributed in the hope that it will be useful, * -# but WITHOUT ANY WARRANTY; without even the implied warranty of * -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# GNU General Public License for more details. * -# * -# You should have received a copy of the GNU General Public License * -# along with this program; if not, write to the * -# Free Software Foundation, Inc., * -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * -#**************************************************************************/ - -package NDWeb::Pages::Motd; -use strict; -use warnings FATAL => 'all'; -use ND::Include; -use CGI qw/:standard/; -use NDWeb::Include; - -use base qw/NDWeb::XMLPage/; - -$NDWeb::Page::PAGES{motd} = __PACKAGE__; - -sub render_body { - my $self = shift; - my ($BODY) = @_; - $self->{TITLE} = 'Edit MOTD'; - my $DBH = $self->{DBH}; - - return $self->noAccess unless $self->isHC; - - if (defined param 'cmd' and param('cmd') eq 'change'){ - $DBH->begin_work; - my $query = $DBH->prepare(q{UPDATE misc SET value= ? WHERE id='MOTD'}); - my $motd = escapeHTML(param('motd')); - $query->execute($motd); - log_message $ND::UID,"Updated MOTD"; - $DBH->commit; - $BODY->param(MOTD => $motd); - }else{ - my ($motd) = $DBH->selectrow_array(q{SELECT value FROM misc WHERE id='MOTD'}); - $BODY->param(MOTD => $motd); - } - return $BODY; -} - -1; diff --git a/templates/motd.tmpl b/templates/motd.tmpl deleted file mode 100644 index 327564c..0000000 --- a/templates/motd.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -
Motd - - - -
-
diff --git a/templates/xml.tmpl b/templates/xml.tmpl deleted file mode 100644 index 09c1ee8..0000000 --- a/templates/xml.tmpl +++ /dev/null @@ -1,3 +0,0 @@ - - - -- 2.39.2