mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add inventory
git-svn-id: http://www.observium.org/svn/observer/trunk@284 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
24
html/pages/inventory.php
Normal file
24
html/pages/inventory.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?
|
||||||
|
|
||||||
|
$sql = "SELECT * from entPhysical AS E, devices AS D WHERE E.device_id = D.device_id";
|
||||||
|
|
||||||
|
if($_POST['search']) { $sstring = $_POST['search']; $sql = "SELECT * from entPhysical AS E, devices AS D WHERE E.entPhysicalModelName LIKE '$sstring' AND E.device_id = D.device_id"; }
|
||||||
|
|
||||||
|
echo("<div style='align: right;'><form method=post><input name=search>$sstring</input><submit></form></div>");
|
||||||
|
|
||||||
|
|
||||||
|
$query = mysql_query($sql);
|
||||||
|
echo("<table cellspacing=0 cellpadding=2 width=100%>");
|
||||||
|
|
||||||
|
echo("<tr><th>Hostname</th><th>Description</th><th>Name</th><th>Part No</th><th>Serial No</th></tr>");
|
||||||
|
|
||||||
|
while($entry = mysql_fetch_array($query)) {
|
||||||
|
if($bg == $list_colour_a) { $bg = $list_colour_b; } else { $bg=$list_colour_a; }
|
||||||
|
echo("<tr style=\"background-color: $bg\"><td>" . generatedevicelink($entry, shortHost($entry['hostname'])) . "</td><td>" . $entry['entPhysicalDescr'] . "</td><td>" . $entry['entPhysicalName'] . "</td><td>" . $entry['entPhysicalModelName'] . "</td><td>" . $entry['entPhysicalSerialNum'] . "</td></tr>");
|
||||||
|
|
||||||
|
}
|
||||||
|
echo("</table>");
|
||||||
|
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
|
Reference in New Issue
Block a user