]>
git.ipfire.org Git - ipfire-2.x.git/blob - html/cgi-bin/country.cgi
4 # This code is distributed under the terms of the GPL
8 # 01.01.2006 Stephen Crooks
14 my $flagdir = '/home/httpd/html/images/flags';
21 require '/var/ipfire/general-functions.pl';
22 require "${General::swroot}/lang.pl";
23 require "${General::swroot}/header.pl";
25 &Header
::showhttpheaders
();
27 &Header
::openpage
('Country Codes', 1, '');
28 &Header
::openbigbox
('100%', 'LEFT');
30 &Header
::openbox
('100%', 'LEFT', 'Flags & Country Codes:');
31 print "<TABLE WIDTH='100%'>";
32 print "<tr><td width='5%'><b>Flag</b></td>";
33 print "<td width='5%'><b>Code</b></td>";
34 print "<td width='40%'><b>Country</b></td>";
35 print "<td><b> </b></td>";
36 print "<td width='5%'><b>Flag</b></td>";
37 print "<td width='5%'><b>Code</b></td>";
38 print "<td width='40%'><b>Country</b></td></tr>";
40 @flaglist = <$flagdir/*>;
46 if (!-d
) { push(@flaglistfiles,substr($_,rindex($_,"/")+1)); }
49 foreach $flag (@flaglistfiles)
53 my $flagcode = uc(substr($flag, 0, 2));
54 my $fcode = lc($flagcode);
55 my $country = Locale
::Country
::code2country
($fcode);
56 if($fcode eq 'eu') { $country = 'Europe'; }
57 if($fcode eq 'tp') { $country = 'East Timor'; }
58 if($fcode eq 'yu') { $country = 'Yugoslavia'; }
60 print "<td><a name='$fcode'/><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$flagcode'</td>";
61 print "<td>$flagcode</td>";
62 print "<td>$country</td></tr>\n";
67 print "<tr bgcolor='${Header::table1colour}'>";
69 print "<tr bgcolor='${Header::table2colour}'>";
71 print "<td><a name='$fcode'/><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$flagcode'</td>";
72 print "<td>$flagcode</td>";
73 print "<td>$country</td>";
74 #print "<td><img src='/blob.gif' alt='*' /></td>";
75 print "<td> </td>";
83 &Header
::closebigbox
();
89 <td align='center'><a href='$ENV{'HTTP_REFERER'}'>$Lang::tr{'back'}</a></td>