|
=gettext("Proto");?> |
=gettext("Source -> Router -> Destination");?> |
=gettext("State");?> |
|
0) {
foreach($states as $line) {
if($row >= 1000)
break;
$line_split = preg_split("/\s+/", $line);
$type = array_shift($line_split);
$proto = array_shift($line_split);
$state = array_pop($line_split);
$info = implode(" ", $line_split);
/* break up info and extract $srcip and $dstip */
$ends = preg_split("/\-\>?/", $info);
$parts = explode(":", $ends[0]);
$srcip = trim($parts[0]);
$parts = explode(":", $ends[count($ends) - 1]);
$dstip = trim($parts[0]);
echo "
{$proto} |
{$info} |
{$state} |
|
";
$row++;
}
}
else {
echo "
" . gettext("No states were found.") . "
|
";
}
?>
|
|