X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=web%2Fstempmap.pl;h=33cad52a7eaac37efcff92c3ae9147053ff33a33;hb=3ab0bccbc13a5157f2a76abd21f58a23fcafcfc7;hp=b2df70b688461ae7f841a669fdcf2793a182df35;hpb=d6cfbb682b3492d24b6623fbf1345c5b2b95f230;p=nms diff --git a/web/stempmap.pl b/web/stempmap.pl index b2df70b..33cad52 100755 --- a/web/stempmap.pl +++ b/web/stempmap.pl @@ -5,17 +5,18 @@ 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');