| 1 | <?php
|
|---|
| 2 | /**
|
|---|
| 3 | * Plugin name: User Manager
|
|---|
| 4 | * Template name: plugins/user_manager/user_man_main.php
|
|---|
| 5 | *
|
|---|
| 6 | * PHP version 5
|
|---|
| 7 | *
|
|---|
| 8 | * LICENSE: Hotaru CMS is free software: you can redistribute it and/or
|
|---|
| 9 | * modify it under the terms of the GNU General Public License as
|
|---|
| 10 | * published by the Free Software Foundation, either version 3 of
|
|---|
| 11 | * the License, or (at your option) any later version.
|
|---|
| 12 | *
|
|---|
| 13 | * Hotaru CMS is distributed in the hope that it will be useful, but WITHOUT
|
|---|
| 14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|---|
| 15 | * FITNESS FOR A PARTICULAR PURPOSE.
|
|---|
| 16 | *
|
|---|
| 17 | * You should have received a copy of the GNU General Public License along
|
|---|
| 18 | * with Hotaru CMS. If not, see http://www.gnu.org/licenses/.
|
|---|
| 19 | *
|
|---|
| 20 | * @category Content Management System
|
|---|
| 21 | * @package HotaruCMS
|
|---|
| 22 | * @author Nick Ramsay <admin@hotarucms.org>
|
|---|
| 23 | * @copyright Copyright (c) 2009, Hotaru CMS
|
|---|
| 24 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
|
|---|
| 25 | * @link http://www.hotarucms.org/
|
|---|
| 26 | */
|
|---|
| 27 |
|
|---|
| 28 | // fixes for undefined index errors:
|
|---|
| 29 | if (!isset($h->vars['user_man_rows'])) { $h->vars['user_man_rows'] = ''; }
|
|---|
| 30 | if (!isset($h->vars['user_man_navi'])) { $h->vars['user_man_navi'] = ''; }
|
|---|
| 31 | ?>
|
|---|
| 32 |
|
|---|
| 33 | <!-- TITLE FOR USER MANAGER -->
|
|---|
| 34 | <h2><?php echo $h->lang["user_man"]; ?></h2>
|
|---|
| 35 |
|
|---|
| 36 | <?php echo $h->lang["user_man_desc"]; ?>
|
|---|
| 37 |
|
|---|
| 38 | <?php echo " [<a href='" . BASEURL . "admin_index.php?user_filter=pending&plugin=user_manager&page=plugin_settings&type=filter'>" . $h->lang["user_man_num_pending"] . $h->vars['num_pending'] . "</a>]"; ?>
|
|---|
| 39 |
|
|---|
| 40 | <p id="user_man_navigation">
|
|---|
| 41 | <b><u><?php echo $h->lang["user_man"]; ?></u></b>
|
|---|
| 42 | <?php echo "<a href='" . BASEURL . "admin_index.php?plugin=user_manager&page=plugin_settings&subpage=default_perms'>" . $h->lang["user_man_default_perms"] . "</a>"; ?>
|
|---|
| 43 | <?php echo "<a href='" . BASEURL . "admin_index.php?plugin=user_manager&page=plugin_settings&subpage=default_settings'>" . $h->lang["user_man_default_settings"] . "</a>"; ?>
|
|---|
| 44 | <?php echo "<a href='" . BASEURL . "admin_index.php?plugin=user_manager&page=plugin_settings&subpage=add_user'>" . $h->lang["user_man_add"] . "</a>"; ?>
|
|---|
| 45 | </p>
|
|---|
| 46 |
|
|---|
| 47 | <?php echo $h->showMessage(); ?>
|
|---|
| 48 |
|
|---|
| 49 | <table><tr><td>
|
|---|
| 50 |
|
|---|
| 51 | <form name='user_man_search_form' action='<?php echo BASEURL; ?>admin_index.php' method='get'>
|
|---|
| 52 | <h3><?php echo $h->lang["user_man_search"]; ?></h3>
|
|---|
| 53 | <table>
|
|---|
| 54 | <tr class='table_headers'>
|
|---|
| 55 | <td><input type='text' size=30 name='search_value' value='<?php echo $h->vars['search_term']; ?>' /></td>
|
|---|
| 56 | <td><input class='submit' type='submit' value='<?php echo $h->lang['user_man_search_button']; ?>' /></td>
|
|---|
| 57 | </tr>
|
|---|
| 58 | </table>
|
|---|
| 59 | <input type='hidden' name='plugin' value='user_manager' />
|
|---|
| 60 | <input type='hidden' name='page' value='plugin_settings' />
|
|---|
| 61 | <input type='hidden' name='type' value='search' />
|
|---|
| 62 | <input type='hidden' name='csrf' value='<?php echo $h->csrfToken; ?>' />
|
|---|
| 63 | </form>
|
|---|
| 64 |
|
|---|
| 65 | </td><td>
|
|---|
| 66 |
|
|---|
| 67 | <form name='user_man_filter_form' action='<?php echo BASEURL; ?>admin_index.php?plugin=user_manager' method='get'>
|
|---|
| 68 | <h3><?php echo $h->lang["user_man_filter"]; ?></h3>
|
|---|
| 69 | <table>
|
|---|
| 70 | <tr class='table_headers'>
|
|---|
| 71 | <td><select name='user_filter'>
|
|---|
| 72 | <option style='font-weight: bold;' value='<?php echo $h->vars['user_filter']; ?>'><?php echo make_name($h->vars['user_filter'], '_'); ?></option>
|
|---|
| 73 | <option value='' disabled>-----</option>
|
|---|
| 74 | <option value='all'><?php echo $h->lang['user_man_filter_all']; ?></option>
|
|---|
| 75 | <option value='not_killspammed'><?php echo $h->lang['user_man_filter_not_killspammed']; ?></option>
|
|---|
| 76 | <option value='' disabled>-----</option>
|
|---|
| 77 | <option value='newest'><?php echo $h->lang['user_man_filter_newest']; ?></option>
|
|---|
| 78 | <option value='oldest'><?php echo $h->lang['user_man_filter_oldest']; ?></option>
|
|---|
| 79 | <option value='last_visited'><?php echo $h->lang['user_man_filter_last_visited']; ?></option>
|
|---|
| 80 | <option value='' disabled>-----</option>
|
|---|
| 81 | <?php
|
|---|
| 82 | if ($h->vars['roles']) {
|
|---|
| 83 | foreach ($h->vars['roles'] as $status) {
|
|---|
| 84 | if ($status != 'unsaved' && $status != 'deleted') {
|
|---|
| 85 | echo "<option value=" . $status . ">" . ucfirst($status) . "</option>\n";
|
|---|
| 86 | }
|
|---|
| 87 | }
|
|---|
| 88 | }
|
|---|
| 89 | ?>
|
|---|
| 90 | </select></td>
|
|---|
| 91 | <td><input class='submit' type='submit' value='<?php echo $h->lang['user_man_filter_button']; ?>' /></td>
|
|---|
| 92 | </tr>
|
|---|
| 93 | </table>
|
|---|
| 94 | <input type='hidden' name='plugin' value='user_manager' />
|
|---|
| 95 | <input type='hidden' name='page' value='plugin_settings' />
|
|---|
| 96 | <input type='hidden' name='type' value='filter' />
|
|---|
| 97 | <input type='hidden' name='csrf' value='<?php echo $h->csrfToken; ?>' />
|
|---|
| 98 | </form>
|
|---|
| 99 |
|
|---|
| 100 | </tr></table>
|
|---|
| 101 |
|
|---|
| 102 | <form name='user_man_checkbox_form' style='margin: 0px; padding: 0px;' action='<?php echo BASEURL; ?>admin_index.php?plugin=user_manager' method='get'>
|
|---|
| 103 |
|
|---|
| 104 | <div id="table_list">
|
|---|
| 105 | <table>
|
|---|
| 106 | <tr class='table_headers'>
|
|---|
| 107 | <td><?php echo $h->lang["user_man_id"]; ?></td>
|
|---|
| 108 | <td><?php echo $h->lang["user_man_role"]; ?></td>
|
|---|
| 109 | <td><?php echo $h->lang["user_man_username"]; ?></td>
|
|---|
| 110 | <td><?php echo $h->lang["user_man_joined"]; ?></td>
|
|---|
| 111 | <td><?php echo $h->lang["user_man_account"]; ?></td>
|
|---|
| 112 | <td><?php echo $h->lang["user_man_perms"]; ?></td>
|
|---|
| 113 | <td><?php echo $h->lang["user_man_check"]; ?></td>
|
|---|
| 114 | </tr>
|
|---|
| 115 | <?php echo $h->vars['user_man_rows']; ?>
|
|---|
| 116 | </table>
|
|---|
| 117 | </div>
|
|---|
| 118 |
|
|---|
| 119 | <div class='user_man_pre_submit'>
|
|---|
| 120 | <p class="user_man_pre_submit_instruct"><?php echo $h->lang['user_man_when_killspam_delete']; ?></p>
|
|---|
| 121 | <input type='checkbox' name='addblockedlist'>
|
|---|
| 122 | <?php echo $h->lang['user_man_add_blocked_list']; ?>
|
|---|
| 123 | <?php $h->pluginHook('user_manager_pre_submit_button'); ?>
|
|---|
| 124 | </div>
|
|---|
| 125 |
|
|---|
| 126 | <div class='user_man_submit_button'>
|
|---|
| 127 | <table>
|
|---|
| 128 | <tr class='table_headers'>
|
|---|
| 129 | <td><select name='checkbox_action'>
|
|---|
| 130 | <option value='member'><?php echo $h->lang["user_man_set_member"]; ?></option>
|
|---|
| 131 | <option value='moderator'><?php echo $h->lang["user_man_set_moderator"]; ?></option>
|
|---|
| 132 | <option value='supermod'><?php echo $h->lang["user_man_set_supermod"]; ?></option>
|
|---|
| 133 | <option value='admin'><?php echo $h->lang["user_man_set_admin"]; ?></option>
|
|---|
| 134 | <option value='' disabled>-----</option>
|
|---|
| 135 | <option value='undermod'><?php echo $h->lang["user_man_set_undermod"]; ?></option>
|
|---|
| 136 | <option value='pending'><?php echo $h->lang["user_man_set_pending"]; ?></option>
|
|---|
| 137 | <option value='suspended'><?php echo $h->lang["user_man_set_suspended"]; ?></option>
|
|---|
| 138 | <option value='banned'><?php echo $h->lang["user_man_set_banned"]; ?></option>
|
|---|
| 139 | <option value='' disabled>-----</option>
|
|---|
| 140 | <option style='color: red; font-weight: bold;' value='killspammed'><?php echo $h->lang["user_man_set_killspammed"]; ?></option>
|
|---|
| 141 | <option value='' disabled>-----</option>
|
|---|
| 142 | <option style='color: red; font-weight: bold;' value='deleted'><?php echo $h->lang["user_man_set_delete"]; ?></option>
|
|---|
| 143 | </select>
|
|---|
| 144 | </td>
|
|---|
| 145 | <td><input class='submit' type='submit' value='<?php echo $h->lang['user_man_checkbox_action']; ?>' /></td>
|
|---|
| 146 | </tr>
|
|---|
| 147 | </table>
|
|---|
| 148 | <input type='hidden' name='plugin' value='user_manager' />
|
|---|
| 149 | <input type='hidden' name='page' value='plugin_settings' />
|
|---|
| 150 | <input type='hidden' name='type' value='checkboxes' />
|
|---|
| 151 | <input type='hidden' name='csrf' value='<?php echo $h->csrfToken; ?>' />
|
|---|
| 152 | </form>
|
|---|
| 153 | </div>
|
|---|
| 154 |
|
|---|
| 155 | <div class='clear'></div>
|
|---|
| 156 |
|
|---|
| 157 | <?php echo $h->vars['user_man_navi']; // pagination ?> |
|---|