First commit based on v0.1

This commit is contained in:
2023-02-13 08:34:23 +01:00
commit 2efd4ad0ab
56 changed files with 3374 additions and 0 deletions

59
assigniptonode.php Normal file
View File

@@ -0,0 +1,59 @@
<?php
include("header.php");
$ip = $_GET['ip'];
$subnet_id = $_GET['subnet_id'];
// get node info
$result = mysql_query("SELECT subnet_address, subnet_mask FROM subnet WHERE subnet_id='$subnet_id'");
while ($row = mysql_fetch_object($result)) {
$subnet_address = $row->subnet_address;
$subnet_mask = $row->subnet_mask;
}
?>
<table border="0">
<tr>
<td>
<b>IP:</b>
</td>
<td>
<?php echo $ip; ?>
</td>
</tr>
<tr>
<td>
<b>Subnet:</b>
</td>
<td>
<a href="subnetview.php?subnet_id=<?php echo $subnet_id; ?>&page=<?php echo page($ip); ?>"><?php echo $subnet_address; ?>/<?php echo $subnet_mask; ?></a>
</td>
</tr>
</table>
<?php
// display only if admin
if($_SESSION['suser_level'] >= 2) {
?>
<p>
<table border="0">
<tr>
<td>
<img src="images/arrow.gif" border="0"><a href="assigniptoasset.php?ip=<?php echo $ip; ?>&subnet_id=<?php echo $subnet_id; ?>">Assign IP to asset</a>
</td>
</tr>
<tr>
<td>
<img src="images/arrow.gif" border="0"><a href="nodeadd.php?ip=<?php echo $ip; ?>&subnet_id=<?php echo $subnet_id; ?>">Create new asset</a>
</td>
</tr>
</table>
<?php
// end display only if admin
}
include("footer.php");
?>