summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2011-03-27 14:48:22 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2011-03-27 14:48:22 +1100
commitb08751f56288addc70c2e7c3af537664ad3aa7ab (patch)
treefb383e1058b08fec028f26abe0c874938e5b2112
parentd5e42bf5bfe3d9475ab82dbf30bdbe371a55bf1a (diff)
Logout button for mod interface
-rw-r--r--mod.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/mod.php b/mod.php
index ab643d16..cda1a4aa 100644
--- a/mod.php
+++ b/mod.php
@@ -78,7 +78,8 @@
// Dashboard
$fieldset = Array(
'Boards' => '',
- 'Administration' => ''
+ 'Administration' => '',
+ 'Logout' => ''
);
// Boards
@@ -103,6 +104,8 @@
$fieldset['Administration'] .= '<li><a href="?/config">Show configuration</a></li>';
}
+ $fieldset['Logout'] .= '<li><a href="?/logout">Logout</a></li>';
+
// TODO: Statistics, etc, in the dashboard.
$body = '';
@@ -118,6 +121,10 @@
//,'mod'=>true /* All 'mod' does, at this point, is put the "Return to dashboard" link in. */
)
);
+ } elseif(preg_match('/^\/logout$/', $query)) {
+ destroyCookies();
+
+ header('Location: ?/', true, $config['redirect_http']);
} elseif(preg_match('/^\/log$/', $query)) {
if($mod['type'] < $config['mod']['modlog']) error($config['error']['noaccess']);
@@ -698,7 +705,7 @@
'">'. $ban['ip'] . '</a></td>' .
// Reason
- '<td>' . ($ban['reason'] ? $ban['reason'] : '<em>none given</em>') . '</td>' .
+ '<td>' . ($ban['reason'] ? $ban['reason'] : '<em>-</em>') . '</td>' .
// Set
'<td style="white-space: nowrap">' . date($config['post_date'], $ban['set']) . '</td>' .