]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/country.cgi
proxy.pac: Don't use proxy for direct domain access.
[people/teissler/ipfire-2.x.git] / html / cgi-bin / country.cgi
index 474d60cd06572f602a38a94f3089d4f13b21a409..76035fb46d76ad0c4775e300e8d4c975dcc2b36f 100644 (file)
@@ -36,18 +36,18 @@ require "${General::swroot}/header.pl";
 
 &Header::showhttpheaders();
 
-&Header::openpage('Country Codes', 1, '');
-&Header::openbigbox('100%', 'LEFT');
-
-&Header::openbox('100%', 'LEFT', 'Flags & Country Codes:');
-print "<TABLE WIDTH='100%'>";
-print "<tr><td width='5%'><b>Flag</b></td>";
-print "<td width='5%'><b>Code</b></td>";
-print "<td width='40%'><b>Country</b></td>";
-print "<td><b>&nbsp;</b></td>";
-print "<td width='5%'><b>Flag</b></td>";
-print "<td width='5%'><b>Code</b></td>";
-print "<td width='40%'><b>Country</b></td></tr>";
+&Header::openpage($Lang::tr{'countries'}, 1, '');
+&Header::openbigbox('100%', 'left');
+
+&Header::openbox('100%', 'left', $Lang::tr{'country codes and flags'});
+print "<table class='tbl'>";
+print "<tr><th style='width=5%;'><b>$Lang::tr{'flag'}</b></th>";
+print "<th style='width=5%;'><b>$Lang::tr{'countrycode'}</b></th>";
+print "<th style='width=40%; text-align:left;'><b>$Lang::tr{'country'}</b></th>";
+print "<th>&nbsp;</th>";
+print "<th style='width=5%;'><b>$Lang::tr{'flag'}</b></th>";
+print "<th style='width=5%;'><b>$Lang::tr{'countrycode'}</b></th>";
+print "<th style='width=40%; text-align:left;'><b>$Lang::tr{'country'}</b></th></tr>";
 
 @flaglist = <$flagdir/*>;
 
@@ -57,50 +57,46 @@ foreach (@flaglist)
 {
        if (!-d) { push(@flaglistfiles,substr($_,rindex($_,"/")+1));    }
 }
-
+my $col="";
 foreach $flag (@flaglistfiles)
 {
        $lines++;
-      
-  my $flagcode = uc(substr($flag, 0, 2));
-  my $fcode = lc($flagcode);
+
+       my $flagcode = uc(substr($flag, 0, 2));
+       my $fcode = lc($flagcode);
        my $country = Locale::Country::code2country($fcode);
-  if($fcode eq 'eu') { $country = 'Europe'; }
-  if($fcode eq 'tp') { $country = 'East Timor'; }
-  if($fcode eq 'yu') { $country = 'Yugoslavia'; }
-  if ($lines % 2) {
-       print "<td><a name='$fcode'/><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$flagcode'</td>";
-       print "<td>$flagcode</td>";
-       print "<td>$country</td></tr>\n";
-  }
-  else {
-       $lines2++;
-       if($lines2 % 2) {
-               print "<tr bgcolor='${Header::table1colour}'>";
-       } else {
-               print "<tr bgcolor='${Header::table2colour}'>";
+       if($fcode eq 'eu') { $country = 'Europe'; }
+       if($fcode eq 'tp') { $country = 'East Timor'; }
+       if($fcode eq 'yu') { $country = 'Yugoslavia'; }
+       if ($lines % 2) {
+               print "<td $col><a id='$fcode'><img src='/images/flags/$fcode.png' alt='$flagcode' title='$flagcode'/></a></td>";
+               print "<td $col>$flagcode</td>";
+               print "<td $col>$country</td></tr>\n";
+       }
+       else {
+               $lines2++;
+               if($lines2 % 2) {
+                       $col="style='background-color:${Header::table2colour};'";
+               } else {
+                       $col="style='background-color:${Header::table1colour};'";
+               }
+               print "<tr>";
+               print "<td $col><a id='$fcode'><img src='/images/flags/$fcode.png' alt='$flagcode' title='$flagcode'/></a></td>";
+               print "<td $col>$flagcode</td>";
+               print "<td $col>$country</td>";
+               print "<td $col>&nbsp;</td>";
        }
-       print "<td><a name='$fcode'/><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$flagcode'</td>";
-       print "<td>$flagcode</td>";
-       print "<td>$country</td>";
-       #print "<td><img src='/blob.gif' alt='*' /></td>";
-       print "<td>&nbsp;</td>";
-  }    
 }
 
 
-print "</TABLE>";
+print "</table>";
 &Header::closebox();
 
 &Header::closebigbox();
 
 print <<END
-<div align='center'>
-<table width='80%'>
-<tr>
-<td align='center'><a href='$ENV{'HTTP_REFERER'}'>$Lang::tr{'back'}</a></td>
-</tr>
-</table>
+<div style='text-align:center'>
+<a href='$ENV{'HTTP_REFERER'}'>$Lang::tr{'back'}</a>
 </div>
 END
 ;