1 |
pjm2 |
1.1 |
#!/usr/bin/perl -w |
2 |
|
|
|
3 |
|
|
|
4 |
|
|
#------------------------------------------------------------ |
5 |
|
|
# logviewer.cgi |
6 |
|
|
# |
7 |
|
|
# i-scream download log viewer |
8 |
|
|
# Copyright Paul Mutton, 2001. |
9 |
|
|
#------------------------------------------------------------ |
10 |
|
|
|
11 |
|
|
print "Content-type: text/html\n\n"; |
12 |
|
|
|
13 |
|
|
print '<html><body><table border="1">'; |
14 |
|
|
|
15 |
pjm2 |
1.2 |
$download_count = 0; |
16 |
|
|
|
17 |
pjm2 |
1.1 |
open(FILE, "<download_log"); |
18 |
|
|
while($line = <FILE>) { |
19 |
|
|
@row = split(/\|/, $line); |
20 |
|
|
print <<EOT; |
21 |
|
|
<tr> |
22 |
|
|
<td>$row[0]</td> |
23 |
|
|
<td>$row[1]</td> |
24 |
|
|
<td>$row[2]</td> |
25 |
|
|
<td>$row[3]</td> |
26 |
|
|
<td>$row[4]</td> |
27 |
|
|
<td>$row[5]</td> |
28 |
|
|
</tr> |
29 |
|
|
EOT |
30 |
pjm2 |
1.2 |
$download_count++; |
31 |
pjm2 |
1.1 |
} |
32 |
|
|
|
33 |
pjm2 |
1.2 |
print "</table>Download count: $download_count</body></html>"; |