diff options
Diffstat (limited to 'www/irc/irclogs.pl')
-rwxr-xr-x | www/irc/irclogs.pl | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/www/irc/irclogs.pl b/www/irc/irclogs.pl index cf69d2cfb7..729ab1b241 100755 --- a/www/irc/irclogs.pl +++ b/www/irc/irclogs.pl | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/bin/perl |
2 | 2 | ||
3 | require "/home/dast/perl/date.pm"; | 3 | #require "/home/dast/perl/date.pm"; |
4 | 4 | ||
5 | opendir(DIR, ".") or | 5 | opendir(DIR, ".") or |
6 | die "Can't opendir()"; | 6 | die "Can't opendir()"; |
@@ -17,30 +17,36 @@ for ( @logs ) { | |||
17 | $size = (stat("$_"))[7]; | 17 | $size = (stat("$_"))[7]; |
18 | $file = $_; | 18 | $file = $_; |
19 | $log = ""; | 19 | $log = ""; |
20 | |||
20 | if (/-(\d+)/) { | 21 | if (/-(\d+)/) { |
21 | if ( $1 =~ /(\d\d\d\d)(\d\d)(\d\d)/ ) { | 22 | if ( $1 =~ /(\d\d\d\d)(\d\d)(\d\d)/ ) { |
22 | $y = $1; | 23 | $y = $1; |
23 | $m = $2; | 24 | $m = $2; |
24 | $d = $3; | 25 | $d = $3; |
25 | $mname = ucfirst MonthNameEng($m); | 26 | |
27 | $mname = $m; | ||
28 | # $mname = ucfirst MonthNameEng($m); | ||
29 | if ($y != $lasty) { | ||
30 | print "</tr><tr>\n" if $lasty != 0; | ||
31 | print "<th>$y</th>\n"; | ||
32 | $lasty = $y; | ||
33 | } else { | ||
34 | print "</tr><tr>\n<th></th>" if ( $m != $lastm ); | ||
35 | } | ||
36 | |||
26 | if ( $m != $lastm ) { | 37 | if ( $m != $lastm ) { |
27 | $count=0; | 38 | $count=0; |
28 | print "</tr><tr>\n" if $lastm != 0; | ||
29 | # if ( $m % 6 == 0 ) { | ||
30 | # print "</tr><tr valign=top>\n"; | ||
31 | # } | ||
32 | print "<th>$mname</th>\n"; | 39 | print "<th>$mname</th>\n"; |
33 | $lastm = $m; | 40 | $lastm = $m; |
34 | } | 41 | } |
35 | # $lines = `wc -l $file` + 0; | 42 | |
36 | # print "<li><a test href=\"$file\">$mname $d</a> <small>($lines lines)</small>\n"; | ||
37 | print "<td><a test href=\"$file\">$d</a></td>\n"; | 43 | print "<td><a test href=\"$file\">$d</a></td>\n"; |
44 | |||
38 | if ( ++$count > 15 ) { | 45 | if ( ++$count > 15 ) { |
39 | print "</tr><tr><th></th>\n"; | 46 | print "</tr><tr><th></th><th></th>\n"; |
40 | $count=0; | 47 | $count=0; |
41 | } | 48 | } |
42 | } | 49 | } |
43 | } | 50 | } |
44 | #print "<li><a href=\"daily/$_\">$_</a> ($size bytes) $log\n"; | ||
45 | } | 51 | } |
46 | print "</ul></td></tr></table>\n"; | 52 | print "</ul></td></tr></table>\n"; |