#
# This code is distributed under the terms of the GPL
#
-# JC HERITIER
+# JC HERITIER
# page inspired from the initial firewalllog.dat
#
# Modified for IPFire by Christian Schmidt
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
-# Libloc database handle.
-my $libloc_db_handle = &Location::Functions::init();
-
use POSIX();
my %cgiparams=();
$lines++;
}
}
- close (FILE);
+ close (FILE);
}
$skip=0;
{
print "\t<option ";
if ($month == $cgiparams{'MONTH'}) {
- print "selected='selected' ";
+ print "selected='selected' ";
}
print "value='$month'>$longmonths[$month]</option>\n";
}
<select name='DAY'>
END
;
-for ($day = 1; $day <= 31; $day++)
+for ($day = 1; $day <= 31; $day++)
{
print "\t<option ";
if ($day == $cgiparams{'DAY'}) {
- print "selected='selected' ";
+ print "selected='selected' ";
}
print "value='$day'>$day</option>\n";
}
my $o;
if($cgiparams{'otherspie'} == 2 ){}
-else{
+else{
my $numothers;
for($o=0;$o<$pienumber;$o++){
$numothers = $numothers + $numb[$o];
my %color = ();
my %mainsettings = ();
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
-&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
+&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) {
my $mygraph = GD::Graph::pie->new(500, 350);
$col="bgcolor='$color{\"color$colorIndex\"}'";
print "<tr>";
- my $ccode = &Location::Functions::lookup_country_code($libloc_db_handle, $key[$s]);
-
+ # Get country code.
+ my $ccode = &Location::Functions::lookup_country_code($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>";
print "<td align='center' $col><a href='/cgi-bin/ipinfo.cgi?ip=$key[$s]'>$key[$s]</a></td>";