Line 1... |
Line 1... |
1 |
<?php
|
1 |
<?php
|
- |
|
2 |
//gestion de la langue
|
- |
|
3 |
$origine='user_new';
|
- |
|
4 |
if (is_file("../lib/langues.php"))
|
- |
|
5 |
include("../lib/langues.php");
|
2 |
require('/etc/freeradius-web/config.php');
|
6 |
require('/etc/freeradius-web/config.php');
|
3 |
?>
|
7 |
?>
|
4 |
<html>
|
8 |
<html>
|
5 |
<head>
|
9 |
<head>
|
6 |
<?php
|
10 |
<?php
|
Line 10... |
Line 14... |
10 |
|
14 |
|
11 |
if (is_file("../lib/$config[general_lib_type]/user_info.php")){
|
15 |
if (is_file("../lib/$config[general_lib_type]/user_info.php")){
|
12 |
include("../lib/$config[general_lib_type]/user_info.php");
|
16 |
include("../lib/$config[general_lib_type]/user_info.php");
|
13 |
if ($user_exists == 'no'){
|
17 |
if ($user_exists == 'no'){
|
14 |
echo <<<EOM
|
18 |
echo <<<EOM
|
15 |
<title>Page d'information d'utilisateur</title>
|
19 |
<title>User information page</title>
|
16 |
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
|
20 |
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
|
17 |
<link rel="stylesheet" href="/css/style.css">
|
21 |
<link rel="stylesheet" href="/css/style.css">
|
18 |
</head>
|
22 |
</head>
|
19 |
<body>
|
23 |
<body>
|
20 |
<center>
|
24 |
<center>
|
Line 32... |
Line 36... |
32 |
|
36 |
|
33 |
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
|
37 |
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
|
34 |
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
|
38 |
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
|
35 |
else{
|
39 |
else{
|
36 |
echo <<<EOM
|
40 |
echo <<<EOM
|
37 |
<title>Page d'information d'utilisateur</title>
|
41 |
<title>User information page</title>
|
38 |
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
|
42 |
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
|
39 |
<link rel="stylesheet" href="style.css">
|
43 |
<link rel="stylesheet" href="style.css">
|
40 |
</head>
|
44 |
</head>
|
41 |
<body>
|
45 |
<body>
|
42 |
<center>
|
46 |
<center>
|
Line 53... |
Line 57... |
53 |
$weekly_limit = ($weekly_limit) ? $weekly_limit : $config[counter_default_weekly];
|
57 |
$weekly_limit = ($weekly_limit) ? $weekly_limit : $config[counter_default_weekly];
|
54 |
$daily_limit = ($item_vals['Max-Daily-Session'][0] != '') ? $item_vals['Max-Daily-Session'][0] : $default_vals['Max-Daily-Session'][0];
|
58 |
$daily_limit = ($item_vals['Max-Daily-Session'][0] != '') ? $item_vals['Max-Daily-Session'][0] : $default_vals['Max-Daily-Session'][0];
|
55 |
$daily_limit = ($daily_limit) ? $daily_limit : $config[counter_default_daily];
|
59 |
$daily_limit = ($daily_limit) ? $daily_limit : $config[counter_default_daily];
|
56 |
$session_limit = ($item_vals['Session-Timeout'][0] != '') ? $item_vals['Session-Timeout'][0] : $default_vals['Session-Timeout'][0];
|
60 |
$session_limit = ($item_vals['Session-Timeout'][0] != '') ? $item_vals['Session-Timeout'][0] : $default_vals['Session-Timeout'][0];
|
57 |
$session_limit = ($session_limit) ? $session_limit : 'none';
|
61 |
$session_limit = ($session_limit) ? $session_limit : 'none';
|
- |
|
62 |
$total_limit = ($item_vals['Max-All-Session'][0] != '') ? $item_vals['Max-All-Session'][0] : $default_vals['Max-All-Session'][0];
|
- |
|
63 |
$total_limit = ($total_limit) ? $total_limit : 'none';
|
58 |
$remaining = 'unlimited time';
|
64 |
$remaining = 'unlimited time';
|
59 |
$log_color = 'green';
|
65 |
$log_color = 'green';
|
60 |
|
66 |
|
61 |
$now = time();
|
67 |
$now = time();
|
62 |
$week = $now - 604800;
|
68 |
$week = $now - 604800;
|
Line 288... |
Line 294... |
288 |
|
294 |
|
289 |
$monthly_limit = (is_numeric($monthly_limit)) ? time2str($monthly_limit) : $monthly_limit;
|
295 |
$monthly_limit = (is_numeric($monthly_limit)) ? time2str($monthly_limit) : $monthly_limit;
|
290 |
$weekly_limit = (is_numeric($weekly_limit)) ? time2str($weekly_limit) : $weekly_limit;
|
296 |
$weekly_limit = (is_numeric($weekly_limit)) ? time2str($weekly_limit) : $weekly_limit;
|
291 |
$daily_limit = (is_numeric($daily_limit)) ? time2str($daily_limit) : $daily_limit;
|
297 |
$daily_limit = (is_numeric($daily_limit)) ? time2str($daily_limit) : $daily_limit;
|
292 |
$session_limit = (is_numeric($session_limit)) ? time2str($session_limit) : $session_limit;
|
298 |
$session_limit = (is_numeric($session_limit)) ? time2str($session_limit) : $session_limit;
|
- |
|
299 |
$total_limit = (is_numeric($total_limit)) ? time2str($total_limit) : $total_limit;
|
293 |
$remaining = (is_numeric($remaining)) ? time2str($remaining) : $remaining;
|
300 |
$remaining = (is_numeric($remaining)) ? time2str($remaining) : $remaining;
|
294 |
|
301 |
|
295 |
if ($item_vals['Dialup-Access'][0] == 'FALSE' || (!isset($item_vals['Dialup-Access'][0]) && $attrmap['Dialup-Access'] != '' && $attrmap['Dialup-Access'] != 'none'))
|
302 |
if ($item_vals['Dialup-Access'][0] == 'FALSE' || (!isset($item_vals['Dialup-Access'][0]) && $attrmap['Dialup-Access'] != '' && $attrmap['Dialup-Access'] != 'none'))
|
296 |
$msg =<<<EON
|
303 |
$msg =<<<EON
|
297 |
<font color=red><b> Le compte de l'utilisateur est verrouillé </b></font>
|
304 |
<font color=red><b> $l_locked_user </b></font>
|
298 |
EON;
|
305 |
EON;
|
299 |
else
|
306 |
else
|
300 |
$msg =<<<EON
|
307 |
$msg =<<<EON
|
301 |
L'utilisateur peut s'identifier pendant <font color="$log_color"> <b>$remaining $extra_msg</font>
|
308 |
$l_user_remain_login<font color="$log_color"> <b>$remaining $extra_msg</b></font>
|
302 |
EON;
|
309 |
EON;
|
303 |
$lock_msg = $item_vals['Dialup-Lock-Msg'][0];
|
310 |
$lock_msg = $item_vals['Dialup-Lock-Msg'][0];
|
304 |
if ($lock_msg != '')
|
311 |
if ($lock_msg != '')
|
305 |
$descr =<<<EON
|
312 |
$descr =<<<EON
|
306 |
<font color=red><b>$lock_msg </b</font>
|
313 |
<font color=red><b>$lock_msg </b</font>
|
Line 313... |
Line 320... |
313 |
$expiration = $item_vals['Expiration'][0];
|
320 |
$expiration = $item_vals['Expiration'][0];
|
314 |
if ($expiration != ''){
|
321 |
if ($expiration != ''){
|
315 |
$expiration = strtotime($expiration);
|
322 |
$expiration = strtotime($expiration);
|
316 |
if ($expiration != -1 && $expiration < time())
|
323 |
if ($expiration != -1 && $expiration < time())
|
317 |
$descr = <<<EOM
|
324 |
$descr = <<<EOM
|
318 |
<font color=red><b>Le compte de l'utilisateur a expiré</b></font>
|
325 |
<font color=red><b>$l_user_expired</b></font>
|
319 |
EOM;
|
326 |
EOM;
|
320 |
}
|
327 |
}
|
321 |
|
328 |
|
322 |
require('../html/user_admin.html.php');
|
329 |
require('../html/user_admin.html.php');
|
323 |
?>
|
330 |
?>
|