use CGI;
use GD;
use DBI;
+use lib '../include';
+use nms;
use strict;
use warnings;
GD::Image->trueColor(1);
-my $img = GD::Image->new('snmp-bg.png');
+my $img = GD::Image->new('bg07.png');
#my $img = GD::Image->new(100,100);
my $cgi = CGI->new;
-my $dbh = DBI->connect("dbi:Pg:dbname=snmpfetch;host=violet.tg05.gathering.org", "snmpfetch", "removed")
- or die "Couldn't connect to database";
+my $dbh = nms::db_connect();
my $sgetpoll = $dbh->prepare('select switch,(select temp from temppoll where switches.switch=temppoll.switch AND temp != 0 order by id desc limit 1) AS temp,placement from switches natural join placements');