mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
some formatting cleanups, introduce some more FIXMEs to look at, plus replace mysql_fetch_array by mysql_fetch_assoc, for great justice
git-svn-id: http://www.observium.org/svn/observer/trunk@2029 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -127,20 +127,20 @@ if ($_GET['optd'] == "top10")
|
||||
`ports` AS I, `devices` AS D WHERE M.interface_id = '".$interface['interface_id']."' AND I.interface_id = M.interface_id
|
||||
AND I.device_id = D.device_id ORDER BY bps DESC");
|
||||
|
||||
while ($acc = mysql_fetch_array($query))
|
||||
while ($acc = mysql_fetch_assoc($query))
|
||||
{
|
||||
if (!is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
||||
$addy = mysql_fetch_array(mysql_query("SELECT * FROM ipv4_mac where mac_address = '".$acc['mac']."'"));
|
||||
$addy = mysql_fetch_assoc(mysql_query("SELECT * FROM ipv4_mac where mac_address = '".$acc['mac']."'"));
|
||||
$name = gethostbyaddr($addy['ipv4_address']);
|
||||
|
||||
$arp_host = mysql_fetch_array(mysql_query("SELECT * FROM ipv4_addresses AS A, ports AS I, devices AS D WHERE A.ipv4_address = '".$addy['ipv4_address']."' AND I.interface_id = A.interface_id AND D.device_id = I.device_id"));
|
||||
$arp_host = mysql_fetch_assoc(mysql_query("SELECT * FROM ipv4_addresses AS A, ports AS I, devices AS D WHERE A.ipv4_address = '".$addy['ipv4_address']."' AND I.interface_id = A.interface_id AND D.device_id = I.device_id"));
|
||||
if ($arp_host) { $arp_name = generate_device_link($arp_host); $arp_name .= " ".generate_port_link($arp_host); } else { unset($arp_if); }
|
||||
|
||||
if ($name == $addy['ipv4_address']) { unset ($name); }
|
||||
if (mysql_result(mysql_query("SELECT count(*) FROM bgpPeers WHERE device_id = '".$acc['device_id']."' AND bgpPeerIdentifier = '".$addy['ipv4_address']."'"),0))
|
||||
{
|
||||
$peer_query = mysql_query("SELECT * FROM bgpPeers WHERE device_id = '".$acc['device_id']."' AND bgpPeerIdentifier = '".$addy['ipv4_address']."'");
|
||||
$peer_info = mysql_fetch_array($peer_query);
|
||||
$peer_info = mysql_fetch_assoc($peer_query);
|
||||
} else { unset ($peer_info); }
|
||||
|
||||
if ($peer_info)
|
||||
|
||||
Reference in New Issue
Block a user