]> git.sesse.net Git - nms/blobdiff - web/stempmap.pl
Use the right image.
[nms] / web / stempmap.pl
index b2df70b688461ae7f841a669fdcf2793a182df35..33cad52a7eaac37efcff92c3ae9147053ff33a33 100755 (executable)
@@ -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');