ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/web/cgi-bin/logviewer.cgi
Revision: 1.2
Committed: Fri May 25 18:02:15 2001 UTC (22 years, 11 months ago) by pjm2
Branch: MAIN
CVS Tags: PRE_WWW_REDESIGN
Branch point for: I-SCREAM_ORG
Changes since 1.1: +4 -1 lines
Log Message:
Now displays the total number of downloads at the bottom of the
page... always nice to know.  Perhaps one day I shall have to change this
so it doesn't display the whole lot!

File Contents

# User Rev Content
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>";