示例#1
0
     ColHead('ifupdate');
 }
 if (in_array("ifchanges", $col)) {
     ColHead('ifchanges');
 }
 if (in_array("ifdet", $col)) {
     echo "<th>IF Details</th>";
 }
 if (in_array("graph", $col)) {
     echo "<th>Traffic / Errors</th>";
 }
 if (in_array("firstseen", $col)) {
     ColHead('firstseen');
 }
 if (in_array("lastseen", $col)) {
     ColHead('lastseen');
 }
 if (in_array("ssh", $col)) {
     echo "<th>SSH server</th>";
 }
 if (in_array("tel", $col)) {
     echo "<th>Telnet server</th>";
 }
 if (in_array("www", $col)) {
     echo "<th>Web server</th>";
 }
 if (in_array("nbt", $col)) {
     echo "<th>Netbios</th>";
 }
 echo "</tr>\n";
 $link = @DbConnect($dbhost, $dbuser, $dbpass, $dbname);
示例#2
0
	if( in_array("name",$col) )	{ColHead('name');}
	if( in_array("ip",$col) )	{ColHead('ip');}
	if( in_array("ipupdate",$col) )	{ColHead('ipupdate');}
	if( in_array("ipchanges",$col) ){ColHead('ipchanges');}
	if( in_array("iplost",$col) )	{ColHead('iplost');}
	if( in_array("mac",$col) )	{ColHead('mac');}
	if( in_array("oui",$col) )	{ColHead('oui');}
	if( in_array("ifname",$col) )	{ColHead('ifname');}
	if( in_array("vlanid",$col) )	{ColHead('vlanid');}
	if( in_array("ifmetric",$col) )	{ColHead('ifmetric');}
	if( in_array("ifupdate",$col) )	{ColHead('ifupdate');}
	if( in_array("ifchanges",$col) ){ColHead('ifchanges');}
	if(in_array("ifdet",$col))	{echo "<th>IF Details</th>";}
	if(in_array("graph",$col))	{echo "<th>Traffic / Errors</th>";}
	if( in_array("firstseen",$col) ){ColHead('firstseen');}
	if( in_array("lastseen",$col) )	{ColHead('lastseen');}
	if( in_array("ssh",$col) )	{echo "<th>SSH server</th>";}
	if( in_array("tel",$col) )	{echo "<th>Telnet server</th>";}
	if( in_array("www",$col) )	{echo "<th>Web server</th>";}
	if( in_array("nbt",$col) )	{echo "<th>Netbios</th>";}
	echo "</tr>\n";

	$link	= @DbConnect($dbhost,$dbuser,$dbpass,$dbname);
	$query	= GenQuery('nodes','s','*',$ord,'',array($ina,$inb),array($opa,$opb),array($sta,$stb),array($cop));
	$res	= @DbQuery($query,$link);
	if($res){
		$row = 0;
		while( ($n = @DbFetchRow($res)) ){
			if ($row % 2){$bg = "txta"; $bi = "imga";}else{$bg = "txtb"; $bi = "imgb";}
			$row++;
			$name		= preg_replace("/^(.*?)\.(.*)/","$1", $n[0]);
}
?>
</SELECT>
</th>
<th width=80><input type="submit" value="Show"></th>
</tr></table></form><p>
<?
if ($ina){
	?>
<table class="content"><tr class="<?php 
echo $modgroup[$self];
?>
2">
	<?
	foreach($col as $h){
		ColHead($h);
	}
	echo "</tr>\n";

	$link	= @DbConnect($dbhost,$dbuser,$dbpass,$dbname);
	$query	= GenQuery('modules','s','*',$ord,'',array($ina,$inb),array($opa,$opb),array($sta,$stb),array($cop) );
	$res	= @DbQuery($query,$link);
	if($res){
		$row = 0;
		while( ($m = @DbFetchRow($res)) ){
			if ($row % 2){$bg = "txta"; $bi = "imga";}else{$bg = "txtb"; $bi = "imgb";}
			$row++;
			$ud = rawurlencode($m[0]);
			echo "<tr class=\"$bg\">";
			if(in_array("device",$col)){
				echo "<td><a href=Devices-Status.php?dev=$ud>$m[0]</a></td>\n";
			$opa	= '=';
			$target	='device';
		}
?>
<h2>List</h2>
<table class="content"><tr class="<?php 
echo $modgroup[$self];
?>
2">
<?

		ColHead('device',80);
		ColHead('config');
		ColHead('changes');
		?><th>OS</th><?
		ColHead('time');

		$query	= GenQuery('configs','s','*',$ord,'',array($target),array($opa),array($str));

		$res	= @DbQuery($query,$link);
		if($res){
			$row = 0;
			while( ($con = @DbFetchRow($res)) ){
				if ($row % 2){$bg = "txta"; $bi = "imga";}else{$bg = "txtb"; $bi = "imgb";}
				$row++;
				$img	= $devic[$con[0]];
				$typ	= $devty[$con[0]];
				$cfg	= substr(implode("\n",preg_grep("/$str/i",split("\n",$con[1]) ) ),0,80 ) . "...";
				$chg	= substr(implode("\n",preg_grep("/$str/i",split("\n",$con[2]) ) ),0,80 );
				$ud	= rawurlencode($con[0]);
				echo "<tr class=\"$bg\"><th class=\"$bi\">\n";