In this script the author has it collecting stats by date, hour, month and year. The only one of these thats not working correctly is by year:
By Year ( . = 4 viruses )
--------------------------
2: 90 ......................
The same is with the html output. On the authors page his has the complete
year shown:
2006 7,779
The virus count is right, its just the year thats being shown wrong. This
is the portion of the script that I 'think' controls this:
### BY YEAR
$TXT .= "\n\nBy Year ( . = $yearscale viruses )\n" if $text;
$TXT .= "--------------------------\n" if $text;
if ($html) {
print "<table border=0><tr><Th bgcolor=\#666699
COLSPAN=3><font color=\#FFFFFF size=4>Viruses by Year</font></th><TH
align=center>";
}
foreach my $yr ( sort keys %{$stats{year}} ) {
my $yearraw = $stats{year}->{$yr};
1 while $stats{year}->{$yr} =~ s/(.*\d)(\d\d\d)/$1,$2/;
$TXT .= sprintf("%6s: %6s %s\n", $yr, $stats{year}->{$yr}, "."
x
int($yearraw/$yearscale)) if $text;
if ($html) {
print "<tr><td align=left bgcolor=\#9999FF>";
print "$yr" . "</td>";
print "<td align=center bgcolor=\#DCDCEE>";
print $stats{year}->{$yr} . "</td>";
print "<td align=left bgcolor=\#DCDCEE><img
src=\"/meter.jpg\" height=5 WIDTH=" . int($yearraw/$yearscale) . ">";
print "</td></tr>\n";
}
}
print "</TD>" if $html;
}
There are a few lines that are line wrapped here in this message. Any help
would be appreciated.
Chris
--
Chris
Registered Linux User 283774 http://counter.li.org
18:44:14 up 27 days, 6:44, 1 user, load average: 0.24, 0.28, 0.18
Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk
pgpnOcQocBCid.pgp
Description: PGP signature
