XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
rmc_users.php
Go to the documentation of this file.
1 <div id="users-filter-options">
2  <form name="filterForm" id="filter-form" method="get" action="users.php">
3  <div class="basic_options">
4  <span class="sections">
5  <label for="search-key"><?php _e('Search:','rmcommon'); ?></label>
6  <input type="text" name="keyw" id="search-key" size="15" value="<?php echo rmc_server_var($_REQUEST, 'keyword', ''); ?>" />
7  </span>
8  <span class="sections">
9  <label for="users-number"><?php _e('Show:','rmcommon'); ?></label>
10  <input type="text" name="limit" id="users-number" size="6" value="<?php echo $limit; ?>" />
11  </span>
12  <span class="sections">
13  <input type="submit" value="<?php _e('Go Now!','rmcommon'); ?>" />
14  </span>
15  <span class="sections_right">
16  <a href="javascript:;" id="show-search"><?php _e('Advanced Search','rmcommon'); ?></a>
17  </span>
18  </div>
19  <div id="users-advanced-options">
20  <table class="table_options" cellspacing="0" border="0" width="100%">
21  <tr class="even">
22  <td><?php _e('Email:','rmcommon'); ?></td>
23  <td><?php _e('Web site:','rmcommon'); ?></td>
24  <td><?php _e('Country/Location:','rmcommon'); ?></td>
25  </tr>
26  <tr class="even">
27  <td><input type="text" name="email" id="user-email" value="<?php echo RMTemplate::get()->get_var('srhemail'); ?>" size="20" /></td>
28  <td><input type="text" name="url" id="user-url" size="20" value="" /></td>
29  <td><input type="text" name="from" id="user-from" size="20" value="" /></td>
30  </tr>
31  <tr class="even">
32  <td><?php _e('Registered between:','rmcommon'); ?></td>
33  <td><?php _e('Last login between:','rmcommon'); ?></td>
34  <td><?php _e('Posts between:','rmcommon'); ?></td>
35  </tr>
36  <tr class="even">
37  <td><?php echo $register1->render(); ?> <?php _e('and','rmcommon'); ?> <?php echo $register2->render(); ?></td>
38  <td><?php echo $login1->render(); ?> <?php _e('and','rmcommon'); ?> <?php echo $login2->render(); ?></td>
39  <td>
40  <input type="text" name="posts1" id="users-posts1" value="0" size="5" />
41  <?php _e('and','rmcommon'); ?>
42  <input type="text" name="posts2" id="users-posts2" value="" size="5" />
43  </td>
44  </tr>
45  <tr class="even">
46  <td><?php _e('Mail:','rmcommon'); ?></td>
47  <td><?php _e('Status:','rmcommon'); ?></td>
48  <td><?php _e('Search method:','rmcommon'); ?></td>
49  </tr>
50  <tr class="even">
51  <td>
52  <select name="mailok" id="users-mailok">
53  <option value="-1"><?php _e('All users','rmcommon'); ?></option>
54  <option value="1"><?php _e('Users that accept mail','rmcommon'); ?></option>
55  <option value="0"><?php _e('Users that do\'nt accept mail','rmcommon'); ?></option>
56  </select>
57  </td>
58  <td>
59  <select name="actives" id="users-actives">
60  <option value="-1"><?php _e('All users','rmcommon'); ?></option>
61  <option value="1"><?php _e('Active users','rmcommon'); ?></option>
62  <option value="0"><?php _e('Inactive users','rmcommon'); ?></option>
63  </select>
64  </td>
65  <td>
66  <label><input name="srhmethod" value="OR" checked="checked" type="radio" />Coincident</label>
67  <label><input name="srhmethod" value="AND" type="radio" />Exact</label>
68  </td>
69  </tr>
70  <tr class="even">
71  <td colspan="3" align="right">
72  <input type="submit" value="<?php _e('Search Now!','rmcommon'); ?>" class="formButton" />
73  <input type="button" value="<?php _e('Cancel','rmcommon'); ?>" onclick="$('#users-advanced-options').slideUp('slow');" />
74  </td>
75  </tr>
76  <tr class="even no_border_bottom">
77  <td colspan="3">
78  <?php _e('All these options are optional and will be additional to basic search keyword.','rmcommon'); ?>
79  </td>
80  </tr>
81  </table>
82  </div>
83  </form>
84 </div>
85 <form name="frmUsers" id="form-users" method="post" action="users.php">
86 <!-- Navigation Options -->
87 <div class="users_navigation">
88  <?php $nav->display(); ?>
89  <div class="users_nav_showing"><?php echo $nav->get_showing(); ?></div>
90  <div class="users_order_options">
91  <?php _e('Order by:', 'system'); ?>
92  <select name="order" id="user-order">
93  <option value="uid"<?php echo $order=='uid' || $order=='' ? ' selected="selected"' : ''; ?>><?php _e('ID','rmcommon'); ?></option>
94  <option value="uname"<?php echo $order=='uname' ? ' selected="selected"' : ''; ?>><?php _e('Username','rmcommon'); ?></option>
95  <option value="name"<?php echo $order=='name' ? ' selected="selected"' : ''; ?>><?php _e('Name','rmcommon'); ?></option>
96  <option value="email"<?php echo $order=='email' ? ' selected="selected"' : ''; ?>><?php _e('Email','rmcommon'); ?></option>
97  </select>
98  <input type="button" value="<?php _e('Sort','rmcommon'); ?>" onclick="$('#order').val($('#user-order').val()); submit();" />
99  </div>
100  <div class="users_bulk">
101  <select name="action" id="bulk-top">
102  <option value=""><?php _e('Bulk Actions...','rmcommon'); ?></option>
103  <option value="activate"><?php _e('Activate','rmcommon'); ?></option>
104  <option value="deactivate"><?php _e('Deactivate','rmcommon'); ?></option>
105  <option value="mailer"><?php _e('Send email','rmcommon'); ?></option>
106  <option value="delete"><?php _e('Delete','rmcommon'); ?></option>
107  </select>
108  <input type="button" value="<?php _e('Apply','rmcommon'); ?>" id="the-op-top" onclick="before_submit('form-users');" />
109  </div>
110 </div>
111 <!-- Navigation Options -->
112 
113 <table class="outer" cellspacing="0" width="100%">
114  <thead>
115  <tr>
116  <th width="20"><input type="checkbox" class="checkall" id="checkall-top" onclick="$('#form-users').toggleCheckboxes(':not(#checkall-top)');" /></th>
117  <th align="center"><?php _e('ID','rmcommon'); ?></th>
118  <th align="left"><?php _e('Username','rmcommon'); ?></th>
119  <th align="left"><?php _e('Name','rmcommon'); ?></th>
120  <th><?php _e('Email','rmcommon'); ?></th>
121  <th><?php _e('Groups','rmcommon'); ?></th>
122  <th><?php _e('Status','rmcommon'); ?></th>
123  </tr>
124  </thead>
125  <tfoot>
126  <tr>
127  <th width="20"><input type="checkbox" id="checkall-bottom" name="checkall" onclick="$('#form-users').toggleCheckboxes(':not(#checkall-bottom)');" /></th>
128  <th align="center"><?php _e('ID','rmcommon'); ?></th>
129  <th align="left"><?php _e('Username','rmcommon'); ?></th>
130  <th align="left"><?php _e('Name','rmcommon'); ?></th>
131  <th><?php _e('Email','rmcommon'); ?></th>
132  <th><?php _e('Groups','rmcommon'); ?></th>
133  <th><?php _e('Status','rmcommon'); ?></th>
134  </tr>
135  </tfoot>
136  <tbody>
137  <?php if(count($users)<=0): ?>
138  <tr class="even">
139  <td colspan="6" align="center" style="color: #F00;">
140  <?php _e('There are not any user registered with for this filter.','rmcommon'); ?>
141  </td>
142  </tr>
143  <?php endif; ?>
144  <?php
145  $class = 'odd';
146 
147  $qstring = '';
148  foreach (RMTemplate::get()->vars() as $var => $value){
149  $qstring .= $qstring=='' ? $var.'='.$value : '&amp;'.$var.'='.$value;
150  }
151 
152  foreach($users as $user):
153  ?>
154  <tr class="<?php echo tpl_cycle('even,odd'); ?><?php echo $user['level']<=0 ? ' user_inactive' : '' ?>" valign="top">
155  <td align="center"><input type="checkbox" name="ids[]" id="item-<?php echo $user['uid']; ?>" value="<?php echo $user['uid']; ?>" /></td>
156  <td align="center"><?php echo $user['uid']; ?></td>
157  <td>
158  <strong><?php echo $user['uname']; ?></strong>
159  <span class="rmc_options">
160  <a href="users.php?action=edit&amp;uid=<?php echo $user['uid']; ?>&amp;query=<?php echo base64_encode($qstring); ?>"><?php _e('Edit','rmcommon'); ?></a> |
161  <a href="users.php?action=mailer&amp;uid=<?php echo $user['uid']; ?>&amp;query=<?php echo base64_encode($qstring); ?>"><?php _e('Send Email','rmcommon'); ?></a> |
162  <a href="#" onclick="select_option(<?php echo $user['uid']; ?>,'delete','form-users');"><?php _e('Delete','rmcommon'); ?></a>
163  </span>
164  </td>
165  <td><?php echo $user['name']; ?></td>
166  <td align="center"><a href="javascript:;" title="<?php echo sprintf(__('Send email to %s','rmcommon'), $user['uname']); ?>"><?php echo $user['email']; ?></a></td>
167  <td align="center" class="users_cell_groups">
168  <?php
169  $str = '';
170  foreach ($user['groups'] as $group):
171  $str = $str=='' ? $xgh->get($group)->name() : ', '.$xgh->get($group)->name();
172  echo $str;
173  endforeach; ?>
174  </td>
175  <td align="center">
176  <img src="images/<?php echo $user['level']<=0 ? 'error.png' : 'done.png'; ?>" alt="" />
177  </td>
178  </tr>
179  <?php endforeach; ?>
180  </tbody>
181 </table>
182 <!-- Navigation Options -->
183 <div class="users_navigation">
184  <?php $nav->display(); ?>
185  <div class="users_nav_showing"><?php echo $nav->get_showing(); ?></div>
186  <div class="users_order_options">
187  <?php _e('Order by:', 'system'); ?>
188  <select name="order" id="user-order-bottom">
189  <option value="uid"><?php _e('ID','rmcommon'); ?></option>
190  <option value="display_name"><?php _e('Username','rmcommon'); ?></option>
191  <option value="name"><?php _e('Name','rmcommon'); ?></option>
192  <option value="email"><?php _e('Email','rmcommon'); ?></option>
193  </select>
194  <input type="button" value="<?php _e('Sort','rmcommon'); ?>" onclick="$('#order').val($('#user-order-bottom').val()); submit();" />
195  </div>
196  <div class="users_bulk">
197  <select name="actionb" id="bulk-bottom">
198  <option value=""><?php _e('Bulk Actions...','rmcommon'); ?></option>
199  <option value="activate"><?php _e('Activate','rmcommon'); ?></option>
200  <option value="deactivate"><?php _e('Deactivate','rmcommon'); ?></option>
201  <option value="mailer"><?php _e('Send email','rmcommon'); ?></option>
202  <option value="delete"><?php _e('Delete','rmcommon'); ?></option>
203  </select>
204  <input type="button" value="<?php _e('Apply','rmcommon'); ?>" id="the-op-bottom" onclick="before_submit('form-users');" />
205  </div>
206 </div>
207 <?php echo $xoopsSecurity->getTokenHTML(); ?>
208 <!-- Navigation Options -->
209 </form>