summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2008-12-07 17:42:26 -0500
committerStarla Insigna <hatkirby@fourisland.com>2008-12-07 17:42:26 -0500
commit6da9342fba299c30983c1d32e293a0a29401b13c (patch)
treeba9b45828045b930f7767795cdb86332a34c846b
parent07aae7e8f8b752e6b37b338783a6d6fef290ee10 (diff)
downloadfourisland-6da9342fba299c30983c1d32e293a0a29401b13c.tar.gz
fourisland-6da9342fba299c30983c1d32e293a0a29401b13c.tar.bz2
fourisland-6da9342fba299c30983c1d32e293a0a29401b13c.zip
Created a "Mantainence Mode"
A mantainence has been created in the config table so that when it is on, users other than the localhost only see a temporarily down message, while
localhost can still access Four Island. This will be useful during times when changes in this repository do things that require the database schema
to be changed or scripts to be run, such as the previous three changesets.
-rwxr-xr-xincludes/mantainence.php39
-rwxr-xr-xindex.php1
-rw-r--r--theme/mantainence.tpl6
3 files changed, 46 insertions, 0 deletions
diff --git a/includes/mantainence.php b/includes/mantainence.php new file mode 100755 index 0000000..6e595a1 --- /dev/null +++ b/includes/mantainence.php
@@ -0,0 +1,39 @@
1<?php
2/*
3 444444444
4 4::::::::4
5 4:::::::::4
6 4::::44::::4
7 4::::4 4::::4 Four Island
8 4::::4 4::::4
9 4::::4 4::::4 Written and maintained by Starla Insigna
104::::444444::::444
114::::::::::::::::4 includes/mantainence.php
124444444444:::::444
13 4::::4 Please do not use, reproduce or steal the
14 4::::4 contents of this file without explicit
15 4::::4 permission from Hatkirby.
16 44::::::44
17 4::::::::4
18 4444444444
19*/
20
21if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);}
22
23require('headerproc.php');
24
25$getconfig = "SELECT * FROM config WHERE name = \"mantainenceMode\"";
26$getconfig2 = mysql_query($getconfig);
27$getconfig3 = mysql_fetch_array($getconfig2);
28if ($getconfig3['value'] == '1')
29{
30 if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1')
31 {
32 $template = new FITemplate('mantainence');
33 $template->display($template);
34
35 exit;
36 }
37}
38
39?>
diff --git a/index.php b/index.php index c7e6d5b..9faecc9 100755 --- a/index.php +++ b/index.php
@@ -25,6 +25,7 @@ header('X-Pingback: http://fourisland.com/xmlrpc.php');
25include('../security/config.php'); 25include('../security/config.php');
26include('includes/db.php'); 26include('includes/db.php');
27include('includes/template.php'); 27include('includes/template.php');
28include('includes/mantainence.php');
28include('includes/session.php'); 29include('includes/session.php');
29include('includes/bbcode.php'); 30include('includes/bbcode.php');
30include('includes/xmlrpc/xmlrpc.inc'); 31include('includes/xmlrpc/xmlrpc.inc');
diff --git a/theme/mantainence.tpl b/theme/mantainence.tpl new file mode 100644 index 0000000..dab4ef5 --- /dev/null +++ b/theme/mantainence.tpl
@@ -0,0 +1,6 @@
1<CENTER><H1>Four Island is under mantainence</H1></CENTER>
2
3<P>I'm sorry, but you've caught Four Island off guard. We're currently upgrading the website to accomidate for some fun new features we've thrown in,
4so Four Island'll be down for a few minutes. Please try again soon and thanks for your interest in Four Island!</P>
5
6<P STYLE="text-align: right"><I>--Starla Insigna</I></P>