$vlans=dbFetchRows("SELECT * FROM `ports_vlans` AS PV, vlans AS V WHERE PV.`interface_id` = '".$port['interface_id']."' and PV.`device_id` = '".$device['device_id']."' AND V.`vlan_vlan` = PV.vlan AND V.device_id = PV.device_id");
$otherports=dbFetchRows("SELECT * FROM `ports_vlans` AS V, `ports` as P WHERE V.`device_id` = ? AND V.`vlan` = ? AND P.interface_id = V.interface_id",array($device['device_id'],$vlan['vlan']));
foreach($otherportsas$otherport)
{
$vlan_ports[$otherport[ifIndex]]=$otherport;
}
$otherports=dbFetchRows("SELECT * FROM ports WHERE `device_id` = ? AND `ifVlan` = ?",array($device['device_id'],$vlan['vlan']));