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

81
index.php Normal file
View File

@@ -0,0 +1,81 @@
<?php
include("header.php");
// calculate stats
$query = mysql_query("SELECT asset_id FROM asset") or die(mysql_error());
$assetcount = mysql_num_rows($query);
$query = mysql_query("SELECT location_id FROM location") or die(mysql_error());
$locationcount = mysql_num_rows($query);
$query = mysql_query("SELECT node_id FROM node") or die(mysql_error());
$nodecount = mysql_num_rows($query);
$query = mysql_query("SELECT subnet_id FROM subnet") or die(mysql_error());
$subnetcount = mysql_num_rows($query);
$query = mysql_query("SELECT vlan_id FROM vlan") or die(mysql_error());
$vlancount = mysql_num_rows($query);
?>
<table border="0">
<tr>
<td>
<b>IP Reg <?php echo $config_version; ?></b>
</td>
</tr>
</table>
<p>
<table border="0">
<tr>
<td colspan="2">
<b>Statistics:</b>
</td>
</tr>
<tr>
<td width="100">
Assets:
</td>
<td align="right">
<?php echo $assetcount; ?>
</td>
</tr>
<tr>
<td>
Locations:
</td>
<td align="right">
<?php echo $locationcount; ?>
</td>
</tr>
<tr>
<td>
Nodes:
</td>
<td align="right">
<?php echo $nodecount; ?>
</td>
</tr>
<tr>
<td>
Subnets:
</td>
<td align="right">
<?php echo $subnetcount; ?>
</td>
</tr>
<tr>
<td>
VLANs:
</td>
<td align="right">
<?php echo $vlancount; ?>
</td>
</tr>
</table>
<?php
include("footer.php");
?>