Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2817 → Rev 2818

/web/acc/manager/htdocs/accounting.php
1,10 → 1,9
<!DOCTYPE html>
<?php
 
require('/etc/freeradius-web/config.php');
require('../lib/functions.php');
require('../lib/sql/functions.php');
require('../lib/acctshow.php');
 
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
11,8 → 10,8
echo <<<EOM
<html>
<head>
<title>G&eacute;n&eacute;rateur de rapports de comptes</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>$l_title</title>
<link rel="stylesheet" href="/css/acc.css">
</head>
<body>
23,6 → 22,16
EOM;
exit();
}
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]), 0, 2));
}
if ($Language === 'fr') {
$l_title = "Journal des connexions";
} else {
$l_title = "Connections log";
}
 
$operators=array( '=','<', '>', '<=', '>=', 'regexp', 'like' );
if ($config['sql_type'] == 'pg'){
30,10 → 39,7
}
$link = da_sql_pconnect ($config) or die('cannot connect to sql databse');
$fields = da_sql_list_fields($config['sql_accounting_table'],$link,$config);
 
 
unset($items);
 
while($row = $fields->fetch_array())
{
$key = strtolower($row[0]);
107,18 → 113,14
?>
<html>
<head>
<title>Journal des connexions</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config['general_charset']?>">
<link rel="stylesheet" href="/css/acc.css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?= $l_title ?></title>
<link rel="stylesheet" href="/css/acc.css">
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Journal des connexions</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2">
</td></tr>
</TABLE>
<TABLE width="100%" border="1" cellspacing="0" cellpadding="1">
<tr><td>
<div class="panel">
<div class="panel-header"><?= $l_title ?></div>
<div class="panel-row">
<?php
if(!isset($queryflag))
{
207,11 → 209,7
</tr>
</table>
</form>
</table>
</body>
</html>
EOM;
 
}
 
if ($queryflag == 1){
269,13 → 267,10
echo <<<EOM
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<p>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr bgcolor="#d0ddb0">
</tr>
<table border=1 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr bgcolor="#d0ddb0">
EOM;
 
 
foreach($accounting_show_attrs as $val){
$desc = $sql_attrs[$val]['desc'];
if($val == 'acctoutputoctets')
301,7 → 296,7
$info = '-';
if ($val == 'username'){
$Info = urlencode($info);
$info = "<a href=\"user_admin.php?login=$Info\" title=\"Edit user $info\">$info<a/>";
$info = "<a href=\"user_admin.php?login=$Info\" title=\"Edit user $info\">$info</a>";
}
echo <<<EOM
<td>$info</td>
312,15 → 307,14
}
else
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
echo <<<EOM
</table>
echo <<<EOM
</table>
</td></tr>
</table>
</td></tr>
</table>
</table>
</body>
</html>
</table>\n
EOM;
}
?>
</div>
</div>
</body>
</html>