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, '');
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++;
$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> </td>";
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();
-
-