]>
Commit | Line | Data |
---|---|---|
e4aac473 AH |
1 | #!/usr/bin/perl |
2 | # | |
3 | # SmoothWall CGIs | |
4 | # | |
5 | # This code is distributed under the terms of the GPL | |
6 | # | |
7 | # JC HERITIER | |
8 | # page inspired from the initial firewalllog.dat | |
9 | # | |
10 | # Modified for IPFire by Christian Schmidt | |
11 | # and Michael Tremer (www.ipfire.org) | |
12 | ||
13 | use strict; | |
14 | use Geo::IP::PurePerl; | |
15 | use Getopt::Std; | |
16 | ||
17 | # enable only the following on debugging purpose | |
18 | #use warnings; | |
19 | #use CGI::Carp 'fatalsToBrowser'; | |
20 | ||
21 | require '/var/ipfire/general-functions.pl'; | |
3ea01fe0 | 22 | require "${General::swroot}/geoip-functions.pl"; |
e4aac473 AH |
23 | require "${General::swroot}/lang.pl"; |
24 | require "${General::swroot}/header.pl"; | |
25 | ||
26 | use POSIX(); | |
27 | ||
28 | my %cgiparams=(); | |
29 | my %settings=(); | |
30 | my $pienumber; | |
31 | my $otherspie; | |
32 | my $showpie; | |
33 | my $sortcolumn; | |
34 | my $errormessage = ''; | |
35 | ||
36 | $cgiparams{'pienumber'} = 10; | |
37 | $cgiparams{'otherspie'} = 1; | |
38 | $cgiparams{'showpie'} = 1; | |
39 | $cgiparams{'sortcolumn'} = 1; | |
40 | ||
41 | my @shortmonths = ( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', | |
42 | 'Sep', 'Oct', 'Nov', 'Dec' ); | |
43 | my @longmonths = ( $Lang::tr{'january'}, $Lang::tr{'february'}, $Lang::tr{'march'}, | |
44 | $Lang::tr{'april'}, $Lang::tr{'may'}, $Lang::tr{'june'}, $Lang::tr{'july'}, $Lang::tr{'august'}, | |
45 | $Lang::tr{'september'}, $Lang::tr{'october'}, $Lang::tr{'november'}, | |
46 | $Lang::tr{'december'} ); | |
47 | ||
48 | my @now = localtime(); | |
49 | my $dow = $now[6]; | |
50 | my $doy = $now[7]; | |
51 | my $tdoy = $now[7]; | |
52 | my $year = $now[5]+1900; | |
53 | ||
54 | $cgiparams{'DAY'} = $now[3]; | |
55 | $cgiparams{'MONTH'} = $now[4]; | |
56 | $cgiparams{'ACTION'} = ''; | |
57 | ||
58 | &General::readhash("${General::swroot}/fwlogs/ipsettings", \%settings); | |
59 | if ($settings{'pienumber'} != 0) { $cgiparams{'pienumber'} = $settings{'pienumber'} }; | |
60 | if ($settings{'otherspie'} != 0) { $cgiparams{'otherspie'} = $settings{'otherspie'} }; | |
61 | if ($settings{'showpie'} != 0) { $cgiparams{'showpie'} = $settings{'showpie'} }; | |
62 | if ($settings{'sortcolumn'} != 0) { $cgiparams{'sortcolumn'} = $settings{'sortcolumn'} }; | |
63 | ||
64 | &Header::getcgihash(\%cgiparams); | |
65 | if ($cgiparams{'pienumber'} != 0) { $settings{'pienumber'} = $cgiparams{'pienumber'} }; | |
66 | if ($cgiparams{'otherspie'} != 0) { $settings{'otherspie'} = $cgiparams{'otherspie'} }; | |
67 | if ($cgiparams{'showpie'} != 0) { $settings{'showpie'} = $cgiparams{'showpie'} }; | |
68 | if ($cgiparams{'sortcolumn'} != 0) { $settings{'sortcolumn'} = $cgiparams{'sortcolumn'} }; | |
69 | ||
70 | if ($cgiparams{'ACTION'} eq $Lang::tr{'save'}) | |
71 | { | |
72 | &General::writehash("${General::swroot}/fwlogs/ipsettings", \%settings); | |
73 | } | |
74 | ||
75 | my $start = -1; | |
76 | if ($ENV{'QUERY_STRING'} && $cgiparams{'ACTION'} ne $Lang::tr{'update'}) | |
77 | { | |
78 | my @temp = split(',',$ENV{'QUERY_STRING'}); | |
79 | $start = $temp[0]; | |
80 | $cgiparams{'MONTH'} = $temp[1]; | |
81 | $cgiparams{'DAY'} = $temp[2]; | |
82 | } | |
83 | ||
84 | if (!($cgiparams{'MONTH'} =~ /^(0|1|2|3|4|5|6|7|8|9|10|11)$/) || | |
85 | !($cgiparams{'DAY'} =~ /^(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)$/)) | |
86 | { | |
87 | $cgiparams{'DAY'} = $now[3]; | |
88 | $cgiparams{'MONTH'} = $now[4]; | |
89 | } | |
90 | elsif($cgiparams{'ACTION'} eq '>>') | |
91 | { | |
92 | my @temp_then=(); | |
93 | my @temp_now = localtime(time); | |
94 | $temp_now[4] = $cgiparams{'MONTH'}; | |
95 | $temp_now[3] = $cgiparams{'DAY'}; | |
96 | @temp_then = localtime(POSIX::mktime(@temp_now) + 86400); | |
97 | ## Retrieve the same time on the next day - | |
98 | ## 86400 seconds in a day | |
99 | $cgiparams{'MONTH'} = $temp_then[4]; | |
100 | $cgiparams{'DAY'} = $temp_then[3]; | |
101 | } | |
102 | elsif($cgiparams{'ACTION'} eq '<<') | |
103 | { | |
104 | my @temp_then=(); | |
105 | my @temp_now = localtime(time); | |
106 | $temp_now[4] = $cgiparams{'MONTH'}; | |
107 | $temp_now[3] = $cgiparams{'DAY'}; | |
108 | @temp_then = localtime(POSIX::mktime(@temp_now) - 86400); | |
109 | ## Retrieve the same time on the previous day - | |
110 | ## 86400 seconds in a day | |
111 | $cgiparams{'MONTH'} = $temp_then[4]; | |
112 | $cgiparams{'DAY'} = $temp_then[3]; | |
113 | } | |
114 | ||
115 | if (($cgiparams{'DAY'} ne $now[3]) || ($cgiparams{'MONTH'} ne $now[4])) | |
116 | { | |
117 | my @then = (); | |
118 | if ( ( $cgiparams{'MONTH'} eq $now[4]) && ($cgiparams{'DAY'} > $now[3]) || | |
119 | ( $cgiparams{'MONTH'} > $now[4] ) ) { | |
120 | @then = localtime(POSIX::mktime( 0, 0, 0, $cgiparams{'DAY'}, $cgiparams{'MONTH'}, $year - 1901 )); | |
121 | } else { | |
122 | @then = localtime(POSIX::mktime( 0, 0, 0, $cgiparams{'DAY'}, $cgiparams{'MONTH'}, $year - 1900 )); | |
123 | } | |
124 | $tdoy = $then[7]; | |
125 | my $lastleap=($year-1)%4; | |
126 | if ($tdoy>$doy) { | |
127 | if ($lastleap == 0 && $tdoy < 60) { | |
128 | $doy=$tdoy+366; | |
129 | } else { | |
130 | $doy=$doy+365; | |
131 | } | |
132 | } | |
133 | } | |
134 | ||
135 | my $datediff=0; | |
136 | my $dowd=0; | |
137 | my $multifile=0; | |
138 | if ($tdoy ne $doy) { | |
139 | $datediff=int(($doy-$tdoy)/7); | |
140 | $dowd=($doy-$tdoy)%7; | |
141 | if (($dow-$dowd)<1) { | |
142 | $datediff=$datediff+1; | |
143 | } | |
144 | if (($dow-$dowd)==0) { | |
145 | $multifile=1; | |
146 | } | |
147 | } | |
148 | ||
149 | my $monthstr = $shortmonths[$cgiparams{'MONTH'}]; | |
150 | my $longmonthstr = $longmonths[$cgiparams{'MONTH'}]; | |
151 | my $day = $cgiparams{'DAY'}; | |
152 | my $daystr=''; | |
153 | if ($day <= 9) { | |
154 | $daystr = " $day"; } | |
155 | else { | |
156 | $daystr = $day; | |
157 | } | |
158 | ||
159 | my $skip=0; | |
160 | my $filestr=''; | |
161 | if ($datediff==0) { | |
162 | $filestr="/var/log/messages"; | |
163 | } else { | |
164 | $filestr="/var/log/messages.$datediff"; | |
165 | $filestr = "$filestr.gz" if -f "$filestr.gz"; | |
166 | } | |
167 | ||
168 | if (!(open (FILE,($filestr =~ /.gz$/ ? "gzip -dc $filestr |" : $filestr)))) { | |
169 | $errormessage = "$Lang::tr{'date not in logs'}: $filestr $Lang::tr{'could not be opened'}"; | |
170 | $skip=1; | |
171 | # Note: This is in case the log does not exist for that date | |
172 | } | |
173 | my $lines = 0; | |
174 | my @log=(); | |
175 | ||
176 | if (!$skip) | |
177 | { | |
178 | while (<FILE>) | |
179 | { | |
180 | if (/(^${monthstr} ${daystr} ..:..:..) [\w\-]+ kernel:.*(IN=.*)$/) { | |
181 | $log[$lines] = $_; | |
182 | $lines++; | |
183 | } | |
184 | } | |
185 | close (FILE); | |
186 | } | |
187 | ||
188 | $skip=0; | |
189 | if ($multifile) { | |
190 | $datediff=$datediff-1; | |
191 | if ($datediff==0) { | |
192 | $filestr="/var/log/messages"; | |
193 | } else { | |
194 | $filestr="/var/log/messages.$datediff"; | |
195 | $filestr = "$filestr.gz" if -f "$filestr.gz"; | |
196 | } | |
197 | if (!(open (FILE,($filestr =~ /.gz$/ ? "gzip -dc $filestr |" : $filestr)))) { | |
198 | $errormessage="$Lang::tr{'date not in logs'}: $filestr $Lang::tr{'could not be opened'}"; | |
199 | $skip=1; | |
200 | } | |
201 | if (!$skip) { | |
202 | while (<FILE>) { | |
203 | if (/(^${monthstr} ${daystr} ..:..:..) [\w\-]+ kernel:.*(IN=.*)$/) { | |
204 | $log[$lines] = $_; | |
205 | $lines++; | |
206 | } | |
207 | } | |
208 | close (FILE); | |
209 | } | |
210 | } | |
211 | ||
212 | my $MODNAME="fwlogs"; | |
213 | ||
214 | &Header::showhttpheaders(); | |
215 | &Header::openpage($Lang::tr{'firewall log'}, 1, ''); | |
216 | &Header::openbigbox('100%', 'left', '', $errormessage); | |
217 | ||
218 | ||
219 | if ($errormessage) { | |
220 | &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); | |
221 | print "<font class='base'>$errormessage </font>\n"; | |
222 | &Header::closebox(); | |
223 | } | |
224 | ||
f4248975 | 225 | &Header::openbox('100%', 'left', "$Lang::tr{'settings'}"); |
e4aac473 AH |
226 | |
227 | print <<END | |
228 | <form method='post' action='$ENV{'SCRIPT_NAME'}'> | |
229 | <table width='100%'> | |
230 | <tr> | |
231 | <td width='10%' class='base'>$Lang::tr{'month'}: </td> | |
232 | <td width='10%'> | |
233 | <select name='MONTH'> | |
234 | END | |
235 | ; | |
236 | my $month; | |
237 | for ($month = 0; $month < 12; $month++) | |
238 | { | |
239 | print "\t<option "; | |
240 | if ($month == $cgiparams{'MONTH'}) { | |
241 | print "selected='selected' "; } | |
242 | print "value='$month'>$longmonths[$month]</option>\n"; | |
243 | } | |
244 | print <<END | |
245 | </select> | |
246 | </td> | |
247 | <td width='10%' class='base' align='right'> $Lang::tr{'day'}: </td> | |
248 | <td width='40%'> | |
249 | <select name='DAY'> | |
250 | END | |
251 | ; | |
252 | for ($day = 1; $day <= 31; $day++) | |
253 | { | |
254 | print "\t<option "; | |
255 | if ($day == $cgiparams{'DAY'}) { | |
256 | print "selected='selected' "; } | |
257 | print "value='$day'>$day</option>\n"; | |
258 | } | |
259 | ||
260 | if( $cgiparams{'pienumber'} != 0){$pienumber=$cgiparams{'pienumber'};} | |
261 | if( $cgiparams{'otherspie'} != 0){$otherspie=$cgiparams{'otherspie'};} | |
262 | if( $cgiparams{'showpie'} != 0){$showpie=$cgiparams{'showpie'};} | |
263 | if( $cgiparams{'sortcolumn'} != 0){$sortcolumn=$cgiparams{'sortcolumn'};} | |
264 | ||
265 | print <<END | |
266 | </select> | |
267 | </td> | |
268 | <td width='5%' align='center'><input type='submit' name='ACTION' title='$Lang::tr{'day before'}' value='<<' /></td> | |
269 | <td width='5%' align='center'><input type='submit' name='ACTION' title='$Lang::tr{'day after'}' value='>>' /></td> | |
f4248975 AH |
270 | <td width='20%' align='right'><input type='submit' name='ACTION' value='$Lang::tr{'update'}' /></td> |
271 | </tr> | |
272 | <tr> | |
273 | <td colspan='3' align='left' valign="left">$Lang::tr{'Number of Countries for the pie chart'}:</td> | |
274 | <td colspan='3' align='left' valign="center"><input type='text' name='pienumber' value='$pienumber' size='4'></td> | |
275 | <td align='right'><input type='submit' name='ACTION' value='$Lang::tr{'save'}' /></td> | |
e4aac473 AH |
276 | </tr> |
277 | </table> | |
f4248975 | 278 | </form> |
e4aac473 AH |
279 | END |
280 | ; | |
281 | ||
282 | &Header::closebox(); | |
283 | ||
284 | &Header::openbox('100%', 'left', 'Firewall Logs'); | |
285 | print "<p><b>$Lang::tr{'firewall hits'} $longmonthstr $daystr: $lines</b></p>"; | |
286 | ||
4fca9c99 | 287 | my $red_interface = &General::get_red_interface(); |
e4aac473 AH |
288 | my $linesjc = 0; |
289 | my %tabjc; | |
e4aac473 AH |
290 | my $gi = Geo::IP::PurePerl->new(); |
291 | ||
292 | if ($pienumber == -1 || $pienumber > $lines || $sortcolumn == 2) { $pienumber = $lines; }; | |
293 | $lines = 0; | |
4fca9c99 | 294 | |
e4aac473 AH |
295 | foreach $_ (@log) |
296 | { | |
fde47f5a AH |
297 | /^... (..) (..:..:..) [\w\-]+ kernel:(.*)(IN=.*)$/; |
298 | my $packet = $4; | |
299 | $packet =~ /IN=(\w+)/; my $iface=$1; if ( $1 =~ /2./ ){ $iface="";} | |
300 | $packet =~ /SRC=([\d\.]+)/; my $srcaddr=$1; | |
301 | ||
4fca9c99 | 302 | if($iface eq $red_interface) { |
fde47f5a AH |
303 | if($srcaddr ne '') { |
304 | my $ccode = $gi->country_code_by_name($srcaddr); | |
305 | if( $ccode eq '') { | |
306 | $ccode = 'unknown'; | |
307 | } | |
308 | $tabjc{$ccode} = $tabjc{$ccode} + 1 ; | |
309 | if(($tabjc{$ccode} == 1) && ($lines < $pienumber)) { $lines = $lines + 1; } | |
310 | $linesjc++; | |
e4aac473 | 311 | } |
fde47f5a AH |
312 | } |
313 | else { | |
314 | if($iface ne '') { | |
315 | $tabjc{$iface} = $tabjc{$iface} + 1 ; | |
316 | if(($tabjc{$iface} == 1) && ($lines < $pienumber)) { $lines = $lines + 1; } | |
317 | $linesjc++; | |
e4aac473 AH |
318 | } |
319 | } | |
320 | } | |
321 | ||
322 | $pienumber = $lines; | |
323 | ||
324 | my @keytabjc = keys %tabjc; | |
325 | ||
326 | my @slice; | |
327 | my $go; | |
328 | my $nblinejc; | |
329 | ||
330 | if( $cgiparams{'linejc'} eq 'all' ){ $nblinejc = $linesjc; $go=1; } | |
331 | if( ($cgiparams{'linejc'} != 0) && ($cgiparams{'linejc'} ne 'all') ){ $nblinejc = $cgiparams{'linejc'}; $go=1;} | |
332 | if( $go != 1){ $nblinejc = 1000; } | |
333 | ||
334 | my @key; | |
335 | my @value; | |
336 | my $indice=0; | |
337 | my @tabjc2; | |
338 | ||
339 | if ($sortcolumn == 1) | |
340 | { | |
341 | @tabjc2 = sort { $b <=> $a } values (%tabjc); | |
342 | } | |
343 | else | |
344 | { | |
345 | @tabjc2 = sort { $a <=> $b } keys (%tabjc); | |
346 | } | |
347 | ||
348 | my $colour=1; | |
349 | ||
350 | ############################################## | |
351 | #pie chart generation | |
352 | use GD::Graph::pie; | |
353 | use GD::Graph::colour; | |
354 | #ips sort by hits number | |
355 | my $v; | |
356 | ||
357 | if ($sortcolumn == 1) | |
358 | { | |
359 | for ($v=0;$v<$pienumber;$v++){ | |
360 | findkey($tabjc2[$v]); | |
361 | } | |
362 | } | |
363 | else | |
364 | { | |
365 | foreach $v (@tabjc2) { | |
366 | $key[$indice] = $v; | |
367 | $value[$indice] = $tabjc{$v}; | |
368 | $indice++; | |
369 | } | |
370 | } | |
371 | ||
372 | my @ips; | |
373 | my @numb; | |
374 | ||
375 | @ips = @key; | |
376 | @numb = @value; | |
377 | ||
378 | my $o; | |
379 | ||
380 | if($cgiparams{'otherspie'} == 2 ){} | |
381 | else{ | |
382 | my $numothers; | |
383 | for($o=0;$o<$pienumber;$o++){ | |
384 | $numothers = $numothers + $numb[$o]; | |
385 | } | |
386 | $numothers = $linesjc - $numothers; | |
387 | if ($numothers > 0) { | |
388 | $ips[$pienumber]="$Lang::tr{'otherip'}"; | |
389 | $numb[$pienumber] = $numothers; | |
390 | } | |
391 | } | |
392 | ||
393 | my @data = (\@ips,\@numb); | |
394 | use GD::Graph::colour qw( :files ); | |
395 | ||
396 | my $color=0; | |
397 | my %color = (); | |
398 | my %mainsettings = (); | |
399 | &General::readhash("${General::swroot}/main/settings", \%mainsettings); | |
400 | &General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); | |
401 | ||
402 | if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) { | |
403 | my $mygraph = GD::Graph::pie->new(500, 350); | |
404 | $mygraph->set( | |
405 | 'title' => '', | |
406 | 'pie_height' => 50, | |
407 | 'start_angle' => 89 | |
408 | ) or warn $mygraph->error; | |
409 | ||
410 | $mygraph->set_value_font(GD::gdMediumBoldFont); | |
411 | $mygraph->set( dclrs => [ "$color{'color1'}" , "$color{'color2'}" , "$color{'color3'}" , "$color{'color4'}" , "$color{'color5'}" , "$color{'color6'}" , "$color{'color7'}" , "$color{'color8'}" , "$color{'color9'}" , "$color{'color10'}" ] ); | |
412 | my $myimage = $mygraph->plot(\@data) or die $mygraph->error; | |
413 | ||
fff2be22 | 414 | my @filenames = glob("/srv/web/ipfire/html/graphs/fwlog-country*.png"); |
e4aac473 AH |
415 | unlink(@filenames); |
416 | my $imagerandom = rand(1000000); | |
fff2be22 | 417 | my $imagename = "/srv/web/ipfire/html/graphs/fwlog-country$imagerandom.png"; |
e4aac473 AH |
418 | open(FILE,">$imagename"); |
419 | print FILE $myimage->png; | |
420 | close(FILE); | |
421 | ##################################################### | |
06f32031 | 422 | print "<div style='text-align:center;'>"; |
fff2be22 | 423 | print "<img src='/graphs/fwlog-country$imagerandom.png'>"; |
06f32031 | 424 | print "</div>"; |
e4aac473 AH |
425 | } |
426 | ||
427 | print <<END | |
f4248975 AH |
428 | <table width='100%' class='tbl'> |
429 | <tr> | |
430 | <th width='10%' align='center' class='boldbase'></th> | |
431 | <th width='30%' align='center' class='boldbase'><b>$Lang::tr{'country'}</b></th> | |
432 | <th width='30%' align='center' class='boldbase'><b>Count</b></th> | |
433 | <th width='30%' align='center' class='boldbase'><b>$Lang::tr{'percentage'}</b></th> | |
434 | </tr> | |
e4aac473 AH |
435 | END |
436 | ; | |
437 | ||
438 | my $total=0; | |
439 | my $show=0; | |
440 | ||
441 | my $s; | |
442 | my $percent; | |
f4248975 | 443 | my $col=""; |
e4aac473 AH |
444 | |
445 | for($s=0;$s<$lines;$s++) | |
446 | { | |
447 | $show++; | |
448 | $percent = $value[$s] * 100 / $linesjc; | |
449 | $percent = sprintf("%.f", $percent); | |
450 | $total = $total + $value[$s]; | |
06f32031 AH |
451 | my $colorIndex = $color % 10; |
452 | if($colorIndex == 0) { | |
453 | $colorIndex = 10; | |
454 | } | |
455 | $col="bgcolor='$color{\"color$colorIndex\"}'"; | |
e4aac473 | 456 | $color++; |
06f32031 AH |
457 | print "<tr>"; |
458 | ||
f4248975 | 459 | 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>"; |
fde47f5a AH |
460 | if($key[$s] eq 'blue0' || $key[$s] eq 'green0' || $key[$s] eq 'orange0') { |
461 | print "<td align='center' $col>$key[$s]</td>"; | |
462 | } | |
e4aac473 | 463 | else { |
3ea01fe0 SS |
464 | my $fcode = lc($key[$s]); |
465 | ||
466 | # Get flag icon for of the country. | |
467 | my $flag_icon = &GeoIP::get_flag_icon($fcode); | |
468 | ||
469 | if($flag_icon) { | |
470 | print "<td align='center' $col><a href='/cgi-bin/country.cgi#$fcode'><img src='$flag_icon' border='0' align='absmiddle' alt='$key[$s]' title='$key[$s]'></a></td>"; | |
471 | } else { | |
472 | print "<td align='center' $col>$key[$s]</td>"; | |
fde47f5a | 473 | } |
e4aac473 | 474 | } |
f4248975 AH |
475 | print "<td align='center' $col>$value[$s]</td>"; |
476 | print "<td align='center' $col>$percent</td>"; | |
477 | print "</tr>"; | |
478 | } | |
e4aac473 AH |
479 | |
480 | if($cgiparams{'otherspie'} == 2 ){} | |
481 | else{ | |
06f32031 AH |
482 | my $colorIndex = $color % 10; |
483 | if($colorIndex == 0) { | |
484 | $colorIndex = 10; | |
485 | } | |
486 | $col="bgcolor='$color{\"color$colorIndex\"}'"; | |
487 | print "<tr>"; | |
e4aac473 AH |
488 | |
489 | if ( $linesjc ne "0") | |
490 | { | |
491 | my $dif; | |
492 | $dif = $linesjc - $total; | |
493 | $percent = $dif * 100 / $linesjc; | |
494 | $percent = sprintf("%.f", $percent); | |
495 | print <<END | |
f4248975 AH |
496 | <td align='center' $col></TD> |
497 | <td align='center' $col>$Lang::tr{'other countries'}</td> | |
498 | <td align='center' $col>$dif</TD> | |
499 | <td align='center' $col>$percent</TD> | |
500 | </tr> | |
e4aac473 AH |
501 | END |
502 | ; | |
503 | } | |
504 | } | |
505 | print <<END | |
506 | </TABLE> | |
507 | END | |
508 | ; | |
509 | ||
510 | &Header::closebox(); | |
511 | &Header::closebigbox(); | |
512 | &Header::closepage(); | |
513 | ||
514 | sub findkey { | |
515 | my $v; | |
516 | foreach $v (@keytabjc) { | |
517 | if ($tabjc{$v} eq $_[0]) { | |
518 | delete $tabjc{$v}; | |
519 | $key[$indice] = "$v"; | |
520 | $value[$indice] = $_[0]; | |
521 | $indice++; | |
522 | last; | |
523 | } | |
524 | } | |
525 | } | |
526 | sub checkversion { | |
527 | #Automatic Updates is disabled | |
528 | return "0","0"; | |
529 | } | |
530 |