Subversion Repositories ALCASAR

Compare Revisions

Regard whitespace Rev 2856 → Rev 2855

/web/acc/manager/htdocs/user_stats.php
8,8 → 8,23
?>
<!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'])){
76,21 → 91,6
$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,7 → 100,8
$start = da_sql_escape_string($link,$start);
$stop = da_sql_escape_string($link,$stop);
?>
<title><?= $l_title ?></title>
<head>
<title><?php echo "$l_title";?></title>
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</head>
<body>
/web/acc/manager/htdocs/stats.php
2,63 → 2,37
# $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
# 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";
}
require_once('../lib/functions.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>$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>
<b>Could not include SQL library functions. Aborting</b>
</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);
91,10 → 65,11
$column[3] = "$column3";
$selected3["$column3"] = 'selected';
 
$message['sessions'] = $l_sessions;
$message['usage'] = $l_usage;
$message['upload'] = $l_uploads;
$message['download'] = $l_downloads;
$message['sessions'] = 'sessions';
$message['usage'] = 'total usage time';
$message['usage'] = 'temps d\'utilisation total ';
$message['upload'] = 'uploads';
$message['download'] = 'downloads';
if ($config['general_stats_use_totacct'] == 'yes'){
$sql_val['sessions'] = 'connnum';
$sql_val['usage'] = 'conntotduration';