mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
graphs auth.inc.phps to db*
git-svn-id: http://www.observium.org/svn/observer/trunk@2303 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -6,27 +6,14 @@ include("../includes/billing.php");
|
||||
|
||||
if (is_numeric($_GET['id']) && ($config['allow_unauth_graphs'] || bill_permitted($_GET['id'])))
|
||||
{
|
||||
$bill_query = mysql_query("SELECT * FROM `bills` WHERE bill_id = '".mres($_GET['id'])."'");
|
||||
$bill = mysql_fetch_assoc($bill_query);
|
||||
|
||||
# $day_data = getDates($bill['bill_day']);
|
||||
# $datefrom = $day_data['0'];
|
||||
# $dateto = $day_data['1'];
|
||||
|
||||
#print_r($day_data);
|
||||
|
||||
|
||||
$datefrom = date('YmdHis', $_GET['from']);
|
||||
$dateto = date('YmdHis', $_GET['to']);
|
||||
|
||||
|
||||
$bill = dbFetchRow("SELECT * FROM `bills` WHERE bill_id = ?", array($_GET['id']));
|
||||
|
||||
$datefrom = date('YmdHis', $_GET['from']);
|
||||
$dateto = date('YmdHis', $_GET['to']);
|
||||
|
||||
$rates = getRates($_GET['id'], $datefrom, $dateto);
|
||||
|
||||
$ports = mysql_query("SELECT * FROM `bill_ports` AS B, `ports` AS P, `devices` AS D
|
||||
WHERE B.bill_id = '".mres($_GET['id'])."' AND P.interface_id = B.port_id
|
||||
AND D.device_id = P.device_id");
|
||||
$ports = dbFetchRows("SELECT * FROM `bill_ports` AS B, `ports` AS P, `devices` AS D WHERE B.bill_id = ? AND P.interface_id = B.port_id AND D.device_id = P.device_id", array($_GET['id']));
|
||||
|
||||
$auth = TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user