Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2855 → Rev 2856

/web/acc/manager/htdocs/stats.php
2,37 → 2,63
# $Id$
 
require('/etc/freeradius-web/config.php');
require('../lib/functions.php');
require('../lib/sql/nas_list.php');
require_once('../lib/xlat.php');
?>
<!DOCTYPE html>
<html>
<head>
<title>Analyse des comptes</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?= $config['general_charset'] ?>">
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
 
<?php
require_once('../lib/functions.php');
 
# Choice of language
$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 = "Analyse journalière";
$l_sessions = "Sessions";
$l_usage = "temps d'utilisation total";
$l_uploads = "Données sortantes";
$l_downloads = "Données entrantes";
} else if($Language == 'es') {
$l_title = "SAnálisis diario";
$l_sessions = "sesiones";
$l_usage = "total usage time";
$l_uploads = "Datos de salida";
$l_downloads = "Datos entrantes";
} else {
$l_title = "Daily analysis";
$l_sessions = "Sessions";
$l_usage = "tiempo total de uso";
$l_uploads = "Uploads";
$l_downloads = "Downloads";
}
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo <<<EOM
<b>Could not include SQL library functions. Aborting</b>
<title>$l_title</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="/css/acc.css">
</head>
<body>
<center><b>Could not include SQL library functions. Aborting</b></center>
</body>
</html>
EOM;
exit();
}
 
?>
<title><?= $l_title ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?= $config['general_charset'] ?>">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</head>
<body>
<?php
$stats_num = array();
 
$date = strftime('%A, %e %B %Y, %T %Z');
$now = time();
 
if (!isset($before))
{
$before = date($config['sql_date_format'], $now + 86400);
65,11 → 91,10
$column[3] = "$column3";
$selected3["$column3"] = 'selected';
 
$message['sessions'] = 'sessions';
$message['usage'] = 'total usage time';
$message['usage'] = 'temps d\'utilisation total ';
$message['upload'] = 'uploads';
$message['download'] = 'downloads';
$message['sessions'] = $l_sessions;
$message['usage'] = $l_usage;
$message['upload'] = $l_uploads;
$message['download'] = $l_downloads;
if ($config['general_stats_use_totacct'] == 'yes'){
$sql_val['sessions'] = 'connnum';
$sql_val['usage'] = 'conntotduration';
/web/acc/manager/htdocs/user_stats.php
8,23 → 8,8
?>
<!DOCTYPE html>
<html>
<head>
<?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>Statistiques utilisateurs</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="/css/acc.css">
</head>
<body>
<center>
<b>Could not include SQL library functions. Aborting</b>
</body>
</html>
EOM;
exit();
}
# Choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
91,6 → 76,21
$l_login = "Login";
$l_user_edit = "Edit user";
}
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>$l_title</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="/css/acc.css">
</head>
<body>
<center><b>Could not include SQL library functions. Aborting</b></center>
</body>
</html>
EOM;
exit();
}
if (!isset($start) && !isset($stop)){
$now = time();
$stop = date($config['sql_date_format'],$now);
100,8 → 100,7
$start = da_sql_escape_string($link,$start);
$stop = da_sql_escape_string($link,$stop);
?>
<head>
<title><?php echo "$l_title";?></title>
<title><?= $l_title ?></title>
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</head>
<body>