Source for file allvmps.php
Documentation is available at allvmps.php
# 2006.05.25/Sean Boran: Production
# 2006.01.24/Thomas Dagonnier: First prototype
# Copyright (C) 2006 FreeNAC
# Licensed under GPL, see LICENSE file or http://www.gnu.org/licenses/gpl.html
####################################
require_once('../../etc/config.inc');
require_once('./webfuncs.inc');
global $dbuser,$dbpass,$conf;
echo
"List all ports used on all switches in the last ".
$conf->web_lastdays.
" days, and which end-devices were seen on each port. For each end device, the node name and associated user is shown.<br>";
$sel =
"SELECT DISTINCT(switch.id) as id, switch.name as name, switch.ip as ip, CONCAT(building.name,' ',location.name) as location
LEFT JOIN port ON port.id = systems.LastPort
LEFT JOIN switch ON port.switch = switch.id
LEFT JOIN location ON location.id = switch.location
LEFT JOIN building ON building.id = location.building_id
WHERE (TO_DAYS(LastSeen)>=TO_DAYS(CURDATE())-".
$conf->web_lastdays.
") AND port.switch != ''
echo
'<table cellspacing=0 cellpadding=5 border=1>';
if (($swi['ip'] ==
'0.0.0.0') ||
($swi['ip'] ==
'') ||
(stristr($swi['ip'],'0.0.0'))) {
echo
'<!-- Not graphed : '.
$swi['name'].
' ('.
$swi['location'].
" / ".
$swi['ip'].
" -->";
echo
"<tr><th align=left>".
echo
"<br><img src=\"vmpsdot.php?sw=".
$swi['id'].
"\" border=0>\n";
else echo
"<h1>ACCESS DENIED</h1>";
Documentation generated on Mon, 17 Nov 2008 01:10:22 +0100 by phpDocumentor 1.4.0