diff options
author | Starla Insigna <starla4444@gmail.com> | 2010-11-02 22:06:37 -0400 |
---|---|---|
committer | Starla Insigna <starla4444@gmail.com> | 2010-11-02 22:06:37 -0400 |
commit | 7d7c11adc78e2f5393523a2223f2035253220afc (patch) | |
tree | 46b327b5918b5039c64fef24e71a5521d76ec8e4 /includes | |
parent | 05fef4cd88030e04f233b332a8e32057fb57d5e4 (diff) | |
download | fourisland-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')
-rwxr-xr-x | includes/maintenance.php | 30 |
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 | ||
23 | require('headerproc.php'); | 23 | require('headerproc.php'); |
24 | 24 | ||
25 | $getconfig = "SELECT * FROM config WHERE name = \"maintenanceMode\""; | 25 | function isInMaintenance() |
26 | $getconfig2 = mysql_query($getconfig); | ||
27 | $getconfig3 = mysql_fetch_array($getconfig2); | ||
28 | if ($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 | |||
41 | if (isInMaintenance()) | ||
42 | { | ||
43 | $template = new FITemplate('maintenance'); | ||
44 | $template->display($template); | ||
34 | 45 | ||
35 | exit; | 46 | exit; |
36 | } | ||
37 | } | 47 | } |
38 | 48 | ||
39 | ?> | 49 | ?> |