############################################################################
# Registration From for use with ASRA and other Societies #
# (Includes code for RugglesCC.pm) #
# (Includes PBLs, proper Tab spacing, ONEDAY, Intensive Workshops, #
# Master Classes, Early Bird, JavaScript deselect(Q,V), #
# State/International solution) #
# Blank Survey Responce Added #
# Added Reception/Guests, Added Research Fund (6/24/02 lth) #
# Added Society name to Form (6/25/02) lth #
# Added Non-CyberCash Transaction Verbage (6/27/02) lth #
# Removed upper case societies (8/9/02) lth #
# Added %sold_out (8/14/02) lth #
# Fixed late date problem (3/20/02) lth #
############################################################################
package IRPA_SYLLABUS_2014;
use CGI qw(:standard);
use PGP::GPG::MessageProcessor;
use Time::Local;
use POSIX qw(strftime floor);
use Apache::DBI();
use HTML::Entities;
$SIG{CHLD} = 'IGNORE';
my $onsite = 1;
#####################
# Society Variables #
#####################
my $society="SPA"; #Society Name i.e. ASRA, SEA, SPA, SCA, etc.
my $society_name = "Society for Pediatric Anesthesia";
my $form="irpasyllabus2014"; #Form name (directory location for status.iphtml & for orderIDs in database max 10 char)
my $account="40342"; #Account number - coming year use 23007 after dec 31 use 40300
my $dues_account = "22000"; # coming year 22000 - after dec 31 40200
my $fiscal_year = "20111031";
my $international = 0;
####################
# Virtual Merchant #
####################
my $MerchantMode = "false"; # Set to true to enable test mode, false to disable
my $status_url; # directory of status page
my $pin_num = "KLEJYE"; # Web user pin - Check with Chris
# if ($MerchantMode eq "false") {
$status_url = "https://secure.societyhq.com/spa/members/irpa2014/order-status.iphtml";
# } else {
# $status_url = "http://www.societyhq.com/~daniel/devel/secure.societyhq.com/htdocs/spa/irpa2013/order-status.iphtml";
# }
#####################
# Meeting Variables #
#####################
my $meeting ="Intensive Review of Pediatric Anesthesia Syllabus (Book Edition/Online Access)"; #meeting name i.e. Fall Meeting
my $late_reg_date = "20140215" ; #Late Registration date YYYYMMDD
my $meeting_number="65"; #Meeting Number written to file (ask Daniel)
my $meeting_date="May 30 - June 1, 2014"; #Date of meeting ie. Thrusday, June 21, 2001 or July 1-7, 2008
my $meeting_location="Hyatt Regency DFW International Airport, DFW Airport, TX"; # i.e. Richmond, VA
my $refund_policy="\nNo refunds. All sales are final."; # Full text of the refund policy i.e. Full refund before June 1, 2000; 10% refund between June 1, 2000 and Jan 2, 2008; no refund after Jan 2, 2008
my $early_bird_date="0"; # set to 0 if there is no early bird special
my $reginfo_buffer = '';
my $reginfo_buffer2 = '';
######################
# Database Variables #
######################
my $update_database = 0;
my $get_db_soldout = 1;
my ($dsn);
my ($sth);
my @fields;
my $SQL;
my $member_no = '';
$main::cgi = new CGI; # to take advantage of the "param" decoding method
$main::dbh = DBI->connect('DBI:mysql:spa:localhost', 'spadb_user','Alseides81',
{ PrintError => 0}) || die $DBI::errstr;
!>
my $path="../../site/";
my $path2=$path;
my $title="IRPA 2014 Symposium Syllabus Book Sale";
my $header = '';
//!>
#include ../../includes/header.iphtml
######################
# Member Information #
#####################
my $get_mbr_info = 1;
if ($get_mbr_info) {
my $username = $main::cgi->remote_user();
$SQL = < Thank you for your order! Refund Policy: $refund_policy " . $cgi->param('card_type') . ": " . $new_card_no2 . "$missing
\n";
print p("");
} else {
# print '\n";
print '
\n";
##############################################
# Totals, Cybercash, Write to file, etc #
##############################################
# $buffer .= "\n=============================================================================";
# $buffer .= "\nTotal:\t\t\t\t\t\t\t\t\t \$" . $cost;
# $buffer .= "\n\nCredit Card Information";
my $new_card_no = substr($cgi->param('ssl_card_number'), 0, 2) . "********" . substr($cgi->param('ssl_card_number'), -4);
# $buffer .= "\n\nCard Type: " . $cgi->param('card_type') . "\nCard Number: " . $new_card_no . "\nExpiration. Date: " . $cgi->param('ssl_exp_date');
##########
# Survey #
##########
if ($cgi->param('hear_about_meeting')) {
my $survey_buffer .="\n\n\n\nSurvey\n";
$survey_buffer .= "How did you hear about the meeting? \n";
my @hear_about = $cgi->param('hear_about_meeting');
foreach (@hear_about) {
$survey_buffer .= "\t -- $_ \n";
}
$buffer .= $survey_buffer;
}
if ($cgi->param('vascular_track')) {
my $survey2_buffer = "\n\nAre you attending this meeting this meeting because of the Vascular Track?\n";
my @vascular_track = $cgi->param('vascular_track');
foreach (@vascular_track) {
$survey2_buffer .= "\t -- $_ \n";
}
$buffer .= $survey2_buffer;
}
## End Survey
$buffer .= "
';
$buffer = 'Qty
Description
Price
';
$buffer .= '
SALES RECEIPT
Date: '.$date.'
';
$buffer .= $society_name . '
2209 Dickens Road
Richmond, VA 23230
(804) 282-9780 Phone
(804) 282-0090 Fax
' . lc($society) . '@societyhq.comTO ';
$buffer .= $cgi->param('ssl_first_name') . " " . $cgi->param('ssl_last_name') . '
';
$buffer .= $cgi->param('ssl_ship_to_address1') . '
' if $cgi->param('ssl_ship_to_address1');
$buffer .= $cgi->param('ssl_ship_to_address2') . '
';
$buffer .= $cgi->param('ssl_ship_to_city') . ", " . $cgi->param('ssl_ship_to_state') . " " . $cgi->param('ssl_ship_to_zip') . '
';
$buffer .= $cgi->param('ssl_ship_to_country') if $cgi->param('ssl_ship_to_country');
$buffer .= "
Phone: " . $cgi->param('ssl_phone');
$buffer .= "
Email: " . $cgi->param('ssl_email');
$buffer .= '
';
$buffer .= '
';
$buffer .= '
PAYMENT METHOD
CARD NUMBER
' . $cgi->param('card_type') . '
****' . $card_type_no . '
';
$buffer .= '
';
if ($cgi->param('category')) {
$buffer .= "\nCategory: " . $cgi->param('category');
if ($cgi->param('category') eq "O") {
$buffer .= " -- " . $cgi->param('cat_other');
}
}
# $buffer .= "\nAccompanying Person(s) Name(s): " . $cgi->param('accomp') if $cgi->param('accomp');
# $buffer .= "\nDietary Restrictions? " . $cgi->param('dietary') if $cgi->param('dietary');
# $buffer .= "\nABA Number: " . $cgi->param('aba_number');
# $buffer .="\n\nDescription:\n";
for ($i=0; defined($reg_types[$i]); $i++) {
if ($cgi->param('reg_type') eq $reg_types[$i][0]) {
# $buffer .= " " . $reg_types[$i][1];
$tab=length($reg_types[$i][1]);
my $subtype_count=0;
$reginfo_buffer2 .= "QUANTITY
DESCRIPTION
COST
" . $counter . " \n";
$reginfo_buffer2 .= "$reg_types[$i][1]";
$buffer .= " \n";
} else {
# $buffer .=" \$";
# $buffer .= $reg_types[$i][2][$reduced_rate];
$buffer .= "" . $counter . " ";
$buffer .= "$reg_types[$i][1]";
$counter++;
for ($j=0; defined($reg_types[$i][3][$j]); $j++) {
foreach my $rts (@reg_types_sub) {
if ($rts eq $reg_types[$i][3][$j][0]) {
$buffer .= "(" . $reg_types[$i][3][$j][1] . ")";
$tab += length($reg_types[$i][3][$j][1]) +2;
$subtype_count++;
}
}
}
# my $t_count=(floor((75-$tab)/8+.5)-1);
my $t_count= 64-$tab;
if ($cgi->param('reg_type') eq "ONEDAY") {
# $t_count = $t_count-3;
$t_count = $t_count - 18;
}
for (my $tabs=0; $tabs<$t_count; $tabs++) {
# $buffer .= "\t";
# $buffer .=" ";
}
### Deal with ONEDAY costs here
if ($cgi->param('reg_type') eq "ONEDAY") {
$regcost=$subtype_count * $reg_types[$i][2][$reduced_rate];
$cost = $cost + $regcost;
$buffer .= "$subtype_count days \@ \$" . $reg_types[$i][2][$reduced_rate] . "/day= \$" . $regcost;
$reginfo_buffer2 .= " $subtype_count days \@ \$" . $reg_types[$i][2][$reduced_rate] . "/day \n";
$reginfo_buffer2 .= "\$$regcost \$$reg_types[$i][2][$reduced_rate] ";
$reginfo_buffer2 .= "\$$reg_types[$i][2][$reduced_rate] \n";
$regcost = $reg_types[$i][2][$reduced_rate];
# if ($cgi->param('ssl_ship_to_country') ne "USA" and $cgi->param('ssl_ship_to_country') ne "Canada") { $regcost = $regcost+50; }
$cost=$cost+$regcost;
}
}
} #end first if $complete
if ($cgi->param('ssl_ship_to_country') ne "USA" and $cgi->param('ssl_ship_to_country') ne "Canada")
{
$cost = $cost+50;
$buffer .= " ";
$reginfo_buffer2 .= "1 Additional international shipping fee \$50 \n";
$international=1;
}
my $mondaynightreceptioncost_total = $mondaynightreception[$reduced_rate] * $cgi->param('mondaynightreception');
$cost = $cost + $mondaynightreceptioncost_total;
if ($cgi->param('mondaynightreception')) {
my $mondaynightreception_total = 1;
$buffer .= "\n\nI will attend the Friday Reception\n";
$reginfo_buffer2 .= "" . "1" . " \n";
$reginfo_buffer2 .= "Additional international shipping fee \n";
$reginfo_buffer2 .= "\$50 \n";
for (my $i=0; $i < $mondaynightreception_total; $i++) {
$text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"1";
$text[2] .= "\",\"0\",\"";
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . $mondaynightreception[2] . "\",\"";
$text[2] .= $mondaynightreception[$reduced_rate] . "\",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
$text[2] .= "\",\"";
$text[2] .= "TOTALCOST\",\"";
$text[2] .= $society . "\",";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
if ($update_database) {
$main::dbh->do(qq{LOCK TABLES meeting WRITE});
$main::dbh->do(qq{UPDATE meeting set total_registered = total_registered + 1 WHERE meeting_no = "$meeting_number" AND workshop_no = 1 AND breakout_no = 0});
$main::dbh->do(qq{UNLOCK TABLES});
}
}
}
my $extra_total = $extras[$reduced_rate] * $cgi->param('extras');
$cost = $cost + $extra_total;
my $extras_total = $cgi->param('extras');
if ($cgi->param('extras')) {
$buffer .= "\n" . $cgi->param('extras') . " Accompanying Person(s) \@ \$" . $extras[$reduced_rate] . "/person:\t\t\t\t \$" . $extra_total . "\n";
$reginfo_buffer2 .= "" . $counter++ . " \n";
$reginfo_buffer2 .= "I will attend the Friday Reception \n";
$reginfo_buffer2 .= "\$$mondaynightreceptioncost_total \n";
for (my $i=0; $i < $extras_total; $i++) {
$text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"1";
$text[2] .= "\",\"0\",\"";
if ($update_database) {
$main::dbh->do(qq{LOCK TABLES meeting WRITE});
$main::dbh->do(qq{UPDATE meeting set total_registered = total_registered + 1 WHERE meeting_no = "$meeting_number" AND workshop_no = 1 AND breakout_no = 0});
$main::dbh->do(qq{UNLOCK TABLES});
}
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . $extras[2] . "\",\"";
$text[2] .= $extras[$reduced_rate] . "\",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
$text[2] .= "\",\"";
$text[2] .= "TOTALCOST\",\"";
$text[2] .= $society . "\",";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
}
}
if ($cgi->param('vegetarian')) {
$buffer .= "\nI require vegetatrian meals\n";
$text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"36";
$text[2] .= "\",\"0\",\"";
if ($update_database) {
$main::dbh->do(qq{LOCK TABLES meeting WRITE});
$main::dbh->do(qq{UPDATE meeting set total_registered = total_registered + 1 WHERE meeting_no = "$meeting_number" AND workshop_no = 36 AND breakout_no = 0});
$main::dbh->do(qq{UNLOCK TABLES});
}
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"\",\"";
$text[2] .= "0\",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
$text[2] .= "\",\"";
$text[2] .= "TOTALCOST\",\"";
$text[2] .= $society . "\",";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
}
if ($cgi->param('kosher')) {
$buffer .= "\nI require kosher meals\n";
$text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"37";
$text[2] .= "\",\"0\",\"";
if ($update_database) {
$main::dbh->do(qq{LOCK TABLES meeting WRITE});
$main::dbh->do(qq{UPDATE meeting set total_registered = total_registered + 1 WHERE meeting_no = "$meeting_number" AND workshop_no = 37 AND breakout_no = 0});
$main::dbh->do(qq{UNLOCK TABLES});
}
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"\",\"";
$text[2] .= "0\",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
$text[2] .= "\",\"";
$text[2] .= "TOTALCOST\",\"";
$text[2] .= $society . "\",";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
}
my $kidsmondaynightreceptioncost_total = $kidsmondaynightreception[$reduced_rate] * $cgi->param('kidsmondaynightreception');
$cost = $cost + $kidsmondaynightreceptioncost_total;
my $kidsmondaynightreception_total = $cgi->param('kidsmondaynightreception');
if ($cgi->param('kidsmondaynightreception')) {
$buffer .= "\n" . $cgi->param('kidsmondaynightreception') . " 12 and under Seafood Feast Attendees \@ \$" . $kidsmondaynightreception[$reduced_rate] . "/person:\t\t\t \$" . $kidsmondaynightreceptioncost_total . "\n";
$reginfo_buffer2 .= "" . $counter++ . " \n";
$reginfo_buffer2 .= "" . $cgi->param('extras') . " Accompanying Person(s) \@ \$" . $extras[$reduced_rate] . "/person \n";
$reginfo_buffer2 .= "\$$extra_total \n";
for (my $i=0; $i < $kidsmondaynightreception_total; $i++) {
$text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"1";
$text[2] .= "\",\"0\",\"";
if ($update_database) {
$main::dbh->do(qq{LOCK TABLES meeting WRITE});
$main::dbh->do(qq{UPDATE meeting set total_registered = total_registered + 1 WHERE meeting_no = "$meeting_number" AND workshop_no = 1 AND breakout_no = 0});
$main::dbh->do(qq{UNLOCK TABLES});
}
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . $kidsmondaynightreception[2] . "\",\"";
$text[2] .= $kidsmondaynightreception[$reduced_rate] . "\",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
$text[2] .= "\",\"";
$text[2] .= "TOTALCOST\",\"";
$text[2] .= $society . "\",";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
}
}
if (defined($workshops[0])) {
# generate workshops for buffer and txt files
$buffer .="\n\nWorkshops:\n";
my %u_dates;
$u_dates{$_->[3]}++ for @workshops;
my @wsdates=sort keys %u_dates;
my $k=0;
my $ws_count=0;
for ($i=0; defined($wsdates[$i]); $i++) {
if ($cgi->param("WS$wsdates[$i]A")) {
for ($j=0; defined($workshops[$j]); $j++) {
if ($cgi->param("WS$wsdates[$i]A") eq $workshops[$j][0]) {
my $Wday=substr($workshops[$j][3], 6, 2);
my $Wmonth=substr($workshops[$j][3],4,2);
$Wmonth--;
my $Wyear=substr($workshops[$j][3],0,4)-1900;
my $Whour=substr($workshops[$j][3],8,2);
my $Wmin=substr($workshops[$j][3],10,2);
my $Wtime=timelocal(0,$Wmin,$Whour,$Wday,$Wmonth,$Wyear);
my $Wdate = strftime("%B %d %Y -- %I:%M %p", (localtime($Wtime)));
$buffer .= "\n\n$Wdate";
my $subbuffer = "\n -- " . $workshops[$j][1] . ":";
$buffer .= $subbuffer;
$reginfo_buffer2 .= "" . $counter++ . " \n";
$reginfo_buffer2 .= "" . $cgi->param('kidsmondaynightreception') . " 12 and under Seafood Feast Attendees \@ \$" . $kidsmondaynightreception[$reduced_rate] . "/person \n";
$reginfo_buffer2 .= "\$$kidsmondaynightreceptioncost_total \n";
$cost=$cost+$workshops[$j][2][$reduced_rate];
$ws_count++;
$text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"";
$text[2] .=$workshops[$j][0] . "\",\"0\",\"";
if ($update_database) {
$main::dbh->do(qq{LOCK TABLES meeting WRITE});
$main::dbh->do(qq{UPDATE meeting set total_registered = total_registered + 1 WHERE meeting_no = "$meeting_number" AND workshop_no = "$workshops[$j][0]" AND breakout_no = 0});
$main::dbh->do(qq{UNLOCK TABLES});
}
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . $workshops[$j][4] . "\",\"";
if (($ws_count==2) && ($early_bird)) {
$text[2] .= "0" . "\",\"";
$buffer .= "\n\t\t\t\t\t\t\tEARLYBIRD BONUS\t-\$" . $workshops[$j][2][$reduced_rate];
$cost=$cost-$workshops[$j][2][$reduced_rate];
} else {
$text[2] .= $workshops[$j][2][$reduced_rate] . "\",\"";
}
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
$text[2] .= "\",\"";
if (($ws_count==2) && ($early_bird)) {
$text[2] .= "TOTALCOST" . "\",\"";
} else {
$text[2] .= "TOTALCOST" . "\",\"";
}
$text[2] .= $society . "\",";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
}
}
if ($cgi->param("WS$wsdates[$i]B")) {
for ($j=0; defined($workshops[$j]); $j++) {
if ($cgi->param("WS$wsdates[$i]B") eq $workshops[$j][0]) {
$buffer .= "\n\t (Second Choice: $workshops[$j][1])";
}
}
}
if ($cgi->param("WS$wsdates[$i]C")) {
for ($j=0; defined($workshops[$j]); $j++) {
if ($cgi->param("WS$wsdates[$i]C") eq $workshops[$j][0]) {
$buffer .= "\n\t (Third Choice: $workshops[$j][1])";
}
}
}
} else {
$k++;
}
}
if ($k==$i) {
$buffer .= "\tNo workshops\n";
}
} # end 2nd if complete
if (defined($pbls[0])) {
# generate PBLs for buffer and text files
$buffer .= "\n\nPBLs: \n";
my %u_dates;
$u_dates{$_->[3]}++ for @pbls;
my @pbldates=sort keys %u_dates;
my $k=0;
for ($i=0; defined($pbldates[$i]); $i++) {
if ($cgi->param("PBL$pbldates[$i]A")) {
for ($j=0; defined($pbls[$j]); $j++) {
if ($cgi->param("PBL$pbldates[$i]A") eq $pbls[$j][0]) {
my $Wday=substr($pbls[$j][3], 6, 2);
my $Wmonth=substr($pbls[$j][3],4,2);
$Wmonth--;
my $Wyear=substr($pbls[$j][3],0,4)-1900;
my $Whour=substr($pbls[$j][3],8,2);
my $Wmin=substr($pbls[$j][3],10,2);
my $Wtime=timelocal(0,$Wmin,$Whour,$Wday,$Wmonth,$Wyear);
my $Wdate = strftime("%B %d %Y -- %I:%M %p", (localtime($Wtime)));
$buffer .= "\n\n$Wdate";
my $subbuffer .= "\n -- " . substr($pbls[$j][1],0,50) . " ... " . ":";
$buffer .= $subbuffer;
$reginfo_buffer2 .= "" . $counter++ . " \n";
$reginfo_buffer2 .= "$workshops[$j][1] \n";
# my $t_count=(floor((81 - length($workshops[$j][1]))/8+.5)-1);
# my $t_count = 64 - length($workshops[$j][1]);
my $t_count =72 - length($subbuffer);
for (my $tabs = 1; $tabs<=$t_count; $tabs++) {
# $buffer .= "\t";
$buffer .= " ";
}
$buffer .= "\t \$";
$buffer .= $workshops[$j][2][$reduced_rate];
$reginfo_buffer2 .= "\$$workshops[$j][2][$reduced_rate] \n";
$cost=$cost+$pbls[$j][2][$reduced_rate];
$text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"";
$text[2] .= $pbls[$j][0] . "\",\"0\",\"";
if ($update_database) {
$main::dbh->do(qq{LOCK TABLES meeting WRITE});
$main::dbh->do(qq{UPDATE meeting set total_registered = total_registered + 1 WHERE meeting_no = "$meeting_number" AND workshop_no = "$pbls[$j][0]" AND breakout_no = 0});
$main::dbh->do(qq{UNLOCK TABLES});
}
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . $pbls[$j][4] . "\",\"";
$text[2] .= $pbls[$j][2][$reduced_rate] . "\",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
$text[2] .= "\",\"";
$text[2] .= "TOTALCOST" . "\",\"";
$text[2] .= $society . "\",";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
}
}
if ($cgi->param("PBL$pbldates[$i]B")) {
for ($j=0; defined($pbls[$j]); $j++) {
if ($cgi->param("PBL$pbldates[$i]B") eq $pbls[$j][0]) {
$buffer .= "\n\t (Second Choice: PBL -- " . substr($pbls[$j][1],0,25) ."...)";
}
}
}
if ($cgi->param("PBL$pbldates[$i]C")) {
for ($j=0; defined($pbls[$j]); $j++) {
if ($cgi->param("PBL$pbldates[$i]C") eq $pbls[$j][0]) {
$buffer .= "\n\t (Third Choice: PBL -- " . substr($pbls[$j][1],0,25) ."...)";
}
}
}
} else {
$k++;
}
}
if ($k==$i) {
$buffer .= "\tNo pbls\n";
}
} #end 3nd if $complete
if (defined($intensive_ws[0])) {
# generate intensive workshops for buffer and txt files
$buffer .= "\n\nSpecial Interest Group - Pediatric Pain Medicine \n";
my %u_dates;
$u_dates{$_->[3]}++ for @intensive_ws;
my @wsdates=sort keys %u_dates;
my $k=0;
for ($i=0; defined($wsdates[$i]); $i++) {
if ($cgi->param("IWS$wsdates[$i]A")) {
for ($j=0; defined($intensive_ws[$j]); $j++) {
if ($cgi->param("IWS$wsdates[$i]A") eq $intensive_ws[$j][0]) {
my $Wday=substr($intensive_ws[$j][3], 6, 2);
my $Wmonth=substr($intensive_ws[$j][3],4,2);
$Wmonth--;
my $Wyear=substr($intensive_ws[$j][3],0,4)-1900;
my $Whour=substr($intensive_ws[$j][3],8,2);
my $Wmin=substr($intensive_ws[$j][3],10,2);
my $Wtime=timelocal(0,$Wmin,$Whour,$Wday,$Wmonth,$Wyear);
my $Wdate = strftime("%B %d %Y -- %I:%M %p", (localtime($Wtime)));
$buffer .= "\n\n$Wdate";
my $subbuffer .= "\n -- " . $intensive_ws[$j][1] . ":";
$buffer .= $subbuffer;
# my $t_count=(floor((83 - length($intensive_ws[$j][1]))/8+.5)-1);
my $t_count = 72 - length($subbuffer);
for (my $tabs = 1; $tabs<=$t_count; $tabs++) {
$buffer .= " ";
# $buffer .= "\t";
}
$buffer .= "\t \$";
$buffer .= $intensive_ws[$j][2][$reduced_rate];
$cost=$cost+$intensive_ws[$j][2][$reduced_rate];
$text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"";
$text[2] .=$intensive_ws[$j][0] . "\",\"0\",\"";
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . $intensive_ws[$j][4] . "\",\"";
$text[2] .= $intensive_ws[$j][2][$reduced_rate] . "\",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
$text[2] .= "\",\"";
$text[2] .= "TOTALCOST" . "\",\"";
$text[2] .= $society . "\",";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
}
}
if ($cgi->param("IWS$wsdates[$i]B")) {
for ($j=0; defined($intensive_ws[$j]); $j++) {
if ($cgi->param("IWS$wsdates[$i]B") eq $intensive_ws[$j][0]) {
$buffer .= "\n\t (Second Choice: $intensive_ws[$j][1])";
}
}
}
if ($cgi->param("IWS$wsdates[$i]C")) {
for ($j=0; defined($intensive_ws[$j]); $j++) {
if ($cgi->param("IWS$wsdates[$i]C") eq $intensive_ws[$j][0]) {
$buffer .= "\n\t (Third Choice: $intensive_ws[$j][1])";
}
}
}
} else {
$k++;
}
}
if ($k==$i) {
$buffer .= "\tNo PALS Course\n";
}
} #end 4nd if $complete
if (defined($master_classes[0])) {
# generate Master Classes for buffer and txt files
$buffer .= "\n\nMaster Classes: \n";
my %u_dates;
$u_dates{$_->[3]}++ for @master_classes;
my @wsdates=sort keys %u_dates;
my $k=0;
my $ws_count=0;
for ($i=0; defined($wsdates[$i]); $i++) {
if ($cgi->param("MC$wsdates[$i]A")) {
for ($j=0; defined($master_classes[$j]); $j++) {
if ($cgi->param("MC$wsdates[$i]A") eq $master_classes[$j][0]) {
my $Wday=substr($master_classes[$j][3], 6, 2);
my $Wmonth=substr($master_classes[$j][3],4,2);
$Wmonth--;
my $Wyear=substr($master_classes[$j][3],0,4)-1900;
my $Whour=substr($master_classes[$j][3],8,2);
my $Wmin=substr($master_classes[$j][3],10,2);
my $Wtime=timelocal(0,$Wmin,$Whour,$Wday,$Wmonth,$Wyear);
my $Wdate = strftime("%B %d %Y -- %I:%M %p", (localtime($Wtime)));
$buffer .= "\n\n$Wdate";
my $subbuffer .= "\n -- " . substr($master_classes[$j][1],0,50) . "... :";
$buffer .= $subbuffer;
# my $t_count=(floor((77 - length($master_classes[$j][0]) - length($master_classes[$j][1]))/8+.5)-1);
my $t_count = 72 - length($subbuffer);
for (my $tabs = 1; $tabs<=$t_count; $tabs++) {
$buffer .= " ";
# $buffer .= "\t";
}
$buffer .= "\t \$";
$buffer .= $master_classes[$j][2][$reduced_rate];
$cost=$cost+$master_classes[$j][2][$reduced_rate];
$ws_count++;
$text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"";
$text[2] .=$master_classes[$j][0] . "\",\"0\",\"";
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . $master_classes[$j][4] . "\",\"";
$text[2] .= $master_classes[$j][2][$reduced_rate] . "\",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
# if ($CyberCash) {
# $text[2] .= "_C";
# }
$text[2] .= "\",\"";
$text[2] .= "TOTALCOST" . "\",\"";
$text[2] .= $society . "\",";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
}
}
} else {
$k++;
}
}
if ($k==$i) {
$buffer .= "\tNo Master Classes\n";
}
} #end 5nd if $complete
### Begin Reception Guests
# note proper tab spacing not yet implemented
if (@guest_cost) {
# 6th complete (for Reception Guests)
my $gcost=0;
if ($cgi->param('guests')==1) {
$buffer .= "\n\t--Will attend Reception \n";
$text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"";
$text[2] .= $gitem . "\",\"0\",\"";
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . $gaccount . "\", \"" . $gcost . "\",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
# if ($CyberCash) {
# $text[2] .= "_C";
# }
$text[2] .= "\",\"" . $gcost . "\",\"";
$text[2] .= $society . "\",";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
$gcost=$guest_cost[$reduced_rate]*$cgi->param('guests');
$cost=$cost+$gcost;
$buffer .="Extra Reception Ticket (" . $cgi->param('guests') . "):\t\t\t\t\t\t \$" . $gcost . "\n";
$text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"";
$text[2] .= $gitem . "\",\"0\",\"";
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . $gaccount . "\", \"" . $gcost . "\",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
# if ($CyberCash) {
# $text[2] .= "_C";
# }
$text[2] .= "\",\"" . $gcost . "\",\"";
$text[2] .= $society . "\",";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
} else {
if ($cgi->param('attend') eq "yes") {
$gcost=0;
$buffer .= "\n Will attend Reception \n";
$text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"";
$text[2] .= $gitem . "\",\"0\",\"";
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . $gaccount . "\", \"" . $gcost . "\",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
# if ($CyberCash) {
# $text[2] .= "_C";
# }
$text[2] .= "\",\"" . $gcost . "\",\"";
$text[2] .= $society . "\",";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
}
}
} # end 6th complete
### End Reception Guest
### Begin Research Education Fund
# Note proper tab spacing not yet implemented
if (defined($research[0])) {
# 7th complete for fund
if ($cgi->param('fund')>0) {
$cost=$cost+$cgi->param('fund');
$buffer .="\nResearch Education Fund:\t\t\t\t\t\t \$" . $cgi->param('fund') . "\n";
$reginfo_buffer2 .= "" . $counter++ . " \n";
$reginfo_buffer2 .= "$pbls[$j][1] \n";
# my $t_count=(floor((81 - length($subbuffer))/8+.5)-1);
my $t_count=72 - length($subbuffer);
for (my $tabs = 1; $tabs<=$t_count; $tabs++) {
$buffer .= " ";
# $buffer .= "\t";
}
$buffer .= "\t \$";
$buffer .= $pbls[$j][2][$reduced_rate];
$reginfo_buffer2 .= "\$$pbls[$j][2][$reduced_rate] \n";
$text[2] .="\"" . $orderID . "\",\"" . $research[1] . "\",\"";
$text[2] .= $research[2] . "\",\"0\",\"";
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . $research[0] . "\",\"" . $cgi->param('fund') . "\",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
# if ($CyberCash) {
# $text[2] .= "_C";
# }
$text[2] .= "\",\"" . "TOTALCOST" . "\",\"";
$text[2] .= $society . "\",";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
}
} # End 7th complete
### End Research Education Fund
### Dinners
if (defined($receptions[0])) {
# 8th complete for dinners
$buffer .= "\n\nDinners:";
my %u_dates;
$u_dates{$_->[3]}++ for @receptions;
my @wsdates=sort keys %u_dates;
my $k=0;
my $ws_count=0;
for ($i=0; defined($wsdates[$i]); $i++) {
# cycle through dates
if ($cgi->param("dinner$wsdates[$i]")) {
# Dinner check
for ($j=0; defined($receptions[$j]); $j++) {
# cycle through dinners
if ($cgi->param("dinner$wsdates[$i]") eq $receptions[$j][0]) {
# Selected Dinner matches
my $Wday=substr($receptions[$j][3], 6, 2);
my $Wmonth=substr($receptions[$j][3],4,2);
$Wmonth--;
my $Wyear=substr($receptions[$j][3],0,4)-1900;
my $Whour=substr($receptions[$j][3],8,2);
my $Wmin=substr($receptions[$j][3],10,2);
my $Wtime=timelocal(0,$Wmin,$Whour,$Wday,$Wmonth,$Wyear);
my $Wdate = strftime("%B %d %Y -- %I:%M %p", (localtime($Wtime)));
$buffer .= "\n$Wdate";
my $subbuffer .= "\n -- " . substr($receptions[$j][1],0,50);
if ($receptions[$j][1] ne substr($receptions[$j][1],0,50)) {
$subbuffer .= "... :";
} else {
$subbuffer .= ":";
}
$buffer .= $subbuffer;
# my $t_count=(floor((77 - length($receptions[$j][0]) - length($receptions[$j][1]))/8+.5)-1);
my $t_count = 72 - length($subbuffer);
for (my $tabs = 1; $tabs<=$t_count; $tabs++) {
$buffer .= " ";
# $buffer .= "\t";
}
$buffer .= "\t \$";
$buffer .= $receptions[$j][2]{$cgi->param('reg_type')}[$reduced_rate];
$cost=$cost+$receptions[$j][2]{$cgi->param('reg_type')}[$reduced_rate];
$ws_count++;
$text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"";
$text[2] .=$receptions[$j][0] . "\",\"0\",\"";
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . $receptions[$j][4] . "\",\"";
$text[2] .= $receptions[$j][2]{$cgi->param('reg_type')}[$reduced_rate] . "\",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
# if ($CyberCash) {
# $text[2] .= "_C";
# }
$text[2] .= "\",\"";
$text[2] .= "TOTALCOST" . "\",\"";
$text[2] .= $society . "\",";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
}
}
} else {
$k++;
}
}
if ($k==$i) {
$buffer .= "\tNo Dinners\n";
}
}# end 8th complete
### End Dinners
my $guest_names = $cgi->param('guestnames');
if (($guest_names) && (($cgi->param('adultguests')>0) || ($cgi->param('childguests')>0))) {
$buffer .="\nGuest names: " . $guest_names . "\n";
}
############################
# Calculate Membership Cost #
############################
if (($show_mbr_appl) && ($cgi->param('applyingfor'))) {
my %membership = ("Active", 175,
"Affiliate", 175,
"International", 50,
"Active Joint SPA/CCAS", 200,
"Affiliate Joint SPA/CCAS", 200,
"International Joint SPA/CCAS", 75,
"Resident", 40,
"Fellow", 40);
$cost=$cost+$membership{$cgi->param('applyingfor')};
if ($membership{$cgi->param('applyingfor')} eq "200") {
$text[2] .= "\"" . $orderID . "\",\"0\",\"" . "0" . "\",\"0\",\"";
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . $dues_account . "\"," . "150" . ",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
$text[2] .= "\"," . "TOTALCOST" . ",\"";
$text[2] .= $society . "\",\"";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
$text[2] .= "\"" . $orderID . "\",\"0\",\"" . "0" . "\",\"0\",\"";
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . "23010" . "\"," . "50" . ",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
$text[2] .= "\"," . "TOTALCOST" . ",\"";
$text[2] .= $society . "\",\"";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
} elsif ($membership{$cgi->param('applyingfor')} eq "75") {
$text[2] .= "\"" . $orderID . "\",\"0\",\"" . "0" . "\",\"0\",\"";
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . $dues_account . "\"," . "50" . ",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
$text[2] .= "\"," . "TOTALCOST" . ",\"";
$text[2] .= $society . "\",\"";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
$text[2] .= "\"" . $orderID . "\",\"0\",\"" . "0" . "\",\"0\",\"";
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . "23010" . "\"," . "25" . ",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
$text[2] .= "\"," . "TOTALCOST" . ",\"";
$text[2] .= $society . "\",\"";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
} else {
$text[2] .= "\"" . $orderID . "\",\"0\",\"" . "0" . "\",\"0\",\"";
$text[2] .= $cgi->param('reg_type') . "\",\"";
$text[2] .= $date . "\",\"" . $dues_account . "\"," . $membership{$cgi->param('applyingfor')} . ",\"";
$text[2] .= $cgi->param('card_type') . "*" . substr($cgi->param('ssl_card_number'), -4);
$text[2] .= "\"," . "TOTALCOST" . ",\"";
$text[2] .= $society . "\",\"";
$text[2] .= $cgi->param('ssl_last_name');
$text[2] .= "\",\"";
$text[2] .= $cgi->param('ssl_first_name');
$text[2] .= "\"\n";
}
$reginfo_buffer2 .= "" . $counter++ . " \n";
$reginfo_buffer2 .= "$society Education/Research Fund Donation \n";
$reginfo_buffer2 .= "\$" . $cgi->param('fund') . " \n";
##########################
# Membership Information #
##########################
$buffer .= "\n=============================================================================";
$buffer .= "\nMEMBERSHIP INFORMATION\n";
$buffer .= "\nApplication for: " . $descriptions{$cgi->param('applyingfor')};
$buffer .= "\n\nDate of Birth: " . $cgi->param('month') . "/" . $cgi->param('day') . "/" . $cgi->param('year');
$buffer .= "\nPractice Type: " . $cgi->param('practice');
$buffer .="\nInstitution:: " . $cgi->param('institution');
$buffer .="\nResidency/Fellowship ends: " . $cgi->param('endsmonth') . " - " . $cgi->param('endsyear');
$buffer .="\nProgram Director: " . $cgi->param('director');
}
$buffer .= '" . $counter++ . " \n";
$reginfo_buffer2 .= "$descriptions{$cgi->param('applyingfor')} \n";
$reginfo_buffer2 .= "\$$membership{$cgi->param('applyingfor')} ';
$buffer .= "Total: ';
$buffer .= '$'.$cost.'
";
$buffer .= ' \n";
$reginfo_buffer2 .= "Total Amount Due: \n";
$reginfo_buffer2 .= "\$$cost
\n";
print "$reginfo_buffer";
print "$reginfo_buffer2";
print h4('Payment Information:');
my $new_card_no2 = substr($cgi->param('ssl_card_number'), 0, 2) . "********" . substr($cgi->param('ssl_card_number'), -4);
print "
Shipping Information
Receipt Information
';
$reginfo_buffer .= $cgi->param('ssl_first_name');
$reginfo_buffer .= " " . $cgi->param('ssl_last_name');
$reginfo_buffer .= " " . $cgi->param('title') . "\n";
$reginfo_buffer .= " \n";
$reginfo_buffer .= "
" . $cgi->param('ssl_ship_to_address1') if $cgi->param('ssl_ship_to_address1');
$reginfo_buffer .= "
" . $cgi->param('ssl_ship_to_address2') if $cgi->param('ssl_ship_to_address2');
$reginfo_buffer .= "
" . $cgi->param('ssl_ship_to_city') . ", " . $cgi->param('ssl_ship_to_state') . " " . $cgi->param('ssl_ship_to_zip');
$reginfo_buffer .= "
" . $cgi->param('ssl_ship_to_country');
$reginfo_buffer .= "
" . $cgi->param('ssl_phone') if $cgi->param('ssl_phone');
$reginfo_buffer .= "
" . $cgi->param('email') if $cgi->param('ssl_email');
$reginfo_buffer .= "";
if ($cgi->param('ssl_email')) {
$reginfo_buffer .= "Your receipt will be emailed to this email address. Receipts are sent by email only.\n";
$reginfo_buffer .= "
" . $cgi->param('ssl_email');
} else {
$reginfo_buffer .= "No email address was provided for delivery of your confirmation letter. Confirmation letters are sent by email only.\n";
}
$reginfo_buffer .= "
\n";
print "Expiration Date: " . $cgi->param('ssl_exp_date') . "
You will receive the printed IRPA syllabus and access to the online syllabus files.
This symposium will reinforce your knowledge of the theory and practice of pediatric anesthesiology. Lectures provide a comprehensive review of Pediatric Anesthesiology, reinforcing the basic sciences, core physiologic principles, and clinically applicable concepts. We have assembled a renowned group of faculty educators from our nation's premier teaching programs for this thorough review of pediatric anesthesiology. |
|
Non Member Price: \$325.00 Your Price: \$275.00 You Save: \$50.00 \$50 shipping and handling fee will be added for addresses outside US and Canada |
} !> #include ../../includes/footer.iphtml