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.
69 lines
1.5 KiB
69 lines
1.5 KiB
<?php
|
|
/*****************************************************************************
|
|
IP Reg, a PHP/MySQL IPAM tool
|
|
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
|
Copyright (C) 2011-2023 Thomas Hooge
|
|
|
|
SPDX-License-Identifier: GPL-3.0-or-later
|
|
*****************************************************************************/
|
|
|
|
include("includes.php");
|
|
|
|
include("header.php");
|
|
|
|
// asset
|
|
$query = "SELECT
|
|
COUNT(asset_id) AS asset_counter
|
|
FROM
|
|
asset";
|
|
|
|
$assets = $db->db_select($query);
|
|
$smarty->assign("asset_counter", $assets[0]['asset_counter']);
|
|
|
|
// location
|
|
$query = "SELECT
|
|
COUNT(location_id) AS location_counter
|
|
FROM
|
|
location";
|
|
|
|
$locations = $db->db_select($query);
|
|
$smarty->assign("location_counter", $locations[0]['location_counter']);
|
|
|
|
// node
|
|
$query = "SELECT
|
|
COUNT(node_id) AS node_counter
|
|
FROM
|
|
node";
|
|
|
|
$nodes = $db->db_select($query);
|
|
$smarty->assign("node_counter", $nodes[0]['node_counter']);
|
|
|
|
// subnet
|
|
$query = "SELECT
|
|
COUNT(subnet_id) AS subnet_counter
|
|
FROM
|
|
subnet";
|
|
$subnets = $db->db_select($query);
|
|
$smarty->assign("subnet_counter", $subnets[0]['subnet_counter']);
|
|
|
|
// vlan
|
|
$query = "SELECT
|
|
COUNT(vlan_id) AS vlan_counter
|
|
FROM
|
|
vlan";
|
|
|
|
$vlans = $db->db_select($query);
|
|
$smarty->assign("vlan_counter", $vlans[0]['vlan_counter']);
|
|
|
|
// zone
|
|
$query = "SELECT
|
|
COUNT(zone_id) AS zone_counter
|
|
FROM
|
|
zone";
|
|
$zones = $db->db_select($query);
|
|
$smarty->assign("zone_counter", $zones[0]['zone_counter']);
|
|
|
|
$smarty->display("index.tpl");
|
|
|
|
include("footer.php");
|
|
?>
|
|
|