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 |
$download_count = 0; |
16 |
|
17 |
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 |
$download_count++; |
31 |
} |
32 |
|
33 |
print "</table>Download count: $download_count</body></html>"; |