]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/logs.cgi/firewalllogip.dat
CGIs angepasst damit das httpd log sauberer bleibt
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / logs.cgi / firewalllogip.dat
index b3f5535191d480cf325281f74b246975fd1bc01a..3ec3f6df2cf9b197fff133335328c4e77d01470e 100644 (file)
@@ -15,8 +15,8 @@ use Geo::IP::PurePerl;
 use Getopt::Std;
 
 # enable only the following on debugging purpose
-use warnings;
-use CGI::Carp 'fatalsToBrowser';
+#use warnings;
+#use CGI::Carp 'fatalsToBrowser';
 
 require '/var/ipfire/general-functions.pl';
 require "${General::swroot}/lang.pl";
@@ -24,10 +24,6 @@ require "${General::swroot}/header.pl";
 
 use POSIX();
 
-#workaround to suppress a warning when a variable is used only once
-my @dummy = ( ${Header::table2colour} );
-undef (@dummy);
-
 my %cgiparams=();
 my %settings=();
 my $pienumber;
@@ -448,7 +444,10 @@ for($s=0;$s<$lines;$s++)
   $color++;
   print "<TD ALIGN='CENTER'><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='details'></form></TD>";
   print "<TD ALIGN='CENTER'><a href='/cgi-bin/ipinfo.cgi?ip=$key[$s]'>$key[$s]</a></TD>";
-  print "<TD ALIGN='CENTER'><a href='/cgi-bin/country.cgi#$fcode'><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$ccode'></a></TD>";
+  if ( $fcode ne "" ){
+  print "<TD ALIGN='CENTER'><a href='/cgi-bin/country.cgi#$fcode'><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$ccode'></a></TD>";} 
+  else {
+  print "<TD ALIGN='CENTER'></TD>";}
   print "<TD ALIGN='CENTER'>$value[$s]</TD>";
   print "<TD ALIGN='CENTER'>$percent</TD>";
   print "</TR>";