Add some language strings for the new firewalllogport.dat, and
include html fixes done in firewalllogip.dat, which this file
is based on.
Also try to add the menu item to the sub menu, but that is
currently not working.
'title' => "$Lang::tr{'firewall logs port'}",
'enabled' => 1
};
'title' => "$Lang::tr{'firewall logs port'}",
'enabled' => 1
};
+ $sublogs->{'43.firewallcountry'} = {'caption' => $Lang::tr{'firewall logs country'},
+ 'uri' => '/cgi-bin/logs.cgi/firewalllogcountry.dat',
+ 'title' => "$Lang::tr{'firewall logs country'}",
+ 'enabled' => 1
+ };
$sublogs->{'50.ids'} = {'caption' => $Lang::tr{'ids logs'},
'uri' => '/cgi-bin/logs.cgi/ids.dat',
'title' => "$Lang::tr{'ids logs'}",
$sublogs->{'50.ids'} = {'caption' => $Lang::tr{'ids logs'},
'uri' => '/cgi-bin/logs.cgi/ids.dat',
'title' => "$Lang::tr{'ids logs'}",
-&Header::openbox('100%', 'left', "$Lang::tr{'settings'}:");
+&Header::openbox('100%', 'left', "$Lang::tr{'settings'}");
print <<END
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
print <<END
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
</td>
<td width='5%' align='center'><input type='submit' name='ACTION' title='$Lang::tr{'day before'}' value='<<' /></td>
<td width='5%' align='center'><input type='submit' name='ACTION' title='$Lang::tr{'day after'}' value='>>' /></td>
</td>
<td width='5%' align='center'><input type='submit' name='ACTION' title='$Lang::tr{'day before'}' value='<<' /></td>
<td width='5%' align='center'><input type='submit' name='ACTION' title='$Lang::tr{'day after'}' value='>>' /></td>
-<td width='20%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'update'}' /></td>
+<td width='20%' align='right'><input type='submit' name='ACTION' value='$Lang::tr{'update'}' /></td>
+</tr>
+<tr>
+ <td colspan='3' align='left' valign="left">$Lang::tr{'Number of Countries for the pie chart'}:</td>
+ <td colspan='3' align='left' valign="center"><input type='text' name='pienumber' value='$pienumber' size='4'></td>
+ <td align='right'><input type='submit' name='ACTION' value='$Lang::tr{'save'}' /></td>
-<table width='100%'>
-<tr><td width='20%' align='right' valign="center">$Lang::tr{'Number of IPs for the pie chart'}:</td>
- <td width='10%' align='left' valign="center"><input type='text' name='pienumber' value='$pienumber' size='4'></td>
- <td width='20%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'save'}' /></td></tr>
- </table>
- </form>
my $linesjc = 0;
my %tabjc;
my $linesjc = 0;
my %tabjc;
my $gi = Geo::IP::PurePerl->new();
if ($pienumber == -1 || $pienumber > $lines || $sortcolumn == 2) { $pienumber = $lines; };
my $gi = Geo::IP::PurePerl->new();
if ($pienumber == -1 || $pienumber > $lines || $sortcolumn == 2) { $pienumber = $lines; };
-<TABLE WIDTH='100%'>
-<TR>
-<TD WIDTH='10%' ALIGN='CENTER' CLASS='boldbase'></TD>
-<TD WIDTH='10%' ALIGN='CENTER' CLASS='boldbase'><B>Flag</B></TD>
-<TD WIDTH='10%' ALIGN='CENTER' CLASS='boldbase'><B>Count</B></TD>
-<TD WIDTH='30%' ALIGN='CENTER' CLASS='boldbase'><B>Percent</B></TD>
-</TR>
+<table width='100%' class='tbl'>
+<tr>
+<th width='10%' align='center' class='boldbase'></th>
+<th width='30%' align='center' class='boldbase'><b>$Lang::tr{'country'}</b></th>
+<th width='30%' align='center' class='boldbase'><b>Count</b></th>
+<th width='30%' align='center' class='boldbase'><b>$Lang::tr{'percentage'}</b></th>
+</tr>
for($s=0;$s<$lines;$s++)
{
for($s=0;$s<$lines;$s++)
{
$percent = $value[$s] * 100 / $linesjc;
$percent = sprintf("%.f", $percent);
$total = $total + $value[$s];
$percent = $value[$s] * 100 / $linesjc;
$percent = sprintf("%.f", $percent);
$total = $total + $value[$s];
- if ( ($color % 10) == 1 ){print "<TR BGCOLOR='$color{'color1'}'>\n";}
- if ( ($color % 10) == 2 ){print "<TR BGCOLOR='$color{'color2'}'>\n";}
- if ( ($color % 10) == 3 ){print "<TR BGCOLOR='$color{'color3'}'>\n";}
- if ( ($color % 10) == 4 ){print "<TR BGCOLOR='$color{'color4'}'>\n";}
- if ( ($color % 10) == 5 ){print "<TR BGCOLOR='$color{'color5'}'>\n";}
- if ( ($color % 10) == 6 ){print "<TR BGCOLOR='$color{'color6'}'>\n";}
- if ( ($color % 10) == 7 ){print "<TR BGCOLOR='$color{'color7'}'>\n";}
- if ( ($color % 10) == 8 ){print "<TR BGCOLOR='$color{'color8'}'>\n";}
- if ( ($color % 10) == 9 ){print "<TR BGCOLOR='$color{'color9'}'>\n";}
- if ( ($color % 10) == 0 ){print "<TR BGCOLOR='$color{'color10'}'>\n";}
-
+ if ( ($color % 10) == 1 ){print "<tr>"; $col="bgcolor='$color{'color1'}'";}
+ if ( ($color % 10) == 2 ){print "<tr>"; $col="bgcolor='$color{'color2'}'";}
+ if ( ($color % 10) == 3 ){print "<tr>"; $col="bgcolor='$color{'color3'}'";}
+ if ( ($color % 10) == 4 ){print "<tr>"; $col="bgcolor='$color{'color4'}'";}
+ if ( ($color % 10) == 5 ){print "<tr>"; $col="bgcolor='$color{'color5'}'";}
+ if ( ($color % 10) == 6 ){print "<tr>"; $col="bgcolor='$color{'color6'}'";}
+ if ( ($color % 10) == 7 ){print "<tr>"; $col="bgcolor='$color{'color7'}'";}
+ if ( ($color % 10) == 8 ){print "<tr>"; $col="bgcolor='$color{'color8'}'";}
+ if ( ($color % 10) == 9 ){print "<tr>"; $col="bgcolor='$color{'color9'}'";}
+ if ( ($color % 10) == 0 ){print "<tr>"; $col="bgcolor='$color{'color10'}'";}
- print "<TD ALIGN='CENTER'><form method='post' action='showrequestfromcountry.dat'><input type='hidden' name='MONTH' value='$cgiparams{'MONTH'}'> <input type='hidden' name='DAY' value='$cgiparams{'DAY'}'> <input type='hidden' name='country' value='$key[$s]'> <input type='submit' value='details'></form></TD>";
+ print "<td align='center' $col><form method='post' action='showrequestfromcountry.dat'><input type='hidden' name='MONTH' value='$cgiparams{'MONTH'}'> <input type='hidden' name='DAY' value='$cgiparams{'DAY'}'> <input type='hidden' name='country' value='$key[$s]'> <input type='submit' value='details'></form></td>";
if ( $key[$s] ne "unknown" ){
my $fcode = lc($key[$s]);
if ( $key[$s] ne "unknown" ){
my $fcode = lc($key[$s]);
- print "<TD ALIGN='CENTER'><a href='/cgi-bin/country.cgi#$fcode'><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$key[$s]' title='$key[$s]'></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='$key[$s]' title='$key[$s]'></a></TD>";}
- print "<TD ALIGN='CENTER'></TD>";}
- print "<TD ALIGN='CENTER'>$value[$s]</TD>";
- print "<TD ALIGN='CENTER'>$percent</TD>";
- print "</TR>";
+ print "<td align='center' $col></td>";
+ print "<td align='center' $col>$value[$s]</td>";
+ print "<td align='center' $col>$percent</td>";
+ print "</tr>";
+}
if($cgiparams{'otherspie'} == 2 ){}
else{
if($cgiparams{'otherspie'} == 2 ){}
else{
-if ( ($color % 10) == 1 ){print "<TR BGCOLOR='$color{'color1'}'>\n";}
-if ( ($color % 10) == 2 ){print "<TR BGCOLOR='$color{'color2'}'>\n";}
-if ( ($color % 10) == 3 ){print "<TR BGCOLOR='$color{'color3'}'>\n";}
-if ( ($color % 10) == 4 ){print "<TR BGCOLOR='$color{'color4'}'>\n";}
-if ( ($color % 10) == 5 ){print "<TR BGCOLOR='$color{'color5'}'>\n";}
-if ( ($color % 10) == 6 ){print "<TR BGCOLOR='$color{'color6'}'>\n";}
-if ( ($color % 10) == 7 ){print "<TR BGCOLOR='$color{'color7'}'>\n";}
-if ( ($color % 10) == 8 ){print "<TR BGCOLOR='$color{'color8'}'>\n";}
-if ( ($color % 10) == 9 ){print "<TR BGCOLOR='$color{'color9'}'>\n";}
-if ( ($color % 10) == 0 ){print "<TR BGCOLOR='$color{'color10'}'>\n";}
+if ( ($color % 10) == 1 ){print "<tr>"; $col="bgcolor='$color{'color1'}'";}
+if ( ($color % 10) == 2 ){print "<tr>"; $col="bgcolor='$color{'color2'}'";}
+if ( ($color % 10) == 3 ){print "<tr>"; $col="bgcolor='$color{'color3'}'";}
+if ( ($color % 10) == 4 ){print "<tr>"; $col="bgcolor='$color{'color4'}'";}
+if ( ($color % 10) == 5 ){print "<tr>"; $col="bgcolor='$color{'color5'}'";}
+if ( ($color % 10) == 6 ){print "<tr>"; $col="bgcolor='$color{'color6'}'";}
+if ( ($color % 10) == 7 ){print "<tr>"; $col="bgcolor='$color{'color7'}'";}
+if ( ($color % 10) == 8 ){print "<tr>"; $col="bgcolor='$color{'color8'}'";}
+if ( ($color % 10) == 9 ){print "<tr>"; $col="bgcolor='$color{'color9'}'";}
+if ( ($color % 10) == 0 ){print "<tr>"; $col="bgcolor='$color{'color10'}'";}
$percent = $dif * 100 / $linesjc;
$percent = sprintf("%.f", $percent);
print <<END
$percent = $dif * 100 / $linesjc;
$percent = sprintf("%.f", $percent);
print <<END
-<TD ALIGN='CENTER'></TD>
-<TD ALIGN='CENTER'>Other country</TD>
-<TD ALIGN='CENTER'>$dif</TD>
-<TD ALIGN='CENTER'>$percent</TD>
-</TR>
+<td align='center' $col></TD>
+<td align='center' $col>$Lang::tr{'other countries'}</td>
+<td align='center' $col>$dif</TD>
+<td align='center' $col>$percent</TD>
+</tr>
'Level7 rule' => 'Level7-Regel',
'Local VPN IP' => 'Internes Netzwerk (GREEN)',
'MTU' => 'MTU Size',
'Level7 rule' => 'Level7-Regel',
'Local VPN IP' => 'Internes Netzwerk (GREEN)',
'MTU' => 'MTU Size',
+'Number of Countries for the pie chart' => 'Anzahl der angezeigten Länder im Diagramm',
'Number of IPs for the pie chart' => 'Anzahl der angezeigten IPs im Diagramm',
'Number of Ports for the pie chart' => 'Anzahl der angezeigten Ports im Diagramm',
'OVPN' => 'OpenVPN',
'Number of IPs for the pie chart' => 'Anzahl der angezeigten IPs im Diagramm',
'Number of Ports for the pie chart' => 'Anzahl der angezeigten Ports im Diagramm',
'OVPN' => 'OpenVPN',
'firewall log' => 'Firewall-Protokoll',
'firewall log viewer' => 'Betrachter der Firewall-Logdateien',
'firewall logs' => 'Firewall-Logdateien',
'firewall log' => 'Firewall-Protokoll',
'firewall log viewer' => 'Betrachter der Firewall-Logdateien',
'firewall logs' => 'Firewall-Logdateien',
+'firewall logs country' => 'Fw-Logdiagramme (Land)',
'firewall logs ip' => 'Fw-Logdiagramme (IP)',
'firewall logs port' => 'Fw-Logdiagramme (Port)',
'firewall rules' => 'Firewallregeln',
'firewall logs ip' => 'Fw-Logdiagramme (IP)',
'firewall logs port' => 'Fw-Logdiagramme (Port)',
'firewall rules' => 'Firewallregeln',
'Level7 rule' => 'Level7 rule',
'Local VPN IP' => 'Internal Network (GREEN):',
'MTU' => 'MTU size:',
'Level7 rule' => 'Level7 rule',
'Local VPN IP' => 'Internal Network (GREEN):',
'MTU' => 'MTU size:',
+'Number of Countries for the pie chart' => 'Number of Countries for the pie chart',
'Number of IPs for the pie chart' => 'Number of IPs for the pie chart',
'Number of Ports for the pie chart' => 'Number of ports for the pie chart',
'OVPN' => 'OpenVPN',
'Number of IPs for the pie chart' => 'Number of IPs for the pie chart',
'Number of Ports for the pie chart' => 'Number of ports for the pie chart',
'OVPN' => 'OpenVPN',
'firewall graphs' => 'Firewall Graphs',
'firewall hits' => 'Total number of firewall hits for',
'firewall hits per' => 'firewallhits per',
'firewall graphs' => 'Firewall Graphs',
'firewall hits' => 'Total number of firewall hits for',
'firewall hits per' => 'firewallhits per',
+'firewall logs' => 'Firewall Logs',
'firewall log' => 'Firewall log',
'firewall log viewer' => 'Firewall Log Viewer',
'firewall log' => 'Firewall log',
'firewall log viewer' => 'Firewall Log Viewer',
-'firewall logs' => 'Firewall Logs',
'firewall logs ip' => 'Fw-Loggraphs (IP)',
'firewall logs port' => 'Fw-Loggraphs (Port)',
'firewall logs ip' => 'Fw-Loggraphs (IP)',
'firewall logs port' => 'Fw-Loggraphs (Port)',
+'firewall logs country' => 'Fw-Loggraphs (Country)',
'firewall rules' => 'Firewall Rules',
'firewallhits' => 'firewallhits',
'firmware' => 'Firmware',
'firewall rules' => 'Firewall Rules',
'firewallhits' => 'firewallhits',
'firmware' => 'Firmware',