mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
clean up unused function, remove baseurl (yay relative urls)
git-svn-id: http://www.observium.org/svn/observer/trunk@1626 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -57,14 +57,14 @@ if(bill_permitted($bill_id)) {
|
|||||||
if(!$_GET['optb']) { $_GET['optb'] = "details"; }
|
if(!$_GET['optb']) { $_GET['optb'] = "details"; }
|
||||||
|
|
||||||
if($_GET['optb'] == "details") { echo("<strong>"); }
|
if($_GET['optb'] == "details") { echo("<strong>"); }
|
||||||
echo("<a href='".$config['base_url']."/bill/".$bill_id."/details/'>Details</a>");
|
echo("<a href='bill/".$bill_id."/details/'>Details</a>");
|
||||||
if($_GET['optb'] == "details") { echo("</strong>"); }
|
if($_GET['optb'] == "details") { echo("</strong>"); }
|
||||||
|
|
||||||
if($_SESSION['userlevel'] == "10")
|
if($_SESSION['userlevel'] == "10")
|
||||||
{
|
{
|
||||||
echo(" | ");
|
echo(" | ");
|
||||||
if($_GET['optb'] == "edit") { echo("<strong>"); }
|
if($_GET['optb'] == "edit") { echo("<strong>"); }
|
||||||
echo("<a href='".$config['base_url']."/bill/".$bill_id."/edit/'>Edit</a>");
|
echo("<a href='bill/".$bill_id."/edit/'>Edit</a>");
|
||||||
if($_GET['optb'] == "edit") { echo("</strong>"); }
|
if($_GET['optb'] == "edit") { echo("</strong>"); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ if(bill_permitted($bill_id)) {
|
|||||||
$yesterday = mysql_result(mysql_query("SELECT UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 DAY))"), 0);
|
$yesterday = mysql_result(mysql_query("SELECT UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 DAY))"), 0);
|
||||||
$rightnow = date(U);
|
$rightnow = date(U);
|
||||||
|
|
||||||
# $di = "<img src='".$config['base_url']."/billing-graph.php?bill_id=" . $bill_id . "&bill_code=" . $_GET['bill_code'];
|
# $di = "<img src='billing-graph.php?bill_id=" . $bill_id . "&bill_code=" . $_GET['bill_code'];
|
||||||
# $di = $di . "&from=" . $yesterday . "&to=" . $rightnow . "&x=715&y=250";
|
# $di = $di . "&from=" . $yesterday . "&to=" . $rightnow . "&x=715&y=250";
|
||||||
# $di = $di . "$type'>";
|
# $di = $di . "$type'>";
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ if(bill_permitted($bill_id)) {
|
|||||||
$di = $di . "&width=715&height=200&total=1'>";
|
$di = $di . "&width=715&height=200&total=1'>";
|
||||||
|
|
||||||
|
|
||||||
# $mi = "<img src='".$config['base_url']."/billing-graph.php?bill_id=" . $bill_id . "&bill_code=" . $_GET['bill_code'];
|
# $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 . "&from=" . $lastmonth . "&to=" . $rightnow . "&x=715&y=250";
|
||||||
# $mi = $mi . "$type'>";
|
# $mi = $mi . "$type'>";
|
||||||
|
|
||||||
|
|||||||
@@ -109,25 +109,6 @@ function getHostOS($device)
|
|||||||
if ($os) { return $os; } else { return "generic"; }
|
if ($os) { return $os; } else { return "generic"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
function billpermitted($bill_id)
|
|
||||||
{
|
|
||||||
global $_SESSION;
|
|
||||||
if ($_SESSION['userlevel'] >= "5")
|
|
||||||
{
|
|
||||||
$allowed = TRUE;
|
|
||||||
}
|
|
||||||
elseif (@mysql_result(mysql_query("SELECT count(*) FROM bill_perms WHERE `user_id` = '" . $_SESSION['user_id'] . "' AND `bill_id` = $bill_id"), 0) > '0')
|
|
||||||
{
|
|
||||||
$allowed = TRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$allowed = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $allowed;
|
|
||||||
}
|
|
||||||
|
|
||||||
function formatRates($rate) {
|
function formatRates($rate) {
|
||||||
$rate = format_si($rate) . "bps";
|
$rate = format_si($rate) . "bps";
|
||||||
return $rate;
|
return $rate;
|
||||||
|
|||||||
Reference in New Issue
Block a user