]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/country.cgi
suricata: Change midstream policy to "pass-flow"
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / country.cgi
index f2ae81300905ee5fafb995224471cdbe5a09aa54..30111dc21757439db90c73126d40884c8e5fb093 100644 (file)
 
 use strict;
 
-use Locale::Codes::Country;
-
 my $col;
 my $lines = '1';
 my $lines2 = '';
 
 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";
 
+require "${General::swroot}/location-functions.pl";
+
 &Header::showhttpheaders();
 
 &Header::openpage($Lang::tr{'countries'}, 1, '');
@@ -53,24 +53,24 @@ print<<END;
 END
 
 # Get a list of all supported country codes.
-my @countries = Locale::Codes::Country::all_country_codes();
+my @countries = &Location::Functions::get_locations();
 
 # Loop through whole country list.
 foreach my $country (@countries) {
        $lines++;
 
        # Convert country code into upper case.
-       my $country_uc = uc($country);
+       $country = uc($country);
 
        # Get flag icon for of the country.
-       my $flag_icon = &GeoIP::get_flag_icon($country);
+       my $flag_icon = &Location::Functions::get_flag_icon($country);
 
        # Get country name.
-       my $name = &GeoIP::get_full_country_name($country);
+       my $name = &Location::Functions::get_full_country_name($country);
 
        if ($lines % 2) {
-               print "<td $col><a id='$country'><img src='$flag_icon' alt='$country_uc' title='$country_uc'/></a></td>";
-               print "<td $col>$country_uc</td>";
+               print "<td $col><a id='$country'><img src='$flag_icon' alt='$country' title='$country'/></a></td>";
+               print "<td $col>$country</td>";
                print "<td $col>$name</td></tr>\n";
        } else {
                $lines2++;
@@ -80,8 +80,8 @@ foreach my $country (@countries) {
                        $col="style='background-color:${Header::table1colour};'";
                }
                print "<tr>";
-               print "<td $col><a id='$country'><img src='$flag_icon' alt='$country_uc' title='$country_uc'/></a></td>";
-               print "<td $col>$country_uc</td>";
+               print "<td $col><a id='$country'><img src='$flag_icon' alt='$country' title='$country'/></a></td>";
+               print "<td $col>$country</td>";
                print "<td $col>$name</td>";
                print "<td $col>&nbsp;</td>";
 
@@ -96,10 +96,17 @@ foreach my $country (@countries) {
 print "</table>";
 &Header::closebox();
 
-&Header::closebigbox();
+print <<END
+<div align='center'>
+<table width='80%'>
+<tr>
+       <td align='center'><a href='$ENV{'HTTP_REFERER'}'><img src='/images/back.png' alt='$Lang::tr{'back'}' title='$Lang::tr{'back'}' /></a></td>
+</tr>
+</table>
+</div>
+END
+;
 
-print "<div style='text-align:center'><a href='$ENV{'HTTP_REFERER'}'>$Lang::tr{'back'}</a></div>\n";
+&Header::closebigbox();
 
 &Header::closepage();
-
-