diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-04-13 21:43:01 +1000 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-04-13 21:43:01 +1000 |
| commit | 761cb4feab1a052e2e611a1d09d0a3513e011c06 (patch) | |
| tree | 5de4c9ea1fb7517521b97e893502287fdcacef31 /inc/mod/pages.php | |
| parent | d1876a0dd66422570409787bae40aad371011b89 (diff) | |
?/users (user list)
Diffstat (limited to 'inc/mod/pages.php')
| -rw-r--r-- | inc/mod/pages.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/inc/mod/pages.php b/inc/mod/pages.php index 942cfd50..2b5487fd 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -250,3 +250,15 @@ function mod_delete($board, $post) { header('Location: ?/' . sprintf($config['board_path'], $board) . $config['file_index'], true, $config['redirect_http']); } +function mod_users() { + global $config; + if(!hasPermission($config['mod']['manageusers'])) + error($config['error']['noaccess']); + + $args = array(); + $query = query("SELECT *, (SELECT `time` FROM `modlogs` WHERE `mod` = `id` ORDER BY `time` DESC LIMIT 1) AS `last`, (SELECT `text` FROM `modlogs` WHERE `mod` = `id` ORDER BY `time` DESC LIMIT 1) AS `action` FROM `mods` ORDER BY `type` DESC,`id`") or error(db_error()); + $args['users'] = $query->fetchAll(PDO::FETCH_ASSOC); + + mod_page("Manage users", 'mod/users.html', $args); +} + |
