mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-26 02:42:58 +02:00
firewalllog*.cgi and country.cgi: Use language strings, and align graphs
Put the piechart for firewalllog* in the center of the page horisontally, this looks visually better. Add language string for count and details submit button. Add language strings for country.cgi. Make html validate for country.cgi.
This commit is contained in:
@@ -397,9 +397,9 @@ if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) {
|
||||
print FILE $myimage->png;
|
||||
close(FILE);
|
||||
#####################################################
|
||||
print "<table align='center'><tr><td>";
|
||||
print "<div style='text-align:center'>";
|
||||
print "<img src='/graphs/fwlog-ip$imagerandom.png'>";
|
||||
print "</td></tr></table>";
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
print <<END
|
||||
@@ -408,7 +408,7 @@ print <<END
|
||||
<th width='10%' align='center' class='boldbase'></th>
|
||||
<th width='30%' align='center' class='boldbase'><b>$Lang::tr{'ip address'}</b></th>
|
||||
<th width='10%' align='center' class='boldbase'><b>$Lang::tr{'country'}</b></th>
|
||||
<th width='10%' align='center' class='boldbase'><b>Count</b></th>
|
||||
<th width='10%' align='center' class='boldbase'><b>$Lang::tr{'count'}</b></th>
|
||||
<th width='30%' align='center' class='boldbase'><b>$Lang::tr{'percentage'}</b></th>
|
||||
</tr>
|
||||
END
|
||||
@@ -439,10 +439,10 @@ for($s=0;$s<$lines;$s++)
|
||||
my $fcode = lc($ccode);
|
||||
|
||||
$color++;
|
||||
print "<td align='center' $col><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' $col><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='$Lang::tr{'details'}'></form></td>";
|
||||
print "<td align='center' $col><a href='/cgi-bin/ipinfo.cgi?ip=$key[$s]'>$key[$s]</a></td>";
|
||||
if ( $fcode ne "" ){
|
||||
print "<td align='center' $col><a href='/cgi-bin/country.cgi#$fcode'><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$ccode'></a></td>";}
|
||||
print "<td align='center' $col><a href='/cgi-bin/country.cgi#$fcode'><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$ccode' title='$ccode'></a></td>";}
|
||||
else {
|
||||
print "<td align='center' $col></td>";}
|
||||
print "<td align='center' $col>$value[$s]</td>";
|
||||
|
||||
@@ -400,17 +400,17 @@ if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) {
|
||||
print FILE $myimage->png;
|
||||
close(FILE);
|
||||
#####################################################
|
||||
print "<table align='center'><tr><td>";
|
||||
print "<div style='text-align:center'>";
|
||||
print "<img src='/graphs/fwlog-port$imagerandom.png'>";
|
||||
print "</td></tr></table>";
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
print <<END
|
||||
<table width='100%' CLASS='tbl'>
|
||||
<table width='100%' class='tbl'>
|
||||
<tr>
|
||||
<th width='10%' align='center' class='boldbase'></th>
|
||||
<th width='33%' align='center' class='boldbase'><b>$Lang::tr{'port'}</b></th>
|
||||
<th width='33%' align='center' class='boldbase'><b>count</b></th>
|
||||
<th width='33%' align='center' class='boldbase'><b>$Lang::tr{'count'}</b></th>
|
||||
<th width='33%' align='center' class='boldbase'><b>$Lang::tr{'percentage'}</b></th>
|
||||
</tr>
|
||||
END
|
||||
@@ -437,7 +437,7 @@ for($s=0;$s<$lines;$s++)
|
||||
print "<tr>";
|
||||
|
||||
$color++;
|
||||
print "<td align='center' $col><form method='post' action='showrequestfromport.dat'><input type='hidden' name='MONTH' value='$cgiparams{'MONTH'}'> <input type='hidden' name='DAY' value='$cgiparams{'DAY'}'> <input type='hidden' name='port' value='$key[$s]'> <input type='submit' value='details'></form></td>";
|
||||
print "<td align='center' $col><form method='post' action='showrequestfromport.dat'><input type='hidden' name='MONTH' value='$cgiparams{'MONTH'}'> <input type='hidden' name='DAY' value='$cgiparams{'DAY'}'> <input type='hidden' name='port' value='$key[$s]'> <input type='submit' value='$Lang::tr{'details'}'></form></td>";
|
||||
print "<td align='center' $col>$key[$s]</td>";
|
||||
print "<td align='center' $col>$value[$s]</td>";
|
||||
print "<td align='center' $col>$percent</td>";
|
||||
|
||||
Reference in New Issue
Block a user