Subversion Repositories ALCASAR

Rev

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

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