Files
librenms-librenms/html/includes/graphs/bill/auth.inc.php
T

18 lines
664 B
PHP
Raw Normal View History

2010-07-31 21:08:35 +00:00
<?php
2012-05-25 12:24:34 +00:00
// Authorises bill viewing and sets $ports as reference to mysql query containing ports for this bill
require '../includes/billing.php';
2010-07-31 21:08:35 +00:00
if (is_numeric($_GET['id']) && ($auth || bill_permitted($_GET['id']))) {
$bill = dbFetchRow('SELECT * FROM `bills` WHERE bill_id = ?', array($_GET['id']));
2011-03-23 10:25:42 +00:00
$datefrom = date('YmdHis', $_GET['from']);
$dateto = date('YmdHis', $_GET['to']);
$rates = getRates($_GET['id'], $datefrom, $dateto);
2011-03-23 10:25:42 +00:00
$ports = dbFetchRows('SELECT * FROM `bill_ports` AS B, `ports` AS P, `devices` AS D WHERE B.bill_id = ? AND P.port_id = B.port_id AND D.device_id = P.device_id', array($_GET['id']));
2011-03-23 10:25:42 +00:00
$auth = true;
2010-07-31 21:08:35 +00:00
}