3 #--------------------------------------------------------------
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.
10 # Copyright Paul Mutton, 2001.
11 #--------------------------------------------------------------
19 #--------------------------------------------------------------
21 #--------------------------------------------------------------
22 my ($build_dir) = "/builds";
23 my ($log_file) = "download_log";
24 #--------------------------------------------------------------
27 my ($query) = new CGI;
29 my ($file_name) = ($query->param('file_name') =~ /^\s*(.*)\s*$/);
30 my ($your_name) = ($query->param('your_name') =~ /^\s*(.*)\s*$/);
31 my ($email_address) = ($query->param('email_address') =~ /^\s*(.*)\s*$/);
32 my ($country) = ($query->param('country') =~ /^\s*(.*)\s*$/);
33 my ($submit) = ($query->param('submit') =~ /^\s*(.*)\s*$/);
34 my ($date) = scalar localtime time;
36 $your_name =~ s/\|//g;
37 $email_address =~ s/\|//g;
40 if (!defined($file_name) || $file_name eq "") {
41 print "Content-type: text/html\n\n";
42 print "You must specify a filename for use with the i-scream downloader.";
46 if (defined($submit) && $submit eq "Download") {
47 open(LOGFILE, ">>$log_file");
48 print LOGFILE "$date|$file_name|$your_name|$email_address|$country\n";
50 print $query->redirect("$build_dir/$file_name");
53 print "Content-type: text/html\n\n";
57 <basefont face="arial,sans-serif" size="2">
58 <body bgcolor="white" text="#000066">
59 <table align="center" width="600">
62 <center><img src="/i-scream.gif" width="502" height="37" border="0"></center>
63 <center><h3>i-scream builds</h3></center>
65 At the current moment, all i-scream builds may be downloaded <b>free
66 of charge</b>. If you wish to be alerted infrequently about important issues
67 regarding the i-scream montoring system, then we would recommend that
68 you provide your contact details below. All fields are optional.
76 <form action="download.cgi" method="POST">
77 <table border="0" align="center">
80 <td><b>$file_name</b><input type="hidden" name="file_name" value="$file_name"></td>
84 <td><input type="text" name="your_name" value=""></td>
87 <td>Email address:</td>
88 <td><input type="text" name="email_address" value=""></td>
92 <td><input type="text" name="country" value=""></td>
96 <td><input type="submit" name="submit" value="Download"></td>