From 85cbd3fe85b623bfa12c14aba57f5e60adf64b42 Mon Sep 17 00:00:00 2001 From: Tim Bishop Date: Mon, 22 Mar 2004 00:02:38 +0000 Subject: [PATCH] Remove old CGI's for logging downloads. --- cgi-bin/download.cgi | 159 ------------------------------------------ cgi-bin/logviewer.cgi | 33 --------- 2 files changed, 192 deletions(-) delete mode 100755 cgi-bin/download.cgi delete mode 100755 cgi-bin/logviewer.cgi diff --git a/cgi-bin/download.cgi b/cgi-bin/download.cgi deleted file mode 100755 index 51727ec..0000000 --- a/cgi-bin/download.cgi +++ /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"; - - - - - - - - i-scream downloads - - - - - - - - - - - - - -
-END - - &print_html($left); - - print <<"END"; - -END - - &print_html($title); - - print < -
- -

i-scream builds

- - 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! - -
-
- -

 

- -
- - - - - - - - - - - - - - - - - - - - - -
Filename:$file_name
Your name:
Email address:
Country:
 
-
- - - -EOT - - &print_html($bottom); - - print <<"END"; - - - - -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 index 3de416e..0000000 --- a/cgi-bin/logviewer.cgi +++ /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 ''; - -$download_count = 0; - -open(FILE, ") { - @row = split(/\|/, $line); - print < - - - - - - - -EOT - $download_count++; -} - -print "
$row[0]$row[1]$row[2]$row[3]$row[4]$row[5]
Download count: $download_count"; \ No newline at end of file -- 2.44.0