IP Reg is a IPAM tool to keep track of assets, nodes (IP addresses, MAC addresses, DNS aliases) within different subnets, over different locations or even VLAN's. Written in PHP, used with a MySQL-database to have a unique insight in your local network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
ipreg/assetclassview.php

70 lines
1.6 KiB

<?php
include("header.php");
// get id
$assetclass_id = $_GET['assetclass_id'];
// get assetclassgroup info
$result = mysql_query("SELECT ac.assetclassgroup_id, ac.assetclass_name, acg.assetclassgroup_name FROM assetclass ac, assetclassgroup acg WHERE ac.assetclass_id='$assetclass_id' AND acg.assetclassgroup_id=ac.assetclassgroup_id");
while ($row = mysql_fetch_object($result)) {
$assetclass_name = $row->assetclass_name;
$assetclassgroup_id = $row->assetclassgroup_id;
$assetclassgroup_name = $row->assetclassgroup_name;
}
?>
<table border="0">
<tr>
<td>
<b>Assetclass Name:</b>
</td>
<td>
<?php echo $assetclass_name; ?>
</td>
</tr>
<tr>
<td>
<b>Assetclass Groupname:</b>
</td>
<td>
<a href="assetclassgroupview.php?assetclassgroup_id=<?php echo $assetclassgroup_id; ?>"><?php echo $assetclassgroup_name; ?></a>
</td>
</tr>
<tr>
<td>
<b>Asset(s):</b><br>
</td>
<td>
<?php
$result = mysql_query("SELECT asset_id, asset_name FROM asset WHERE assetclass_id='$assetclass_id' ORDER BY asset_name");
while ($row = mysql_fetch_object($result)) {
echo '<a href="assetview.php?asset_id=' . $row->asset_id . '">' . $row->asset_name . '</a><br>';
}
?>
</td>
</tr>
</table>
<p>
<?php
// display only if admin
if($_SESSION['suser_level'] >= 2) {
?>
<table border="0">
<tr>
<td>
<img src="images/arrow.gif" border="0"><a href="assetclassedit.php?assetclass_id=<?php echo $assetclass_id; ?>">Modify assetclass</a>
</td>
</tr>
</table>
<?php
// end display only if admin
}
include("footer.php");
?>