ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/web/cgi-bin/download.cgi
(Generate patch)

Comparing web/cgi-bin/download.cgi (file contents):
Revision 1.1 by pjm2, Sat Mar 31 10:53:58 2001 UTC vs.
Revision 1.2 by pjm2, Sat Mar 31 11:42:06 2001 UTC

# Line 1 | Line 1
1 < #!/usr/bin/perl -w
1 > #!/usr/bin/perl
2  
3   #--------------------------------------------------------------
4   # download.cgi
5   #
6 < # A Perl CGI script that requests a user's email address
7 < # before they may download a build from the i-scream web site.
8 < # It is not essential for them to enter their email address.
6 > # A Perl CGI script that requests some details from the user
7 > # before they download a build from the i-scream web site.
8 > # To assist the paranoid, all fields are optional.
9   #
10   # Copyright Paul Mutton, 2001.
11   #--------------------------------------------------------------
# Line 19 | Line 19 | $| = 1;
19   #--------------------------------------------------------------
20   # Essential Settings
21   #--------------------------------------------------------------
22 < my $build_dir = "/builds";
23 < my $log_file = "download_log";
22 > my ($build_dir) = "/builds";
23 > my ($log_file) = "download_log";
24   #--------------------------------------------------------------
25  
26  
27 < my $query = new CGI;
27 > my ($query) = new CGI;
28  
29   my ($file_name) = ($query->param('file_name') =~ /^\s*(.*)\s*$/);
30   my ($your_name) = ($query->param('your_name') =~ /^\s*(.*)\s*$/);
# Line 47 | Line 47 | if (defined($submit) && $submit eq "Download") {
47      open(LOGFILE, ">>$log_file");
48      print LOGFILE "$date|$file_name|$your_name|$email_address|$country\n";
49      close(LOGFILE);
50 <    print "Location: $build_dir/$file_name\n\n";
50 >    print $query->redirect("$build_dir/$file_name");
51   }
52   else {
53      print "Content-type: text/html\n\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines