From 830dfcf69a394aef50d2f73ad933e56b06ec3271 Mon Sep 17 00:00:00 2001 From: hdl Date: Wed, 11 Jul 2007 10:28:18 +0000 Subject: [PATCH] adding maintenance script to warn users when maintenance is on. --- koha-tmpl/opac-tmpl/prog/en/maintenance.tmpl | 11 ++++++ opac/maintenance.pl | 38 ++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 koha-tmpl/opac-tmpl/prog/en/maintenance.tmpl create mode 100755 opac/maintenance.pl diff --git a/koha-tmpl/opac-tmpl/prog/en/maintenance.tmpl b/koha-tmpl/opac-tmpl/prog/en/maintenance.tmpl new file mode 100644 index 0000000000..9240688760 --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/maintenance.tmpl @@ -0,0 +1,11 @@ + + -- Library Catalog + + + +
+ Site under maintenance. + Please Come back later. + If you still see this page, please contact ">me +
+ diff --git a/opac/maintenance.pl b/opac/maintenance.pl new file mode 100755 index 0000000000..2f1d264257 --- /dev/null +++ b/opac/maintenance.pl @@ -0,0 +1,38 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha 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. +# +# Koha 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 +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + +# $Id$ + +use strict; +require Exporter; +use CGI; +use C4::Auth; +use C4::Output; + +my $input = new CGI; + +my ( $template, $borrowernumber, $cookie ) = get_template_and_user( + { + template_name => "maintenance.tmpl", + type => "opac", + query => $input, + authnotrequired => 1, + flagsrequired => { borrow => 1 }, + } +); + +output_html_with_http_headers $input, '', $template->output; -- 2.20.1