mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
SEARCHMOTHERFUCKER.
git-svn-id: http://www.observium.org/svn/observer/trunk@2152 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
40
html/pages/search.inc.php
Normal file
40
html/pages/search.inc.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
$sections = array('ipv4' => 'IPv4 Address', 'ipv6' => 'IPv6 Address', 'mac' => 'MAC Address');
|
||||
|
||||
if (!$_GET['opta']) { $_GET['opta'] = "ipv4"; }
|
||||
|
||||
print_optionbar_start('', '');
|
||||
|
||||
unset($sep);
|
||||
foreach ($sections as $type => $texttype)
|
||||
{
|
||||
echo($sep);
|
||||
if ($_GET['opta'] == $type)
|
||||
{
|
||||
echo("<span class='pagemenu-selected'>");
|
||||
}
|
||||
|
||||
echo('<a href="search/' . $type . ($_GET['optb'] ? '/' . $_GET['optb'] : ''). '/">' . $texttype .'</a>');
|
||||
|
||||
if ($_GET['opta'] == $type) { echo("</span>"); }
|
||||
|
||||
$sep = ' | ';
|
||||
}
|
||||
unset ($sep);
|
||||
|
||||
print_optionbar_end('', '');
|
||||
|
||||
switch ($_GET['opta'])
|
||||
{
|
||||
case 'ipv4':
|
||||
case 'ipv6':
|
||||
case 'mac':
|
||||
include('pages/search/'.$_GET['opta'].'.inc.php');
|
||||
break;
|
||||
default:
|
||||
echo("<h2>Error. Please report this to observium developers.</h2>");
|
||||
break;
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user