]>
Commit | Line | Data |
---|---|---|
cd1a2927 MT |
1 | #!/usr/bin/perl |
2 | # | |
3 | # SmoothWall CGIs | |
4 | # | |
5 | # This code is distributed under the terms of the GPL | |
6 | # | |
7 | # (c) The SmoothWall Team | |
8 | # | |
9 | # $Id: log.dat,v 1.6.2.22 2006/01/03 12:47:17 franck78 Exp $ | |
10 | # | |
11 | ||
12 | use strict; | |
13 | ||
14 | # enable only the following on debugging purpose | |
5595bc03 CS |
15 | use warnings; |
16 | use CGI::Carp 'fatalsToBrowser'; | |
cd1a2927 | 17 | |
986e08d9 | 18 | require '/var/ipfire/general-functions.pl'; |
cd1a2927 MT |
19 | require "${General::swroot}/lang.pl"; |
20 | require "${General::swroot}/header.pl"; | |
21 | ||
f2fdd0c1 CS |
22 | my %color = (); |
23 | my %mainsettings = (); | |
24 | &General::readhash("${General::swroot}/main/settings", \%mainsettings); | |
25 | &General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); | |
26 | ||
cd1a2927 MT |
27 | use POSIX(); |
28 | ||
cd1a2927 MT |
29 | my %cgiparams=(); |
30 | my %logsettings=(); | |
31 | my $errormessage = ''; | |
32 | ||
33 | my @shortmonths = ( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', | |
34 | 'Sep', 'Oct', 'Nov', 'Dec' ); | |
35 | my @longmonths = ( $Lang::tr{'january'}, $Lang::tr{'february'}, $Lang::tr{'march'}, | |
36 | $Lang::tr{'april'}, $Lang::tr{'may'}, $Lang::tr{'june'}, $Lang::tr{'july'}, $Lang::tr{'august'}, | |
37 | $Lang::tr{'september'}, $Lang::tr{'october'}, $Lang::tr{'november'}, | |
38 | $Lang::tr{'december'} ); | |
39 | ||
40 | my @now = localtime(); | |
41 | my $dow = $now[6]; | |
42 | my $doy = $now[7]; | |
43 | my $tdoy = $now[7]; | |
44 | my $year = $now[5]+1900; | |
45 | ||
46 | $cgiparams{'DAY'} = $now[3]; | |
47 | $cgiparams{'MONTH'} = $now[4]; | |
48 | $cgiparams{'ACTION'} = ''; | |
97fe1741 | 49 | $cgiparams{'SECTION'} = 'ipfire'; |
cd1a2927 MT |
50 | |
51 | my %sections = ( | |
5e818d6a | 52 | 'auth' => '(\w+\(pam_unix\)\[.*\]: )', |
dec52693 | 53 | 'wio' => '(wio|wio\[.*\])', |
6d31cfdd | 54 | 'captive' => '(Captive:)', |
4f57d698 | 55 | 'clamav' => '(clamd\[.*\]: |freshclam\[.*\]: )', |
5362088b | 56 | 'collectd' => '(collectd\[.*\]: )', |
5595bc03 | 57 | 'cron' => '(fcron\[.*\]: )', |
5e818d6a MF |
58 | 'ddns' => '(ddns\[\d+\]:)', |
59 | 'dhcp' => '(dhcpd: )', | |
60 | 'dma' => '(dma\[.*\]: )', | |
5e818d6a MF |
61 | 'guardian' => '(guardian\[.*\]: )', |
62 | 'ipfire' => '(ipfire: )', | |
0e14ef8a | 63 | 'ipsec' => '(ipsec_[\w_]+: |pluto\[.*\]: |charon: |vpnwatch: )', |
5e818d6a MF |
64 | 'kernel' => '(kernel: (?!DROP_))', |
65 | 'ntp' => '(ntpd(?:ate)?\[.*\]: )', | |
c77bd492 | 66 | 'oinkmaster' => '(oinkmaster:)', |
0f0db884 | 67 | 'openvpn' => '(openvpnserver\[.*\]: |.*n2n\[.*\]: )', |
5e818d6a MF |
68 | 'pakfire' => '(pakfire:)', |
69 | 'red' => '(red:|pppd\[.*\]: |chat\[.*\]|pppoe\[.*\]|pptp\[.*\]|pppoa\[.*\]|pppoa3\[.*\]|pppoeci\[.*\]|ipppd|ipppd\[.*\]|kernel: ippp\d|kernel: isdn.*|ibod\[.*\]|dhcpcd\[.*\]|modem_run\[.*\])', | |
5cbfa014 | 70 | 'snort' => '(snort\[.*\]: )', |
5e818d6a MF |
71 | 'squid' => '(squid\[.*\]: |squid: )', |
72 | 'ssh' => '(sshd(?:\(.*\))?\[.*\]: )', | |
d659de88 | 73 | 'unbound' => '(unbound: \[.*:.*\])(.*:.*$)', |
5e818d6a MF |
74 | 'urlfilter bl' => '(installpackage\[urlfilter\]: )', |
75 | 'wireless' => '(hostapd:|kernel: ath.*:|kernel: wifi[0-9]:)' | |
cd1a2927 MT |
76 | ); |
77 | ||
78 | # Translations for the %sections array. | |
79 | my %trsections = ( | |
5e818d6a | 80 | 'auth' => "$Lang::tr{'loginlogout'}", |
dec52693 | 81 | 'wio' => 'Who Is Online?', |
6d31cfdd | 82 | 'captive' => $Lang::tr{'captive'}, |
5e818d6a MF |
83 | 'clamav' => 'ClamAV', |
84 | 'collectd' => 'Collectd', | |
85 | 'cron' => 'Cron', | |
9494c611 | 86 | 'ddns' => "$Lang::tr{'dynamic dns'}", |
cd1a2927 | 87 | 'dhcp' => "$Lang::tr{'dhcp server'}", |
5e818d6a | 88 | 'dma' => 'Mail', |
5e818d6a MF |
89 | 'guardian' => "$Lang::tr{'guardian'}", |
90 | 'ipfire' => 'IPFire', | |
cd1a2927 | 91 | 'ipsec' => 'IPSec', |
5e818d6a MF |
92 | 'kernel' => "$Lang::tr{'kernel'}", |
93 | 'ntp' => 'NTP', | |
c77bd492 | 94 | 'oinkmaster' => 'Oinkmaster', |
6e13d0a5 | 95 | 'openvpn' => 'OpenVPN', |
c506cad0 | 96 | 'pakfire' => 'Pakfire', |
5e818d6a | 97 | 'red' => 'RED', |
5cbfa014 | 98 | 'snort' => "$Lang::tr{'intrusion detection'}", |
5e818d6a MF |
99 | 'squid' => "$Lang::tr{'web proxy'}", |
100 | 'ssh' => 'SSH', | |
d659de88 | 101 | 'unbound' => 'DNS: Unbound', |
5e818d6a MF |
102 | 'urlfilter bl' => 'URLFilter Blacklist', |
103 | 'wireless' => 'Wireless' | |
cd1a2927 MT |
104 | ); |
105 | ||
106 | ||
107 | &Header::getcgihash(\%cgiparams); | |
108 | $logsettings{'LOGVIEW_REVERSE'} = 'off'; | |
109 | &General::readhash("${General::swroot}/logging/settings", \%logsettings); | |
110 | ${Header::viewsize} = defined ($logsettings{'LOGVIEW_VIEWSIZE'}) ? $logsettings{'LOGVIEW_VIEWSIZE'} : 150; | |
111 | ||
112 | my $start = ($logsettings{'LOGVIEW_REVERSE'} eq 'on') ? 0x7FFFF000 : 0; #index of firts line number to display | |
113 | ||
114 | if ($ENV{'QUERY_STRING'} && $cgiparams{'ACTION'} ne $Lang::tr{'update'}) | |
115 | { | |
116 | my @temp = split(',',$ENV{'QUERY_STRING'}); | |
117 | $start = $temp[0]; | |
118 | $cgiparams{'MONTH'} = $temp[1]; | |
119 | $cgiparams{'DAY'} = $temp[2]; | |
120 | $cgiparams{'SECTION'} = $temp[3]; | |
121 | } | |
122 | ||
123 | if (!($cgiparams{'MONTH'} =~ /^(0|1|2|3|4|5|6|7|8|9|10|11)$/) || | |
124 | !($cgiparams{'DAY'} =~ /^(0|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)$/)) | |
125 | { | |
126 | $cgiparams{'DAY'} = $now[3]; | |
127 | $cgiparams{'MONTH'} = $now[4]; | |
128 | } | |
129 | elsif($cgiparams{'ACTION'} eq '>>') | |
130 | { | |
131 | my @temp_then=(); | |
132 | my @temp_now = localtime(time); | |
133 | $temp_now[4] = $cgiparams{'MONTH'}; | |
134 | $temp_now[3] = $cgiparams{'DAY'}; | |
135 | if ($cgiparams{'DAY'}) { | |
136 | @temp_then = localtime(POSIX::mktime(@temp_now) + 86400); | |
137 | ## Retrieve the same time on the next day + | |
138 | ## 86400 seconds in a day | |
139 | } else { | |
140 | $temp_now[3] = 1; | |
141 | $temp_now[4] = ($temp_now[4]+1) %12; | |
142 | @temp_then = localtime(POSIX::mktime(@temp_now) ); | |
143 | $temp_then[3] = 0; | |
144 | } | |
145 | $cgiparams{'MONTH'} = $temp_then[4]; | |
146 | $cgiparams{'DAY'} = $temp_then[3]; | |
147 | } | |
148 | elsif($cgiparams{'ACTION'} eq '<<') | |
149 | { | |
150 | my @temp_then=(); | |
151 | my @temp_now = localtime(time); | |
152 | $temp_now[4] = $cgiparams{'MONTH'}; | |
153 | $temp_now[3] = $cgiparams{'DAY'}; | |
154 | if ($cgiparams{'DAY'}) { | |
155 | @temp_then = localtime(POSIX::mktime(@temp_now) - 86400); | |
156 | ## Retrieve the same time on the next day - | |
157 | ## 86400 seconds in a day | |
158 | } else { | |
159 | $temp_now[3] = 1; | |
160 | $temp_now[4] = ($temp_now[4]-1) %12; | |
161 | @temp_then = localtime(POSIX::mktime(@temp_now) ); | |
162 | $temp_then[3] = 0; | |
163 | } | |
164 | $cgiparams{'MONTH'} = $temp_then[4]; | |
165 | $cgiparams{'DAY'} = $temp_then[3]; | |
166 | } | |
167 | ||
168 | # Find in which file.gz is the log. Can be calculated because WEEKLY ROTATING of access.log | |
169 | my $gzindex; | |
170 | my $date = $cgiparams{'DAY'} == 0 ? '' : $cgiparams{'DAY'} <= 9 ? "0$cgiparams{'DAY'}" : "$cgiparams{'DAY'}"; | |
171 | ||
172 | { | |
173 | my $xday; | |
9f663e66 | 174 | |
cd1a2927 MT |
175 | # Calculate time. If future date, calculate for past year !!! |
176 | if (( $cgiparams{'MONTH'} eq $now[4]) && ($cgiparams{'DAY'} > $now[3]) || | |
177 | ( $cgiparams{'MONTH'} > $now[4] ) ) { | |
178 | $xday = POSIX::mktime( 0, 0, 0, $cgiparams{'DAY'}, $cgiparams{'MONTH'}, $year - 1901 ); | |
179 | $date = "$longmonths[$cgiparams{'MONTH'}] $date, ". int($year-1); | |
180 | } else { | |
181 | $xday = POSIX::mktime( 0, 0, 0, $cgiparams{'DAY'}, $cgiparams{'MONTH'}, $year - 1900 ); | |
182 | $date = "$longmonths[$cgiparams{'MONTH'}] $date, $year"; | |
183 | } | |
184 | ||
185 | # calculate end of active week (saturday 23H59) | |
186 | my @then = (); | |
187 | @then = localtime(time()); | |
0d08de33 | 188 | my $sunday = POSIX::mktime( 0, 0, 0, $then[3], $then[4], $then[5]); |
cd1a2927 MT |
189 | $sunday += (6-$then[6]) * 86400; |
190 | ||
191 | # Convert delta in second to full weeks | |
192 | $gzindex = int (($sunday-$xday)/604800 ); | |
193 | } | |
9f663e66 | 194 | |
cd1a2927 MT |
195 | my $monthstr = $shortmonths[$cgiparams{'MONTH'}]; |
196 | my $daystr = $cgiparams{'DAY'} == 0 ? '..' : $cgiparams{'DAY'} <= 9 ? " $cgiparams{'DAY'}" : "$cgiparams{'DAY'}"; | |
197 | my $section = $sections{$cgiparams{'SECTION'}}; | |
198 | ||
199 | my $lines = 0; | |
200 | my @log=(); | |
201 | ||
202 | my $loop = 1; | |
203 | my $filestr = 0; | |
204 | my $lastdatetime; # for debug | |
205 | my $search_for_end = 0; | |
9f663e66 | 206 | |
cd1a2927 MT |
207 | while ($gzindex >=0 && $loop) { |
208 | # calculate file name | |
209 | if ($gzindex == 0) { | |
210 | $filestr = "/var/log/messages"; | |
1986cc88 | 211 | $filestr = "/var/log/mail" if (${section} =~ 'dma'); |
cd1a2927 MT |
212 | } else { |
213 | $filestr = "/var/log/messages.$gzindex"; | |
1986cc88 | 214 | $filestr = "/var/log/mail.$gzindex" if (${section} =~ 'dma'); |
cd1a2927 MT |
215 | $filestr = "$filestr.gz" if -f "$filestr.gz"; |
216 | } | |
217 | # now read file if existing | |
218 | if (open (FILE,($filestr =~ /.gz$/ ? "gzip -dc $filestr |" : $filestr))) { | |
219 | #&General::log("reading $filestr"); | |
220 | READ:while (<FILE>) { | |
221 | my $line = $_; | |
5595bc03 | 222 | if ($line =~ /^${monthstr} ${daystr} ..:..:.. [\w\-]+ ${section}(.*)/) { |
5e818d6a | 223 | # when standard viewing, just keep in memory the correct slice |
cd1a2927 MT |
224 | # it starts a '$start' and size is $viewport |
225 | # If export, then keep all lines... | |
226 | if ($cgiparams{'ACTION'} eq $Lang::tr{'export'}){ | |
227 | $log[$lines++] = "$line"; | |
228 | } else { | |
229 | if ($lines++ < ($start + $Header::viewsize)) { | |
230 | push(@log,"$line"); | |
231 | if (@log > $Header::viewsize) { | |
232 | shift (@log); | |
233 | } | |
5e818d6a | 234 | #} else { don't do this optimisation, need to count lines ! |
cd1a2927 MT |
235 | # $datetime = $maxtime; # we have read viewsize lines, stop main loop |
236 | # last READ; # exit read file | |
237 | } | |
238 | } | |
239 | $search_for_end = 1; # we find the start of slice, can look for end now | |
240 | } else { | |
241 | if ($search_for_end == 1) { | |
242 | #finish read files when date is over (test month equality only) | |
243 | $line =~ /^(...) (..) ..:..:..*$/; | |
244 | $loop = 0 if ( ($1 ne $monthstr) || ( ($daystr ne '..') && ($daystr ne $2) ) ); | |
245 | } | |
246 | } | |
247 | } | |
248 | close (FILE); | |
249 | } | |
250 | $gzindex--; # will try next gz file eg 40,39,38,.... because it may have holes when ipcop stopped | |
251 | # for a long time | |
252 | }# while | |
253 | ||
254 | # $errormessage = "$Lang::tr{'date not in logs'}: $filestr $Lang::tr{'could not be opened'}"; | |
255 | ||
256 | if ($cgiparams{'ACTION'} eq $Lang::tr{'export'}) | |
257 | { | |
258 | print "Content-type: text/plain\n\n"; | |
78331e30 | 259 | print "IPFire diagnostics\r\n"; |
cd1a2927 MT |
260 | print "$Lang::tr{'section'}: $cgiparams{'SECTION'}\n"; |
261 | print "$Lang::tr{'date'}: $date\r\n\r\n"; | |
262 | ||
263 | if ($logsettings{'LOGVIEW_REVERSE'} eq 'on') { @log = reverse @log; } | |
264 | ||
265 | foreach $_ (@log) | |
266 | { | |
5595bc03 | 267 | /^... (..) (..:..:..) [\w\-]+ ${section}(.*)$/; |
cd1a2927 MT |
268 | my $day = $1; |
269 | $day =~ tr / /0/; | |
270 | my $time = $cgiparams{'DAY'} ? "$2" : "$day/$2" ; | |
5595bc03 | 271 | print "$time $3 $4\r\n"; |
cd1a2927 MT |
272 | } |
273 | exit 0; | |
274 | } | |
275 | ||
276 | &Header::showhttpheaders(); | |
277 | ||
986e08d9 | 278 | &Header::openpage($Lang::tr{'system logs'}, 1, ''); |
cd1a2927 MT |
279 | |
280 | &Header::openbigbox('100%', 'left', '', $errormessage); | |
281 | ||
282 | if ($errormessage) { | |
283 | &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); | |
284 | print "<font class='base'>$errormessage </font>\n"; | |
285 | &Header::closebox(); | |
286 | } | |
287 | ||
288 | &Header::openbox('100%', 'left', "$Lang::tr{'settings'}:"); | |
289 | ||
290 | print <<END | |
291 | <form method='post' action='$ENV{'SCRIPT_NAME'}'> | |
292 | <table width='100%'> | |
293 | <tr> | |
294 | <td width='10%' class='base'>$Lang::tr{'section'}: </td> | |
295 | <td width='20%'> | |
296 | <select name='SECTION'> | |
297 | END | |
298 | ; | |
5e818d6a | 299 | foreach $section (sort {$trsections{$a} cmp $trsections{$b}} keys %sections) { |
cd1a2927 MT |
300 | print "\t<option "; |
301 | if ($section eq $cgiparams{'SECTION'}) { | |
302 | print "selected='selected' "; } | |
303 | print "value='$section'>$trsections{$section}</option>\n"; | |
304 | } | |
305 | print <<END | |
306 | </select> | |
307 | </td> | |
308 | <td width='10%' class='base' align='right'>$Lang::tr{'month'}: </td> | |
309 | <td width='10%'> | |
310 | <select name='MONTH'> | |
311 | END | |
312 | ; | |
313 | for (my $month = 0; $month < 12; $month++) | |
314 | { | |
315 | print "\t<option "; | |
316 | if ($month == $cgiparams{'MONTH'}) { | |
317 | print "selected='selected' "; } | |
318 | print "value='$month'>$longmonths[$month]</option>\n"; | |
319 | } | |
320 | print <<END | |
321 | </select> | |
322 | </td> | |
323 | <td width='10%' class='base' align='right'> $Lang::tr{'day'}: </td> | |
324 | <td width='40%'> | |
325 | <select name='DAY'> | |
326 | END | |
327 | ; | |
328 | print "<option value='0'>$Lang::tr{'all'}</option>\n"; | |
9f663e66 | 329 | for (my $day = 1; $day <= 31; $day++) |
cd1a2927 MT |
330 | { |
331 | print "\t<option "; | |
332 | if ($day == $cgiparams{'DAY'}) { | |
333 | print "selected='selected' "; } | |
334 | print "value='$day'>$day</option>\n"; | |
335 | } | |
336 | print <<END | |
337 | </select> | |
338 | </td> | |
339 | <td width='5%' align='center'><input type='submit' name='ACTION' title='$Lang::tr{'day before'}' value='<<' /></td> | |
340 | <td width='5%' align='center'><input type='submit' name='ACTION' title='$Lang::tr{'day after'}' value='>>' /></td> | |
341 | <td width='10%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'update'}' /></td> | |
342 | <td width='10%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'export'}' /></td> | |
343 | </tr> | |
344 | </table> | |
345 | </form> | |
346 | END | |
347 | ; | |
348 | ||
349 | &Header::closebox(); | |
350 | ||
351 | &Header::openbox('100%', 'left', $Lang::tr{'log'}); | |
352 | print "<p><b>$Lang::tr{'total hits for log section'} $cgiparams{'SECTION'} $date: $lines</b></p>"; | |
353 | ||
354 | $start = $lines - ${Header::viewsize} if ($start >= $lines - ${Header::viewsize}); | |
355 | $start = 0 if ($start < 0); | |
356 | ||
357 | my $prev; | |
358 | if ($start == 0) { | |
359 | $prev = -1; | |
360 | } else { | |
361 | $prev = $start - ${Header::viewsize}; | |
362 | $prev = 0 if ( $prev < 0); | |
363 | } | |
9f663e66 | 364 | |
cd1a2927 MT |
365 | my $next; |
366 | if ($start == $lines - ${Header::viewsize}) { | |
367 | $next = -1; | |
368 | } else { | |
369 | $next = $start + ${Header::viewsize}; | |
370 | $next = $lines - ${Header::viewsize} if ($next >= $lines - ${Header::viewsize}); | |
371 | } | |
372 | ||
373 | if ($logsettings{'LOGVIEW_REVERSE'} eq 'on') { @log = reverse @log; } | |
374 | if ($lines != 0) { &oldernewer(); } | |
375 | ||
376 | print <<END | |
fda1f52f | 377 | <table width='100%' class='tbl'> |
cd1a2927 | 378 | <tr> |
fda1f52f | 379 | <th width='10%' align='center' class='boldbase'><b>$Lang::tr{'time'}</b></th> |
5e818d6a MF |
380 | <th width='15%' align='center' class='boldbase'><b>$Lang::tr{'section'}</b></th> |
381 | <th width='75%'> </th> | |
cd1a2927 MT |
382 | </tr> |
383 | END | |
384 | ; | |
385 | ||
386 | $lines = 0; | |
387 | #print '<tt>'; | |
388 | foreach $_ (@log) | |
389 | { | |
5595bc03 | 390 | /^... (..) (..:..:..) [\w\-]+ ${section}(.*)$/; |
cd1a2927 MT |
391 | my $day = $1; |
392 | $day =~ tr / /0/; | |
393 | my $time = $cgiparams{'DAY'} ? "$2" : "$day/$2" ; | |
394 | my $sec = $3; | |
395 | my $data = $4; | |
396 | # correct the cut position, just when section=RED | |
397 | if (($cgiparams{'SECTION'} eq 'red' ) && ($sec =~ /(kernel:)(.*)/)) { | |
398 | $sec = 'kernel'; | |
399 | $data = $2.': '.$data; | |
400 | } | |
401 | my $d = substr ($data,0,80); | |
402 | while (length($data)>80){ #very basic breaking of lines... | |
403 | $data = substr ($data,80); #permit correct display in table cell | |
404 | $d .= ' ' . substr ($data,0,80); | |
405 | } | |
fda1f52f | 406 | my $col=""; |
cd1a2927 MT |
407 | |
408 | if ($lines % 2) { | |
fda1f52f AM |
409 | print "<tr>"; |
410 | $col="bgcolor='$color{'color20'}'"; } | |
cd1a2927 | 411 | else { |
fda1f52f AM |
412 | print "<tr>"; |
413 | $col="bgcolor='$color{'color22'}'"; } | |
414 | print "<td $col>$time<td $col>$sec<td $col>" .&Header::cleanhtml ("$d", 'y') . "</td></tr>\n"; | |
cd1a2927 MT |
415 | $lines++; |
416 | } | |
417 | #print '</tt>'; | |
418 | print "</table>"; | |
419 | ||
420 | &oldernewer(); | |
421 | ||
422 | &Header::closebox(); | |
423 | ||
424 | &Header::closebigbox(); | |
425 | ||
426 | &Header::closepage(); | |
427 | ||
428 | sub oldernewer | |
429 | { | |
430 | print <<END | |
431 | <table width='100%'> | |
432 | <tr> | |
433 | END | |
434 | ; | |
435 | ||
436 | print "<td align='center' width='50%'>"; | |
437 | if ($prev != -1) { | |
438 | print "<a href='/cgi-bin/logs.cgi/log.dat?$prev,$cgiparams{'MONTH'},$cgiparams{'DAY'},$cgiparams{'SECTION'}'>$Lang::tr{'older'}</a>"; } | |
439 | else { | |
440 | print "$Lang::tr{'older'}"; } | |
441 | print "</td>\n"; | |
442 | ||
443 | print "<td align='center' width='50%'>"; | |
444 | if ($next >= 0) { | |
445 | print "<a href='/cgi-bin/logs.cgi/log.dat?$next,$cgiparams{'MONTH'},$cgiparams{'DAY'},$cgiparams{'SECTION'}'>$Lang::tr{'newer'}</a>"; } | |
446 | else { | |
447 | print "$Lang::tr{'newer'}"; } | |
448 | print "</td>\n"; | |
449 | ||
450 | print <<END | |
451 | </tr> | |
452 | </table> | |
453 | END | |
454 | ; | |
455 | } |