Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 352 lines (310 sloc) 11.041 kB
bd552ac Renamed files to .php
Kenzaburo Ito authored
1 <?php
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored
2 # MantisBT - a php based bugtracking system
2669909 @giallu Merge back to HEAD the changes between tags:
giallu authored
3
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored
4 # MantisBT is free software: you can redistribute it and/or modify
2669909 @giallu Merge back to HEAD the changes between tags:
giallu authored
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 2 of the License, or
7 # (at your option) any later version.
8 #
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored
9 # MantisBT is distributed in the hope that it will be useful,
2669909 @giallu Merge back to HEAD the changes between tags:
giallu authored
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored
15 # along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
9985f87 @vboctor - Updated copyright to include 2004
vboctor authored
16
526bbaa @grangeway Comment updates for phpdoc ( http://www.mantisforge.org/dev/phpdoc/ )…
grangeway authored
17 /**
18 * @package MantisBT
19 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored
20 * @copyright Copyright (C) 2002 - 2009 MantisBT Team - mantisbt-dev@lists.sourceforge.net
526bbaa @grangeway Comment updates for phpdoc ( http://www.mantisforge.org/dev/phpdoc/ )…
grangeway authored
21 * @link http://www.mantisbt.org
22 */
23 /**
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored
24 * MantisBT Core API's
526bbaa @grangeway Comment updates for phpdoc ( http://www.mantisforge.org/dev/phpdoc/ )…
grangeway authored
25 */
54c04bf Renames:
Julian Fitzell authored
26 require_once( 'core.php' );
8664b81 @vboctor Fixed 4946: After adding a user redirect to manage_user_edit_page ra…
vboctor authored
27
c36df5b @grangeway following giallu's change to use set_include_path to set first requir…
grangeway authored
28 require_once( 'icon_api.php' );
bb4f40f @jreese Fix #8336: Require re-login for high impact tasks.
jreese authored
29
30 auth_reauthenticate();
31
0370da8 So finally, 2 days later, here is the access_api rewrite. I've teste…
Julian Fitzell authored
32 access_ensure_global_level( config_get( 'manage_user_threshold' ) );
bd552ac Renamed files to .php
Kenzaburo Ito authored
33
54c04bf Renames:
Julian Fitzell authored
34 $f_sort = gpc_get_string( 'sort', 'username' );
831e436 This is sort of a dump of what I've done so far. I realized I need t…
Julian Fitzell authored
35 $f_dir = gpc_get_string( 'dir', 'ASC' );
54c04bf Renames:
Julian Fitzell authored
36 $f_hide = gpc_get_bool( 'hide' );
37 $f_save = gpc_get_bool( 'save' );
e345f2f @jreese Fix #10303: Use UTF-8 compatible string functions.
jreese authored
38 $f_filter = utf8_strtoupper( gpc_get_string( 'filter', config_get( 'default_manage_user_prefix' ) ) );
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
39 $f_page_number = gpc_get_int( 'page_number', 1 );
5cf7970 @grangeway Consistency update
grangeway authored
40
1dcb585 @grangeway Add db_get_table / db_get_table_list functionality be reworking where…
grangeway authored
41 $t_user_table = db_get_table( 'mantis_user_table' );
c3067e4 Remove all traces of g_manage_cookie_val by using gpc_get_cookie()
Julian Fitzell authored
42 $t_cookie_name = config_get( 'manage_cookie' );
51ab53b @vboctor Fix #3143: Show a padlock instead of "p".
vboctor authored
43 $t_lock_image = '<img src="' . config_get( 'icon_path' ) . 'protected.gif" width="8" height="15" border="0" alt="' . lang_get( 'protected' ) . '" />';
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
44 $c_filter = '';
c3067e4 Remove all traces of g_manage_cookie_val by using gpc_get_cookie()
Julian Fitzell authored
45
cdeb39b @thraxisp fix for 0006558: XSS Vulnerability in manage_user (TKADV2005-11-002)
thraxisp authored
46 # Clean up the form variables
cd2fb4e @grangeway code formatting
grangeway authored
47 if ( !in_array( $f_sort, db_field_names( $t_user_table ) ) ) {
cdeb39b @thraxisp fix for 0006558: XSS Vulnerability in manage_user (TKADV2005-11-002)
thraxisp authored
48 $c_sort = 'username';
5cf7970 @grangeway Consistency update
grangeway authored
49 } else {
cdeb39b @thraxisp fix for 0006558: XSS Vulnerability in manage_user (TKADV2005-11-002)
thraxisp authored
50 $c_sort = addslashes($f_sort);
51 }
52
53 if ($f_dir == 'ASC') {
54 $c_dir = 'ASC';
55 } else {
56 $c_dir = 'DESC';
57 }
58
59 if ($f_hide == 0) { # a 0 will turn it off
60 $c_hide = 0;
61 } else { # anything else (including 'on') will turn it on
62 $c_hide = 1;
63 }
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
64 $t_hide_filter = '&amp;hide=' . $c_hide;
5cf7970 @grangeway Consistency update
grangeway authored
65
54c04bf Renames:
Julian Fitzell authored
66 # set cookie values for hide, sort by, and dir
c3067e4 Remove all traces of g_manage_cookie_val by using gpc_get_cookie()
Julian Fitzell authored
67 if ( $f_save ) {
cdeb39b @thraxisp fix for 0006558: XSS Vulnerability in manage_user (TKADV2005-11-002)
thraxisp authored
68 $t_manage_string = $c_hide.':'.$c_sort.':'.$c_dir;
c3067e4 Remove all traces of g_manage_cookie_val by using gpc_get_cookie()
Julian Fitzell authored
69 gpc_set_cookie( $t_cookie_name, $t_manage_string, true );
70 } else if ( !is_blank( gpc_get_cookie( $t_cookie_name, '' ) ) ) {
71 $t_manage_arr = explode( ':', gpc_get_cookie( $t_cookie_name ) );
54c04bf Renames:
Julian Fitzell authored
72 $f_hide = $t_manage_arr[0];
73
74 if ( isset( $t_manage_arr[1] ) ) {
75 $f_sort = $t_manage_arr[1];
76 } else {
77 $f_sort = 'username';
78 }
79
80 if ( isset( $t_manage_arr[2] ) ) {
81 $f_dir = $t_manage_arr[2];
82 } else {
83 $f_dir = 'DESC';
84 }
85 }
86
230e3f4 @grangeway HTML api documentation + tidy up of api names
grangeway authored
87 html_page_top( lang_get( 'manage_users_link' ) );
bd552ac Renamed files to .php
Kenzaburo Ito authored
88
230e3f4 @grangeway HTML api documentation + tidy up of api names
grangeway authored
89 print_manage_menu( 'manage_user_page.php' );
90
91 # New Accounts Form BEGIN
bd552ac Renamed files to .php
Kenzaburo Ito authored
92
fcf225e @grangeway Add Seconds_per_day constant
grangeway authored
93 $days_old = 7 * SECONDS_PER_DAY;
54c04bf Renames:
Julian Fitzell authored
94 $query = "SELECT *
7de22a9 Replace global config variable references with config_get() calls in all
Julian Fitzell authored
95 FROM $t_user_table
51051c7 @grangeway Convert DateTimes in database to integer types.
grangeway authored
96 WHERE ".db_helper_compare_days("" . db_now() . "","date_created","<= $days_old")."
54c04bf Renames:
Julian Fitzell authored
97 ORDER BY date_created DESC";
9a5cea9 @grangeway I hate odbc_mssql -random errors ftw
grangeway authored
98 $result = db_query_bound( $query );
99 $g_db->debug=false;
58a5e55 @grangeway Sync my db api changes with trunk. still working my way through code…
grangeway authored
100 $new_user_count = db_num_rows( $result);
7f3fe6c @vboctor 5678: Hide empty sections in manage_user_page.php
vboctor authored
101
230e3f4 @grangeway HTML api documentation + tidy up of api names
grangeway authored
102 # Never Logged In Form BEGIN
54c04bf Renames:
Julian Fitzell authored
103
104 $query = "SELECT *
7de22a9 Replace global config variable references with config_get() calls in all
Julian Fitzell authored
105 FROM $t_user_table
d306af5 @vboctor Fixed #7680: Successful Sign up should set login count to 1.
vboctor authored
106 WHERE ( login_count = 0 ) AND ( date_created = last_visit )
8664b81 @vboctor Fixed 4946: After adding a user redirect to manage_user_edit_page ra…
vboctor authored
107 ORDER BY date_created DESC";
0c62d6d @grangeway Database API changes - Use query bound queries.
grangeway authored
108 $result = db_query_bound( $query );
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
109 $unused_user_count = db_num_rows( $result );
8664b81 @vboctor Fixed 4946: After adding a user redirect to manage_user_edit_page ra…
vboctor authored
110
230e3f4 @grangeway HTML api documentation + tidy up of api names
grangeway authored
111 # Manage Form BEGIN
acd7321 More XHTML compliance for Form tags.
Kenzaburo Ito authored
112
481d1a8 @vboctor Enhancement #2377: Index user names in manage user page by letters. (…
vboctor authored
113 $t_prefix_array = array( 'ALL' );
5cf7970 @grangeway Consistency update
grangeway authored
114
589ee26 @vboctor Enhancement #2377: Index user names in manage user page by letters.
vboctor authored
115 for ( $i = 'A'; $i != 'AA'; $i++ ) {
481d1a8 @vboctor Enhancement #2377: Index user names in manage user page by letters. (…
vboctor authored
116 $t_prefix_array[] = $i;
117 }
118
119 for ( $i = 0; $i <= 9; $i++ ) {
120 $t_prefix_array[] = "$i";
121 }
6c7a75b @siebrand * Add localisation for 4 messages
siebrand authored
122 $t_prefix_array[] = lang_get( 'users_unused' );
123 $t_prefix_array[] = lang_get( 'users_new' );
5cf7970 @grangeway Consistency update
grangeway authored
124
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
125 echo '<br /><center><table class="width75"><tr>';
481d1a8 @vboctor Enhancement #2377: Index user names in manage user page by letters. (…
vboctor authored
126 foreach ( $t_prefix_array as $t_prefix ) {
2e2cb35 @vboctor Changes related to enhancement #2377: index user names in manage user…
vboctor authored
127 if ( $t_prefix === 'ALL' ) {
128 $t_caption = lang_get( 'show_all_users' );
129 } else {
130 $t_caption = $t_prefix;
131 }
132
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
133 if ( $t_prefix == $f_filter ) {
134 $c_filter = $f_filter;
e2d4f49 @vboctor Minor html fix.
vboctor authored
135 $t_link = "<strong>$t_caption</strong>";
589ee26 @vboctor Enhancement #2377: Index user names in manage user page by letters.
vboctor authored
136 } else {
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
137 $t_link = '<a href="manage_user_page.php?filter=' . $t_prefix . $t_hide_filter .'">' . $t_caption . '</a>';
138 }
5cf7970 @grangeway Consistency update
grangeway authored
139
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
140 echo '<td>' . $t_link;
141 if ($t_prefix == 'UNUSED' ) {
768df87 @grangeway html tidy
grangeway authored
142 echo '[' . $unused_user_count . ']' . '<br />' . lang_get( 'never_logged_in_title' ) . '<br />';
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
143 echo print_button( 'manage_user_prune.php', lang_get( 'prune_accounts' ) );
144 } else if ($t_prefix == 'NEW' ) {
145 echo '[' . $new_user_count . ']<br />' . '(' . lang_get( '1_week_title' ) . ')';
589ee26 @vboctor Enhancement #2377: Index user names in manage user page by letters.
vboctor authored
146 }
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
147 echo '</td>';
589ee26 @vboctor Enhancement #2377: Index user names in manage user page by letters.
vboctor authored
148 }
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
149 echo '</tr></table></center>';
589ee26 @vboctor Enhancement #2377: Index user names in manage user page by letters.
vboctor authored
150
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
151 $t_where_params = null;
152 if ( $f_filter === 'ALL' ) {
589ee26 @vboctor Enhancement #2377: Index user names in manage user page by letters.
vboctor authored
153 $t_where = '(1 = 1)';
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
154 } else if ( $f_filter === 'UNUSED' ) {
155 $t_where = '(login_count = 0) AND ( date_created = last_visit )';
156 } else if ( $f_filter === 'NEW' ) {
51051c7 @grangeway Convert DateTimes in database to integer types.
grangeway authored
157 $t_where = db_helper_compare_days("" . db_now() . "","date_created","<= $days_old");
589ee26 @vboctor Enhancement #2377: Index user names in manage user page by letters.
vboctor authored
158 } else {
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
159 $c_prefix = db_prepare_string($f_filter);
caab3b2 @vboctor Fixed #6459: Port #6457: SQL Injection in manage user page (TKADV2005…
vboctor authored
160 $t_where = "(username like '$c_prefix%')";
589ee26 @vboctor Enhancement #2377: Index user names in manage user page by letters.
vboctor authored
161 }
5cf7970 @grangeway Consistency update
grangeway authored
162
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
163 $p_per_page = 50;
164
165 $t_offset = ( ( $f_page_number - 1 ) * $p_per_page );
589ee26 @vboctor Enhancement #2377: Index user names in manage user page by letters.
vboctor authored
166
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
167 $total_user_count = 0;
5cf7970 @grangeway Consistency update
grangeway authored
168
54c04bf Renames:
Julian Fitzell authored
169 # Get the user data in $c_sort order
58a5e55 @grangeway Sync my db api changes with trunk. still working my way through code…
grangeway authored
170 $result = '';
54c04bf Renames:
Julian Fitzell authored
171 if ( 0 == $c_hide ) {
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
172 $query = "SELECT count(*) as usercnt
173 FROM $t_user_table
174 WHERE $t_where";
175 $result = db_query_bound($query, $t_where_params);
176 $row = db_fetch_array( $result );
177 $total_user_count = $row['usercnt'];
178 } else {
179 $query = "SELECT count(*) as usercnt
180 FROM $t_user_table
51051c7 @grangeway Convert DateTimes in database to integer types.
grangeway authored
181 WHERE $t_where AND " . db_helper_compare_days("" . db_now() . "","last_visit","< $days_old");
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
182 $result = db_query_bound($query, $t_where_params);
183 $row = db_fetch_array( $result );
5cf7970 @grangeway Consistency update
grangeway authored
184 $total_user_count = $row['usercnt'];
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
185 }
5cf7970 @grangeway Consistency update
grangeway authored
186
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
187 $t_page_count = ceil($total_user_count / $p_per_page);
188 if ( $t_page_count < 1 ) {
189 $t_page_count = 1;
190 }
5cf7970 @grangeway Consistency update
grangeway authored
191
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
192 # Make sure $p_page_number isn't past the last page.
193 if ( $f_page_number > $t_page_count ) {
194 $f_page_number = $t_page_count;
195 }
196
197 # Make sure $p_page_number isn't before the first page
198 if ( $f_page_number < 1 ) {
199 $f_page_number = 1;
200 }
201
5cf7970 @grangeway Consistency update
grangeway authored
202
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
203 if ( 0 == $c_hide ) {
fa66cdd @thraxisp fix for 0005382: Ambiguous SQL - manage_user_page.php (and others)
thraxisp authored
204 $query = "SELECT *
7de22a9 Replace global config variable references with config_get() calls in all
Julian Fitzell authored
205 FROM $t_user_table
589ee26 @vboctor Enhancement #2377: Index user names in manage user page by letters.
vboctor authored
206 WHERE $t_where
3f2bf47 Added experimental support for MSSQL and PgSQL database, through ADOD…
Jeroen Latour authored
207 ORDER BY $c_sort $c_dir";
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
208 $result = db_query_bound($query, $t_where_params, $p_per_page, $t_offset);
3fa729e Added variable $s_reset_password_msg2 in strings_*.txt files for proper
jotel authored
209 } else {
5cf7970 @grangeway Consistency update
grangeway authored
210
fa66cdd @thraxisp fix for 0005382: Ambiguous SQL - manage_user_page.php (and others)
thraxisp authored
211 $query = "SELECT *
7de22a9 Replace global config variable references with config_get() calls in all
Julian Fitzell authored
212 FROM $t_user_table
51051c7 @grangeway Convert DateTimes in database to integer types.
grangeway authored
213 WHERE $t_where AND " . db_helper_compare_days(0,"last_visit","< $days_old") . "
3f2bf47 Added experimental support for MSSQL and PgSQL database, through ADOD…
Jeroen Latour authored
214 ORDER BY $c_sort $c_dir";
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
215 /* db_now added to where params in count query above so not added here */
216 $result = db_query_bound($query, $t_where_params, $p_per_page, $t_offset );
5cf7970 @grangeway Consistency update
grangeway authored
217 }
54c04bf Renames:
Julian Fitzell authored
218 $user_count = db_num_rows( $result );
5cf7970 @grangeway Consistency update
grangeway authored
219
54c04bf Renames:
Julian Fitzell authored
220 ?>
9655dec changed P tags to BR. This will format better across more browsers. …
Kenzaburo Ito authored
221 <br />
54c04bf Renames:
Julian Fitzell authored
222 <table class="width100" cellspacing="1">
7db50d0 Modified get_enum_string to use the g_ enum string value instead of t…
Kenzaburo Ito authored
223 <tr>
54c04bf Renames:
Julian Fitzell authored
224 <td class="form-title" colspan="5">
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
225 <?php echo lang_get( 'manage_accounts_title' ) ?> [<?php echo $total_user_count ?>]
899988d @vboctor Fixed #5606: Support prefetching of web page for Google Web Accelerat…
vboctor authored
226 <?php print_button( 'manage_user_create_page.php', lang_get( 'create_new_account_link' ) ) ?>
54c04bf Renames:
Julian Fitzell authored
227 </td>
ffbfd85 @jreese Fix #10299: Fixed incorrect or missing HTML colspan attributes.
jreese authored
228 <td class="center" colspan="3">
54c04bf Renames:
Julian Fitzell authored
229 <form method="post" action="manage_user_page.php">
2969ff3 @davidhicks CSRF protection not needed for manage_user_page
davidhicks authored
230 <?php # CSRF protection not required here - form does not result in modifications ?>
54c04bf Renames:
Julian Fitzell authored
231 <input type="hidden" name="sort" value="<?php echo $c_sort ?>" />
232 <input type="hidden" name="dir" value="<?php echo $c_dir ?>" />
233 <input type="hidden" name="save" value="1" />
234 <input type="checkbox" name="hide" value="1" <?php check_checked( $c_hide, 1 ); ?> /> <?php echo lang_get( 'hide_inactive' ) ?>
ff82370 Enh #3735: New CSS class for HTML Form Buttons
Jeroen Latour authored
235 <input type="submit" class="button" value="<?php echo lang_get( 'filter_button' ) ?>" />
54c04bf Renames:
Julian Fitzell authored
236 </form>
7db50d0 Modified get_enum_string to use the g_ enum string value instead of t…
Kenzaburo Ito authored
237 </td>
238 </tr>
54c04bf Renames:
Julian Fitzell authored
239 <tr class="row-category">
240 <td>
fbae2c2 @grangeway Empty ?> <?php block can be removed.
grangeway authored
241 <?php
242 print_manage_user_sort_link( 'manage_user_page.php', lang_get( 'username' ), 'username', $c_dir, $c_sort, $c_hide, $c_filter );
243 print_sort_icon( $c_dir, $c_sort, 'username' );
244 ?>
7db50d0 Modified get_enum_string to use the g_ enum string value instead of t…
Kenzaburo Ito authored
245 </td>
54c04bf Renames:
Julian Fitzell authored
246 <td>
fbae2c2 @grangeway Empty ?> <?php block can be removed.
grangeway authored
247 <?php
248 print_manage_user_sort_link( 'manage_user_page.php', lang_get( 'realname' ), 'realname', $c_dir, $c_sort, $c_hide, $c_filter );
249 print_sort_icon( $c_dir, $c_sort, 'realname' );
250 ?>
f00e9e2 @vboctor Enh #3841: Add real name ability to mantis
vboctor authored
251 </td>
252 <td>
fbae2c2 @grangeway Empty ?> <?php block can be removed.
grangeway authored
253 <?php
254 print_manage_user_sort_link( 'manage_user_page.php', lang_get( 'email' ), 'email', $c_dir, $c_sort, $c_hide, $c_filter );
255 print_sort_icon( $c_dir, $c_sort, 'email' );
256 ?>
7db50d0 Modified get_enum_string to use the g_ enum string value instead of t…
Kenzaburo Ito authored
257 </td>
54c04bf Renames:
Julian Fitzell authored
258 <td>
fbae2c2 @grangeway Empty ?> <?php block can be removed.
grangeway authored
259 <?php
260 print_manage_user_sort_link( 'manage_user_page.php', lang_get( 'access_level' ), 'access_level', $c_dir, $c_sort, $c_hide, $c_filter );
261 print_sort_icon( $c_dir, $c_sort, 'access_level' );
262 ?>
7db50d0 Modified get_enum_string to use the g_ enum string value instead of t…
Kenzaburo Ito authored
263 </td>
692e5b8 Modified project user module behavior.
Kenzaburo Ito authored
264 <td>
fbae2c2 @grangeway Empty ?> <?php block can be removed.
grangeway authored
265 <?php
266 print_manage_user_sort_link( 'manage_user_page.php', lang_get( 'enabled' ), 'enabled', $c_dir, $c_sort, $c_hide, $c_filter );
267 print_sort_icon( $c_dir, $c_sort, 'enabled' );
268 ?>
7db50d0 Modified get_enum_string to use the g_ enum string value instead of t…
Kenzaburo Ito authored
269 </td>
54c04bf Renames:
Julian Fitzell authored
270 <td>
fbae2c2 @grangeway Empty ?> <?php block can be removed.
grangeway authored
271 <?php
272 print_manage_user_sort_link( 'manage_user_page.php', $t_lock_image, 'protected', $c_dir, $c_sort, $c_hide, $c_filter );
273 print_sort_icon( $c_dir, $c_sort, 'protected' );
274 ?>
7db50d0 Modified get_enum_string to use the g_ enum string value instead of t…
Kenzaburo Ito authored
275 </td>
276 <td>
fbae2c2 @grangeway Empty ?> <?php block can be removed.
grangeway authored
277 <?php
278 print_manage_user_sort_link( 'manage_user_page.php', lang_get( 'date_created' ), 'date_created', $c_dir, $c_sort, $c_hide, $c_filter );
279 print_sort_icon( $c_dir, $c_sort, 'date_created' );
280 ?>
7db50d0 Modified get_enum_string to use the g_ enum string value instead of t…
Kenzaburo Ito authored
281 </td>
54c04bf Renames:
Julian Fitzell authored
282 <td>
fbae2c2 @grangeway Empty ?> <?php block can be removed.
grangeway authored
283 <?php
284 print_manage_user_sort_link( 'manage_user_page.php', lang_get( 'last_visit' ), 'last_visit', $c_dir, $c_sort, $c_hide, $c_filter );
285 print_sort_icon( $c_dir, $c_sort, 'last_visit' );
286 ?>
7db50d0 Modified get_enum_string to use the g_ enum string value instead of t…
Kenzaburo Ito authored
287 </td>
288 </tr>
54c04bf Renames:
Julian Fitzell authored
289 <?php
9ceb338 @grangeway Performance optimisation
grangeway authored
290 $t_date_format = config_get( 'normal_date_format' );
5cf7970 @grangeway Consistency update
grangeway authored
291 $t_access_level = Array();
54c04bf Renames:
Julian Fitzell authored
292 for ($i=0;$i<$user_count;$i++) {
293 # prefix user data with u_
294 $row = db_fetch_array($result);
295 extract( $row, EXTR_PREFIX_ALL, 'u' );
7db50d0 Modified get_enum_string to use the g_ enum string value instead of t…
Kenzaburo Ito authored
296
51051c7 @grangeway Convert DateTimes in database to integer types.
grangeway authored
297 $u_date_created = date( $t_date_format, $u_date_created );
298 $u_last_visit = date( $t_date_format, $u_last_visit );
5cf7970 @grangeway Consistency update
grangeway authored
299
9ceb338 @grangeway Performance optimisation
grangeway authored
300 if( !isset( $t_access_level[$u_access_level] ) ) {
301 $t_access_level[$u_access_level] = get_enum_element( 'access_levels', $u_access_level );
302 }
54c04bf Renames:
Julian Fitzell authored
303 ?>
304 <tr <?php echo helper_alternate_class( $i ) ?>>
305 <td>
9ceb338 @grangeway Performance optimisation
grangeway authored
306 <a href="manage_user_edit_page.php?user_id=<?php echo $u_id ?>"><?php echo string_display_line( $u_username ) ?></a>
54c04bf Renames:
Julian Fitzell authored
307 </td>
9ceb338 @grangeway Performance optimisation
grangeway authored
308 <td><?php echo string_display_line( $u_realname ) ?></td>
7df1a2e * manage_user_page.php: remove align="center" from td tags
Julian Fitzell authored
309 <td><?php print_email_link( $u_email, $u_email ) ?></td>
9ceb338 @grangeway Performance optimisation
grangeway authored
310 <td><?php echo $t_access_level[$u_access_level] ?></td>
7df1a2e * manage_user_page.php: remove align="center" from td tags
Julian Fitzell authored
311 <td><?php echo trans_bool( $u_enabled ) ?></td>
51ab53b @vboctor Fix #3143: Show a padlock instead of "p".
vboctor authored
312 <td class="center">
313 <?php
314 if ( $u_protected ) {
315 echo " $t_lock_image";
316 } else {
317 echo '&nbsp;';
318 }
319 ?>
320 </td>
7df1a2e * manage_user_page.php: remove align="center" from td tags
Julian Fitzell authored
321 <td><?php echo $u_date_created ?></td>
322 <td><?php echo $u_last_visit ?></td>
54c04bf Renames:
Julian Fitzell authored
323 </tr>
3a7e37a @vboctor Administrators can now modify preferences for all users (#1677). Thi…
vboctor authored
324 <?php
54c04bf Renames:
Julian Fitzell authored
325 } # end for
fbae2c2 @grangeway Empty ?> <?php block can be removed.
grangeway authored
326
327 # -- Page number links --
3a7e37a @vboctor Administrators can now modify preferences for all users (#1677). Thi…
vboctor authored
328 ?>
284493a @grangeway html tidy
grangeway authored
329 <tr>
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
330 <td class="right" colspan="8">
331 <span class="small">
332 <?php
b62a51c @grangeway PHPDoc
grangeway authored
333 /* @todo hack - pass in the hide inactive filter via cheating the actual filter value */
5e45f17 @grangeway manage user page was slow - implement paging and rework new/unused fu…
grangeway authored
334 print_page_links( 'manage_user_page.php', 1, $t_page_count, (int)$f_page_number, $c_filter . $t_hide_filter);
335 ?>
336 </span>
337 </td>
284493a @grangeway html tidy
grangeway authored
338 </tr>
54c04bf Renames:
Julian Fitzell authored
339 </table>
065745b @vboctor Fixes #9847: Make it easier to manage user for installations with lar…
vboctor authored
340 <?php
341 # Manage Form END
342 ?>
343 <br />
344 <form method="get" action="manage_user_edit_page.php">
2969ff3 @davidhicks CSRF protection not needed for manage_user_page
davidhicks authored
345 <?php # CSRF protection not required here - form does not result in modifications ?>
065745b @vboctor Fixes #9847: Make it easier to manage user for installations with lar…
vboctor authored
346 <?php echo lang_get( 'username' ) ?>
347 <input type="text" name="username" value="" />
348 <input type="submit" class="button" value="<?php echo lang_get( 'manage_user' ) ?>" />
349 </form>
350 <?php
624fafd @grangeway We dont use __FILE__ param of html_page_bottom. Note: someone who wer…
grangeway authored
351 html_page_bottom();
Something went wrong with that request. Please try again.