#!/usr/local/bin/perl # get_mapnav_data # This cgi script either presents a form for entering # registration information to obtain the EWG mapnav data # (if no QUERY_STRING is specified), or # processes the form data and displays a link to the # mapnav tar archive (if a QUERY_STRING is specified). # # This was adapted from John Aberdeen's script for downloading # Alembic. # # Author: Laurie Damianos # Modified: February 3, 1998 # This tells perl not to buffer output. $|=1; ################################################### # Set a few parameters $localTest = 0; $version = "GetMapnavData v1.0.0"; if ($localTest) { $server = "erroll.mitre.org:8080"; $recipientList = "laurie\@mitre.org"; $loggerDataPath = "http://snad.ncsl.nist.gov/~icv-ewg/experiments/mapnav/data/logger_data"; $sgmlDataPath = "http://snad.ncsl.nist.gov/~icv-ewg/experiments/mapnav/data/sgml_data"; } else { $server = $ENV{"SERVER_NAME"}; $recipientList = "laurie\@mitre.org, jkurtz\@mitre.org, robyn\@mitre.org, lynette\@mitre.org"; $loggerDataPath = "http://snad.ncsl.nist.gov/~icv-ewg/experiments/mapnav/data/logger_data"; $sgmlDataPath = "http://snad.ncsl.nist.gov/~icv-ewg/experiments/mapnav/data/sgml_data"; } $cgi = $ENV{"SCRIPT_NAME"}; $call_self = "http://".$server.$cgi; $sendmail = "/usr/lib/sendmail"; $tempFile = "/tmp/get-mapnav-data-$$"; ################################################### # Determine whether we're displaying the # registration page, or processing the registration # page and presenting a link to the logger. if ($ENV{'REQUEST_METHOD'} ne "GET") { die "$version only supports the GET method."; } else { if ($ENV{'QUERY_STRING'} eq "") { &presentRegFormPage; } else { &processFormData; } } ################################################### # Show the Registration Form Page sub presentRegFormPage { print < Download the Map Navigation Experiment Data

Download the Map Navigation Experiment Data

Please fill in the registration information below to obtain the Map Navigation Experiment:

Name:
Affiliation:
email:
Postal Address:
 

                      Except as permitted below
                         ALL RIGHTS RESERVED

                           SOFTWARE LICENSE

The MITRE Corporation (MITRE) provides this software to you without
charge to use for your internal purposes only.  Any copy you make for
such purposes is authorized provided you reproduce MITRE's copyright
designation and this License in any such copy.  You may not give or
sell this software to any other party without the prior written
permission of the MITRE Corporation.

This software is the copyright work of MITRE.  No ownership or other
proprietary interest in this software is granted you other than what
is granted in this license.

Any modification or enhancement of this software must inherit this
license, including its warranty disclaimers.  You hereby agree to
provide to MITRE, at no charge, a copy of any such modification or
enhancement without limitation.

MITRE IS PROVIDING THE PRODUCT "AS IS" AND MAKES NO WARRANTY, EXPRESS
OR IMPLIED, AS TO THE ACCURACY, CAPABILITY, EFFICIENCY,
MERCHANTABILITY, OR FUNCTIONING OF THIS SOFTWARE AND DOCUMENTATION.
IN NO EVENT WILL MITRE BE LIABLE FOR ANY GENERAL, CONSEQUENTIAL,
INDIRECT, INCIDENTAL, EXEMPLARY OR SPECIAL DAMAGES, EVEN IF MITRE HAS
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

You accept this software on the condition that you indemnify and hold
harmless MITRE, its Board of Trustees, officers, agents, and
employees, from any and all liability or damages to third parties,
including attorneys' fees, court costs, and other related costs and
expenses, arising out of your use of this software irrespective of the
cause of said liability.

The export from the United States or the subsequent reexport of this
software is subject to compliance with United States export control
and munitions control restrictions.  You agree that in the event you
seek to export this software you assume full responsibility for
obtaining all necessary export licenses and approvals and for assuring
compliance with applicable reexport restrictions.

NOTE: When exporting this product outside the United States of
America, the U. S. Commerce Department has determined that no license
is required.

$version
laurie@mitre.org
ENDOFREGFORM } ################################################### # Process the form data and display the link page sub processFormData { &processQueryString; ¬ifyDevelopers; &presentLoggerLinkPage; } sub notifyDevelopers { open (MAILREG, ">$tempFile"); print MAILREG "Subject: Mapnav Data Registration\n"; print MAILREG "\n"; print MAILREG "Name: $theNAME\n"; print MAILREG "Affiliation: $theAFFILIATION\n"; print MAILREG "email: $theEMAIL\n"; print MAILREG "Address: $theADDRESS1\n"; print MAILREG " $theADDRESS2\n"; print MAILREG "\n"; print MAILREG "----------------------------------------\n"; print MAILREG "\n"; print MAILREG "REMOTE_HOST: $ENV{'REMOTE_HOST'}\n"; print MAILREG "REMOTE_ADDR: $ENV{'REMOTE_ADDR'}\n"; print MAILREG "REMOTE_USER: $ENV{'REMOTE_USER'}\n"; print MAILREG "REMOTE_IDENT: $ENV{'REMOTE_IDENT'}\n"; print MAILREG "HTTP_USER_AGENT: $ENV{'HTTP_USER_AGENT'}\n"; print MAILREG ".\n"; close(MAILREG); system "cat $tempFile | $sendmail $recipientList"; system "/bin/rm -f $tempFile"; } sub presentLoggerLinkPage { print < Thank You

Thank You

Download the Map Navigation Experiment Data by clicking on the links below: STARTOFDATA print "\n"; print "\n"; print "\n"; print <
$version
laurie@mitre.org
ENDOFLINKPAGE } ################################################### # Process the QUERY_STRING environment variable sub processQueryString { @keyValuePairs = split (/&/, $ENV{'QUERY_STRING'}); foreach $keyValue (@keyValuePairs) { ($key, $value) = split (/=/, $keyValue); if ($key eq "NAME") { $theNAME = &urlDecode($value); } elsif ($key eq "AFFILIATION") { $theAFFILIATION = &urlDecode($value); } elsif ($key eq "EMAIL") { $theEMAIL = &urlDecode($value); } elsif ($key eq "ADDRESS1") { $theADDRESS1 = &urlDecode($value); } elsif ($key eq "ADDRESS2") { $theADDRESS2 = &urlDecode($value); } elsif ($key eq "OS") { $theOS = &urlDecode($value); } } } sub urlDecode { local($value) = @_; $value =~ tr/+/ /; $value =~ s/(%[A-Fa-f][\dA-Fa-f])/&#$1;/gi; $value =~ s/%([A-Fa-f][\dA-Fa-f])/hex ($1)/eg; $value =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C", hex ($1))/eg; $value; }
Data FormatData
MITRE Multi-Modal Loggerg11
g12
g14
g16
sgmlg7
g8
g9
g10
g11
g12
g14
g16