Files
librenms-librenms/html/includes/print-interface-graphs.inc.php
T

31 lines
2.2 KiB
PHP
Raw Normal View History

2007-04-03 14:10:23 +00:00
<?php
2007-11-21 14:26:24 +00:00
global $config;
2007-06-24 14:56:47 +00:00
if(!$graph_type) { $graph_type = $_GET['type']; }
2007-04-03 14:10:23 +00:00
2009-02-06 15:17:09 +00:00
if(!$device) { $device['device_id'] = getifhost($interface['interface_id']); }
2009-10-28 13:49:37 +00:00
$daily_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$day&to=$now&width=215&height=100";
$daily_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$day&to=$now&width=500&height=150";
2007-04-03 14:10:23 +00:00
2009-10-28 13:49:37 +00:00
$weekly_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$week&to=$now&width=215&height=100";
$weekly_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$week&to=$now&width=500&height=150";
2007-04-03 14:10:23 +00:00
2009-10-28 13:49:37 +00:00
$monthly_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$month&to=$now&width=215&height=100";
$monthly_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$month&to=$now&width=500&height=150";
2007-04-03 14:10:23 +00:00
2009-10-28 13:49:37 +00:00
$yearly_traffic = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$year&to=$now&width=215&height=100";
$yearly_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&type=$graph_type&from=$year&to=$now&width=500&height=150";
2007-06-24 14:56:47 +00:00
echo("<a href='".$daily_url."' onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
2007-04-03 14:10:23 +00:00
<img src='$daily_traffic' border=0></a> ");
echo("<a href='".$weekly_url."' onmouseover=\"return overlib('<img src=\'$weekly_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
2007-04-03 14:10:23 +00:00
<img src='$weekly_traffic' border=0></a> ");
echo("<a href='".$monthly_url."' onmouseover=\"return overlib('<img src=\'$monthly_url\'>', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\">
2007-04-03 14:10:23 +00:00
<img src='$monthly_traffic' border=0></a> ");
echo("<a href='".$yearly_url."' onmouseover=\"return overlib('<img src=\'$yearly_url\'>', LEFT".$config['overlib_defaults'].", WIDTH, 350);\" onmouseout=\"return nd();\">
2007-04-03 14:10:23 +00:00
<img src='$yearly_traffic' border=0></a>");
?>