summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xincludes/maintenance.php30
-rwxr-xr-xtheme/maintenance.tpl77
2 files changed, 91 insertions, 16 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?>
diff --git a/theme/maintenance.tpl b/theme/maintenance.tpl index 349c6d1..d07b2a5 100755 --- a/theme/maintenance.tpl +++ b/theme/maintenance.tpl
@@ -1,6 +1,71 @@
1<center><h1>Four Island is under maintenance</h1></center> 1<!DOCTYPE html>
2 2<html>
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, 3 <head>
4so Four Island'll be down for a few minutes. Please try again soon and thanks for your interest in Four Island!</p> 4 <title>Four Island</title>
5 5 <style type="text/css">
6<p style="text-align: right"><em>--Starla Insigna</em></p> 6 body {
7 background-color: #3D3D3D;
8 }
9
10 #wrap {
11 position: fixed;
12 top: 50%;
13 left: 50%;
14 margin-left: -20em;
15 margin-top: -9em;
16 width: 40em;
17 height: 18em;
18 -webkit-border-radius: 10px;
19 -moz-border-radius: 10px;
20 border-radius: 10px;
21 text-shadow: #000 1px 1px;
22 font-family: sans;
23 color: #CDCDCD;
24 text-align: center;
25 }
26
27 #options {
28 float: right;
29 margin-top: -1em;
30 }
31
32 #options ul li {
33 -webkit-border-radius: 10px;
34 -moz-border-radius: 10px;
35 border-radius: 10px;
36 background-color: rgba(200,200,200,0.4);
37 list-style-type: none;
38 }
39
40 #options ul li:hover {
41 background-color: orange;
42 }
43
44 #options ul li a {
45 padding: 5px;
46 color: white;
47 text-decoration: none;
48 font-family: sans;
49 }
50
51 #options ul li:hover a {
52 color: black;
53 }
54 </style>
55 </head>
56 <body>
57 <nav id="options">
58 <ul>
59 <li><a href="http://dev.fourisland.com/fourm/ucp.php?mode=login">Login</a></li>
60 </ul>
61 </nav>
62
63 <div id="wrap">
64 <img src="http://fourisland.com/apple-touch-icon-precomposed.png">
65
66 <h1>Four Island is currently under maintenance</h1>
67
68 <p>We'll be back before you know it. Just sit tight for a while.</p>
69 </div>
70 </body>
71</html>