Subversion Repositories ALCASAR

Rev

Rev 40 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 40 Rev 113
1
<?php
1
<?php
2
require('/etc/freeradius-web/config.php');
2
require('/etc/freeradius-web/config.php');
3
require('../lib/attrshow.php');
3
require('../lib/attrshow.php');
4
require('../lib/defaults.php');
4
require('../lib/defaults.php');
5
$extra_text = '';
5
$extra_text = '';
6
if ($user_type != 'group'){
6
if ($user_type != 'group'){
7
	if (is_file("../lib/$config[general_lib_type]/user_info.php"))
7
	if (is_file("../lib/$config[general_lib_type]/user_info.php"))
8
		include("../lib/$config[general_lib_type]/user_info.php");
8
		include("../lib/$config[general_lib_type]/user_info.php");
9
	if ($config[general_lib_type] == 'sql' && $config[sql_show_all_groups] == 'true'){
9
	if ($config[general_lib_type] == 'sql' && $config[sql_show_all_groups] == 'true'){
10
		$extra_text = "<br><font size=-2><i>(le groupe auquel apartient l'usager est surlign&eacute;)</i></font>";
10
		$extra_text = "<br><font size=-2><i>(le groupe auquel apartient l'usager est surlign&eacute;)</i></font>";
11
		$saved_login = $login;
11
		$saved_login = $login;
12
		$login = '';
12
		$login = '';
13
		if (is_file("../lib/sql/group_info.php"))
13
		if (is_file("../lib/sql/group_info.php"))
14
			include("../lib/sql/group_info.php");
14
			include("../lib/sql/group_info.php");
15
		$login = $saved_login;
15
		$login = $saved_login;
16
	}
16
	}
17
}
17
}
18
else{
18
else{
19
	if (is_file("../lib/$config[general_lib_type]/group_info.php"))
19
	if (is_file("../lib/$config[general_lib_type]/group_info.php"))
20
		include("../lib/$config[general_lib_type]/group_info.php");
20
		include("../lib/$config[general_lib_type]/group_info.php");
21
}
21
}
22
if ($config[general_lib_type] == 'sql' && $config[sql_use_operators] == 'true'){
22
if ($config[general_lib_type] == 'sql' && $config[sql_use_operators] == 'true'){
23
	$colspan=2;
23
	$colspan=2;
24
	$show_ops = 1;
24
	$show_ops = 1;
25
	include("../lib/operators.php");
25
	include("../lib/operators.php");
26
}
26
}
27
else{
27
else{
28
	$show_ops = 0;
28
	$show_ops = 0;
29
	$colspan=1;
29
	$colspan=1;
30
}
30
}
31
 
31
 
32
 
32
 
33
echo <<<EOM
33
echo <<<EOM
34
<html>
34
<html>
35
<head>
35
<head>
36
EOM;
36
EOM;
37
 
37
 
38
if ($user_type != 'group'){
38
if ($user_type != 'group'){
39
	echo " <title>subscription configuration for $login ($cn)</title>\n";
39
	echo " <title>subscription configuration for $login ($cn)</title>\n";
40
	$util = "usagers";}
40
	$util = "usagers";}
41
else{
41
else{
42
	echo " <title>subscription configuration for $login</title>\n";
42
	echo " <title>subscription configuration for $login</title>\n";
43
	$util = "groupes";}
43
	$util = "groupes";}
44
?>
44
?>
45
 
45
 
46
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
46
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
47
<link rel="stylesheet" href="/css/style.css">
47
<link rel="stylesheet" href="/css/style.css">
48
<script language="javascript" type="text/javascript">
48
<script language="javascript" type="text/javascript">
49
var chars='0123456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ'
49
var chars='0123456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ'
50
function password(size)
50
function password(size)
51
  {
51
  {
52
  var pass=''
52
  var pass=''
53
  while(pass.length < size)
53
  while(pass.length < size)
54
  {
54
  {
55
    pass+=chars.charAt(Math.round(Math.random() * (chars.length)))
55
    pass+=chars.charAt(Math.round(Math.random() * (chars.length)))
56
  }
56
  }
57
  document.edituser.passwd.value=pass
57
  document.edituser.passwd.value=pass
58
  document.edituser.pwdgene.value=pass
58
  document.edituser.pwdgene.value=pass
59
}
59
}
60
</script>
60
</script>
61
</head>
61
</head>
62
<body>
62
<body>
63
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
63
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
64
	<tr><th>Gestion des <?php echo $util?></th></tr>
64
	<tr><th>Gestion des <?php echo $util?></th></tr>
65
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" 
65
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" 
66
height="2"></td></tr>
66
height="2"></td></tr>
67
</TABLE>
67
</TABLE>
68
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
68
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
69
	<tr><td valign="middle" align="left">
69
	<tr><td valign="middle" align="left">
70
	<center>
70
	<center>
71
	<table border=0 width=550 cellpadding=0 cellspacing=0>
71
	<table border=0 width=550 cellpadding=0 cellspacing=0>
72
		<tr valign=top>
72
		<tr valign=top>
73
		<!--<td align=center><img src="images/title2.gif"></td>-->
73
		<!--<td align=center><img src="images/title2.gif"></td>-->
74
		</tr>
74
		</tr>
75
	</table>
75
	</table>
76
	<table border=0 width=400 cellpadding=0 cellspacing=2>
76
	<table border=0 width=400 cellpadding=0 cellspacing=2>
77
<?php
77
<?php
78
if ($user_type != 'group')
78
if ($user_type != 'group')
79
	{
79
	{
80
	include("../html/user_toolbar.html.php");
80
	include("../html/user_toolbar.html.php");
81
	$titre="de l'usager";
81
	$titre="de l'usager";
82
	}
82
	}
83
else
83
else
84
	{
84
	{
85
	include("../html/group_toolbar.html.php");
85
	include("../html/group_toolbar.html.php");
86
	$titre="du groupe";
86
	$titre="du groupe";
87
	}
87
	}
88
print <<<EOM
88
print <<<EOM
89
</table>
89
</table>
90
<br>
90
<br>
91
<table border=0 width=540 cellpadding=1 cellspacing=1>
91
<table border=0 width=540 cellpadding=1 cellspacing=1>
92
<tr valign=top>
92
<tr valign=top>
93
<td width=75%>&nbsp;</td>
93
<td width=75%>&nbsp;</td>
94
<td bgcolor="black" width=25% align=right>
94
<td bgcolor="black" width=25% align=right>
95
	<table border=0 width="200" cellpadding=2 cellspacing=0>
95
	<table border=0 width="200" cellpadding=2 cellspacing=0>
96
	<tr bgcolor="#907030" align=center valign=top><th>
96
	<tr bgcolor="#907030" align=center valign=top><th>
97
	<font color="white">Attributs $titre : $login</font>&nbsp;
97
	<font color="white">Attributs $titre : $login</font>&nbsp;
98
	</th></tr>
98
	</th></tr>
99
	</table>
99
	</table>
100
</td></tr>
100
</td></tr>
101
<tr bgcolor="black" valign=top><td colspan=2>
101
<tr bgcolor="black" valign=top><td colspan=2>
102
	<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
102
	<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
103
	<tr><td>
103
	<tr><td>
104
EOM;
104
EOM;
105
   
105
   
106
if ($change == 1){
106
if ($change == 1){
107
	if (is_file("../lib/$config[general_lib_type]/change_attrs.php"))
107
	if (is_file("../lib/$config[general_lib_type]/change_attrs.php"))
108
		include("../lib/$config[general_lib_type]/change_attrs.php");
108
		include("../lib/$config[general_lib_type]/change_attrs.php");
109
	if ($user_type != 'group'){
109
	if ($user_type != 'group'){
110
		if ($config[general_show_user_password] != 'no' && $passwd != '' 
110
		if ($config[general_show_user_password] != 'no' && $passwd != '' 
111
			&& is_file("../lib/$config[general_lib_type]/change_passwd.php"))
111
			&& is_file("../lib/$config[general_lib_type]/change_passwd.php"))
112
			include("../lib/$config[general_lib_type]/change_passwd.php");
112
			include("../lib/$config[general_lib_type]/change_passwd.php");
113
		if (is_file("../lib/$config[general_lib_type]/user_info.php"))
113
		if (is_file("../lib/$config[general_lib_type]/user_info.php"))
114
			include("../lib/$config[general_lib_type]/user_info.php");
114
			include("../lib/$config[general_lib_type]/user_info.php");
115
		if ($group_change && $config[general_lib_type] == 'sql' && $config[sql_show_all_groups] == 'true'){
115
		if ($group_change && $config[general_lib_type] == 'sql' && $config[sql_show_all_groups] == 'true'){
116
			include("../lib/sql/group_change.php");
116
			include("../lib/sql/group_change.php");
117
			include("../lib/defaults.php");
117
			include("../lib/defaults.php");
118
		}
118
		}
119
	}
119
	}
120
	else{
120
	else{
121
		if (is_file("../lib/$config[general_lib_type]/group_info.php"))
121
		if (is_file("../lib/$config[general_lib_type]/group_info.php"))
122
			include("../lib/$config[general_lib_type]/group_info.php");
122
			include("../lib/$config[general_lib_type]/group_info.php");
123
	}
123
	}
124
}
124
}
125
else if ($badusers == 1){
125
else if ($badusers == 1){
126
	if (is_file("../lib/add_badusers.php"))
126
	if (is_file("../lib/add_badusers.php"))
127
		include("../lib/add_badusers.php");
127
		include("../lib/add_badusers.php");
128
}
128
}
129
	
129
	
130
?>
130
?>
131
   <form name="edituser" method=post>
131
   <form name="edituser" method=post>
132
      <input type=hidden name=login value=<?php print $login ?>>
132
      <input type=hidden name=login value=<?php print $login ?>>
133
      <input type=hidden name=user_type value=<?php print $user_type ?>>
133
      <input type=hidden name=user_type value=<?php print $user_type ?>>
134
      <input type=hidden name=change value="0">
134
      <input type=hidden name=change value="0">
135
      <input type=hidden name=add value="0">
135
      <input type=hidden name=add value="0">
136
      <input type=hidden name=badusers value="0">
136
      <input type=hidden name=badusers value="0">
137
      <input type=hidden name=group_change value="0">
137
      <input type=hidden name=group_change value="0">
138
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
138
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
139
<?php
139
<?php
140
if ($user_type != 'group' && $config[general_show_user_password] != 'no'){
140
if ($user_type != 'group' && $config[general_show_user_password] != 'no'){
141
	echo <<<EOM
141
	echo <<<EOM
142
<tr>
142
<tr>
143
<td align=right colspan=$colspan bgcolor="#d0ddb0">
143
<td align=right colspan=$colspan bgcolor="#d0ddb0">
144
Nouveau mot de passe<br>
144
Nouveau mot de passe<br>
145
EOM;
145
EOM;
146
if ($user_password_exists == 'yes')
146
if ($user_password_exists == 'yes')
147
	echo "<font size=-2>Le mot de passe <font color=\"green\"><b>existe</b></font></font>\n";
147
	echo "<font size=-2>Le mot de passe <font color=\"green\"><b>existe</b></font></font>\n";
148
else
148
else
149
	echo "<font size=-2>Le mot de passe <font color=\"red\"><b> n'existe pas</b></font></font>\n";
149
	echo "<font size=-2>Le mot de passe <font color=\"red\"><b> n'existe pas</b></font></font>\n";
150
	echo <<<EOM
150
	echo <<<EOM
151
</td>
151
</td>
152
<td>
152
<td>
153
<input type=password name=passwd value="" size=40>
153
<input type=password name=passwd value="" size=40>
154
<br /><input type="button" value="g&eacute;n&eacute;rer" onclick="password(8)">
154
<br /><input type="button" value="g&eacute;n&eacute;rer" onclick="password(8)">
155
<input type="text" value="" name="pwdgene" size=20 readonly>
155
<input type="text" value="" name="pwdgene" size=20 readonly>
156
</td>
156
</td>
157
</tr>
157
</tr>
158
EOM;
158
EOM;
159
}
159
}
160
	foreach($show_attrs as $key => $desc){
160
	foreach($show_attrs as $key => $desc){
161
		$name = $attrmap["$key"];
161
		$name = $attrmap["$key"];
162
		$generic = $attrmap[generic]["$key"];
162
		$generic = $attrmap[generic]["$key"];
163
		if ($name == 'none')
163
		if ($name == 'none')
164
			continue;
164
			continue;
165
		unset($vals);
165
		unset($vals);
166
		unset($selected);
166
		unset($selected);
167
		unset($ops);
167
		unset($ops);
168
		$def_added = 0;
168
		$def_added = 0;
169
		if ($item_vals["$key"][count]){
169
		if ($item_vals["$key"][count]){
170
			for($i=0;$i<$item_vals["$key"][count];$i++){
170
			for($i=0;$i<$item_vals["$key"][count];$i++){
171
				$vals[] = $item_vals["$key"][$i];
171
				$vals[] = $item_vals["$key"][$i];
172
				$ops[] = $item_vals["$key"][operator][$i];
172
				$ops[] = $item_vals["$key"][operator][$i];
173
			}
173
			}
174
		}
174
		}
175
		else{
175
		else{
176
			if ($default_vals["$key"][count]){
176
			if ($default_vals["$key"][count]){
177
				for($i=0;$i<$default_vals["$key"][count];$i++){
177
				for($i=0;$i<$default_vals["$key"][count];$i++){
178
					$vals[] = $default_vals["$key"][$i];
178
					$vals[] = $default_vals["$key"][$i];
179
					$ops[] = $default_vals["$key"][operator][$i];
179
					$ops[] = $default_vals["$key"][operator][$i];
180
				}
180
				}
181
			}
181
			}
182
			else{
182
			else{
183
				$vals[] = '';
183
				$vals[] = '';
184
				$ops[] = '=';
184
				$ops[] = '=';
185
			}
185
			}
186
			$def_added = 1;
186
			$def_added = 1;
187
		}
187
		}
188
		if ($generic == 'generic' && $def_added == 0){
188
		if ($generic == 'generic' && $def_added == 0){
189
			for($i=0;$i<$default_vals["$key"][count];$i++){
189
			for($i=0;$i<$default_vals["$key"][count];$i++){
190
				$vals[] = $default_vals["$key"][$i];
190
				$vals[] = $default_vals["$key"][$i];
191
				$ops[] = $default_vals["$key"][operator][$i];
191
				$ops[] = $default_vals["$key"][operator][$i];
192
			}
192
			}
193
		}	
193
		}	
194
		if ($add && $name == $add_attr){
194
		if ($add && $name == $add_attr){
195
			$vals[] = $default_vals["$key"][0];
195
			$vals[] = $default_vals["$key"][0];
196
			$ops[] = ($default_vals["$key"][operator][0] != '') ? $default_vals["$key"][operator][0] : '=';
196
			$ops[] = ($default_vals["$key"][operator][0] != '') ? $default_vals["$key"][operator][0] : '=';
197
		}
197
		}
198
 
198
 
199
		$i = 0;
199
		$i = 0;
200
		foreach($vals as $val){
200
		foreach($vals as $val){
201
			$name1 = $name . $i;
201
			$name1 = $name . $i;
202
			$val = ereg_replace('"','&quot;',$val);
202
			$val = ereg_replace('"','&quot;',$val);
203
			$oper_name = $name1 . '_op';
203
			$oper_name = $name1 . '_op';
204
			$oper = $ops[$i];
204
			$oper = $ops[$i];
205
			$selected[$oper] = 'selected';
205
			$selected[$oper] = 'selected';
206
			$i++;
206
			$i++;
207
			print <<<EOM
207
			print <<<EOM
208
<tr>
208
<tr>
209
<td align=right bgcolor="#d0ddb0">
209
<td align=right bgcolor="#d0ddb0">
210
EOM;
210
EOM;
211
			$desc = addslashes($desc);
211
			$desc = addslashes($desc);
212
			eval("\$desc = \"$desc\";");
212
			eval("\$desc = \"$desc\";");
213
			$desc = stripslashes($desc);
213
			$desc = stripslashes($desc);
214
			if ($i == 1)
214
			if ($i == 1)
215
				echo "$desc\n";
215
				echo "$desc\n";
216
			else
216
			else
217
				echo "$desc ($i)\n";
217
				echo "$desc ($i)\n";
218
			print <<<EOM
218
			print <<<EOM
219
</td>
219
</td>
220
EOM;
220
EOM;
221
			if ($show_ops){
221
			if ($show_ops){
222
				switch ($key)
222
				switch ($key)
223
					{
223
					{
224
					case 'Simultaneous-Use' : 
224
					case 'Simultaneous-Use' : 
225
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
225
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=40></td>";
226
						break;
226
						break;
227
					case 'Login-Time' : 
227
					case 'Login-Time' : 
228
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
228
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=40></td>";
229
						break;
229
						break;
230
					case 'Expiration' :
230
					case 'Expiration' :
231
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
231
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=40></td>";
232
						break;
232
						break;
233
					case 'Session-Timeout' :
233
					case 'Session-Timeout' :
234
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
234
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=40></td>";
235
						break;
235
						break;
236
					case 'Max-Daily-Session' :
236
					case 'Max-Daily-Session' :
237
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
237
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=40></td>";
238
						break;
238
						break;
239
					case 'Max-Weekly-Session' :
239
					case 'Max-Weekly-Session' :
240
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
240
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=40></td>";
241
						break;
241
						break;
242
					case 'Max-Monthly-Session' :
242
					case 'Max-Monthly-Session' :
243
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
243
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=40></td>";
-
 
244
						break;
-
 
245
					case 'ChilliSpot-Max-Input-Octets' :
-
 
246
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=40></td>";
-
 
247
						break;
-
 
248
					case 'ChilliSpot-Max-Output-Octets' :
-
 
249
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=40></td>";
-
 
250
						break;
-
 
251
					case 'ChilliSpot-Max-Total-Octets' :
-
 
252
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=40></td>";
-
 
253
						break;
-
 
254
					case 'ChilliSpot-Bandwidth-Max-Up' :
-
 
255
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=40></td>";
-
 
256
						break;
-
 
257
					case 'ChilliSpot-Bandwidth-Max-Down' :
-
 
258
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=40></td>";
-
 
259
						break;
-
 
260
					case 'WISPr-Redirection-URL' :
-
 
261
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=40></td>";
244
						break;
262
						break;
245
					default :
263
					default :
246
						print <<<EOM
264
						print <<<EOM
247
<td>
265
<td>
248
<select name=$oper_name>
266
<select name=$oper_name>
249
<option $selected[$op_eq] value="=">=
267
<option $selected[$op_eq] value="=">=
250
<option $selected[$op_set] value=":=">:=
268
<option $selected[$op_set] value=":=">:=
251
<option $selected[$op_add] value="+=">+=
269
<option $selected[$op_add] value="+=">+=
252
<option $selected[$op_eq2] value="==">==
270
<option $selected[$op_eq2] value="==">==
253
<option $selected[$op_ne] value="!=">!=
271
<option $selected[$op_ne] value="!=">!=
254
<option $selected[$op_gt] value=">">&gt;
272
<option $selected[$op_gt] value=">">&gt;
255
<option $selected[$op_ge] value=">=">&gt;=
273
<option $selected[$op_ge] value=">=">&gt;=
256
<option $selected[$op_lt] value="<">&lt;
274
<option $selected[$op_lt] value="<">&lt;
257
<option $selected[$op_le] value="<=">&lt;=
275
<option $selected[$op_le] value="<=">&lt;=
258
<option $selected[$op_regeq] value="=~">=~
276
<option $selected[$op_regeq] value="=~">=~
259
<option $selected[$op_regne] value="!~">!~
277
<option $selected[$op_regne] value="!~">!~
260
<option $selected[$op_exst] value="=*">=*
278
<option $selected[$op_exst] value="=*">=*
261
<option $selected[$op_nexst] value="!*">!*
279
<option $selected[$op_nexst] value="!*">!*
262
</select>
280
</select>
263
</td>
281
</td>
-
 
282
<td><input type=text name="$name1" value="$val" size=40></td>
264
EOM;
283
EOM;
265
						break;
284
						break;
266
					}
285
					}
267
				}
286
				}
268
			print <<<EOM
287
			print <<<EOM
269
<td>
-
 
270
<input type=text name="$name1" value="$val" size=40>
-
 
271
</td>
-
 
272
</tr>
288
</tr>
273
EOM;
289
EOM;
274
		}
290
		}
275
	}
291
	}
276
?>
292
?>
277
<!--
293
<!--
278
<tr>
294
<tr>
279
<td align=right colspan=<?php print $colspan ?> bgcolor="#d0ddb0">
295
<td align=right colspan=<?php print $colspan ?> bgcolor="#d0ddb0">
280
Ajouter un attribut
296
Ajouter un attribut
281
</td>
297
</td>
282
<td>
298
<td>
283
<select name="add_attr" OnChange="this.form.add.value=1;this.form.submit()">
299
<select name="add_attr" OnChange="this.form.add.value=1;this.form.submit()">
284
<?php
300
<?php
285
foreach ($show_attrs as $key => $desc){
301
foreach ($show_attrs as $key => $desc){
286
	$name = $attrmap["$key"];
302
	$name = $attrmap["$key"];
287
	print <<<EOM
303
	print <<<EOM
288
<option value="$name">$desc
304
<option value="$name">$desc
289
EOM;
305
EOM;
290
}
306
}
291
?>
307
?>
292
</select>
308
</select>
293
</td>
309
</td>
294
</tr>
310
</tr>
295
-->
311
-->
296
<?php
312
<?php
297
if ($user_type != 'group'){
313
if ($user_type != 'group'){
298
	echo <<<EOM
314
	echo <<<EOM
299
<tr>
315
<tr>
300
<td align=right colspan=$colspan bgcolor="#d0ddb0">
316
<td align=right colspan=$colspan bgcolor="#d0ddb0">
301
Membre de $extra_text
317
Membre de $extra_text
302
</td>
318
</td>
303
<td>
319
<td>
304
EOM;
320
EOM;
305
if (isset($member_groups)){
321
if (isset($member_groups)){
306
	echo "<select size=5 name=\"edited_groups[]\" multiple OnChange=\"this.form.group_change.value=1\">";
322
	echo "<select size=5 name=\"edited_groups[]\" multiple OnChange=\"this.form.group_change.value=1\">";
307
	if ($config[sql_show_all_groups] == 'true'){
323
	if ($config[sql_show_all_groups] == 'true'){
308
		foreach ($existing_groups as $group => $count){
324
		foreach ($existing_groups as $group => $count){
309
			if ($member_groups[$group] == $group)
325
			if ($member_groups[$group] == $group)
310
				echo "<option selected value=\"$group\">$group\n";
326
				echo "<option selected value=\"$group\">$group\n";
311
			else
327
			else
312
				echo "<option value=\"$group\">$group\n";
328
				echo "<option value=\"$group\">$group\n";
313
			}
329
			}
314
		}else{
330
		}else{
315
		foreach ($member_groups as $group)
331
		foreach ($member_groups as $group)
316
			echo "<option value=\"$group\">$group\n";
332
			echo "<option value=\"$group\">$group\n";
317
		}
333
		}
318
		echo "</select></td></tr>";
334
		echo "</select></td></tr>";
319
	}
335
	}
320
	else{
336
	else{
321
		echo "aucun group</td></tr>";
337
		echo "aucun group</td></tr>";
322
	}
338
	}
323
} 
339
} 
324
echo "</table><br>";
340
echo "</table><br>";
325
echo "<input type=submit class=button value=Change OnClick=\"this.form.change.value=1\">";
341
echo "<input type=submit class=button value=Change OnClick=\"this.form.change.value=1\">";
326
//if ($user_type != 'group'){
342
//if ($user_type != 'group'){
327
//	echo <<<EOM
343
//	echo <<<EOM
328
//<br><br>
344
//<br><br>
329
//<input type=submit class=button value="Add to Badusers" OnClick="this.form.badusers.value=1">
345
//<input type=submit class=button value="Add to Badusers" OnClick="this.form.badusers.value=1">
330
//<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">&lt;--Help</font></a>
346
//<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">&lt;--Help</font></a>
331
//EOM;
347
//EOM;
332
//}
348
//}
333
?>
349
?>
334
</form>
350
</form>
335
</td></tr>
351
</td></tr>
336
</table>
352
</table>
337
</tr>
353
</tr>
338
</table>
354
</table>
339
</td></tr>
355
</td></tr>
340
</TABLE>
356
</TABLE>
341
</body>
357
</body>
342
</html>
358
</html>
343
 
359