Subversion Repositories ALCASAR

Rev

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

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