2011-11-30 12:45:46 +00:00
|
|
|
<?php
|
2012-05-09 10:01:42 +00:00
|
|
|
/**
|
2016-08-20 12:16:55 +01:00
|
|
|
* LibreNMS
|
2012-05-09 10:01:42 +00:00
|
|
|
*
|
2016-08-20 12:16:55 +01:00
|
|
|
* This file is part of LibreNMS.
|
2012-05-09 10:01:42 +00:00
|
|
|
*
|
2016-08-20 12:16:55 +01:00
|
|
|
* @package librenms
|
2013-10-29 05:38:12 +10:00
|
|
|
* @subpackage webinterface
|
|
|
|
* @copyright (C) 2006 - 2012 Adam Armstrong
|
2012-05-09 10:01:42 +00:00
|
|
|
*/
|
|
|
|
|
2012-04-05 16:10:12 +00:00
|
|
|
ini_set('allow_url_fopen', 0);
|
|
|
|
|
2016-11-21 14:12:59 -06:00
|
|
|
$init_modules = array('web', 'auth');
|
|
|
|
require realpath(__DIR__ . '/..') . '/includes/init.php';
|
2015-07-13 20:10:26 +02:00
|
|
|
|
2018-02-20 14:57:56 +00:00
|
|
|
$urlargs = array(
|
|
|
|
'type' => 'bill_historictransfer',
|
|
|
|
'id' => $_GET['bill_id'],
|
|
|
|
'width' => $_GET['x'],
|
|
|
|
'height' => $_GET['y'],
|
|
|
|
'imgtype' => $_GET['type']
|
|
|
|
);
|
|
|
|
if (is_numeric($_GET['bill_hist_id'])) {
|
|
|
|
$urlargs['bill_hist_id'] = $_GET['bill_hist_id'];
|
2018-03-19 16:40:17 -05:00
|
|
|
} elseif (is_numeric($_GET['from']) && is_numeric($_GET['to'])) {
|
2018-02-20 14:57:56 +00:00
|
|
|
$urlargs['from'] = $_GET['from'];
|
|
|
|
$urlargs['to'] = $_GET['to'];
|
2012-04-05 16:10:12 +00:00
|
|
|
}
|
|
|
|
|
2019-06-23 00:29:12 -05:00
|
|
|
$url = Config::get('base_url') . 'graph.php?';
|
2018-02-20 14:57:56 +00:00
|
|
|
$i = 0;
|
|
|
|
foreach ($urlargs as $name => $value) {
|
|
|
|
if ($i++ > 0) {
|
|
|
|
$url .= '&';
|
2015-07-13 20:10:26 +02:00
|
|
|
}
|
2018-02-20 14:57:56 +00:00
|
|
|
$url .= "$name=$value";
|
2015-07-13 20:10:26 +02:00
|
|
|
}
|
|
|
|
|
2018-02-20 14:57:56 +00:00
|
|
|
header("Location: $url", false, 301);
|
|
|
|
exit;
|