$text)
{
echo($sep);
if ($_GET['opta'] == $option) { echo(""); }
$sep = " | ";
}
unset($sep);
echo(' | Graphs: ');
$graph_types = array("bits" => "Bits",
"upkts" => "Unicast Packets",
"nupkts" => "Non-Unicast Packets",
"errors" => "Errors",
"etherlike" => "Etherlike");
foreach ($graph_types as $type => $descr)
{
echo("$type_sep");
if ($_GET['optb'] == $type && $_GET['optc'] != "thumbs") { echo(""); }
echo('(');
if ($_GET['optb'] == $type && $_GET['optc'] == "thumbs") { echo(""); }
echo(')');
$type_sep = " | ";
}
print_optionbar_end();
if ($_GET['optc'] == thumbs)
{
$timeperiods = array('-1day','-1week','-1month','-1year');
$from = '-1day';
echo("
");
$sql = "select * from ports WHERE device_id = '".$device['device_id']."' ORDER BY ifIndex";
$query = mysql_query($sql);
unset ($seperator);
while ($interface = mysql_fetch_assoc($query))
{
echo("
\
".$interface['ifAlias']." \

\
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
"
".truncate(short_port_descr($interface['ifAlias']), 32, '')."
");
}
echo("");
} else {
if ($_GET['opta'] == "arp" || $_GET['opta'] == "adsl" || $_GET['opta'] == "neighbours")
{
include("ports/".$_GET['opta'].".inc.php");
} else {
if ($_GET['opta'] == "details") { $port_details = 1; }
echo("");
$i = "1";
$interface_query = mysql_query("select * from ports WHERE device_id = '".$device['device_id']."' AND deleted = '0' ORDER BY `ifIndex` ASC");
while ($interface = mysql_fetch_assoc($interface_query))
{
include("includes/print-interface.inc.php");
$i++;
}
echo("
");
}
}
?>