#!/usr/bin/perl ########################################################################## #### see the improved 2007 version !! ################################# ########################################################################## ########################################################################## #################### read info for this year: ############################ do "./INFO.pl"; ########################################################################## $VerisignLink="https://payflowlink.paypal.com"; $VerisignDomain="paypal.com"; ########################################################################## $logfile="/srv/www/cgi-bin/$Year_dir/Register/LOG"; # must chmod 666 $bgcolor="bgcolor=\"#009ebe\""; # background color of webpages ########################################################################## if($ENV{'REQUEST_METHOD'} eq 'POST') { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/,$buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/,$pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; $value =~ s/\"/''/g; $FORM{$name} = $value; } } else { &TestData(); } $fullname = $FORM{"fullname"}; $email = $FORM{"email"}; if ($email) { $emailnotif="$email"; } else { $emailnotif="(none)"; } $phonenum = $FORM{"phonenum"}; $country = $FORM{"country"}; $affiliation = $FORM{"affiliation"}; $category = $FORM{"category"}; $method = $FORM{"method"}; $addrform = $FORM{"addrform"}; #-mb: $dates = $FORM{"dates"}; $banquet = $FORM{"banquet"}; $reception = $FORM{"reception"}; $breakfast = $FORM{"breakfast"}; $sex = $FORM{"sex"}; # #-mb: 07_11_04: set also current date for logging: @mname=qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); ($sec,$min,$hour,$mday,$mon,$year) = localtime(time()); $mbdate = sprintf("%d %s %2d %02d:%02d:%02d", $mday, $mname[$mon], 1900+$year, $hour, $min, $sec); $amount = $FEE{$category}; $category = $TYPE{$category}; &RecordInLog(); if ($method eq "check") { &ResponseForCheck(); } if ($method eq "cardother") { &ResponseForCardother(); } if ($method eq "verisign") { &VeriSign(); } exit 0; ############################################################################## ############################################################################## ############################################################################## sub TestData { %FORM = ( "fullname" => "Test ''monkey'' User ", "email" => "random@colorado.edu", "phonenum" => "303-492-8995", "country" => "USA", "affil" => "appm UCB", "category" => "nonsiam_late", "method" => "cardother", "addrform" => "123 Main St.|||Colder, CO 80099" ); } ############################################################################## sub ResponseForCheck { print < $Acronym Submission Results

Thank you. Your form has been submitted.

A confirmation email will be sent to you at
$emailnotif
once the payment has been processed.

To complete your registration,
be sure to send a check for \$$amount.00 (US dollars)
made out to Copper Mtn. Conference
to this address:
 
    $Acronym
    $ConferenceCoordinator
    $ConferenceAddress1
    $ConferenceAddress2
    $ConferenceAddress3
    $ConferenceAddress4

EOCHECK } ############################################################################## sub ResponseForCardother { print < $Acronym Submission Results

Thank you. Your form has been submitted.

A confirmation email will be sent to you at
$emailnotif
once the payment has been processed.

To complete your registration,
be sure to submit your credit card information
(credit card type, number, and expiration date):

  • phone or mail it to FRSC

  • mail it in a letter to
    $Acronym
    University of Colorado
    Department of Applied Math   
    526 UCB
    Boulder   CO   80309-0526

EOCO } ############################################################################## sub VeriSign { print < $Acronym Submission Results

Thank you. Your form has been submitted.

A confirmation email will be sent to you at
$emailnotif
once the transaction is completed and processed.

To complete your registration, you must submit your credit card payment
by clicking on the following link to a secure server ($VerisignDomain)

(Reminder about the cancellation policy: No refunds will be given for cancellations after $DeadlineRefund.
Full refunds less a \$$RefundFee service charge will be given if notified before $DeadlineRefund.)

EOV } ############################################################################## sub RecordInLog { $addrform =~ s/\|\|\|/, /g; #-------------------------------------- # Try to send an email. #-------------------------------------- open (MAIL,"| $sendmail -s \"$Acronym registration\" $eaddress") || &LogError("cannot email (MAIL)"); print MAIL <>$logfile") || &LogError("cannot write to $logfile"); print LOG < error
ERROR

$problem

EOERR exit 0; } ############################################################################## __END__