mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
updates to billing setup
git-svn-id: http://www.observium.org/svn/observer/trunk@2448 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+43
-32
@@ -33,8 +33,10 @@ if (bill_permitted($bill_id))
|
||||
|
||||
$datefrom = $day_data['0'];
|
||||
$dateto = $day_data['1'];
|
||||
|
||||
$lastfrom = $day_data['2'];
|
||||
$lastto = $day_data['3'];
|
||||
|
||||
$rate_data = getRates($bill_id,$datefrom,$dateto);
|
||||
$rate_95th = $rate_data['rate_95th'];
|
||||
$dir_95th = $rate_data['dir_95th'];
|
||||
@@ -69,8 +71,14 @@ if (bill_permitted($bill_id))
|
||||
|
||||
if (!$_GET['optb']) { $_GET['optb'] = "details"; }
|
||||
|
||||
if ($_GET['optb'] == "basic") { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='bill/".$bill_id."/basic/'>Quick Graphs</a>");
|
||||
if ($_GET['optb'] == "basic") { echo("</span>"); }
|
||||
|
||||
echo(" | ");
|
||||
|
||||
if ($_GET['optb'] == "details") { echo("<span class='pagemenu-selected'>"); }
|
||||
echo("<a href='bill/".$bill_id."/details/'>Details</a>");
|
||||
echo("<a href='bill/".$bill_id."/details/'>Accurate Graphs</a>");
|
||||
if ($_GET['optb'] == "details") { echo("</span>"); }
|
||||
|
||||
if ($_SESSION['userlevel'] == "10")
|
||||
@@ -98,7 +106,7 @@ if (bill_permitted($bill_id))
|
||||
{
|
||||
include("pages/bill/delete.inc.php");
|
||||
}
|
||||
elseif ($_GET['optb'] == "details")
|
||||
elseif ($_GET['optb'] == "details" || $_GET['optb'] == "basic")
|
||||
{
|
||||
|
||||
echo("<h3>Billed Ports</h3>");
|
||||
@@ -173,46 +181,49 @@ if (bill_permitted($bill_id))
|
||||
|
||||
}
|
||||
|
||||
# echo("</td><td><img src='images/billing-key.png'></td></tr></table>");
|
||||
|
||||
# $bi = "<img src='billing-graph.php?bill_id=" . $bill_id . "&bill_code=" . $_GET['bill_code'];
|
||||
# $bi = $bi . "&from=" . $unixfrom . "&to=" . $unixto;
|
||||
# $bi = $bi . "&x=715&y=250";
|
||||
# $bi = $bi . "$type'>";
|
||||
|
||||
$bi = "<img src='graph.php?type=bill_bits&id=" . $bill_id;
|
||||
$bi .= "&from=" . $unixfrom . "&to=" . $unixto;
|
||||
$bi .= "&width=715&height=200&total=1'>";
|
||||
|
||||
$lastmonth = dbFetchCell("SELECT UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 MONTH))");
|
||||
$yesterday = dbFetchCell("SELECT UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 DAY))");
|
||||
$rightnow = date(U);
|
||||
|
||||
if ($_GET['optb'] == "details") {
|
||||
|
||||
$li = "<img src='graph.php?type=bill_bits&id=" . $bill_id;
|
||||
$li .= "&from=" . $unix_prev_from . "&to=" . $unix_prev_to;
|
||||
$li .= "&width=715&height=200&total=1'>";
|
||||
$bi = "<img src='billing-graph.php?bill_id=" . $bill_id . "&bill_code=" . $_GET['bill_code'];
|
||||
$bi = $bi . "&from=" . $unixfrom . "&to=" . $unixto;
|
||||
$bi = $bi . "&x=800&y=250";
|
||||
$bi = $bi . "$type'>";
|
||||
|
||||
$li = "<img src='billing-graph.php?bill_id=" . $bill_id . "&bill_code=" . $_GET['bill_code'];
|
||||
$li = $li . "&from=" . $unix_prev_from . "&to=" . $unix_prev_to . "&x=800&y=250";
|
||||
$li = $li . "$type'>";
|
||||
|
||||
$di = "<img src='billing-graph.php?bill_id=" . $bill_id . "&bill_code=" . $_GET['bill_code'];
|
||||
$di = $di . "&from=" . $config['time']['day'] . "&to=" . $config['time']['now'] . "&x=800&y=250";
|
||||
$di = $di . "$type'>";
|
||||
|
||||
$mi = "<img src='billing-graph.php?bill_id=" . $bill_id . "&bill_code=" . $_GET['bill_code'];
|
||||
$mi = $mi . "&from=" . $lastmonth . "&to=" . $rightnow . "&x=800&y=250";
|
||||
$mi = $mi . "$type'>";
|
||||
|
||||
} else {
|
||||
|
||||
$bi = "<img src='graph.php?type=bill_bits&id=" . $bill_id;
|
||||
$bi .= "&from=" . $unixfrom . "&to=" . $unixto;
|
||||
$bi .= "&width=715&height=200&total=1'>";
|
||||
|
||||
|
||||
$di = "<img src='billing-graph.php?bill_id=" . $bill_id . "&bill_code=" . $_GET['bill_code'];
|
||||
$di = $di . "&from=" . $unix_prev_from . "&to=" . $unix_prev_to . "&x=715&y=250";
|
||||
$di = $di . "$type'>";
|
||||
$li = "<img src='graph.php?type=bill_bits&id=" . $bill_id;
|
||||
$li .= "&from=" . $unix_prev_from . "&to=" . $unix_prev_to;
|
||||
$li .= "&width=715&height=200&total=1'>";
|
||||
|
||||
echo("$di");
|
||||
$di = "<img src='graph.php?type=bill_bits&id=" . $bill_id;
|
||||
$di .= "&from=" . $config['time']['day'] . "&to=" . $config['time']['now'];
|
||||
$di .= "&width=715&height=200&total=1'>";
|
||||
|
||||
$di = "<img src='graph.php?type=bill_bits&id=" . $bill_id;
|
||||
$di .= "&from=" . $config['time']['day'] . "&to=" . $config['time']['now'];
|
||||
$di .= "&width=715&height=200&total=1'>";
|
||||
|
||||
|
||||
# $mi = "<img src='billing-graph.php?bill_id=" . $bill_id . "&bill_code=" . $_GET['bill_code'];
|
||||
# $mi = $mi . "&from=" . $lastmonth . "&to=" . $rightnow . "&x=715&y=250";
|
||||
# $mi = $mi . "$type'>";
|
||||
|
||||
$mi = "<img src='graph.php?type=bill_bits&id=" . $bill_id;
|
||||
$mi .= "&from=" . $lastmonth . "&to=" . $rightnow;
|
||||
$mi .= "&width=715&height=200&total=1'>";
|
||||
$mi = "<img src='graph.php?type=bill_bits&id=" . $bill_id;
|
||||
$mi .= "&from=" . $lastmonth . "&to=" . $rightnow;
|
||||
$mi .= "&width=715&height=200&total=1'>";
|
||||
|
||||
}
|
||||
|
||||
if ($null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user