$interface_query = mysql_query("select * from interfaces WHERE id = '$_GET[id]'"); $interface = mysql_fetch_array($interface_query); $device_query = mysql_query("select * from devices where id = '$interface[host]'"); $device = mysql_fetch_array($device_query); $hostname = $device['hostname']; $hostid = $device['id']; $ifname = $interface['if']; $up = $interface['up']; $up_admin = $interface['up_admin']; $ifIndex = $interface['ifIndex']; $speed = humanspeed($interface['ifSpeed']); $ifalias = $interface['name']; if($interface['ifPhysAddress']) { $mac = "$interface[ifPhysAddress]"; } $color = "black"; if ($up_admin == "down") { $status = "Disabled"; } if ($up_admin == "up" && $up == "down") { $status = "Enabled / Disconnected"; } if ($up_admin == "up" && $up == "up") { $status = "Enabled / Connected"; } $i = 1; $inf = fixifName($ifname); # $bg="#ffffff"; echo("