diff options
Diffstat (limited to 'includes/maintenance.php')
-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 | ?> |