47,6 → 47,9 |
$l_show = "Montrer"; |
$l_from = "Du"; |
$l_to = "au"; |
$l_server = "Serveur"; |
$l_login = "Identifiant"; |
$l_user_edit = "Éditer l'utilisateur"; |
} else { |
$l_title = "Statistics of users connexions"; |
$l_start_date = "Start date"; |
64,6 → 67,9 |
$l_show = "Show"; |
$l_from = "From"; |
$l_to = "to"; |
$l_server = "Server"; |
$l_login = "Login"; |
$l_user_edit = "Edit user"; |
} |
if (!isset($start) && !isset($stop)){ |
$now = time(); |
95,13 → 101,10 |
$l_from $start $l_to $stop |
</td></tr> |
<tr> |
<th>#</th><th>Identifiant</th><th>Date</th><th>Serveur</th><th>Nombres de connections</th><th>Durée des connections</th><th>Upload</th><th>Download</th><th>Serveur</th> |
<th>#</th><th>$l_login</th><th>Date</th><th>$l_server</th><th>$l_con_number</th><th>$l_con_length</th><th>Upload</th><th>Download</th> |
</tr> |
EOM; |
|
$pagesize = ($pagesize) ? $pagesize : 10; |
|
|
$selected[5] = ""; |
$selected[10] = ""; |
$selected[15] = ""; |
113,7 → 116,6 |
$selected['time'] = ""; |
$selected['asc'] = ""; |
$selected['desc'] = ""; |
|
if (!is_numeric($pagesize) && $pagesize != 'all') |
$pagezise = 10; |
if ($pagesize > 100) |
136,23 → 138,16 |
$server_str = ""; |
} |
$login_str = ($login) ? "AND username = '$login' " : ''; |
|
$selected[$order] = 'selected'; |
$selected[$sortby] = 'selected'; |
|
$sql_extra_query = ''; |
if (isset($config['sql_accounting_extra_query'])){ |
$sql_extra_query = xlat($config['sql_accounting_extra_query'],$login,$config); |
$sql_extra_query = da_sql_escape_string($link,$sql_extra_query); |
} |
|
unset($da_name_cache); |
if (isset($_SESSION['da_name_cache'])) |
$da_name_cache = $_SESSION['da_name_cache']; |
|
|
|
|
$link = @da_sql_pconnect($config); |
if ($link){ |
$num = 0; |
160,7 → 155,6 |
"SELECT " . da_sql_limit($limit,0,$config) . " * FROM $config[sql_total_accounting_table] |
WHERE acctdate >= '$start' AND acctdate <= '$stop' $server_str $login_str $sql_extra_query " . da_sql_limit($limit,1,$config) |
. " ORDER BY $order_attr $order " . da_sql_limit($limit,2,$config) . " ;"); |
|
if ($search){ |
while( $row = @da_sql_fetch_array($search,$config) ){ |
$num++; |
169,7 → 163,7 |
$acct_login = '-'; |
else{ |
$Acct_login = urlencode($acct_login); |
$acct_login = "<a href=\"user_admin.php?login=$Acct_login\" title=\"Editer l'utilisateur $acct_login\">$acct_login</a>"; |
$acct_login = "<a href=\"user_admin.php?login=$Acct_login\" title=\"$l_user_edit $acct_login\">$acct_login</a>"; |
} |
$acct_time = $row['conntotduration']; |
$acct_time = time2str($acct_time); |
200,18 → 194,15 |
<td>$acct_time</td> |
<td>$acct_upload</td> |
<td>$acct_download</td> |
<td>$acct_server</td> |
|
</tr> |
EOM; |
} |
} |
|
} |
echo <<<EOM |
</table> |
<tr><td> |
<hr> |
<table width="100%" border="1" cellspacing="0" cellpadding="0"> |
EOM; |
} |
else |