Subversion Repositories ALCASAR

Rev

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

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