diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2009-08-13 17:46:09 -0400 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2009-08-13 17:46:09 -0400 |
commit | b5736e3ad3830fa732dcbd1a518ec3dd6ea7b98a (patch) | |
tree | 0449277e94a42aa155995a90fd8a89cb3309e7ab /admin/maintenance.php | |
parent | 6a1d5b60e6ec541a36727b84b71168f62221f7d7 (diff) | |
download | fourisland-b5736e3ad3830fa732dcbd1a518ec3dd6ea7b98a.tar.gz fourisland-b5736e3ad3830fa732dcbd1a518ec3dd6ea7b98a.tar.bz2 fourisland-b5736e3ad3830fa732dcbd1a518ec3dd6ea7b98a.zip |
Rewrote Admin panel
The following database changes must be made: * A TEXT column called "text" must be added to the end of "polloftheweek" * The transferPollRss.php script must be run * The "pollrss" table must be dropped Closes #113
Diffstat (limited to 'admin/maintenance.php')
-rw-r--r-- | admin/maintenance.php | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/admin/maintenance.php b/admin/maintenance.php new file mode 100644 index 0000000..57f2646 --- /dev/null +++ b/admin/maintenance.php | |||
@@ -0,0 +1,61 @@ | |||
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 | ||
10 | 4::::444444::::444 | ||
11 | 4::::::::::::::::4 admin/maintenance.php | ||
12 | 4444444444:::::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 | |||
21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
22 | |||
23 | require('headerproc.php'); | ||
24 | |||
25 | $category = 'home'; | ||
26 | $pageaid = 'maintenance'; | ||
27 | |||
28 | if (isset($_GET['submit'])) | ||
29 | { | ||
30 | if ($_POST['mode'] == 'on') | ||
31 | { | ||
32 | $set = 1; | ||
33 | } else if ($_POST['mode'] == 'off') | ||
34 | { | ||
35 | $set = 0; | ||
36 | } | ||
37 | |||
38 | if (isset($set)) | ||
39 | { | ||
40 | $setconfig = "UPDATE config SET value = \"" . $set . "\" WHERE name = \"maintenanceMode\""; | ||
41 | $setconfig2 = mysql_query($setconfig); | ||
42 | |||
43 | $flashmsg = 'Maintenance Mode has successfully been set to "' . $_POST['mode'] . '"'; | ||
44 | } | ||
45 | } | ||
46 | |||
47 | $template = new FITemplate('admin/maintenance'); | ||
48 | |||
49 | $getconfig = "SELECT * FROM config WHERE name = \"maintenanceMode\""; | ||
50 | $getconfig2 = mysql_query($getconfig); | ||
51 | $getconfig3 = mysql_fetch_array($getconfig2); | ||
52 | if ($getconfig3['value'] == '1') | ||
53 | { | ||
54 | $template->add('ON', ' selected="selected"'); | ||
55 | } else { | ||
56 | $template->add('OFF', ' selected="selected"'); | ||
57 | } | ||
58 | |||
59 | $template->display(); | ||
60 | |||
61 | ?> | ||