Subversion Repositories ALCASAR

Rev

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

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