/
manage_user_edit_page.php
204 lines (177 loc) · 5.04 KB
/
manage_user_edit_page.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<?php
# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
# Copyright (C) 2002 - 2003 Mantis Team - mantisbt-dev@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
# --------------------------------------------------------
# $Id: manage_user_edit_page.php,v 1.6 2003-03-22 16:30:36 jlatour Exp $
# --------------------------------------------------------
?>
<?php require_once( 'core.php' ) ?>
<?php
access_ensure_global_level( config_get( 'manage_user_threshold' ) );
$f_user_id = gpc_get_int( 'user_id' );
$t_user = user_get_row( $f_user_id );
html_page_top1();
html_page_top2();
print_manage_menu();
?>
<br />
<!-- USER INFO -->
<div align="center">
<form method="post" action="manage_user_update.php">
<table class="width75" cellspacing="1">
<!-- Title -->
<tr>
<td class="form-title" colspan="2">
<input type="hidden" name="user_id" value="<?php echo $t_user['id'] ?>" />
<?php echo lang_get( 'edit_user_title' ) ?>
</td>
</tr>
<!-- Username -->
<tr <?php echo helper_alternate_class( 1 ) ?>>
<td class="category" width="30%">
<?php echo lang_get( 'username' ) ?>:
</td>
<td width="70%">
<input type="text" size="16" maxlength="32" name="username" value="<?php echo $t_user['username'] ?>" />
</td>
</tr>
<!-- Email -->
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php echo lang_get( 'email' ) ?>:
</td>
<td>
<?php print_email_input( 'email', $t_user['email'] ) ?>
</td>
</tr>
<!-- Access Level -->
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php echo lang_get( 'access_level' ) ?>:
</td>
<td>
<select name="access_level">
<?php print_enum_string_option_list( 'access_levels', $t_user['access_level'] ) ?>
</select>
</td>
</tr>
<!-- Enabled Checkbox -->
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php echo lang_get( 'enabled' ) ?>:
</td>
<td>
<input type="checkbox" name="enabled" <?php check_checked( $t_user['enabled'], ON ); ?> />
</td>
</tr>
<!-- Protected Checkbox -->
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php echo lang_get( 'protected' ) ?>:
</td>
<td>
<input type="checkbox" name="protected" <?php check_checked( $t_user['protected'], ON ); ?> />
</td>
</tr>
<!-- Submit Button -->
<tr>
<td colspan="2" class="center">
<input type="submit" value="<?php echo lang_get( 'update_user_button' ) ?>" />
</td>
</tr>
</table>
</form>
</div>
<br />
<!-- RESET AND DELETE -->
<div class="border-center">
<!-- Reset Button -->
<form method="post" action="manage_user_reset.php">
<input type="hidden" name="user_id" value="<?php echo $t_user['id'] ?>" />
<input type="submit" value="<?php echo lang_get( 'reset_password_button' ) ?>" />
</form>
<!-- Delete Button -->
<form method="post" action="manage_user_delete.php">
<input type="hidden" name="user_id" value="<?php echo $t_user['id'] ?>" />
<input type="submit" value="<?php echo lang_get( 'delete_user_button' ) ?>" />
</form>
</div>
<br />
<div align="center">
<?php
if ( ON == config_get( 'send_reset_password' ) ) {
echo lang_get( 'reset_password_msg' );
} else {
echo lang_get( 'reset_password_msg2' );
}
?>
</div>
<!-- PROJECT ACCESS (if permissions allow) -->
<?php if ( access_has_global_level( config_get( 'manage_user_threshold' ) ) ) {
?>
<br />
<div align="center">
<form method="post" action="manage_user_proj_add.php">
<table class="width75" cellspacing="1">
<!-- Title -->
<tr>
<td class="form-title" colspan="2">
<input type="hidden" name="user_id" value="<?php echo $t_user['id'] ?>" />
<?php echo lang_get( 'add_user_title' ) ?>
</td>
</tr>
<!-- Assigned Projects -->
<tr <?php echo helper_alternate_class( 1 ) ?> valign="top">
<td class="category" width="30%">
<?php echo lang_get( 'assigned_projects' ) ?>:
</td>
<td width="70%">
<?php print_project_user_list( $t_user['id'] ) ?>
</td>
</tr>
<!-- Unassigend Project Selection -->
<tr <?php echo helper_alternate_class() ?> valign="top">
<td class="category">
<?php echo lang_get( 'unassigned_projects' ) ?>:
</td>
<td>
<select name="project_id[]" multiple="multiple" size="5">
<?php print_project_user_list_option_list2( $t_user['id'] ) ?>
</select>
</td>
</tr>
<!-- New Access Level -->
<tr <?php echo helper_alternate_class() ?> valign="top">
<td class="category">
<?php echo lang_get( 'access_level' ) ?>:
</td>
<td>
<select name="access_level">
<?php
# No administrator choice
print_project_access_levels_option_list( config_get( 'default_new_account_access_level' ) )
?>
</select>
</td>
</tr>
<!-- Submit Buttom -->
<tr>
<td class="center" colspan="2">
<input type="submit" value="<?php echo lang_get( 'add_user_button' ) ?>" />
</td>
</tr>
</table>
</form>
</div>
<?php
} # End of PROJECT ACCESS conditional section
?>
<!-- ACCOUNT PREFERENCES -->
<?php
include ( 'account_prefs_inc.php' );
edit_account_prefs( $t_user['id'], false, false, 'manage_user_page.php' );
?>
<?php html_page_bottom1( __FILE__ ) ?>