From 7d7c11adc78e2f5393523a2223f2035253220afc Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Tue, 2 Nov 2010 22:06:37 -0400 Subject: Created new maintenance page Requires modification of Fourm's includes/functions.php --- includes/maintenance.php | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'includes/maintenance.php') diff --git a/includes/maintenance.php b/includes/maintenance.php index b3150c5..c3041cf 100755 --- a/includes/maintenance.php +++ b/includes/maintenance.php @@ -22,18 +22,28 @@ if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} require('headerproc.php'); -$getconfig = "SELECT * FROM config WHERE name = \"maintenanceMode\""; -$getconfig2 = mysql_query($getconfig); -$getconfig3 = mysql_fetch_array($getconfig2); -if ($getconfig3['value'] == '1') +function isInMaintenance() { - if (($_SERVER['REMOTE_ADDR'] != '127.0.0.1') && (!isAdmin())) - { - $template = new FITemplate('maintenance'); - $template->display($template); + $getconfig = "SELECT * FROM config WHERE name = \"maintenanceMode\""; + $getconfig2 = mysql_query($getconfig); + $getconfig3 = mysql_fetch_array($getconfig2); + if ($getconfig3['value'] == '1') + { + if (($_SERVER['REMOTE_ADDR'] != '127.0.0.1') && (!isAdmin())) + { + return true; + } + } + + return false; +} + +if (isInMaintenance()) +{ + $template = new FITemplate('maintenance'); + $template->display($template); - exit; - } + exit; } ?> -- cgit 1.4.1