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>
/web/acc/manager/htdocs/help/help.php
File deleted
/web/acc/manager/htdocs/help/framed_protocol_help.html
File deleted
/web/acc/manager/htdocs/help/lock_message_help.html
File deleted
/web/acc/manager/htdocs/help/dialup_access_help.html
File deleted
/web/acc/manager/htdocs/help/reply_message_help.html
File deleted
/web/acc/manager/htdocs/help/framed_mtu_help.html
File deleted
/web/acc/manager/htdocs/help/framed_compression_help.html
File deleted
/web/acc/manager/htdocs/help/class_help.html
File deleted
/web/acc/manager/htdocs/help/port_limit_help.html
File deleted
/web/acc/manager/htdocs/help/callback_id_help.html
File deleted
/web/acc/manager/htdocs/help/callback_number_help.html
File deleted
/web/acc/manager/htdocs/help/login_time_help2.html
File deleted
/web/acc/manager/htdocs/help/filter_id_help.html
File deleted
/web/acc/manager/htdocs/help/service_type_help.html
File deleted
/web/acc/manager/htdocs/help/framed_ip_netmask_help.html
File deleted
/web/acc/manager/htdocs/help/badusers_help.html
File deleted
/web/acc/manager/htdocs/help/framed_ip_address_help.html
File deleted
/web/acc/manager/htdocs/help/idle_timeout_help.html
File deleted
/web/acc/manager/htdocs/help/auth_type_help.html
File deleted
/web/acc/manager/htdocs/help/coovachilli_bandwidth_max_down_help.html
3,7 → 3,7
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Help Page</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</HEAD>
<body>
<center>
/web/acc/manager/htdocs/help/coovachilli_bandwidth_max_up_help.html
3,7 → 3,7
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Help Page</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</HEAD>
<body>
<center>
/web/acc/manager/htdocs/help/coovachilli_max_input_octets_help.html
3,7 → 3,7
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Help Page</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</HEAD>
<body>
<center>
/web/acc/manager/htdocs/help/coovachilli_max_output_octets_help.html
3,7 → 3,7
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Help Page</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</HEAD>
<body>
<center>
/web/acc/manager/htdocs/help/coovachilli_max_total_octets_help.html
3,7 → 3,7
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Help Page</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</HEAD>
<body>
<center>
/web/acc/manager/htdocs/help/expiration_help.html
3,7 → 3,7
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Help Page</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</HEAD>
<body>
<center>
/web/acc/manager/htdocs/help/expire_after_help.html
3,7 → 3,7
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Help Page</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</HEAD>
<body>
<center>
/web/acc/manager/htdocs/help/filtering_help.html
3,7 → 3,7
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Help Page</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</HEAD>
<body>
<center>
/web/acc/manager/htdocs/help/login_time_help.html
3,7 → 3,7
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Help Page</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</HEAD>
<body>
<center>
/web/acc/manager/htdocs/help/max_all_session_help.html
3,7 → 3,7
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Help Page</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</HEAD>
<body>
<center>
/web/acc/manager/htdocs/help/protocols_help.html
3,7 → 3,7
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Help Page</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</HEAD>
<body>
<center>
/web/acc/manager/htdocs/help/session_timeout_help.html
3,7 → 3,7
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Help page</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</HEAD>
<body>
<center>
/web/acc/manager/htdocs/help/simultaneous_use_help.html
3,7 → 3,7
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Help Page</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</HEAD>
<body>
<center>
/web/acc/manager/htdocs/help/statusOpenRequired_help.html
3,7 → 3,7
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Help Page</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</HEAD>
<body>
<center>
/web/acc/manager/htdocs/help/wispr_redirection_url_help.html
3,7 → 3,7
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Help Page</title>
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/acc.css" type="text/css">
</HEAD>
<body>
<center>
/web/acc/manager/htdocs/security.php
27,38 → 27,25
}
$tab = (isset($_GET['tab'])) ? intval($_GET['tab']) : 1;
?>
<!DOCTYPE HTML PUBLIC>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title><?= $l_title ?></title>
<link rel="stylesheet" href="/css/bootstrap.min.css">
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<table class="tableTop" border=0 cellspacing=0 cellpadding=0 >
<tbody >
<tr>
<th class="thBasicACC">
<?echo "$l_title";?>
</th>
</tr>
<tr bgcolor="#FFCC66" class="trSizeACC">
<td class="tdSizeACC">
<img src="/images/pix.gif" width=1 height=2>
</td>
</tr>
</tbody>
</table>
<div class="frameBorderACC">
<div class="btn-group btn-group-justified" role="group" aria-label="Justified button group">
<a href="security.php?tab=1" class="btn btn-default<?= (($tab === 1) ? ' active' : '') ?>" role="button"><?= $l_spoofing ?></a>
<a href="security.php?tab=2" class="btn btn-default<?= (($tab === 2) ? ' active' : '') ?>" role="button"><?= $l_virus ?></a>
<a href="security.php?tab=3" class="btn btn-default<?= (($tab === 3) ? ' active' : '') ?>" role="button"><?= $l_fail2ban ?></a>
</div>
<br>
<head>
<meta charset="UTF-8">
<title><?= $l_title ?></title>
<link rel="stylesheet" href="/css/bootstrap.min.css">
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="/css/acc.css">
</head>
<body>
<div class="panel">
<div class="panel-header"><?= $l_title ?></div>
<div class="panel-row">
<div class="btn-group btn-group-justified" role="group" aria-label="Justified button group">
<a href="security.php?tab=1" class="btn btn-default<?= (($tab === 1) ? ' active' : '') ?>" role="button"><?= $l_spoofing ?></a>
<a href="security.php?tab=2" class="btn btn-default<?= (($tab === 2) ? ' active' : '') ?>" role="button"><?= $l_virus ?></a>
<a href="security.php?tab=3" class="btn btn-default<?= (($tab === 3) ? ' active' : '') ?>" role="button"><?= $l_fail2ban ?></a>
</div>
<?php
if ($tab === 1) {
$spoofs = [];
84,34 → 71,34
}
$spoofs = array_reverse($spoofs);
?>
<h3 style="text-align: center;"><?= $l_spoofing ?></h3>
<div class="container">
<table style='font-family: "DejaVu Sans";font-size: small;color: #666650;' class="table table-striped tableBis table-hover" border="1">
<h3><?= $l_spoofing ?></h3>
<div class="container">
<table class="table table-striped table-hover" border="1">
<tr>
<th class="thSecurityBis" >
<th>
Date
</th>
<th class="thSecurityBis">
<th>
<?= $l_ipAddress ?>
</th>
<th class="thSecurityBis">
<th>
MAC
</th>
<th class="thSecurityBis">
<th>
<?= $l_user ?>
</th>
</tr>
<tbody>
<?php if (!empty($spoofs)): ?>
<tbody>
<?php if (!empty($spoofs)): ?>
<?php foreach ($spoofs as $spoof): ?>
<tr><td><?= $spoof->date ?></td><td><?= $spoof->ip ?></td><td><?= $spoof->mac ?></td><td><?= $spoof->user ?></td></tr>
<tr><td><?= $spoof->date ?></td><td><?= $spoof->ip ?></td><td><?= $spoof->mac ?></td><td><?= $spoof->user ?></td></tr>
<?php endforeach; ?>
<?php else: ?>
<?php else: ?>
<tr><td colspan="4" style="text-align: center;"><?= $l_empty ?></td></tr>
<?php endif; ?>
</tbody>
</table>
</div>
<?php endif; ?>
</tbody>
</table>
</div>
<?php
} else if ($tab === 2) {
$filePath = '/var/log/havp/access.log';
119,12 → 106,10
if ($lines === false) {
exit("Cannot open '$filePath'.");
}
 
$lines = array_reverse($lines);
?>
<h3 style="text-align: center;"><?= $l_virus ?></h3>
<h3><?= $l_virus ?></h3>
<div class="container">
 
<table class="table table-striped table-hover">
<tbody>
<?php if (!empty($lines)): ?>
168,20 → 153,20
}
$bans = array_reverse($bans);
?>
<h3 style="text-align: center;"><?= $l_fail2ban ?></h3>
<h3><?= $l_fail2ban ?></h3>
<div class="container" border="1">
<table class="table tableBis table-striped table-hover" border="1">
<table class="table table-striped table-hover" border="1">
<tr >
<th class="thSecurityBis" >
<th>
Date
</th>
<th class="thSecurityBis" >
<th>
Date Unban
</th>
<th class="thSecurityBis" >
<th>
<?= $l_rule ?>
</th>
<th class="thSecurityBis" >
<th>
<?= $l_ipAddress ?>
</th>
</tr>
212,6 → 197,7
echo 'Unknown tab';
}
?>
</div>
</div>
</body>
</html>
/web/acc/manager/nfsen.php
11,27 → 11,14
?>
<!DOCTYPE html>
<html>
<header>
<link rel="stylesheet" href="htdocs/acc.css">
</header>
<head>
<link rel="stylesheet" href="/css/acc.css">
</head>
<body>
<table border=0 cellspacing=0 cellpadding=0 class="tableTopACC">
<tbody class="tbodyAcc" >
<tr>
<th class="thBasicACC">
<?echo $l_title;?>
</th>
</tr>
</tbody>
<tr bgcolor="#FFCC66" class="trSizeACC">
<td class="tdSizeACC">
<img src="/images/pix.gif" width="1" height="2">
</td>
</tr>
</table>
<div >
<iframe class="ACCiframe" src="nfsen/nfsen.php">
</iframe>
<div class="panel">
<div class="panel-header"><?= $l_title ?></div>
<iframe class="panel-iframe" src="nfsen/nfsen.php">
</iframe>
</div>
</body>
</html>