2 require('../conf/config.php3');
4 header("Location: group_admin.php3?login=$group_to_edit");
7 require('../lib/attrshow.php3');
8 require('../lib/defaults.php3');
9 if ($user_type != 'group'){
10 if (is_file("../lib/$config[general_lib_type]/user_info.php3"))
11 include("../lib/$config[general_lib_type]/user_info.php3");
14 if (is_file("../lib/$config[general_lib_type]/group_info.php3"))
15 include("../lib/$config[general_lib_type]/group_info.php3");
17 if ($config[general_lib_type] == 'sql' && $config[sql_use_operators] == 'true'){
20 include("../lib/operators.php3");
33 if ($user_type != 'group')
34 echo " <title>subscription configuration for $login ($cn)</title>\n";
36 echo " <title>subscription configuration for $login</title>\n";
39 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
40 <link rel="stylesheet" href="style.css">
42 <body bgcolor="#80a040" background="images/greenlines1.gif" link="black" alink="black">
44 <table border=0 width=550 cellpadding=0 cellspacing=0>
46 <td align=center><img src="images/title2.gif"></td>
49 <table border=0 width=400 cellpadding=0 cellspacing=2>
52 if ($user_type != 'group')
53 include("../html/user_toolbar.html.php3");
55 include("../html/group_toolbar.html.php3");
61 <table border=0 width=540 cellpadding=1 cellspacing=1>
63 <td width=75%> </td>
64 <td bgcolor="black" width=25% align=right>
65 <table border=0 width="200" cellpadding=2 cellspacing=0>
66 <tr bgcolor="#907030" align=center valign=top><th>
67 <font color="white">User Preferences for $login ($cn)</font>
71 <tr bgcolor="black" valign=top><td colspan=2>
72 <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
77 if (is_file("../lib/$config[general_lib_type]/change_attrs.php3"))
78 include("../lib/$config[general_lib_type]/change_attrs.php3");
79 if ($user_type != 'group'){
80 if ($config[general_show_user_password] != 'no' && $passwd != ''
81 && is_file("../lib/$config[general_lib_type]/change_passwd.php3"))
82 include("../lib/$config[general_lib_type]/change_passwd.php3");
83 if (is_file("../lib/$config[general_lib_type]/user_info.php3"))
84 include("../lib/$config[general_lib_type]/user_info.php3");
87 if (is_file("../lib/$config[general_lib_type]/group_info.php3"))
88 include("../lib/$config[general_lib_type]/group_info.php3");
91 else if ($badusers == 1){
92 if (is_file("../lib/add_badusers.php3"))
93 include("../lib/add_badusers.php3");
97 <form name="edituser" method=post>
98 <input type=hidden name=login value="<?php print $login ?>">
99 <input type=hidden name=user_type value=<?php print $user_type ?>>
100 <input type=hidden name=change value="0">
101 <input type=hidden name=add value="0">
102 <input type=hidden name=badusers value="0">
103 <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
105 if ($user_type == 'group')
107 Note: The attributes contained in the groups the user belongs to<br>
108 are extracted after the attributes in the radcheck/radreply tables.<br>
109 Please take that into consideration when adding attributes in the group<br>
110 and selecting operators.
113 if ($user_type != 'group' && $config[general_show_user_password] != 'no'){
116 <td align=right colspan=$colspan bgcolor="#d0ddb0">
117 User Password (changes only)<br>
119 if ($user_password_exists == 'yes')
120 echo "<font size=-2>User password <font color=\"green\"><b>exists</b></font></font>\n";
122 echo "<font size=-2>User password <font color=\"red\"><b>does not exist</b></font></font>\n";
126 <input type=password name=passwd value="" size=40>
131 foreach($show_attrs as $key => $desc){
132 $name = $attrmap["$key"];
133 $generic = $attrmap[generic]["$key"];
140 if ($item_vals["$key"][count]){
141 for($i=0;$i<$item_vals["$key"][count];$i++){
142 $vals[] = $item_vals["$key"][$i];
143 $ops[] = $item_vals["$key"][operator][$i];
147 if ($default_vals["$key"][count]){
148 for($i=0;$i<$default_vals["$key"][count];$i++){
149 $vals[] = $default_vals["$key"][$i];
150 $ops[] = $default_vals["$key"][operator][$i];
159 if ($generic == 'generic' && $def_added == 0){
160 for($i=0;$i<$default_vals["$key"][count];$i++){
161 $vals[] = $default_vals["$key"][$i];
162 $ops[] = $default_vals["$key"][operator][$i];
165 if ($add && $name == $add_attr){
166 $vals[] = $default_vals["$key"][0];
167 $ops[] = ($default_vals["$key"][operator][0] != '') ? $default_vals["$key"][operator][0] : '=';
171 foreach($vals as $val){
173 $val = ereg_replace('"','"',$val);
174 $oper_name = $name1 . '_op';
176 $selected[$oper] = 'selected';
180 <td align=right bgcolor="#d0ddb0">
182 $desc = addslashes($desc);
183 eval("\$desc = \"$desc\";");
184 $desc = stripslashes($desc);
195 <select name=$oper_name>
196 <option $selected[$op_eq] value="=">=
197 <option $selected[$op_set] value=":=">:=
198 <option $selected[$op_add] value="+=">+=
199 <option $selected[$op_eq2] value="==">==
200 <option $selected[$op_ne] value="!=">!=
201 <option $selected[$op_gt] value=">">>
202 <option $selected[$op_ge] value=">=">>=
203 <option $selected[$op_lt] value="<"><
204 <option $selected[$op_le] value="<="><=
205 <option $selected[$op_regeq] value="=~">=~
206 <option $selected[$op_regne] value="!~">!~
207 <option $selected[$op_exst] value="=*">=*
208 <option $selected[$op_nexst] value="!*">!*
215 <input type=text name="$name1" value="$val" size=40>
223 <td align=right colspan=<?php print $colspan ?> bgcolor="#d0ddb0">
227 <select name="add_attr" OnChange="this.form.add.value=1;this.form.submit()">
229 foreach ($show_attrs as $key => $desc){
230 $name = $attrmap["$key"];
232 <option value="$name">$desc
241 if (isset($member_groups)){
244 <input type=hidden name=edit_group value=0>
245 <td align=right colspan=$colspan bgcolor="#d0ddb0">
249 <select name="group_to_edit">
251 foreach ($member_groups as $group){
252 echo "<option value=\"$group\">$group\n";
257 <input type=submit class=button value="Edit Group" OnClick="this.form.edit_group.value=1">
265 <input type=submit class=button value=Change OnClick="this.form.change.value=1">
267 if ($user_type != 'group'){
270 <input type=submit class=button value="Add to Badusers" OnClick="this.form.badusers.value=1">
271 <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>