"; if ($ent['entPhysicalClass'] == 'chassis') { echo ' '; } if ($ent['entPhysicalClass'] == 'module') { echo ' '; } if ($ent['entPhysicalClass'] == 'port') { echo ' '; } if ($ent['entPhysicalClass'] == 'container') { echo ' '; } if ($ent['entPhysicalClass'] == 'sensor') { echo ' '; $sensor = dbFetchRow('SELECT * FROM `sensors` WHERE `device_id` = ? AND (`entPhysicalIndex` = ? OR `sensor_index` = ?)', array($device['device_id'], $ent['entPhysicalIndex'], $ent['entPhysicalIndex'])); if (count($sensor)) { $link = " href='device/device=".$device['device_id'].'/tab=health/metric='.$sensor['sensor_class']."/' onmouseover=\"return overlib('', LEFT,FGCOLOR,'#e5e5e5', BGCOLOR, '#c0c0c0', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#050505');\" onmouseout=\"return nd();\""; } } else { unset($link); } if ($ent['entPhysicalClass'] == 'backplane') { echo ' '; } if ($ent['entPhysicalParentRelPos'] > '-1') { echo ''.$ent['entPhysicalParentRelPos'].'. '; } if ($link) { echo ""; } if ($ent['ifIndex']) { $interface = dbFetchRow('SELECT * FROM `ports` WHERE ifIndex = ? AND device_id = ?', array($ent['ifIndex'], $device['device_id'])); $ent['entPhysicalName'] = generate_port_link($interface); } if ($ent['entPhysicalModelName'] && $ent['entPhysicalName']) { echo ''.$ent['entPhysicalModelName'].' ('.$ent['entPhysicalName'].')'; } elseif ($ent['entPhysicalModelName']) { echo ''.$ent['entPhysicalModelName'].''; } elseif (is_numeric($ent['entPhysicalName']) && $ent['entPhysicalVendorType']) { echo ''.$ent['entPhysicalName'].' '.$ent['entPhysicalVendorType'].''; } elseif ($ent['entPhysicalName']) { echo ''.$ent['entPhysicalName'].''; } elseif ($ent['entPhysicalDescr']) { echo ''.$ent['entPhysicalDescr'].''; } if ($ent['entPhysicalClass'] == 'sensor') { echo ' ('.$ent['entSensorValue'].' '.$ent['entSensorType'].')'; } echo "
".$ent['entPhysicalDescr']; if ($link) { echo ''; } if ($ent['entPhysicalSerialNum']) { echo "
Serial No. ".$ent['entPhysicalSerialNum'].' '; } echo '
'; $count = dbFetchCell("SELECT COUNT(*) FROM `entPhysical` WHERE device_id = '".$device['device_id']."' AND entPhysicalContainedIn = '".$ent['entPhysicalIndex']."'"); if ($count) { echo ''; } echo ''; }//end foreach }//end printEntPhysical() echo "
Expand All Nodes Collapse All Nodes
"; echo "
'; $pagetitle = 'Inventory';