First commit based on v0.1
This commit is contained in:
81
index.php
Normal file
81
index.php
Normal 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");
|
||||
?>
|
||||
Reference in New Issue
Block a user