]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/logs.cgi/firewalllogip.dat
suricata: Change midstream policy to "pass-flow"
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / logs.cgi / firewalllogip.dat
index 670d72a526fc848946fd32e990a4b83dc117be86..a7c6e5f80b5d2b4622ee1b7b246f40497c074c8d 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
@@ -22,9 +22,6 @@ require "${General::swroot}/location-functions.pl";
 require "${General::swroot}/lang.pl";
 require "${General::swroot}/header.pl";
 
-# Libloc database handle.
-my $libloc_db_handle = &Location::Functions::init();
-
 use POSIX();
 
 my %cgiparams=();
@@ -184,7 +181,7 @@ if (!$skip)
                        $lines++;
                }
        }
-       close (FILE);   
+       close (FILE);
 }
 
 $skip=0;
@@ -240,7 +237,7 @@ for ($month = 0; $month < 12; $month++)
 {
        print "\t<option ";
        if ($month == $cgiparams{'MONTH'}) {
-               print "selected='selected' "; 
+               print "selected='selected' ";
        }
        print "value='$month'>$longmonths[$month]</option>\n";
 }
@@ -252,11 +249,11 @@ 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'}) {
-               print "selected='selected' "; 
+               print "selected='selected' ";
        }
        print "value='$day'>$day</option>\n";
 }
@@ -362,7 +359,7 @@ my @numb;
 my $o;
 
 if($cgiparams{'otherspie'} == 2 ){}
-else{ 
+else{
        my $numothers;
        for($o=0;$o<$pienumber;$o++){
                $numothers = $numothers + $numb[$o];
@@ -381,7 +378,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);
@@ -438,8 +435,9 @@ for($s=0;$s<$lines;$s++)
        $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>";