]> i-scream Git - www.i-scream.org.git/commitdiff
Remove old CGI's for logging downloads.
authorTim Bishop <tim@bishnet.net>
Mon, 22 Mar 2004 00:02:38 +0000 (00:02 +0000)
committerTim Bishop <tim@bishnet.net>
Mon, 22 Mar 2004 00:02:38 +0000 (00:02 +0000)
cgi-bin/download.cgi [deleted file]
cgi-bin/logviewer.cgi [deleted file]

diff --git a/cgi-bin/download.cgi b/cgi-bin/download.cgi
deleted file mode 100755 (executable)
index 51727ec..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-#!/usr/bin/perl
-
-#--------------------------------------------------------------
-# download.cgi
-# 
-# A Perl CGI script that requests some details from the user
-# before they download a build from the i-scream web site.
-# To assist the paranoid, all fields are optional.
-#
-# Copyright Paul Mutton, 2001.
-#--------------------------------------------------------------
-
-use strict;
-use CGI;
-
-$| = 1;
-
-
-#--------------------------------------------------------------
-# Essential Settings
-#--------------------------------------------------------------
-my ($build_dir) = "/downloads";
-my ($log_file) = "download_log";
-my ($left) = "../htdocs/left.inc" ;
-my ($title) = "../htdocs/title.inc";
-my ($bottom) = "../htdocs/bottom.inc";
-#--------------------------------------------------------------
-
-
-my ($query) = new CGI;
-
-my ($file_name) = ($query->param('file_name') =~ /^\s*(.*)\s*$/);
-my ($your_name) = ($query->param('your_name') =~ /^\s*(.*)\s*$/);
-my ($email_address) = ($query->param('email_address') =~ /^\s*(.*)\s*$/);
-my ($country) = ($query->param('country') =~ /^\s*(.*)\s*$/);
-my ($submit) = ($query->param('submit') =~ /^\s*(.*)\s*$/);
-my ($date) = scalar localtime time;
-
-$your_name =~ s/\|//g;
-$email_address =~ s/\|//g;
-$country =~ s/\|//g;
-
-if (!defined($file_name) || $file_name eq "") {
-    print "Content-type: text/html\n\n";
-    print "You must specify a filename for use with the i-scream downloader.";
-    exit;
-}
-
-if (defined($submit) && $submit eq "Download") {
-    open(LOGFILE, ">>$log_file");
-    print LOGFILE "$date|$ENV{'REMOTE_ADDR'}|$file_name|$your_name|$email_address|$country\n";
-    close(LOGFILE);
-    print $query->redirect("$build_dir/$file_name");
-}
-else {
-    print "Content-type: text/html\n\n";
-
-    print <<"END";
-        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-        <!--
-            download.cgi
-            Created by pjm2 31/03/2001
-            Last modified 31/03/2001
-        -->
-
-        <html>
-
-        <head>
-         <title>i-scream downloads</title>
-         <meta name="description" content="The i-scream Project is a central monitoring system for Unix, Linux and NT servers.">
-         <meta name="keywords" content="i-scream, project, central monitoring system, unix, linux, nt, server, alert">
-         <meta name="generator" content="notepad on acid, aye.">
-        </head>
-
-        <body bgcolor="#ffffff" link="#0000ff" alink="#3333cc" vlink="#3333cc" text="#000066">
-
-        <table border="0" cellpadding="2" cellspacing="2">
-         <tr>
-          <td valign="top">
-END
-
-    &print_html($left);
-
-    print <<"END";
-        </td>
-        <td valign="top">
-END
-
-    &print_html($title);
-
-    print <<EOT;
-        <table align="center" width="500">
-         <tr>
-          <td>
-           <font face="arial,sans-serif">
-           <center><h3>i-scream builds</h3></center>
-           <font size="2">
-            If you wish your details to be kept so we can contact you in the
-            future about i-scream, please enter them below. At the moment we
-            are not using this information, but we may collate a list of
-            details for when we make a new major release. All details are
-            optional - do not feel obliged to enter anything!
-           </font>
-           </font>
-          </td>
-         </tr>
-        </table>
-        
-        <p>&nbsp;</p>
-        
-        <form action="/cgi-bin/download.cgi" method="POST">
-         <table border="0" align="center">
-          <tr>
-           <td><font face="arial,sans-serif">Filename:</font></td>
-           <td><font face="arial,sans-serif"><b>$file_name</b></font><input type="hidden" name="file_name" value="$file_name"></td>
-          </tr>
-          <tr>
-           <td><font face="arial,sans-serif">Your name:</font></td>
-           <td><input type="text" name="your_name" value=""></td>
-          </tr>
-          <tr>
-           <td><font face="arial,sans-serif">Email address:</font></td>
-           <td><input type="text" name="email_address" value=""></td>
-          </tr>
-          <tr>
-           <td><font face="arial,sans-serif">Country:</font></td>
-           <td><input type="text" name="country" value=""></td>
-          </tr>
-          <tr>
-           <td>&nbsp;</td>
-           <td><input type="submit" name="submit" value="Download"></td>
-          </tr>
-         </table>
-        </form>
-        
-        </body>
-        </html>
-EOT
-
-    &print_html($bottom);
-
-    print <<"END";
-
-          </td>
-         </tr>
-        </table>
-END
-
-}
-
-exit;
-
-
-# Print a file without escaping HTML: -
-sub print_html ($) {
-    my ($filename) = @_;
-    print `cat $filename 2>&1`;
-}
diff --git a/cgi-bin/logviewer.cgi b/cgi-bin/logviewer.cgi
deleted file mode 100755 (executable)
index 3de416e..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/perl -w
-
-
-#------------------------------------------------------------
-# logviewer.cgi
-# 
-# i-scream download log viewer
-# Copyright Paul Mutton, 2001.
-#------------------------------------------------------------
-
-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);
-    print <<EOT;
- <tr>
-  <td>$row[0]</td>
-  <td>$row[1]</td>
-  <td>$row[2]</td>
-  <td>$row[3]</td>
-  <td>$row[4]</td>
-  <td>$row[5]</td>
- </tr>
-EOT
-    $download_count++;
-}
-
-print "</table>Download count: $download_count</body></html>";
\ No newline at end of file