'; // look for asset $result = mysql_query("SELECT asset_id, asset_name FROM asset WHERE asset_name LIKE '$needle' OR asset_info LIKE '%$needle%' ORDER BY asset_name"); if (mysql_num_rows($result)>0) { echo 'Asset(s):'; } while ($row = mysql_fetch_object($result)) { echo '' . $row->asset_name . ''; $resultcounter++; } // look for location $result = mysql_query("SELECT location_id, location_name FROM location WHERE location_name LIKE '$needle' OR location_info LIKE '%$needle%' ORDER BY location_name"); if (mysql_num_rows($result)>0) { echo 'Location(s):'; } while ($row = mysql_fetch_object($result)) { echo '' . $row->location_name . ''; $resultcounter++; } // look for ip $result = mysql_query("SELECT node_id, ip FROM node WHERE ip LIKE '$needle' ORDER BY ip"); if (mysql_num_rows($result)>0) { echo 'Registered IP(s):'; } while ($row = mysql_fetch_object($result)) { echo '' . $row->ip . ''; $resultcounter++; } // look for mac $mac = strip_mac($needle); $result = mysql_query("SELECT node_id, mac FROM node WHERE mac LIKE '$mac' ORDER BY mac"); if (mysql_num_rows($result)>0) { echo 'MAC(s):'; } while ($row = mysql_fetch_object($result)) { echo '' . write_mac($row->mac) . ''; $resultcounter++; } // look for dns1 $result = mysql_query("SELECT node_id, dns1 FROM node WHERE dns1 LIKE '$needle' ORDER BY dns1"); if (mysql_num_rows($result)>0) { echo 'DNS name(s):'; } while ($row = mysql_fetch_object($result)) { echo '' . $row->dns1 . ''; $resultcounter++; } // look for dns2 $result = mysql_query("SELECT node_id, dns2 FROM node WHERE dns2 LIKE '$needle' ORDER BY dns2"); if (mysql_num_rows($result)>0) { echo 'DNS alias(es):'; } while ($row = mysql_fetch_object($result)) { echo '' . $row->dns2 . ''; $resultcounter++; } // look for subnet $result = mysql_query("SELECT subnet_id, subnet_address FROM subnet WHERE subnet_address LIKE '$needle' OR subnet_info LIKE '%$needle%' ORDER BY subnet_address"); if (mysql_num_rows($result)>0) { echo 'Subnet(s):'; } while ($row = mysql_fetch_object($result)) { echo '' . $row->subnet_address . ''; $resultcounter++; } // look for vlan $result = mysql_query("SELECT vlan_id, vlan_name FROM vlan WHERE vlan_name LIKE '$needle' OR vlan_info LIKE '%$needle%' ORDER BY vlan_name"); if (mysql_num_rows($result)>0) { echo 'VLAN(s):'; } while ($row = mysql_fetch_object($result)) { echo '' . $row->vlan_name . ''; $resultcounter++; } echo ' '; echo 'Results found: ' . $resultcounter . ''; echo ''; include("footer.php"); ?>