mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	git-svn-id: http://www.observium.org/svn/observer/trunk@3073 61d68cd4-352d-0410-923a-c4978735b2b8
		
			
				
	
	
		
			47 lines
		
	
	
		
			1023 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1023 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
$pagetitle[] = "Search";
 | 
						|
 | 
						|
$sections = array('ipv4' => 'IPv4 Address', 'ipv6' => 'IPv6 Address', 'mac' => 'MAC Address', 'arp' => 'ARP Table');
 | 
						|
 | 
						|
if (!isset($vars['search'])) { $vars['search'] = "ipv4"; }
 | 
						|
 | 
						|
print_optionbar_start('', '');
 | 
						|
 | 
						|
 echo('<span style="font-weight: bold;">Search</span> » ');
 | 
						|
 | 
						|
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("<h2>Error. Please report this to observium developers.</h2>");
 | 
						|
    break;
 | 
						|
}
 | 
						|
 | 
						|
?>
 |