2009-11-11 18:20:32 +00:00
|
|
|
<?php
|
|
|
|
|
2011-03-16 23:10:10 +00:00
|
|
|
if ($ports['total'])
|
|
|
|
{
|
2010-03-14 01:38:43 +00:00
|
|
|
echo('<div style="background-color: #eeeeee; margin: 5px; padding: 5px;">');
|
|
|
|
# ' . device_traffic_image($device['device_id'], 490, 100, $day, '-300s'));
|
|
|
|
|
|
|
|
$graph_array['height'] = "100";
|
|
|
|
$graph_array['width'] = "490";
|
|
|
|
$graph_array['to'] = $now;
|
2010-07-25 14:21:05 +00:00
|
|
|
$graph_array['id'] = $device['device_id'];
|
2010-03-14 01:38:43 +00:00
|
|
|
$graph_array['type'] = "device_bits";
|
2010-04-17 11:01:00 +00:00
|
|
|
$graph_array['from'] = $day;
|
|
|
|
$graph_array['legend'] = "no";
|
2010-03-14 01:38:43 +00:00
|
|
|
$graph = generate_graph_tag($graph_array);
|
|
|
|
|
|
|
|
$content = "<div class=list-large>".$device['hostname']." - Device Traffic</div>";
|
|
|
|
$content .= "<div style=\'width: 850px\'>";
|
2010-04-17 11:01:00 +00:00
|
|
|
$graph_array['legend'] = "yes";
|
|
|
|
$graph_array['width'] = "340";
|
2010-03-14 01:38:43 +00:00
|
|
|
$graph_array['from'] = $day;
|
|
|
|
$content .= generate_graph_tag($graph_array);
|
|
|
|
$graph_array['from'] = $week;
|
|
|
|
$content .= generate_graph_tag($graph_array);
|
|
|
|
$graph_array['from'] = $month;
|
|
|
|
$content .= generate_graph_tag($graph_array);
|
|
|
|
$graph_array['from'] = $year;
|
|
|
|
$content .= generate_graph_tag($graph_array);
|
|
|
|
$content .= "</div>";
|
|
|
|
|
2010-11-29 10:53:43 +00:00
|
|
|
$link = $config['base_url'] . "/graphs/" . $graph_array['id'] . "/" . $graph_array['type'] . "/" . $day . "/" . $config['now'] . "/";
|
2010-07-25 14:21:05 +00:00
|
|
|
|
|
|
|
echo(overlib_link($link, $graph, $content, NULL));
|
2010-03-14 01:38:43 +00:00
|
|
|
|
2010-03-07 22:22:29 +00:00
|
|
|
echo(' <div style="height: 5px;"></div>');
|
2009-11-11 18:20:32 +00:00
|
|
|
|
2010-03-07 22:22:29 +00:00
|
|
|
echo(' <table class="tablehead" cellpadding="2" cellspacing="0" width="100%">
|
|
|
|
<tr bgcolor="' . $ports_colour . '" align="center"><td></td>
|
|
|
|
<td width="25%"><img src="images/16/connect.png" align="absmiddle"> ' . $ports['total'] . '</td>
|
|
|
|
<td width="25%" class="green"><img src="images/16/if-connect.png" align="absmiddle"> ' . $ports['up'] . '</td>
|
|
|
|
<td width="25%" class="red"><img src="images/16/if-disconnect.png" align="absmiddle"> ' . $ports['down'] . '</td>
|
|
|
|
<td width="25%" class="grey"><img src="images/16/if-disable.png" align="absmiddle"> ' . $ports['disabled'] . '</td>
|
|
|
|
</tr>
|
|
|
|
</table>');
|
2009-11-11 18:20:32 +00:00
|
|
|
|
2010-03-07 22:22:29 +00:00
|
|
|
echo(' <div style="margin: 8px; font-size: 11px; font-weight: bold;">');
|
2009-11-11 18:20:32 +00:00
|
|
|
|
2010-02-20 17:22:22 +00:00
|
|
|
$sql = "SELECT * FROM ports WHERE `device_id` = '" . $device['device_id'] . "' AND deleted != '1'";
|
2009-11-11 18:20:32 +00:00
|
|
|
$query = mysql_query($sql);
|
2010-03-07 22:22:29 +00:00
|
|
|
$ifsep = "";
|
2011-03-16 23:10:10 +00:00
|
|
|
|
|
|
|
while ($data = mysql_fetch_array($query))
|
|
|
|
{
|
2009-11-11 18:20:32 +00:00
|
|
|
$data = ifNameDescr($data);
|
2010-05-02 23:24:47 +00:00
|
|
|
$data = array_merge($data, $device);
|
2010-08-02 22:09:52 +00:00
|
|
|
echo("$ifsep" . generate_port_link($data, makeshortif(strtolower($data['label']))));
|
2009-11-11 18:20:32 +00:00
|
|
|
$ifsep = ", ";
|
|
|
|
}
|
2011-03-16 23:10:10 +00:00
|
|
|
|
2009-11-11 18:20:32 +00:00
|
|
|
unset($ifsep);
|
2010-03-07 22:22:29 +00:00
|
|
|
echo(" </div>");
|
2009-11-11 18:20:32 +00:00
|
|
|
echo("</div>");
|
|
|
|
}
|
2011-03-16 23:10:10 +00:00
|
|
|
|
|
|
|
?>
|