Subversion Repositories ALCASAR

Rev

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

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