home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet 1996 World Exposition
/
park.org.s3.amazonaws.com.7z
/
park.org.s3.amazonaws.com
/
Pavilions
/
BrainOpera
/
cgi-bin
/
stats.cgi
< prev
next >
Wrap
Text File
|
2017-09-21
|
1KB
|
70 lines
#!/usr/local/bin/perl
# Script written by Ben Adida
# This script redirects to the right Stat Page.
# written on October 27th, 1995.
require 'flush.pl';
$date_file="/users/benjamin/bin/date.txt";
open(datefile,"$date_file");
$date=<datefile>;
close(datefile);
$date=~ m/^(\S*)\s(.*)$/;
$month=$1;
$day=$2;
$month_menu="
<select name=\"month\">
<option> Jan
<option> Feb
<option> Mar
<option> Apr
<option> May
<option> Jun
<option> Jul
<option> Sep
<option> Oct
<option> Nov
<option> Dec
</select>";
$month_menu=~ s/<option> $month/<option selected> $month/;
$day_menu="<select name=\"day\">";
for ($i=0;$i<32;$i++) {
if ($i==$day) {
$added_stuff="<option selected> $i";
} else {
$added_stuff="<option> $i";
}
$day_menu="$day_menu\n$added_stuff";
}
$day_menu="$day_menu\n</select>";
sub html_header {
print "Content-type: text/html\n\n";
&flush(STDOUT);
}
&html_header;
print "<HTML><HEAD><TITLE>Brain Opera Stats Pages</TITLE></HEAD>
<BODY bgcolor=#ffffff>
<center><h1>Brain Opera Web Server Statistics</h1>
<hr width=40%><p>
<h3>I'd like the Stats page for:</h3>
<form method=get action=\"/cgi-bin/stats-return.cgi\">
$month_menu
$day_menu
<p>
<input type=submit value=\"Give me the Stats\"><p>
<hr size=3><address>benjamin@media.mit.edu</address></body></html>";