]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/logs.cgi/firewalllogip.dat
logs.cgi/*: Use new location lookup method.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / logs.cgi / firewalllogip.dat
index c73d24fd663fee6af86ff0cc31e669f7acf217b0..7b117deabec36e225f7f18d0e350b194ecae68b1 100644 (file)
@@ -22,6 +22,9 @@ require "${General::swroot}/geoip-functions.pl";
 require "${General::swroot}/lang.pl";
 require "${General::swroot}/header.pl";
 
+# Libloc database handle.
+my $libloc_db_handle = &GeoIP::init();
+
 use POSIX();
 
 my %cgiparams=();
@@ -435,7 +438,7 @@ for($s=0;$s<$lines;$s++)
        $col="bgcolor='$color{\"color$colorIndex\"}'";
        print "<tr>";
 
-       my $ccode = &GeoIP::lookup($key[$s]);
+       my $ccode = &GeoIP::lookup_country_code($libloc_db_handle, $key[$s]);
   
        $color++;
        print "<td align='center' $col><form method='post' action='showrequestfromip.dat'><input type='hidden' name='MONTH' value='$cgiparams{'MONTH'}'> <input type='hidden' name='DAY' value='$cgiparams{'DAY'}'> <input type='hidden' name='ip' value='$key[$s]'> <input type='submit' value='$Lang::tr{'details'}'></form></td>";