X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=web%2Foverlay.pl;h=3265b070e7b6e71be10f36fe327c28631ecf28bb;hb=1e7869f8141084245dcd34fb065f38a418517e7b;hp=21eff198badc0f7778cb3e0f0c33b75e80ed4ecd;hpb=d6cfbb682b3492d24b6623fbf1345c5b2b95f230;p=nms diff --git a/web/overlay.pl b/web/overlay.pl index 21eff19..3265b07 100755 --- a/web/overlay.pl +++ b/web/overlay.pl @@ -3,10 +3,11 @@ use GD; use LWP::Simple; use CGI; use DBI; +use lib '../include'; +use nms; 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 $cam = $cgi->param('cam'); if (!defined($cam) || ($cam ne "1" && $cam ne "2")) { @@ -145,7 +146,7 @@ for my $y (0..479) { } -print CGI::header(-type=>'image/png', -refresh=>'10; http://nms.tg05.gathering.org/overlay.pl?cam=' . $cam); +print CGI::header(-type=>'image/png', -refresh=>'10; http://nms.tg07.gathering.org/overlay.pl?cam=' . $cam); print $gd->png; sub get_color {