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 |
|
8 |
|
9 |
if(!isset($change)) $change = 0;
|
9 |
if(!isset($change)) $change = 0;
|
10 |
if(!isset($user_type)) $user_type = 'user';
|
10 |
if(!isset($user_type)) $user_type = 'user';
|
11 |
if(!isset($badusers)) $badusers = 0;
|
11 |
if(!isset($badusers)) $badusers = 0;
|
12 |
if(!isset($cn)) $cn = '';
|
12 |
if(!isset($cn)) $cn = '';
|
13 |
|
13 |
|
14 |
|
14 |
|
15 |
if ($user_type != 'group'){
|
15 |
if ($user_type != 'group'){
|
16 |
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
|
16 |
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
|
17 |
include("../lib/$config[general_lib_type]/user_info.php");
|
17 |
include("../lib/$config[general_lib_type]/user_info.php");
|
18 |
if ($config['general_lib_type'] == 'sql' && $config['sql_show_all_groups'] == 'true'){
|
18 |
if ($config['general_lib_type'] == 'sql' && $config['sql_show_all_groups'] == 'true'){
|
19 |
$saved_login = $login;
|
19 |
$saved_login = $login;
|
20 |
$login = '';
|
20 |
$login = '';
|
21 |
if (is_file("../lib/sql/group_info.php"))
|
21 |
if (is_file("../lib/sql/group_info.php"))
|
22 |
include("../lib/sql/group_info.php");
|
22 |
include("../lib/sql/group_info.php");
|
23 |
$login = $saved_login;
|
23 |
$login = $saved_login;
|
24 |
}
|
24 |
}
|
25 |
}
|
25 |
}
|
26 |
else{
|
26 |
else{
|
27 |
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
|
27 |
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
|
28 |
include("../lib/$config[general_lib_type]/group_info.php");
|
28 |
include("../lib/$config[general_lib_type]/group_info.php");
|
29 |
}
|
29 |
}
|
30 |
if ($config['general_lib_type'] == 'sql' && $config['sql_use_operators'] == 'true'){
|
30 |
if ($config['general_lib_type'] == 'sql' && $config['sql_use_operators'] == 'true'){
|
31 |
$colspan=2;
|
31 |
$colspan=2;
|
32 |
$show_ops = 1;
|
32 |
$show_ops = 1;
|
33 |
include("../lib/operators.php");
|
33 |
include("../lib/operators.php");
|
34 |
}
|
34 |
}
|
35 |
else{
|
35 |
else{
|
36 |
$show_ops = 0;
|
36 |
$show_ops = 0;
|
37 |
$colspan=1;
|
37 |
$colspan=1;
|
38 |
}
|
38 |
}
|
39 |
?>
|
39 |
?>
|
40 |
<html>
|
40 |
<html>
|
41 |
<head>
|
41 |
<head>
|
42 |
<title>Users & groups edition</title>
|
42 |
<title>Users & groups edition</title>
|
43 |
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config['general_charset']?>">
|
43 |
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config['general_charset']?>">
|
44 |
<link rel="stylesheet" href="/css/style.css">
|
44 |
<link rel="stylesheet" href="/css/style.css">
|
45 |
<script language="javascript" type="text/javascript">
|
45 |
<script language="javascript" type="text/javascript">
|
46 |
var chars='0123456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ'
|
46 |
var chars='0123456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ'
|
47 |
function password(size)
|
47 |
function password(size)
|
48 |
{
|
48 |
{
|
49 |
var pass=''
|
49 |
var pass=''
|
50 |
while(pass.length < size)
|
50 |
while(pass.length < size)
|
51 |
{
|
51 |
{
|
52 |
pass+=chars.charAt(Math.round(Math.random() * (chars.length)))
|
52 |
pass+=chars.charAt(Math.round(Math.random() * (chars.length)))
|
53 |
}
|
53 |
}
|
54 |
document.edituser.passwd.value=pass
|
54 |
document.edituser.passwd.value=pass
|
55 |
document.edituser.pwdgene.value=pass
|
55 |
document.edituser.pwdgene.value=pass
|
56 |
}
|
56 |
}
|
57 |
</script>
|
57 |
</script>
|
58 |
<script type="text/javascript" src="/js/epoch_classes.js"></script>
|
58 |
<script type="text/javascript" src="/js/epoch_classes.js"></script>
|
59 |
<script language="javascript" type="text/javascript">
|
59 |
<script language="javascript" type="text/javascript">
|
60 |
/*Insertion du calendrier */
|
60 |
/*Insertion du calendrier */
|
61 |
var dp_cal;
|
61 |
var dp_cal;
|
62 |
window.onload = function () {
|
62 |
window.onload = function () {
|
63 |
dp_cal = new Epoch('epoch_popup','popup',document.getElementById('popup_container'));
|
63 |
dp_cal = new Epoch('epoch_popup','popup',document.getElementById('popup_container'));
|
64 |
};
|
64 |
};
|
65 |
</script>
|
65 |
</script>
|
66 |
|
66 |
|
67 |
</head>
|
67 |
</head>
|
68 |
<body>
|
68 |
<body>
|
69 |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
|
69 |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
|
70 |
<tr><th>
|
70 |
<tr><th>
|
71 |
<?php
|
71 |
<?php
|
72 |
if($user_type != 'group'){ echo "$l_users_managment";} else{ echo "$l_groups_managment";}
|
72 |
if($user_type != 'group'){ echo "$l_users_managment";} else{ echo "$l_groups_managment";}
|
73 |
?>
|
73 |
?>
|
74 |
</th></tr>
|
74 |
</th></tr>
|
75 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
|
75 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
|
76 |
height="2"></td></tr>
|
76 |
height="2"></td></tr>
|
77 |
</TABLE>
|
77 |
</TABLE>
|
78 |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
|
78 |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
|
79 |
<tr><td valign="middle" align="left">
|
79 |
<tr><td valign="middle" align="left">
|
80 |
<center>
|
80 |
<center>
|
81 |
<table border=0 width=640 cellpadding=0 cellspacing=2>
|
81 |
<table border=0 width=640 cellpadding=0 cellspacing=2>
|
82 |
<?php
|
82 |
<?php
|
83 |
if ($user_type != 'group'){
|
83 |
if ($user_type != 'group'){
|
84 |
include("../html/user_toolbar.html.php");
|
84 |
include("../html/user_toolbar.html.php");
|
85 |
$titre=$l_user;
|
85 |
$titre=$l_user;
|
86 |
}else{
|
86 |
}else{
|
87 |
include("../html/group_toolbar.html.php");
|
87 |
include("../html/group_toolbar.html.php");
|
88 |
$titre=$l_group;
|
88 |
$titre=$l_group;
|
89 |
}
|
89 |
}
|
90 |
print <<<EOM
|
90 |
print <<<EOM
|
91 |
</table>
|
91 |
</table>
|
92 |
<br>
|
92 |
<br>
|
93 |
<table border=0 width=620 cellpadding=1 cellspacing=1>
|
93 |
<table border=0 width=620 cellpadding=1 cellspacing=1>
|
94 |
<tr valign=top>
|
94 |
<tr valign=top>
|
95 |
<td width=400></td>
|
95 |
<td width=400></td>
|
96 |
<td bgcolor="black">
|
96 |
<td bgcolor="black">
|
97 |
<table border=0 width=100% cellpadding=2 cellspacing=0>
|
97 |
<table border=0 width=100% cellpadding=2 cellspacing=0>
|
98 |
<tr bgcolor="#907030" align=center valign=top><th>
|
98 |
<tr bgcolor="#907030" align=center valign=top><th>
|
99 |
<font color="white">$titre : $login ($cn)</font>
|
99 |
<font color="white">$titre : $login ($cn)</font>
|
100 |
</th></tr>
|
100 |
</th></tr>
|
101 |
</table>
|
101 |
</table>
|
102 |
</td></tr>
|
102 |
</td></tr>
|
103 |
<tr bgcolor="black" valign=top><td colspan=2>
|
103 |
<tr bgcolor="black" valign=top><td colspan=2>
|
104 |
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
|
104 |
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
|
105 |
<tr><td>
|
105 |
<tr><td>
|
106 |
EOM;
|
106 |
EOM;
|
107 |
|
107 |
|
108 |
if ($change == 1){
|
108 |
if ($change == 1){
|
109 |
if (is_file("../lib/$config[general_lib_type]/change_attrs.php"))
|
109 |
if (is_file("../lib/$config[general_lib_type]/change_attrs.php"))
|
110 |
include("../lib/$config[general_lib_type]/change_attrs.php");
|
110 |
include("../lib/$config[general_lib_type]/change_attrs.php");
|
111 |
if ($user_type != 'group'){
|
111 |
if ($user_type != 'group'){
|
112 |
if ($config['general_show_user_password'] != 'no' && $passwd != ''
|
112 |
if ($config['general_show_user_password'] != 'no' && $passwd != ''
|
113 |
&& is_file("../lib/$config[general_lib_type]/change_passwd.php"))
|
113 |
&& is_file("../lib/$config[general_lib_type]/change_passwd.php"))
|
114 |
include("../lib/$config[general_lib_type]/change_passwd.php");
|
114 |
include("../lib/$config[general_lib_type]/change_passwd.php");
|
115 |
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
|
115 |
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
|
116 |
include("../lib/$config[general_lib_type]/user_info.php");
|
116 |
include("../lib/$config[general_lib_type]/user_info.php");
|
117 |
if ($group_change && $config['general_lib_type'] == 'sql' && $config['sql_show_all_groups'] == 'true'){
|
117 |
if ($group_change && $config['general_lib_type'] == 'sql' && $config['sql_show_all_groups'] == 'true'){
|
118 |
include("../lib/sql/group_change.php");
|
118 |
include("../lib/sql/group_change.php");
|
119 |
include("../lib/defaults.php");
|
119 |
include("../lib/defaults.php");
|
120 |
}
|
120 |
}
|
121 |
# Disconnecting user for re-authentication
|
121 |
# Disconnecting user for re-authentication
|
122 |
$mac=exec("sudo /usr/sbin/chilli_query list | grep \" $login \" | awk '{print $1}'");
|
122 |
$mac=exec("sudo /usr/sbin/chilli_query list | grep \" $login \" | awk '{print $1}'");
|
123 |
exec("sudo /usr/sbin/chilli_query logout $mac");
|
123 |
exec("sudo /usr/sbin/chilli_query logout $mac");
|
124 |
}
|
124 |
}
|
125 |
else{
|
125 |
else{
|
126 |
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
|
126 |
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
|
127 |
include("../lib/$config[general_lib_type]/group_info.php");
|
127 |
include("../lib/$config[general_lib_type]/group_info.php");
|
128 |
# Disconnecting all users from the selected group for re-authentication
|
128 |
# Disconnecting all users from the selected group for re-authentication
|
129 |
if (isset($group_members)){
|
129 |
if (isset($group_members)){
|
130 |
foreach ($group_members as $g_member => $member){
|
130 |
foreach ($group_members as $g_member => $member){
|
131 |
$mac=exec("sudo /usr/sbin/chilli_query list | grep \" $member \" | awk '{print $1}'");
|
131 |
$mac=exec("sudo /usr/sbin/chilli_query list | grep \" $member \" | awk '{print $1}'");
|
132 |
exec("sudo /usr/sbin/chilli_query logout $mac");
|
132 |
exec("sudo /usr/sbin/chilli_query logout $mac");
|
133 |
}
|
133 |
}
|
134 |
}
|
134 |
}
|
135 |
}
|
135 |
}
|
136 |
}
|
136 |
}
|
137 |
else if ($badusers == 1){
|
137 |
else if ($badusers == 1){
|
138 |
if (is_file("../lib/add_badusers.php"))
|
138 |
if (is_file("../lib/add_badusers.php"))
|
139 |
include("../lib/add_badusers.php");
|
139 |
include("../lib/add_badusers.php");
|
140 |
}
|
140 |
}
|
141 |
|
141 |
|
- |
|
142 |
|
- |
|
143 |
|
- |
|
144 |
|
- |
|
145 |
//si l'utilisateur fait parti d'un groupe, on charge les attributs du groupe, pour les afficher ensuite.
|
- |
|
146 |
if(isset($member_groups[0]))
|
- |
|
147 |
{
|
- |
|
148 |
echo "<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor=\"#ffffe0\" valign=top>";
|
- |
|
149 |
|
- |
|
150 |
$group = $member_groups[0];
|
- |
|
151 |
$login_saved = $login;
|
- |
|
152 |
$login = $member_groups[0];
|
- |
|
153 |
include("../lib/sql/group_info.php");
|
- |
|
154 |
$login = $login_saved;
|
- |
|
155 |
|
- |
|
156 |
|
- |
|
157 |
echo "<tr>
|
- |
|
158 |
<td align=right colspan=$colspan bgcolor=\"#d0ddb0\">
|
- |
|
159 |
$l_new_password<br>
|
- |
|
160 |
</td>
|
- |
|
161 |
<td>
|
- |
|
162 |
<input type=password name=passwd value="" size=20>
|
- |
|
163 |
<br /><input type=\"button\" value=\"$l_passwd_gen\" onclick=\"password(8)\">
|
- |
|
164 |
<input type=\"text\" value=\"\" name=\"pwdgene\" size=10 readonly>
|
- |
|
165 |
</td>
|
- |
|
166 |
</tr>";
|
- |
|
167 |
|
- |
|
168 |
|
- |
|
169 |
foreach($show_attrs as $key => $desc){
|
- |
|
170 |
$name = $attrmap["$key"];
|
- |
|
171 |
$generic = (isset($attrmap['generic']["$key"])) ? $attrmap['generic']["$key"] : '';
|
- |
|
172 |
if ($name == 'none')
|
- |
|
173 |
continue;
|
- |
|
174 |
unset($vals);
|
- |
|
175 |
unset($selected);
|
- |
|
176 |
unset($ops);
|
- |
|
177 |
$def_added = 0;
|
- |
|
178 |
if (isset($item_vals["$key"]['count']) && $item_vals["$key"]['count']){
|
- |
|
179 |
for($i=0;$i<$item_vals["$key"]['count'];$i++){
|
- |
|
180 |
$vals[] = $item_vals["$key"][$i];
|
- |
|
181 |
$ops[] = $item_vals["$key"]['operator'][$i];
|
- |
|
182 |
}
|
- |
|
183 |
}
|
- |
|
184 |
else{
|
- |
|
185 |
if (isset($default_vals["$key"]['count']) && $default_vals["$key"]['count']){
|
- |
|
186 |
for($i=0;$i<$default_vals["$key"]['count'];$i++){
|
- |
|
187 |
$vals[] = $default_vals["$key"][$i];
|
- |
|
188 |
$ops[] = $default_vals["$key"]['operator'][$i];
|
- |
|
189 |
}
|
- |
|
190 |
}
|
- |
|
191 |
else{
|
- |
|
192 |
$vals[] = '';
|
- |
|
193 |
$ops[] = '=';
|
- |
|
194 |
}
|
- |
|
195 |
$def_added = 1;
|
- |
|
196 |
}
|
- |
|
197 |
if ($generic == 'generic' && $def_added == 0){
|
- |
|
198 |
for($i=0;$i<$default_vals["$key"]['count'];$i++){
|
- |
|
199 |
$vals[] = $default_vals["$key"][$i];
|
- |
|
200 |
$ops[] = $default_vals["$key"]['operator'][$i];
|
- |
|
201 |
}
|
- |
|
202 |
}
|
- |
|
203 |
if (isset($add) && $add && $name == $add_attr){
|
- |
|
204 |
$vals[] = $default_vals["$key"][0];
|
- |
|
205 |
$ops[] = ($default_vals["$key"]['operator'][0] != '') ? $default_vals["$key"]['operator'][0] : '=';
|
- |
|
206 |
}
|
- |
|
207 |
|
- |
|
208 |
$i = 0;
|
- |
|
209 |
foreach($vals as $val){
|
- |
|
210 |
$name1 = $name . $i;
|
- |
|
211 |
$val = preg_replace('/\"/','"',$val);
|
- |
|
212 |
$oper_name = $name1 . '_op';
|
- |
|
213 |
$oper = $ops[$i];
|
- |
|
214 |
$selected[$oper] = 'selected';
|
- |
|
215 |
$i++;
|
- |
|
216 |
switch ($key)
|
- |
|
217 |
{
|
- |
|
218 |
// $advanced = 1 : champs de saisie amélioré (calendrier, convertisseur, etc.)
|
- |
|
219 |
case 'Simultaneous-Use' :
|
- |
|
220 |
$advanced=1;
|
- |
|
221 |
$help_link="help/simultaneous_use_help.html";
|
- |
|
222 |
$desc=$l_simultaneous_use;
|
- |
|
223 |
break;
|
- |
|
224 |
case 'Max-All-Session' :
|
- |
|
225 |
$advanced=1;
|
- |
|
226 |
$help_link="help/max_all_session_help.html";
|
- |
|
227 |
$desc=$l_max_all_session;
|
- |
|
228 |
break;
|
- |
|
229 |
case 'Session-Timeout' :
|
- |
|
230 |
$advanced=1;
|
- |
|
231 |
$help_link="help/session_timeout_help.html";
|
- |
|
232 |
$desc=$l_session_timeout;
|
- |
|
233 |
break;
|
- |
|
234 |
case 'Max-Daily-Session' :
|
- |
|
235 |
$advanced=1;
|
- |
|
236 |
$help_link="help/session_timeout_help.html";
|
- |
|
237 |
$desc=$l_daily_timeout;
|
- |
|
238 |
break;
|
- |
|
239 |
case 'Max-Monthly-Session' :
|
- |
|
240 |
$advanced=1;
|
- |
|
241 |
$help_link="help/session_timeout_help.html";
|
- |
|
242 |
$desc=$l_monthly_timeout;
|
- |
|
243 |
break;
|
- |
|
244 |
case 'Login-Time' :
|
- |
|
245 |
$advanced=1;
|
- |
|
246 |
$help_link="help/login_time_help.html";
|
- |
|
247 |
$desc=$l_login_time;
|
- |
|
248 |
break;
|
- |
|
249 |
case 'Expiration' :
|
- |
|
250 |
$advanced=1;
|
- |
|
251 |
$help_link="help/expiration_help.html";
|
- |
|
252 |
$desc=$l_expiration;
|
- |
|
253 |
break;
|
- |
|
254 |
case 'ChilliSpot-Max-Input-Octets' :
|
- |
|
255 |
$advanced=1;
|
- |
|
256 |
$help_link="help/chillispot_max_input_octets_help.html";
|
- |
|
257 |
$desc=$l_max_input_octets;
|
- |
|
258 |
break;
|
- |
|
259 |
case 'ChilliSpot-Max-Output-Octets' :
|
- |
|
260 |
$advanced=1;
|
- |
|
261 |
$help_link="help/chillispot_max_output_octets_help.html";
|
- |
|
262 |
$desc=$l_max_output_octets;
|
- |
|
263 |
break;
|
- |
|
264 |
case 'ChilliSpot-Max-Total-Octets' :
|
- |
|
265 |
$advanced=1;
|
- |
|
266 |
$help_link="help/chillispot_max_total_octets_help.html";
|
- |
|
267 |
$desc=$l_max_total_octets;
|
- |
|
268 |
break;
|
- |
|
269 |
case 'ChilliSpot-Bandwidth-Max-Up' :
|
- |
|
270 |
$advanced=1;
|
- |
|
271 |
$help_link="help/chillispot_bandwidth_max_up_help.html";
|
- |
|
272 |
$desc=$l_max_bandwidth_up;
|
- |
|
273 |
break;
|
- |
|
274 |
case 'ChilliSpot-Bandwidth-Max-Down' :
|
- |
|
275 |
$advanced=1;
|
- |
|
276 |
$help_link="help/chillispot_bandwidth_max_down_help.html";
|
- |
|
277 |
$desc=$l_max_bandwidth_down;
|
- |
|
278 |
break;
|
- |
|
279 |
case 'WISPr-Redirection-URL' :
|
- |
|
280 |
$advanced=1;
|
- |
|
281 |
$help_link="help/wispr_redirection_url_help.html";
|
- |
|
282 |
$desc=$l_wispr_redirection;
|
- |
|
283 |
break;
|
- |
|
284 |
case 'Filter-Id' :
|
- |
|
285 |
$advanced=1;
|
- |
|
286 |
$help_link="help/filtering_help.html";
|
- |
|
287 |
$desc=$l_filtering;
|
- |
|
288 |
break;
|
- |
|
289 |
default:
|
- |
|
290 |
$advanced=1;
|
- |
|
291 |
break;
|
- |
|
292 |
}
|
- |
|
293 |
print <<<EOM
|
- |
|
294 |
<tr>
|
- |
|
295 |
<td class="etiquette">
|
- |
|
296 |
<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>
|
- |
|
297 |
EOM;
|
- |
|
298 |
if ($show_ops){
|
- |
|
299 |
if(!isset($selected[$op_eq])) $selected[$op_eq] = '';
|
- |
|
300 |
switch ($key)
|
- |
|
301 |
{
|
- |
|
302 |
case 'Simultaneous-Use' :
|
- |
|
303 |
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;
|
- |
|
305 |
case 'Login-Time' :
|
- |
|
306 |
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;
|
- |
|
308 |
case 'Expiration' :
|
- |
|
309 |
if($login == "sms" && $user_type == 'group'){
|
- |
|
310 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20 disabled></td>";
|
- |
|
311 |
} else {
|
- |
|
312 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input id=\"popup_container\" type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
- |
|
313 |
}
|
- |
|
314 |
break;
|
- |
|
315 |
case 'Max-All-Session' :
|
- |
|
316 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
- |
|
317 |
break;
|
- |
|
318 |
case 'Session-Timeout' :
|
- |
|
319 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
- |
|
320 |
break;
|
- |
|
321 |
case 'Max-Daily-Session' :
|
- |
|
322 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
- |
|
323 |
break;
|
- |
|
324 |
case 'Max-Weekly-Session' :
|
- |
|
325 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
- |
|
326 |
break;
|
- |
|
327 |
case 'Max-Monthly-Session' :
|
- |
|
328 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
- |
|
329 |
break;
|
- |
|
330 |
case 'ChilliSpot-Max-Input-Octets' :
|
- |
|
331 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
- |
|
332 |
break;
|
- |
|
333 |
case 'ChilliSpot-Max-Output-Octets' :
|
- |
|
334 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
- |
|
335 |
break;
|
- |
|
336 |
case 'ChilliSpot-Max-Total-Octets' :
|
- |
|
337 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
- |
|
338 |
break;
|
- |
|
339 |
case 'ChilliSpot-Bandwidth-Max-Up' :
|
- |
|
340 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
- |
|
341 |
break;
|
- |
|
342 |
case 'ChilliSpot-Bandwidth-Max-Down' :
|
- |
|
343 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
- |
|
344 |
break;
|
- |
|
345 |
case 'WISPr-Redirection-URL' :
|
- |
|
346 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
- |
|
347 |
break;
|
- |
|
348 |
case 'Filter-Id' :
|
- |
|
349 |
switch($val)
|
- |
|
350 |
{
|
- |
|
351 |
case "00000001":
|
- |
|
352 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"00000000\">$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>";
|
- |
|
353 |
break;
|
- |
|
354 |
case "00000011":
|
- |
|
355 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"00000000\">$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>";
|
- |
|
356 |
break;
|
- |
|
357 |
case "00000101":
|
- |
|
358 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"00000000\">$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>";
|
- |
|
359 |
break;
|
- |
|
360 |
default :
|
- |
|
361 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"00000000\" 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>";
|
- |
|
362 |
break;
|
- |
|
363 |
}
|
- |
|
364 |
break;
|
- |
|
365 |
default :
|
- |
|
366 |
print <<<EOM
|
- |
|
367 |
<td>
|
- |
|
368 |
<select name=$oper_name>
|
- |
|
369 |
<option $selected[$op_eq] value="=">=
|
- |
|
370 |
<option $selected[$op_set] value=":=">:=
|
- |
|
371 |
<option $selected[$op_add] value="+=">+=
|
- |
|
372 |
<option $selected[$op_eq2] value="==">==
|
- |
|
373 |
<option $selected[$op_ne] value="!=">!=
|
- |
|
374 |
<option $selected[$op_gt] value=">">>
|
- |
|
375 |
<option $selected[$op_ge] value=">=">>=
|
- |
|
376 |
<option $selected[$op_lt] value="<"><
|
- |
|
377 |
<option $selected[$op_le] value="<="><=
|
- |
|
378 |
<option $selected[$op_regeq] value="=~">=~
|
- |
|
379 |
<option $selected[$op_regne] value="!~">!~
|
- |
|
380 |
<option $selected[$op_exst] value="=*">=*
|
- |
|
381 |
<option $selected[$op_nexst] value="!*">!*
|
- |
|
382 |
</select>
|
- |
|
383 |
</td>
|
- |
|
384 |
<td><input type=text name="$name1" value="$val" size=20></td>
|
- |
|
385 |
EOM;
|
- |
|
386 |
break;
|
- |
|
387 |
}
|
- |
|
388 |
}
|
- |
|
389 |
print <<<EOM
|
- |
|
390 |
</tr>
|
- |
|
391 |
EOM;
|
- |
|
392 |
}
|
- |
|
393 |
}
|
- |
|
394 |
|
- |
|
395 |
|
- |
|
396 |
}
|
- |
|
397 |
|
- |
|
398 |
|
142 |
?>
|
399 |
?>
|
143 |
<form name="edituser" method=post>
|
400 |
<form name="edituser" method=post>
|
144 |
<input type=hidden name=login value=<?php print $login ?>>
|
401 |
<input type=hidden name=login value=<?php print $login ?>>
|
145 |
<input type=hidden name=user_type value=<?php print $user_type ?>>
|
402 |
<input type=hidden name=user_type value=<?php print $user_type ?>>
|
146 |
<input type=hidden name=change value="0">
|
403 |
<input type=hidden name=change value="0">
|
147 |
<input type=hidden name=add value="0">
|
404 |
<input type=hidden name=add value="0">
|
148 |
<input type=hidden name=badusers value="0">
|
405 |
<input type=hidden name=badusers value="0">
|
149 |
<input type=hidden name=group_change value="0">
|
406 |
<input type=hidden name=group_change value="0">
|
150 |
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
|
407 |
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
|
151 |
<?php
|
408 |
<?php
|
152 |
if ($user_type != 'group' && $config['general_show_user_password'] != 'no'){
|
409 |
if ($user_type != 'group' && $config['general_show_user_password'] != 'no'){
|
153 |
echo <<<EOM
|
410 |
echo <<<EOM
|
154 |
<tr>
|
411 |
<tr>
|
155 |
<td align=right colspan=$colspan bgcolor="#d0ddb0">
|
412 |
<td align=right colspan=$colspan bgcolor="#d0ddb0">
|
156 |
$l_new_password<br>
|
413 |
$l_new_password<br>
|
157 |
EOM;
|
414 |
EOM;
|
158 |
echo <<<EOM
|
415 |
echo <<<EOM
|
159 |
</td>
|
416 |
</td>
|
160 |
<td>
|
417 |
<td>
|
161 |
<input type=password name=passwd value="" size=20>
|
418 |
<input type=password name=passwd value="" size=20>
|
162 |
<br /><input type="button" value="$l_passwd_gen" onclick="password(8)">
|
419 |
<br /><input type="button" value="$l_passwd_gen" onclick="password(8)">
|
163 |
<input type="text" value="" name="pwdgene" size=10 readonly>
|
420 |
<input type="text" value="" name="pwdgene" size=10 readonly>
|
164 |
</td>
|
421 |
</td>
|
165 |
</tr>
|
422 |
</tr>
|
166 |
EOM;
|
423 |
EOM;
|
167 |
}
|
424 |
}
|
168 |
//si l'utilisateur fait parti d'un groupe, on charge les attributs du groupe, pour les afficher ensuite.
|
- |
|
169 |
if(isset($member_groups[0]))
|
- |
|
170 |
{
|
- |
|
171 |
$group = $member_groups[0];
|
- |
|
172 |
$login_saved = $login;
|
- |
|
173 |
$login = $member_groups[0];
|
- |
|
174 |
include("../lib/sql/group_info.php");
|
- |
|
175 |
$login = $login_saved;
|
- |
|
176 |
|
- |
|
177 |
}
|
- |
|
178 |
|
425 |
|
- |
|
426 |
/*on charge les attributs utilisateurs afin de montrer les groupes disponibles*/
|
- |
|
427 |
if ($user_type != 'group'){
|
- |
|
428 |
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
|
- |
|
429 |
include("../lib/$config[general_lib_type]/user_info.php");
|
- |
|
430 |
if ($config['general_lib_type'] == 'sql' && $config['sql_show_all_groups'] == 'true'){
|
- |
|
431 |
$saved_login = $login;
|
- |
|
432 |
$login = '';
|
- |
|
433 |
if (is_file("../lib/sql/group_info.php"))
|
- |
|
434 |
include("../lib/sql/group_info.php");
|
- |
|
435 |
$login = $saved_login;
|
- |
|
436 |
}
|
- |
|
437 |
}
|
179 |
|
438 |
|
180 |
foreach($show_attrs as $key => $desc){
|
439 |
foreach($show_attrs as $key => $desc){
|
181 |
$name = $attrmap["$key"];
|
440 |
$name = $attrmap["$key"];
|
182 |
$generic = (isset($attrmap['generic']["$key"])) ? $attrmap['generic']["$key"] : '';
|
441 |
$generic = (isset($attrmap['generic']["$key"])) ? $attrmap['generic']["$key"] : '';
|
183 |
if ($name == 'none')
|
442 |
if ($name == 'none')
|
184 |
continue;
|
443 |
continue;
|
185 |
unset($vals);
|
444 |
unset($vals);
|
186 |
unset($selected);
|
445 |
unset($selected);
|
187 |
unset($ops);
|
446 |
unset($ops);
|
188 |
$def_added = 0;
|
447 |
$def_added = 0;
|
189 |
if (isset($item_vals["$key"]['count']) && $item_vals["$key"]['count']){
|
448 |
if (isset($item_vals["$key"]['count']) && $item_vals["$key"]['count']){
|
190 |
for($i=0;$i<$item_vals["$key"]['count'];$i++){
|
449 |
for($i=0;$i<$item_vals["$key"]['count'];$i++){
|
191 |
$vals[] = $item_vals["$key"][$i];
|
450 |
$vals[] = $item_vals["$key"][$i];
|
192 |
$ops[] = $item_vals["$key"]['operator'][$i];
|
451 |
$ops[] = $item_vals["$key"]['operator'][$i];
|
193 |
}
|
452 |
}
|
194 |
}
|
453 |
}
|
195 |
else{
|
454 |
else{
|
196 |
if (isset($default_vals["$key"]['count']) && $default_vals["$key"]['count']){
|
455 |
if (isset($default_vals["$key"]['count']) && $default_vals["$key"]['count']){
|
197 |
for($i=0;$i<$default_vals["$key"]['count'];$i++){
|
456 |
for($i=0;$i<$default_vals["$key"]['count'];$i++){
|
198 |
$vals[] = $default_vals["$key"][$i];
|
457 |
$vals[] = $default_vals["$key"][$i];
|
199 |
$ops[] = $default_vals["$key"]['operator'][$i];
|
458 |
$ops[] = $default_vals["$key"]['operator'][$i];
|
200 |
}
|
459 |
}
|
201 |
}
|
460 |
}
|
202 |
else{
|
461 |
else{
|
203 |
$vals[] = '';
|
462 |
$vals[] = '';
|
204 |
$ops[] = '=';
|
463 |
$ops[] = '=';
|
205 |
}
|
464 |
}
|
206 |
$def_added = 1;
|
465 |
$def_added = 1;
|
207 |
}
|
466 |
}
|
208 |
if ($generic == 'generic' && $def_added == 0){
|
467 |
if ($generic == 'generic' && $def_added == 0){
|
209 |
for($i=0;$i<$default_vals["$key"]['count'];$i++){
|
468 |
for($i=0;$i<$default_vals["$key"]['count'];$i++){
|
210 |
$vals[] = $default_vals["$key"][$i];
|
469 |
$vals[] = $default_vals["$key"][$i];
|
211 |
$ops[] = $default_vals["$key"]['operator'][$i];
|
470 |
$ops[] = $default_vals["$key"]['operator'][$i];
|
212 |
}
|
471 |
}
|
213 |
}
|
472 |
}
|
214 |
if (isset($add) && $add && $name == $add_attr){
|
473 |
if (isset($add) && $add && $name == $add_attr){
|
215 |
$vals[] = $default_vals["$key"][0];
|
474 |
$vals[] = $default_vals["$key"][0];
|
216 |
$ops[] = ($default_vals["$key"]['operator'][0] != '') ? $default_vals["$key"]['operator'][0] : '=';
|
475 |
$ops[] = ($default_vals["$key"]['operator'][0] != '') ? $default_vals["$key"]['operator'][0] : '=';
|
217 |
}
|
476 |
}
|
218 |
|
477 |
|
219 |
$i = 0;
|
478 |
$i = 0;
|
220 |
foreach($vals as $val){
|
479 |
foreach($vals as $val){
|
221 |
$name1 = $name . $i;
|
480 |
$name1 = $name . $i;
|
222 |
$val = preg_replace('/\"/','"',$val);
|
481 |
$val = preg_replace('/\"/','"',$val);
|
223 |
$oper_name = $name1 . '_op';
|
482 |
$oper_name = $name1 . '_op';
|
224 |
$oper = $ops[$i];
|
483 |
$oper = $ops[$i];
|
225 |
$selected[$oper] = 'selected';
|
484 |
$selected[$oper] = 'selected';
|
226 |
$i++;
|
485 |
$i++;
|
227 |
switch ($key)
|
486 |
switch ($key)
|
228 |
{
|
487 |
{
|
229 |
// $advanced = 1 : champs de saisie amélioré (calendrier, convertisseur, etc.)
|
488 |
// $advanced = 1 : champs de saisie amélioré (calendrier, convertisseur, etc.)
|
230 |
case 'Simultaneous-Use' :
|
489 |
case 'Simultaneous-Use' :
|
231 |
$advanced=1;
|
490 |
$advanced=1;
|
232 |
$help_link="help/simultaneous_use_help.html";
|
491 |
$help_link="help/simultaneous_use_help.html";
|
233 |
$desc=$l_simultaneous_use;
|
492 |
$desc=$l_simultaneous_use;
|
234 |
break;
|
493 |
break;
|
235 |
case 'Max-All-Session' :
|
494 |
case 'Max-All-Session' :
|
236 |
$advanced=1;
|
495 |
$advanced=1;
|
237 |
$help_link="help/max_all_session_help.html";
|
496 |
$help_link="help/max_all_session_help.html";
|
238 |
$desc=$l_max_all_session;
|
497 |
$desc=$l_max_all_session;
|
239 |
break;
|
498 |
break;
|
240 |
case 'Session-Timeout' :
|
499 |
case 'Session-Timeout' :
|
241 |
$advanced=1;
|
500 |
$advanced=1;
|
242 |
$help_link="help/session_timeout_help.html";
|
501 |
$help_link="help/session_timeout_help.html";
|
243 |
$desc=$l_session_timeout;
|
502 |
$desc=$l_session_timeout;
|
244 |
break;
|
503 |
break;
|
245 |
case 'Max-Daily-Session' :
|
504 |
case 'Max-Daily-Session' :
|
246 |
$advanced=1;
|
505 |
$advanced=1;
|
247 |
$help_link="help/session_timeout_help.html";
|
506 |
$help_link="help/session_timeout_help.html";
|
248 |
$desc=$l_daily_timeout;
|
507 |
$desc=$l_daily_timeout;
|
249 |
break;
|
508 |
break;
|
250 |
case 'Max-Monthly-Session' :
|
509 |
case 'Max-Monthly-Session' :
|
251 |
$advanced=1;
|
510 |
$advanced=1;
|
252 |
$help_link="help/session_timeout_help.html";
|
511 |
$help_link="help/session_timeout_help.html";
|
253 |
$desc=$l_monthly_timeout;
|
512 |
$desc=$l_monthly_timeout;
|
254 |
break;
|
513 |
break;
|
255 |
case 'Login-Time' :
|
514 |
case 'Login-Time' :
|
256 |
$advanced=1;
|
515 |
$advanced=1;
|
257 |
$help_link="help/login_time_help.html";
|
516 |
$help_link="help/login_time_help.html";
|
258 |
$desc=$l_login_time;
|
517 |
$desc=$l_login_time;
|
259 |
break;
|
518 |
break;
|
260 |
case 'Expiration' :
|
519 |
case 'Expiration' :
|
261 |
$advanced=1;
|
520 |
$advanced=1;
|
262 |
$help_link="help/expiration_help.html";
|
521 |
$help_link="help/expiration_help.html";
|
263 |
$desc=$l_expiration;
|
522 |
$desc=$l_expiration;
|
264 |
break;
|
523 |
break;
|
265 |
case 'ChilliSpot-Max-Input-Octets' :
|
524 |
case 'ChilliSpot-Max-Input-Octets' :
|
266 |
$advanced=1;
|
525 |
$advanced=1;
|
267 |
$help_link="help/chillispot_max_input_octets_help.html";
|
526 |
$help_link="help/chillispot_max_input_octets_help.html";
|
268 |
$desc=$l_max_input_octets;
|
527 |
$desc=$l_max_input_octets;
|
269 |
break;
|
528 |
break;
|
270 |
case 'ChilliSpot-Max-Output-Octets' :
|
529 |
case 'ChilliSpot-Max-Output-Octets' :
|
271 |
$advanced=1;
|
530 |
$advanced=1;
|
272 |
$help_link="help/chillispot_max_output_octets_help.html";
|
531 |
$help_link="help/chillispot_max_output_octets_help.html";
|
273 |
$desc=$l_max_output_octets;
|
532 |
$desc=$l_max_output_octets;
|
274 |
break;
|
533 |
break;
|
275 |
case 'ChilliSpot-Max-Total-Octets' :
|
534 |
case 'ChilliSpot-Max-Total-Octets' :
|
276 |
$advanced=1;
|
535 |
$advanced=1;
|
277 |
$help_link="help/chillispot_max_total_octets_help.html";
|
536 |
$help_link="help/chillispot_max_total_octets_help.html";
|
278 |
$desc=$l_max_total_octets;
|
537 |
$desc=$l_max_total_octets;
|
279 |
break;
|
538 |
break;
|
280 |
case 'ChilliSpot-Bandwidth-Max-Up' :
|
539 |
case 'ChilliSpot-Bandwidth-Max-Up' :
|
281 |
$advanced=1;
|
540 |
$advanced=1;
|
282 |
$help_link="help/chillispot_bandwidth_max_up_help.html";
|
541 |
$help_link="help/chillispot_bandwidth_max_up_help.html";
|
283 |
$desc=$l_max_bandwidth_up;
|
542 |
$desc=$l_max_bandwidth_up;
|
284 |
break;
|
543 |
break;
|
285 |
case 'ChilliSpot-Bandwidth-Max-Down' :
|
544 |
case 'ChilliSpot-Bandwidth-Max-Down' :
|
286 |
$advanced=1;
|
545 |
$advanced=1;
|
287 |
$help_link="help/chillispot_bandwidth_max_down_help.html";
|
546 |
$help_link="help/chillispot_bandwidth_max_down_help.html";
|
288 |
$desc=$l_max_bandwidth_down;
|
547 |
$desc=$l_max_bandwidth_down;
|
289 |
break;
|
548 |
break;
|
290 |
case 'WISPr-Redirection-URL' :
|
549 |
case 'WISPr-Redirection-URL' :
|
291 |
$advanced=1;
|
550 |
$advanced=1;
|
292 |
$help_link="help/wispr_redirection_url_help.html";
|
551 |
$help_link="help/wispr_redirection_url_help.html";
|
293 |
$desc=$l_wispr_redirection;
|
552 |
$desc=$l_wispr_redirection;
|
294 |
break;
|
553 |
break;
|
295 |
case 'Filter-Id' :
|
554 |
case 'Filter-Id' :
|
296 |
$advanced=1;
|
555 |
$advanced=1;
|
297 |
$help_link="help/filtering_help.html";
|
556 |
$help_link="help/filtering_help.html";
|
298 |
$desc=$l_filtering;
|
557 |
$desc=$l_filtering;
|
299 |
break;
|
558 |
break;
|
300 |
default:
|
559 |
default:
|
301 |
$advanced=1;
|
560 |
$advanced=1;
|
302 |
break;
|
561 |
break;
|
303 |
}
|
562 |
}
|
304 |
print <<<EOM
|
563 |
print <<<EOM
|
305 |
<tr>
|
564 |
<tr>
|
306 |
<td class="etiquette">
|
565 |
<td class="etiquette">
|
307 |
<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>
|
566 |
<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>
|
308 |
EOM;
|
567 |
EOM;
|
309 |
if ($show_ops){
|
568 |
if ($show_ops){
|
310 |
if(!isset($selected[$op_eq])) $selected[$op_eq] = '';
|
569 |
if(!isset($selected[$op_eq])) $selected[$op_eq] = '';
|
311 |
switch ($key)
|
570 |
switch ($key)
|
312 |
{
|
571 |
{
|
313 |
case 'Simultaneous-Use' :
|
572 |
case 'Simultaneous-Use' :
|
314 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
573 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
315 |
break;
|
574 |
break;
|
316 |
case 'Login-Time' :
|
575 |
case 'Login-Time' :
|
317 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
576 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
318 |
break;
|
577 |
break;
|
319 |
case 'Expiration' :
|
578 |
case 'Expiration' :
|
320 |
if($login == "sms" && $user_type == 'group'){
|
579 |
if($login == "sms" && $user_type == 'group'){
|
321 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20 disabled></td>";
|
580 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20 disabled></td>";
|
322 |
} else {
|
581 |
} else {
|
323 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input id=\"popup_container\" type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
582 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input id=\"popup_container\" type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
324 |
}
|
583 |
}
|
325 |
break;
|
584 |
break;
|
326 |
case 'Max-All-Session' :
|
585 |
case 'Max-All-Session' :
|
327 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
586 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
328 |
break;
|
587 |
break;
|
329 |
case 'Session-Timeout' :
|
588 |
case 'Session-Timeout' :
|
330 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
589 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
331 |
break;
|
590 |
break;
|
332 |
case 'Max-Daily-Session' :
|
591 |
case 'Max-Daily-Session' :
|
333 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
592 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
334 |
break;
|
593 |
break;
|
335 |
case 'Max-Weekly-Session' :
|
594 |
case 'Max-Weekly-Session' :
|
336 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
595 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
337 |
break;
|
596 |
break;
|
338 |
case 'Max-Monthly-Session' :
|
597 |
case 'Max-Monthly-Session' :
|
339 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
598 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
340 |
break;
|
599 |
break;
|
341 |
case 'ChilliSpot-Max-Input-Octets' :
|
600 |
case 'ChilliSpot-Max-Input-Octets' :
|
342 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
601 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
343 |
break;
|
602 |
break;
|
344 |
case 'ChilliSpot-Max-Output-Octets' :
|
603 |
case 'ChilliSpot-Max-Output-Octets' :
|
345 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
604 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
346 |
break;
|
605 |
break;
|
347 |
case 'ChilliSpot-Max-Total-Octets' :
|
606 |
case 'ChilliSpot-Max-Total-Octets' :
|
348 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
607 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
349 |
break;
|
608 |
break;
|
350 |
case 'ChilliSpot-Bandwidth-Max-Up' :
|
609 |
case 'ChilliSpot-Bandwidth-Max-Up' :
|
351 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
610 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
352 |
break;
|
611 |
break;
|
353 |
case 'ChilliSpot-Bandwidth-Max-Down' :
|
612 |
case 'ChilliSpot-Bandwidth-Max-Down' :
|
354 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
613 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
355 |
break;
|
614 |
break;
|
356 |
case 'WISPr-Redirection-URL' :
|
615 |
case 'WISPr-Redirection-URL' :
|
357 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
616 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
358 |
break;
|
617 |
break;
|
359 |
case 'Filter-Id' :
|
618 |
case 'Filter-Id' :
|
360 |
switch($val)
|
619 |
switch($val)
|
361 |
{
|
620 |
{
|
362 |
case "00000001":
|
621 |
case "00000001":
|
363 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"00000000\">$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>";
|
622 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"00000000\">$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>";
|
364 |
break;
|
623 |
break;
|
365 |
case "00000011":
|
624 |
case "00000011":
|
366 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"00000000\">$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>";
|
625 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"00000000\">$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>";
|
367 |
break;
|
626 |
break;
|
368 |
case "00000101":
|
627 |
case "00000101":
|
369 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"00000000\">$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>";
|
628 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"00000000\">$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>";
|
370 |
break;
|
629 |
break;
|
371 |
default :
|
630 |
default :
|
372 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"00000000\" 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>";
|
631 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"00000000\" 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>";
|
373 |
break;
|
632 |
break;
|
374 |
}
|
633 |
}
|
375 |
break;
|
634 |
break;
|
376 |
default :
|
635 |
default :
|
377 |
print <<<EOM
|
636 |
print <<<EOM
|
378 |
<td>
|
637 |
<td>
|
379 |
<select name=$oper_name>
|
638 |
<select name=$oper_name>
|
380 |
<option $selected[$op_eq] value="=">=
|
639 |
<option $selected[$op_eq] value="=">=
|
381 |
<option $selected[$op_set] value=":=">:=
|
640 |
<option $selected[$op_set] value=":=">:=
|
382 |
<option $selected[$op_add] value="+=">+=
|
641 |
<option $selected[$op_add] value="+=">+=
|
383 |
<option $selected[$op_eq2] value="==">==
|
642 |
<option $selected[$op_eq2] value="==">==
|
384 |
<option $selected[$op_ne] value="!=">!=
|
643 |
<option $selected[$op_ne] value="!=">!=
|
385 |
<option $selected[$op_gt] value=">">>
|
644 |
<option $selected[$op_gt] value=">">>
|
386 |
<option $selected[$op_ge] value=">=">>=
|
645 |
<option $selected[$op_ge] value=">=">>=
|
387 |
<option $selected[$op_lt] value="<"><
|
646 |
<option $selected[$op_lt] value="<"><
|
388 |
<option $selected[$op_le] value="<="><=
|
647 |
<option $selected[$op_le] value="<="><=
|
389 |
<option $selected[$op_regeq] value="=~">=~
|
648 |
<option $selected[$op_regeq] value="=~">=~
|
390 |
<option $selected[$op_regne] value="!~">!~
|
649 |
<option $selected[$op_regne] value="!~">!~
|
391 |
<option $selected[$op_exst] value="=*">=*
|
650 |
<option $selected[$op_exst] value="=*">=*
|
392 |
<option $selected[$op_nexst] value="!*">!*
|
651 |
<option $selected[$op_nexst] value="!*">!*
|
393 |
</select>
|
652 |
</select>
|
394 |
</td>
|
653 |
</td>
|
395 |
<td><input type=text name="$name1" value="$val" size=20></td>
|
654 |
<td><input type=text name="$name1" value="$val" size=20></td>
|
396 |
EOM;
|
655 |
EOM;
|
397 |
break;
|
656 |
break;
|
398 |
}
|
657 |
}
|
399 |
}
|
658 |
}
|
400 |
print <<<EOM
|
659 |
print <<<EOM
|
401 |
</tr>
|
660 |
</tr>
|
402 |
EOM;
|
661 |
EOM;
|
403 |
}
|
662 |
}
|
404 |
}
|
663 |
}
|
405 |
if ($user_type != 'group'){
|
664 |
if ($user_type != 'group'){
|
406 |
echo <<<EOM
|
665 |
echo <<<EOM
|
407 |
<tr>
|
666 |
<tr>
|
408 |
<td align=right colspan=$colspan bgcolor="#d0ddb0">
|
667 |
<td align=right colspan=$colspan bgcolor="#d0ddb0">
|
409 |
$l_group_member<br><font size=-2><i>($l_main_group)</i></font>
|
668 |
$l_group_member<br><font size=-2><i>($l_main_group)</i></font>
|
410 |
</td>
|
669 |
</td>
|
411 |
<td>
|
670 |
<td>
|
412 |
EOM;
|
671 |
EOM;
|
413 |
|
672 |
|
414 |
|
673 |
|
415 |
|
- |
|
416 |
/*on charge les attributs utilisateurs afin de montrer les groupes disponibles*/
|
- |
|
417 |
if ($user_type != 'group'){
|
- |
|
418 |
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
|
- |
|
419 |
include("../lib/$config[general_lib_type]/user_info.php");
|
- |
|
420 |
if ($config['general_lib_type'] == 'sql' && $config['sql_show_all_groups'] == 'true'){
|
- |
|
421 |
$saved_login = $login;
|
- |
|
422 |
$login = '';
|
- |
|
423 |
if (is_file("../lib/sql/group_info.php"))
|
- |
|
424 |
include("../lib/sql/group_info.php");
|
- |
|
425 |
$login = $saved_login;
|
- |
|
426 |
}
|
- |
|
427 |
}
|
- |
|
428 |
|
- |
|
429 |
if (isset($existing_groups)){
|
674 |
if (isset($existing_groups)){
|
430 |
echo "<select size=5 name=\"edited_groups[]\" OnChange=\"this.form.group_change.value=1\">";
|
675 |
echo "<select size=5 name=\"edited_groups[]\" OnChange=\"this.form.group_change.value=1\">";
|
431 |
if ($config['sql_show_all_groups'] == 'true'){
|
676 |
if ($config['sql_show_all_groups'] == 'true'){
|
432 |
foreach ($existing_groups as $group => $count){
|
677 |
foreach ($existing_groups as $group => $count){
|
433 |
if (isset($member_groups[$group]) && ($member_groups[$group] == $group))
|
678 |
if (isset($member_groups[$group]) && ($member_groups[$group] == $group))
|
434 |
echo "<option selected value=\"$group\">$group\n";
|
679 |
echo "<option selected value=\"$group\">$group\n";
|
435 |
else if(isset($member_groups[0]) && ($member_groups[0] == $group))
|
680 |
else if(isset($member_groups[0]) && ($member_groups[0] == $group))
|
436 |
echo "<option selected value=\"$group\">$group\n";
|
681 |
echo "<option selected value=\"$group\">$group\n";
|
437 |
else
|
682 |
else
|
438 |
echo "<option value=\"$group\">$group\n";
|
683 |
echo "<option value=\"$group\">$group\n";
|
439 |
}
|
684 |
}
|
440 |
}else{
|
685 |
}else{
|
441 |
foreach ($member_groups as $group)
|
686 |
foreach ($member_groups as $group)
|
442 |
echo "<option value=\"$group\">$group\n";
|
687 |
echo "<option value=\"$group\">$group\n";
|
443 |
}
|
688 |
}
|
444 |
echo "</select></td></tr>";
|
689 |
echo "</select></td></tr>";
|
445 |
}
|
690 |
}
|
446 |
else{
|
691 |
else{
|
447 |
echo "Aucun groupe</td></tr>";
|
692 |
echo "Aucun groupe</td></tr>";
|
448 |
}
|
693 |
}
|
449 |
}
|
694 |
}
|
450 |
echo "</table><br>";
|
695 |
echo "</table><br>";
|
451 |
echo "<input type=submit class=button value=$l_change OnClick=\"this.form.change.value=1\">";
|
696 |
echo "<input type=submit class=button value=$l_change OnClick=\"this.form.change.value=1\">";
|
452 |
//if ($user_type != 'group'){
|
697 |
//if ($user_type != 'group'){
|
453 |
// echo <<<EOM
|
698 |
// echo <<<EOM
|
454 |
//<br><br>
|
699 |
//<br><br>
|
455 |
//<input type=submit class=button value="Add to Badusers" OnClick="this.form.badusers.value=1">
|
700 |
//<input type=submit class=button value="Add to Badusers" OnClick="this.form.badusers.value=1">
|
456 |
//<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"><--Help</font></a>
|
701 |
//<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"><--Help</font></a>
|
457 |
//EOM;
|
702 |
//EOM;
|
458 |
//}
|
703 |
//}
|
459 |
?>
|
704 |
?>
|
460 |
</form>
|
705 |
</form>
|
461 |
</td></tr>
|
706 |
</td></tr>
|
462 |
</table>
|
707 |
</table>
|
463 |
</tr>
|
708 |
</tr>
|
464 |
</table>
|
709 |
</table>
|
465 |
</td></tr>
|
710 |
</td></tr>
|
466 |
</TABLE>
|
711 |
</TABLE>
|
467 |
</body>
|
712 |
</body>
|
468 |
</html>
|
713 |
</html>
|
469 |
|
714 |
|
470 |
|
715 |
|