# and Michael Tremer (www.ipfire.org)
use strict;
-use Geo::IP::PurePerl;
use Getopt::Std;
# enable only the following on debugging purpose
$col="bgcolor='$color{\"color$colorIndex\"}'";
print "<tr>";
- my $gi = Geo::IP::PurePerl->new();
- my $ccode = $gi->country_code_by_name($key[$s]);
- my $fcode = lc($ccode);
+ my $ccode = &GeoIP::lookup($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>";
my $flag_icon = &GeoIP::get_flag_icon($ccode);
if ( $flag_icon ) {
- print "<td align='center' $col><a href='/cgi-bin/country.cgi#$fcode'><img src='$flag_icon' border='0' align='absmiddle' alt='$ccode' title='$ccode'></a></td>";
+ print "<td align='center' $col><a href='/cgi-bin/country.cgi#$ccode'><img src='$flag_icon' border='0' align='absmiddle' alt='$ccode' title='$ccode'></a></td>";
} else {
print "<td align='center' $col></td>";
}