2 require('../conf/config.php3');
3 require('../lib/attrshow.php3');
4 require('../lib/defaults.php3');
6 if ($user_type != 'group'){
7 if (is_file("../lib/$config[general_lib_type]/user_info.php3"))
8 include("../lib/$config[general_lib_type]/user_info.php3");
9 if ($config[general_lib_type] == 'sql' && $config[sql_show_all_groups] == 'true'){
10 $extra_text = "<br><font size=-2><i>(The groups that the user is a member of are highlated)</i></font>";
11 $saved_login = $login;
13 if (is_file("../lib/sql/group_info.php3"))
14 include("../lib/sql/group_info.php3");
15 $login = $saved_login;
19 if (is_file("../lib/$config[general_lib_type]/group_info.php3"))
20 include("../lib/$config[general_lib_type]/group_info.php3");
22 if ($config[general_lib_type] == 'sql' && $config[sql_use_operators] == 'true'){
25 include("../lib/operators.php3");
38 if ($user_type != 'group')
39 echo " <title>subscription configuration for $login ($cn)</title>\n";
41 echo " <title>subscription configuration for $login</title>\n";
44 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
45 <link rel="stylesheet" href="style.css">
49 <table border=0 width=550 cellpadding=0 cellspacing=0>
51 <td align=center><img src="images/title2.gif"></td>
54 <table border=0 width=400 cellpadding=0 cellspacing=2>
57 if ($user_type != 'group')
58 include("../html/user_toolbar.html.php3");
60 include("../html/group_toolbar.html.php3");
66 <table border=0 width=540 cellpadding=1 cellspacing=1>
68 <td width=75%> </td>
69 <td bgcolor="black" width=25% align=right>
70 <table border=0 width="200" cellpadding=2 cellspacing=0>
71 <tr bgcolor="#907030" align=center valign=top><th>
72 <font color="white">User Preferences for $login ($cn)</font>
76 <tr bgcolor="black" valign=top><td colspan=2>
77 <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
82 if (is_file("../lib/$config[general_lib_type]/change_attrs.php3"))
83 include("../lib/$config[general_lib_type]/change_attrs.php3");
84 if ($user_type != 'group'){
85 if ($config[general_show_user_password] != 'no' && $passwd != ''
86 && is_file("../lib/$config[general_lib_type]/change_passwd.php3"))
87 include("../lib/$config[general_lib_type]/change_passwd.php3");
88 if (is_file("../lib/$config[general_lib_type]/user_info.php3"))
89 include("../lib/$config[general_lib_type]/user_info.php3");
90 if ($group_change && $config[general_lib_type] == 'sql' && $config[sql_show_all_groups] == 'true'){
91 include("../lib/sql/group_change.php3");
92 include("../lib/defaults.php3");
96 if (is_file("../lib/$config[general_lib_type]/group_info.php3"))
97 include("../lib/$config[general_lib_type]/group_info.php3");
100 else if ($badusers == 1){
101 if (is_file("../lib/add_badusers.php3"))
102 include("../lib/add_badusers.php3");
106 <form name="edituser" method=post>
107 <input type=hidden name=login value=<?php print $login ?>>
108 <input type=hidden name=user_type value=<?php print $user_type ?>>
109 <input type=hidden name=change value="0">
110 <input type=hidden name=add value="0">
111 <input type=hidden name=badusers value="0">
112 <input type=hidden name=group_change value="0">
113 <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
115 if ($user_type == 'group')
117 Note: The attributes contained in the groups the user belongs to<br>
118 are extracted after the attributes in the radcheck/radreply tables.<br>
119 Please take that into consideration when adding attributes in the group<br>
120 and selecting operators.
123 if ($user_type != 'group' && $config[general_show_user_password] != 'no'){
126 <td align=right colspan=$colspan bgcolor="#d0ddb0">
127 User Password (changes only)<br>
129 if ($user_password_exists == 'yes')
130 echo "<font size=-2>User password <font color=\"green\"><b>exists</b></font></font>\n";
132 echo "<font size=-2>User password <font color=\"red\"><b>does not exist</b></font></font>\n";
136 <input type=password name=passwd value="" size=40>
141 foreach($show_attrs as $key => $desc){
142 $name = $attrmap["$key"];
143 $generic = $attrmap[generic]["$key"];
150 if ($item_vals["$key"][count]){
151 for($i=0;$i<$item_vals["$key"][count];$i++){
152 $vals[] = $item_vals["$key"][$i];
153 $ops[] = $item_vals["$key"][operator][$i];
157 if ($default_vals["$key"][count]){
158 for($i=0;$i<$default_vals["$key"][count];$i++){
159 $vals[] = $default_vals["$key"][$i];
160 $ops[] = $default_vals["$key"][operator][$i];
169 if ($generic == 'generic' && $def_added == 0){
170 for($i=0;$i<$default_vals["$key"][count];$i++){
171 $vals[] = $default_vals["$key"][$i];
172 $ops[] = $default_vals["$key"][operator][$i];
175 if ($add && $name == $add_attr){
176 $vals[] = $default_vals["$key"][0];
177 $ops[] = ($default_vals["$key"][operator][0] != '') ? $default_vals["$key"][operator][0] : '=';
181 foreach($vals as $val){
183 $val = ereg_replace('"','"',$val);
184 $oper_name = $name1 . '_op';
186 $selected[$oper] = 'selected';
190 <td align=right bgcolor="#d0ddb0">
192 $desc = addslashes($desc);
193 eval("\$desc = \"$desc\";");
194 $desc = stripslashes($desc);
205 <select name=$oper_name>
206 <option $selected[$op_eq] value="=">=
207 <option $selected[$op_set] value=":=">:=
208 <option $selected[$op_add] value="+=">+=
209 <option $selected[$op_eq2] value="==">==
210 <option $selected[$op_ne] value="!=">!=
211 <option $selected[$op_gt] value=">">>
212 <option $selected[$op_ge] value=">=">>=
213 <option $selected[$op_lt] value="<"><
214 <option $selected[$op_le] value="<="><=
215 <option $selected[$op_regeq] value="=~">=~
216 <option $selected[$op_regne] value="!~">!~
217 <option $selected[$op_exst] value="=*">=*
218 <option $selected[$op_nexst] value="!*">!*
225 <input type=text name="$name1" value="$val" size=40>
233 <td align=right colspan=<?php print $colspan ?> bgcolor="#d0ddb0">
237 <select name="add_attr" OnChange="this.form.add.value=1;this.form.submit()">
239 foreach ($show_attrs as $key => $desc){
240 $name = $attrmap["$key"];
242 <option value="$name">$desc
251 if (isset($member_groups)){
254 <td align=right colspan=$colspan bgcolor="#d0ddb0">
255 Member of $extra_text
258 <select size=2 name="edited_groups[]" multiple OnChange="this.form.group_change.value=1">
260 if ($config[sql_show_all_groups] == 'true'){
261 foreach ($existing_groups as $group => $count){
262 if ($member_groups[$group] == $group)
263 echo "<option selected value=\"$group\">$group\n";
265 echo "<option value=\"$group\">$group\n";
268 foreach ($member_groups as $group)
269 echo "<option value=\"$group\">$group\n";
280 <input type=submit class=button value=Change OnClick="this.form.change.value=1">
282 if ($user_type != 'group'){
285 <input type=submit class=button value="Add to Badusers" OnClick="this.form.badusers.value=1">
286 <a href="help/badusers_help.html" target=bu_help onclick=window.open("help/badusers_help.html","bu_help","width=600,height=210,toolbar=no,scrollbars=no,resizable=yes") title="BADUSERS Help Page"><font color="blue"><--Help</font></a>