]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/logs.cgi/firewalllogcountry.dat
suricata: Change midstream policy to "pass-flow"
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / logs.cgi / firewalllogcountry.dat
index 949f2599daade08aa40d9285a3c754bccf419c95..4e998a567a13e024951db992f425fbf520adb94b 100644 (file)
@@ -4,7 +4,7 @@
 #
 # 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
@@ -18,7 +18,7 @@ use Getopt::Std;
 #use CGI::Carp 'fatalsToBrowser';
 
 require '/var/ipfire/general-functions.pl';
-require "${General::swroot}/geoip-functions.pl";
+require "${General::swroot}/location-functions.pl";
 require "${General::swroot}/lang.pl";
 require "${General::swroot}/header.pl";
 
@@ -150,7 +150,7 @@ my $longmonthstr = $longmonths[$cgiparams{'MONTH'}];
 my $day = $cgiparams{'DAY'};
 my $daystr='';
 if ($day <= 9) {
-       $daystr = " $day"; 
+       $daystr = " $day";
 }
 else {
        $daystr = $day;
@@ -182,7 +182,7 @@ if (!$skip)
                        $lines++;
                }
        }
-       close (FILE);   
+       close (FILE);
 }
 
 $skip=0;
@@ -249,7 +249,7 @@ print <<END
        <select name='DAY'>
 END
 ;
-for ($day = 1; $day <= 31; $day++) 
+for ($day = 1; $day <= 31; $day++)
 {
        print "\t<option ";
        if ($day == $cgiparams{'DAY'}) {
@@ -308,7 +308,7 @@ foreach $_ (@log)
                # Traffic from red
                if($srcaddr ne '') {
                        # srcaddr is set
-                       my $ccode = &GeoIP::lookup($srcaddr);
+                       my $ccode = &Location::Functions::lookup_country_code($srcaddr);
                        if ($ccode eq '') {
                                $ccode = 'unknown';
                        }
@@ -386,7 +386,7 @@ my @numb;
 my $o;
 
 if($cgiparams{'otherspie'} == 2 ){}
-else{ 
+else{
        my $numothers;
        for($o=0;$o<$pienumber;$o++){
                $numothers = $numothers + $numb[$o];
@@ -405,7 +405,7 @@ my $color=0;
 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);
@@ -482,7 +482,7 @@ for($s=0;$s<$lines;$s++)
                my $fcode = lc($key[$s]);
 
                # Get flag icon for of the country.
-               my $flag_icon = &GeoIP::get_flag_icon($fcode);
+               my $flag_icon = &Location::Functions::get_flag_icon($fcode);
 
                if($flag_icon) {
                        print "<td align='center' $col><a href='/cgi-bin/country.cgi#$fcode'><img src='$flag_icon' border='0' align='absmiddle' alt='$key[$s]' title='$key[$s]'></a></td>";