3,6 → 3,7 |
if (is_file("../lib/langues.php")) |
include("../lib/langues.php"); |
require('/etc/freeradius-web/config.php'); |
if(!isset($clear_sessions)) $clear_sessions = 0; |
if (is_file("../lib/$config[general_lib_type]/user_info.php")) |
include("../lib/$config[general_lib_type]/user_info.php"); |
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php")) |
32,7 → 33,7 |
<body> |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0"> |
<tr><th>$l_users_managment</th></tr> |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" |
height="2"></td></tr> |
</TABLE> |
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1> |
63,7 → 64,7 |
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top> |
<tr><td> |
EOM; |
|
|
if ($clear_sessions == 1) |
{ |
# close active sessions |
71,10 → 72,10 |
# delete open accounting sessions |
$now = time(); |
$today_now = date("Y-m-d H:i:s",$now); |
$link = @da_sql_pconnect($config); |
$link = da_sql_pconnect($config); |
if ($link) |
{ |
$res = @da_sql_query($link,$config, |
$res = da_sql_query($link,$config, |
"UPDATE $config[sql_accounting_table] SET acctstoptime = '$today_now', acctterminatecause='Admin-Reset' |
WHERE username='$login' AND acctstoptime IS NULL;"); |
if (! $res) |
85,13 → 86,13 |
} |
# Count of accounting open sessions (in database) |
$open_accnt_sessions = 0; |
$link = @da_sql_pconnect($config); |
$link = da_sql_pconnect($config); |
if ($link){ |
$search = @da_sql_query($link,$config, |
$search = da_sql_query($link,$config, |
"SELECT COUNT(*) AS counter FROM $config[sql_accounting_table] |
WHERE username = '$login' AND acctstoptime IS NULL;"); |
if ($search){ |
if ($row = @da_sql_fetch_array($search,$config)) |
if ($row = da_sql_fetch_array($search,$config)) |
$open_accnt_sessions = $row['counter']; |
} |
else |