]> i-scream Git - www.i-scream.org.git/commitdiff
Now displays the total number of downloads at the bottom of the
authorPaul Mutton <pjm2@i-scream.org>
Fri, 25 May 2001 18:02:15 +0000 (18:02 +0000)
committerPaul Mutton <pjm2@i-scream.org>
Fri, 25 May 2001 18:02:15 +0000 (18:02 +0000)
page... always nice to know.  Perhaps one day I shall have to change this
so it doesn't display the whole lot!

cgi-bin/logviewer.cgi

index df05c6948e77f983f6115a60d5b982541c6949bc..3de416e50a41d17ba43856ac5aaf6b28d49b6194 100755 (executable)
@@ -12,6 +12,8 @@ print "Content-type: text/html\n\n";
 
 print '<html><body><table border="1">';
 
+$download_count = 0;
+
 open(FILE, "<download_log");
 while($line = <FILE>) {
     @row = split(/\|/, $line);
@@ -25,6 +27,7 @@ while($line = <FILE>) {
   <td>$row[5]</td>
  </tr>
 EOT
+    $download_count++;
 }
 
-print "</table></body></html>";
\ No newline at end of file
+print "</table>Download count: $download_count</body></html>";
\ No newline at end of file