]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/logs.cgi/firewalllogip.dat
Hardcode theme to ipfire
[ipfire-2.x.git] / html / cgi-bin / logs.cgi / firewalllogip.dat
index 7b117deabec36e225f7f18d0e350b194ecae68b1..4474a8c595fad8434c580465216b679be04cb421 100644 (file)
@@ -18,13 +18,10 @@ 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";
 
-# Libloc database handle.
-my $libloc_db_handle = &GeoIP::init();
-
 use POSIX();
 
 my %cgiparams=();
@@ -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,14 +435,15 @@ for($s=0;$s<$lines;$s++)
        $col="bgcolor='$color{\"color$colorIndex\"}'";
        print "<tr>";
 
-       my $ccode = &GeoIP::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>";
 
        # Get flag icon for of the country.
-       my $flag_icon = &GeoIP::get_flag_icon($ccode);
+       my $flag_icon = &Location::Functions::get_flag_icon($ccode);
 
        if ( $flag_icon ) {
                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>";