summary refs log tree commit diff stats
path: root/includes/maintenance.php
diff options
context:
space:
mode:
authorStarla Insigna <starla4444@gmail.com>2010-11-02 22:06:37 -0400
committerStarla Insigna <starla4444@gmail.com>2010-11-02 22:06:37 -0400
commit7d7c11adc78e2f5393523a2223f2035253220afc (patch)
tree46b327b5918b5039c64fef24e71a5521d76ec8e4 /includes/maintenance.php
parent05fef4cd88030e04f233b332a8e32057fb57d5e4 (diff)
downloadfourisland-7d7c11adc78e2f5393523a2223f2035253220afc.tar.gz
fourisland-7d7c11adc78e2f5393523a2223f2035253220afc.tar.bz2
fourisland-7d7c11adc78e2f5393523a2223f2035253220afc.zip
Created new maintenance page
Requires modification of Fourm's includes/functions.php
Diffstat (limited to 'includes/maintenance.php')
-rwxr-xr-xincludes/maintenance.php30
1 files changed, 20 insertions, 10 deletions
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);}
22 22
23require('headerproc.php'); 23require('headerproc.php');
24 24
25$getconfig = "SELECT * FROM config WHERE name = \"maintenanceMode\""; 25function isInMaintenance()
26$getconfig2 = mysql_query($getconfig);
27$getconfig3 = mysql_fetch_array($getconfig2);
28if ($getconfig3['value'] == '1')
29{ 26{
30 if (($_SERVER['REMOTE_ADDR'] != '127.0.0.1') && (!isAdmin())) 27 $getconfig = "SELECT * FROM config WHERE name = \"maintenanceMode\"";
31 { 28 $getconfig2 = mysql_query($getconfig);
32 $template = new FITemplate('maintenance'); 29 $getconfig3 = mysql_fetch_array($getconfig2);
33 $template->display($template); 30 if ($getconfig3['value'] == '1')
31 {
32 if (($_SERVER['REMOTE_ADDR'] != '127.0.0.1') && (!isAdmin()))
33 {
34 return true;
35 }
36 }
37
38 return false;
39}
40
41if (isInMaintenance())
42{
43 $template = new FITemplate('maintenance');
44 $template->display($template);
34 45
35 exit; 46 exit;
36 }
37} 47}
38 48
39?> 49?>