Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 909 → Rev 910

/web/acc/manager/htdocs/user_accounting.php
1,19 → 1,24
<?php
//gestion de la langue
$origine='user_accounting';
if (is_file("../lib/langues.php"))
include("../lib/langues.php");
require('/etc/freeradius-web/config.php');
?>
<html>
<?php
require('../lib/functions.php');
require('../lib/sql/functions.php');
require('../lib/attrshow.php');
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"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo <<<EOM
<title>Analyse pour $login</title>
<html>
<head>
<title>$l_title</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<center>
48,14 → 53,15
 
 
echo <<<EOM
<html>
<head>
<title>Analyse pour $login</title>
<title>i$l_title</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Statistique des connexions</th></tr>
<tr><th>$l_frame_top</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
64,11 → 70,6
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center>
<table border=0 width=550 cellpadding=0 cellspacing=0>
<tr valign=top>
<!--<td align=center><img src="images/title2.gif"></td>-->
</tr>
</table>
<table border=0 width=400 cellpadding=0 cellspacing=2>
EOM;
 
83,7 → 84,7
<td bgcolor="black" width=35%>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Analyse pour $login</font>&nbsp;
<font color="white">$l_user : $login ($cn)</font>
</th></tr>
</table>
</td></tr>
90,18 → 91,17
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
Dates du <b>$prev_str</b> au <b>$now_str</b>
Dates : <b>$prev_str</b> to <b>$now_str</b>
EOM;
?>
 
<p>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr bgcolor="#d0ddb0">
<th>#</th>
<td><b>#</b></td>
<?php
for($i=1;$i<=9;$i++){
if ($acct_attrs['ua']["$i"] != '')
echo "<th>" . $acct_attrs['ua']["$i"] . "</th>\n";
if (($acct_attrs['ua']["$i"] != '') && ($acct_attrs['ua']["$i"] != 'server') && ($acct_attrs['ua']["$i"] != 'callerid'))
echo "<td><b>" . $acct_attrs['ua']["$i"] . "</b></td>\n";
}
$sql_extra_query = '';
if ($config[sql_accounting_extra_query] != '')
119,7 → 119,6
" ORDER BY acctstarttime $order " . da_sql_limit($limit,2,$config). " ;");
if ($search){
while( $row = @da_sql_fetch_array($search,$config) ){
$tr_color='white';
$num++;
$acct_type = "$row[framedprotocol]/$row[nasporttype]";
if ($acct_type == '')
158,12 → 157,11
$acct_terminate_cause = '-';
if (ereg('Login-Incorrect',$acct_terminate_cause) ||
ereg('Multiple-Logins', $acct_terminate_cause) || ereg('Invalid-User',$acct_terminate_cause))
$tr_color='#ffe8e0';
$acct_callerid = "$row[callingstationid]";
if ($acct_callerid == '')
$acct_callerid = '-';
echo <<<EOM
<tr align=center bgcolor="$tr_color">
<tr align=center>
<td>$num</td>
EOM;
if ($acct_attrs[ua][1] != '') echo "<td>$acct_type</td>\n";
172,9 → 170,9
if ($acct_attrs[ua][4] != '') echo "<td>$acct_ip</td>\n";
if ($acct_attrs[ua][5] != '') echo "<td>$acct_upload</td>\n";
if ($acct_attrs[ua][6] != '') echo "<td>$acct_download</td>\n";
if ($acct_attrs[ua][7] != '') echo "<td>$acct_server</td>\n";
// if ($acct_attrs[ua][7] != '') echo "<td>$acct_server</td>\n";
if ($acct_attrs[ua][8] != '') echo "<td>$acct_terminate_cause</td>\n";
if ($acct_attrs[ua][9] != '') echo "<td>$acct_callerid</td>\n";
// if ($acct_attrs[ua][9] != '') echo "<td>$acct_callerid</td>\n";
echo "</tr>\n";
}
$acct_sessiontime_sum = time2str($acct_sessiontime_sum);
192,16 → 190,16
if ($acct_attrs[ua][2] == '')
$colspan--;
echo <<<EOM
<tr bgcolor="lightyellow">
<td colspan=$colspan align="right">Total pages</td>
<tr bgcolor="lightyellow" align="center">
<td colspan=$colspan><b>Total</b></td>
EOM;
if ($acct_attrs[ua][3] != '') echo "<td align=\"center\"><b>$acct_sessiontime_sum</td>\n";
if ($acct_attrs[ua][3] != '') echo "<td><b>$acct_sessiontime_sum</td>\n";
if ($acct_attrs[ua][4] != '') echo "<td>&nbsp;</td>\n";
if ($acct_attrs[ua][5] != '') echo "<td align=\"right\" nowrap><b>$acct_upload_sum</td>\n";
if ($acct_attrs[ua][6] != '') echo "<td align=\"right\" nowrap><b>$acct_download_sum</td>\n";
if ($acct_attrs[ua][7] != '') echo "<td>&nbsp;</td>\n";
if ($acct_attrs[ua][5] != '') echo "<td><b>$acct_upload_sum</td>\n";
if ($acct_attrs[ua][6] != '') echo "<td><b>$acct_download_sum</td>\n";
// if ($acct_attrs[ua][7] != '') echo "<td>&nbsp;</td>\n";
if ($acct_attrs[ua][8] != '') echo "<td>&nbsp;</td>\n";
if ($acct_attrs[ua][9] != '') echo "<td>&nbsp;</td>\n";
// if ($acct_attrs[ua][9] != '') echo "<td>&nbsp;</td>\n";
?>
</tr>
</table>
213,7 → 211,7
<tr><td colspan=6></td>
</tr>
<tr valign="bottom">
<td><small><b>Utilisateur</td><td><small><b>d&eacute;but date</td><td><small><b>fin date</td><td><small><b>nbr./page</td><td><b>class&eacute; le</td>
<td><small><b><?php echo "$l_user";?></td><td><small><b>from</td><td><small><b>to</td><td><small><b>nbr./page</td><td><b>order</td>
<tr valign="middle"><td>
<?php
echo <<<EOM
231,8 → 229,8
</select>
</td>
<td><select name="order">
<option $selected[asc] value="asc">plus ancien en premier
<option $selected[desc] value="desc">plus r&eacute;cent en premier
<option $selected[asc] value="asc">older first
<option $selected[desc] value="desc">recent first
</select>
</td>
EOM;