if (!isset($vars['search'])) {
    $vars['search'] = "ipv4";
}
print_optionbar_start('', '');
echo '<span style="font-weight: bold;">Search</span> &#187; ';
unset($sep);
foreach ($sections as $type => $texttype) {
    echo $sep;
    if ($vars['search'] == $type) {
        echo "<span class='pagemenu-selected'>";
    }
    #  echo('<a href="search/' . $type . ($_GET['optb'] ? '/' . $_GET['optb'] : ''). '/">' . $texttype .'</a>');
    echo generate_link($texttype, array('page' => 'search', 'search' => $type));
    if ($vars['search'] == $type) {
        echo "</span>";
    }
    $sep = ' | ';
}
unset($sep);
print_optionbar_end('', '');
switch ($vars['search']) {
    case 'ipv4':
    case 'ipv6':
    case 'mac':
    case 'arp':
        include 'pages/search/' . $vars['search'] . '.inc.php';
        break;
    default:
        echo report_this('Unknown search type ' . $vars['search']);
        break;
}
Example #2
0
if (isset($config['enable_syslog']) && $config['enable_syslog'] == 1) {
    echo ' | ';
    if ($vars['section'] == 'syslog') {
        echo '<span class="pagemenu-selected">';
    }
    echo generate_link('Syslog', $vars, array('section' => 'syslog'));
    if ($vars['section'] == 'syslog') {
        echo '</span>';
    }
}
if (isset($config['graylog']['server']) && isset($config['graylog']['port'])) {
    echo ' | ';
    if ($vars['section'] == 'graylog') {
        echo '<span class="pagemenu-selected">';
    }
    echo generate_link('Graylog', $vars, array('section' => 'graylog'));
    if ($vars['section'] == 'graylog') {
        echo '</span>';
    }
}
switch ($vars['section']) {
    case 'syslog':
    case 'eventlog':
    case 'graylog':
        include 'pages/device/logs/' . $vars['section'] . '.inc.php';
        break;
    default:
        print_optionbar_end();
        echo report_this('Unknown section ' . $vars['section']);
        break;
}
Example #3
0
unset($sep);
foreach ($routing_count as $type => $value) {
    if (!$vars['protocol']) {
        $vars['protocol'] = $type;
    }
    echo $sep;
    unset($sep);
    if ($vars['protocol'] == $type) {
        echo '<span class="pagemenu-selected">';
    }
    if ($routing_count[$type]) {
        echo generate_link($type_text[$type] . " (" . $routing_count[$type] . ")", array('page' => 'routing', 'protocol' => $type));
        $sep = " | ";
    }
    if ($vars['protocol'] == $type) {
        echo "</span>";
    }
}
print_optionbar_end();
switch ($vars['protocol']) {
    case 'overview':
    case 'bgp':
    case 'vrf':
    case 'cef':
    case 'ospf':
        include 'pages/routing/' . $vars['protocol'] . '.inc.php';
        break;
    default:
        echo report_this('Unknown protocol ' . $vars['protocol']);
        break;
}