summary refs log tree commit diff stats
path: root/admin/maintenance.php
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2009-08-13 17:46:09 -0400
committerStarla Insigna <hatkirby@fourisland.com>2009-08-13 17:46:09 -0400
commitb5736e3ad3830fa732dcbd1a518ec3dd6ea7b98a (patch)
tree0449277e94a42aa155995a90fd8a89cb3309e7ab /admin/maintenance.php
parent6a1d5b60e6ec541a36727b84b71168f62221f7d7 (diff)
downloadfourisland-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.php61
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
104::::444444::::444
114::::::::::::::::4 admin/maintenance.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$category = 'home';
26$pageaid = 'maintenance';
27
28if (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);
52if ($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?>