\&login_page, 'Continue to Register' => \®ister_page, 'Continue' => \®ister_page ); $Current_Screen = param(".State") || "Default"; die "No screen for $Current_Screen" unless $States{$Current_Screen}; my $pdf_form= "./PCICS-13thAnnualRegForm.pdf"; #location of PDF registration form !> #include ./regheader.iphtml 'center'},'Online Registration Form'); print h3({-align=>'center'},em('REQUIRED FIELDS ARE MARKED WITH AN ASTERISK (*)')); while (my($screen_name, $function) = each %States) { $function->($screen_name eq $Current_Screen); } !> Step 1 of 3

Current or past $society members, enter your email address below. Non-members, enter your email address and proceed to the registration form.






Please note that this form is for credit card transactions only. If you need to pay by check, please use this printable form.

EOF ; } sub register_page { my $active = shift; my $reg_email = param('loginemail'); my $orderID = ''; my $member_no = ''; my $member = 0; my $balance = 0; my $registered = 0; my $application = 0; my $renewal = 0; my $auto_renew = 0; my $registered_type = ''; my $elem = 0; my $msg = ''; my $error_msg = ''; my @reg_fields = (); my $registrant_in_db = 0; return unless $active; if (!param('loginemail')) { print p({-style=>'color: #F00'},strong('Error - Email Address is required!')); print p(''); return; } $orderID=sprintf("%02d%02d%02d%02d%02d%02d%03d",$year % 100, $mon+1,$mday,$hour,$min,$sec,sprintf("%02d", rand(1000))) if !param('id'); $sth = $main::dbh->prepare(qq{ SELECT t1.lname, t1.fname, t1.title, mail_address2, mail_address3, mail_city, mail_state, mail_zip, mail_country, phone, email, aba_id, fax, t1.member_id, member, NickName, balance_due, t1.title, CONCAT_WS(' ',t1.fname,t1.m_initial,t1.lname,t1.title), regtype_id,email2,auto_renewal,group_id FROM member t1 LEFT JOIN registrants t2 ON t1.member_id=t2.member_id AND meeting_no=? AND workshop_no=0 WHERE email LIKE ? OR email2 LIKE ? LIMIT 1}) || $main::dbh->errstr; $sth->execute($meeting_number, $reg_email, $reg_email) || $main::dbh->errstr; @reg_fields = $sth->fetchrow; $sth->finish(); foreach $elem (@reg_fields) { $elem = encode_entities($elem); } $registrant_in_db = 1 if @reg_fields; $member = $reg_fields[14]; $member_no = $reg_fields[13]; $balance = 1 if $reg_fields[16] > 0; # $balance = 0 if $reg_fields[16] > 0; $registered_type = $reg_fields[19] if $reg_fields[19]; if ($reg_fields[21] || $reg_fields[22]) { $auto_renew = 1; } $sth = $main::dbh->prepare(qq{ SELECT 1 FROM registrants WHERE cancelled IS NULL AND workshop_no=0 AND meeting_no = ? AND member_id = ? LIMIT 1}) || $main::dbh->errstr; $sth->execute($meeting_number, $member_no) || $main::dbh->errstr; @fields = $sth->fetchrow; $sth->finish(); $registered = 1 if $fields[0]; if (($registered_type eq "81") or ($registered_type eq "82")) { $registered = 0; } if ($registrant_in_db) { $msg .= "We show you as having a record with $society event under this email address. If you're not $reg_fields[18], please register with a different email address.

"; } SWITCH: { if (scalar @reg_fields == 0) { $msg .= "The email address provided was not found in our system. If you know you have been a member or have attended an $society meeting in the past and used this email address, please contact the $society office."; last SWITCH; } if ($registered) { $msg .= 'You are already registered for this meeting; continue if you want to add additional activities.'; last SWITCH; } if (!$member && $balance) { $msg .= 'Renew your '.$society.' membership and register at the member rate.'; last SWITCH; } if (!$auto_renew && ($member && $balance)) { $msg .= 'Our records show you having an outstanding balance for your membership dues. YOU MUST PAY YOUR MEMBERSHIP DUES IN ORDER TO REGISTER AT THE MEMBER RATE.'; last SWITCH; } if ($reg_fields[14] == 0) { # $msg .= 'Join '.$society.' now by completing the membership application and save on your registration fees by registering at the member rate.'; last SWITCH; } } ################## # Sold Out Items # ################## my @sold_out_numbers; if ($get_database_soldout) { $sth = $main::dbh->prepare("SELECT workshop_no FROM meeting WHERE meeting_no = $meeting_number AND workshop_no > 0 AND total_registered >= capacity"); $sth->execute(); undef(@fields); while (@fields = $sth->fetchrow_array()) { push @sold_out_numbers, $fields[0]; } $sth->finish(); } else { @sold_out_numbers = qw(); # put WSNumbers of sold out workshops here } ##################### # Registration Types# ##################### my @footnotes; my @reg_types; # @reg_types = (["T", "Testing", [1.5,1],[["SUB1", "Sub-Type 1"],["SUB2", "Sub-Type 2"]]]); # For Testing # Note -- Due to really poor planning if the reg_type does not have a sub_type but has a footnote you have to do this # @reg_types = (["T", "Testing", [1.5,1]); # For Testing # $reg_types[1][4] =1; if (!$auto_renew && (!$member || $balance)) { # reg types with Advanced Practice Provider Curriculum Review Course options # @reg_types = (["61","Physician Member", [699, 645]],["52","Nurse/Allied Health Member", [465, 425]],["72", "Resident Member", [350, 300]],["47", "Fellow Member", [350, 300]],["81", "Advanced Practice Provider Curriculum Review Course ONLY - Member", [0, 0]],["62","Physician Non-Member", [745, 699]],["53","Nurse/Allied Health Non-Member", [525, 475]],["73", "Resident Non-Member", [350, 300]],["48", "Fellow Non-Member", [350, 300]],["82", "Advanced Practice Provider Curriculum Review Course ONLY - Non-Member", [0, 0]]); @reg_types = (["61","Physician Member", [745, 699]],["52","Nurse/Allied Health Member", [525, 475]],["72", "Resident Member", [400, 350]],["47", "Fellow Member", [400, 350]],["62","Physician Non-Member", [799, 745]],["53","Nurse/Allied Health Non-Member", [575, 525]],["73", "Resident Non-Member", [400, 350]],["48", "Fellow Non-Member", [400, 350]]); $reg_types[0][4]=[1]; $reg_types[1][4]=[1]; $reg_types[2][4]=[1]; $reg_types[3][4]=[1]; # $reg_types[4][4]=[2]; # $reg_types[9][4]=[2]; $footnotes[1]="You MUST complete the above membership application to select this registration category."; # $footnotes[2]="You MUST select the PCICS Advanced Practice Provider Curriculum Review Course on this form below. This option does NOT include main meeting registration and you may NOT select the December 6, 2017 1 PM Pre-Conference."; } else { # reg types with Advanced Practice Provider Curriculum Review Course options # @reg_types = (["61","Physician Member", [699, 645]],["52","Nurse/Allied Health Member", [465, 425]],["72", "Resident Member", [350, 300]],["47", "Fellow Member", [350, 300]],["81", "Advanced Practice Provider Curriculum Review Course ONLY - Member", [0, 0]]); @reg_types = (["61","Physician Member", [745, 699]],["52","Nurse/Allied Health Member", [525, 475]],["72", "Resident Member", [400, 350]],["47", "Fellow Member", [400, 350]]); # $reg_types[4][4]=[1]; # $footnotes[1]="You MUST select the PCICS Advanced Practice Provider Curriculum Review Course on this form below. This option does NOT include main meeting registration and you may NOT select the December 6, 2017 1 PM Pre-Conference."; } ##################### # Footnotes # ##################### # $reg_types[0][4]=[1]; # $reg_types[1][4]=[2]; # $reg_types[2][4]=[2,3]; # $reg_types[3][4]=[1]; # $reg_types[4][4]=[2]; # Formatting for @reg_types is (["Type1_Name_Written_to_File", "Type1_Description", [Type1_Late_Cost, Type1_Early_Cost], [["Sub_Type1_Name_Written_to_File", "Sub_Type1_Description"]], "Footnote_Number"],["Type2_Name_Written_to_File", "Type2_Description", [Type2_Late_Cost, Type2_Early_Cost]]) # i.e. (["Member","Society Member", [200, 100]],["NonMember", "Non-Member", [250, 200]]) # you can also do it this way if you like lots of lines and [] # $reg_types[0][0] = "Type1_Name_Written_to_File"; # use ONEDAY for oneday reg # $reg_types[0][1] = "Type1_Description"; # $reg_types[0][2][0] = "Type1_Late_cost"; # $reg_types[0][2][1] = "Type1_Early_cost"; # $reg_types[0][3][0][0] = "Type1_SubField1_Written_to_File"; # $reg_types[0][3][0][1] = "Type1_SubField1_Description"; # $reg_types[0][3][1][0] = "Type1_SubField2_Written_to_File"; # $reg_types[0][3][1][1] = "Type1_SubField2_Description"; # $reg_types[0][4] = ["Footnote Number"]; This is an arry in case there is more than one footnote ######################## # Accompanying Persons # ######################## my @extras; my @fields2; my $sth2 = $main::dbh->prepare(qq{ SELECT FORMAT(late_fee,0), FORMAT(early_fee,0), register_acct, name, workshop_no, DATE_FORMAT(start_date, '%Y%m%d'), TIME_FORMAT(start_time, '%H%i'),CONCAT_WS(' - ',TIME_FORMAT(start_time,'%l:%i'),TIME_FORMAT(end_time,'%l:%i %p')) FROM meeting WHERE eventTypeID=3 AND meeting_no=? LIMIT 1 }); $sth2->execute($meeting_number); while (@fields2 = $sth2->fetchrow_array()) { $extras[0] = "$fields2[0]"; $extras[1] = "$fields2[1]"; $extras[2] = "$fields2[2]"; $extras[3] = "$fields2[3]"; $extras[4] = "$fields2[4]"; } $sth2->finish(); my @extras2; # =(200,200, 40325); my @mondaynightreception; # = (0,0, 40305); my @kidsmondaynightreception; # = (30,20, 40305); # format @extras=(late_reg_price, early_reg_price, accountnumber) ######################## # Reception # ######################## my @extras3; my @fields2; my $sth2 = $main::dbh->prepare(qq{ SELECT FORMAT(late_fee,0), FORMAT(early_fee,0), register_acct, name, workshop_no, DATE_FORMAT(start_date, '%Y%m%d'), TIME_FORMAT(start_time, '%H%i'),CONCAT_WS(' - ',TIME_FORMAT(start_time,'%l:%i'),TIME_FORMAT(end_time,'%l:%i %p')) FROM meeting WHERE eventTypeID=4 AND meeting_no=? LIMIT 1 }); $sth2->execute($meeting_number); while (@fields2 = $sth2->fetchrow_array()) { $extras3[0] = "$fields2[0]"; $extras3[1] = "$fields2[1]"; $extras3[2] = "$fields2[2]"; $extras3[3] = "$fields2[3]"; $extras3[4] = "$fields2[4]"; } $sth2->finish(); ################# # Workshops etc # ################# my @workshops; my @fields2; my $icounter = 0; my $sth2 = $main::dbh->prepare(qq{ SELECT workshop_no, name, FORMAT(late_fee,0), FORMAT(early_fee,0), DATE_FORMAT(start_date, '%Y%m%d'), TIME_FORMAT(start_time, '%H%i'),register_acct,CONCAT_WS(' - ',TIME_FORMAT(start_time,'%l:%i'),TIME_FORMAT(end_time,'%l:%i %p')) FROM meeting WHERE eventTypeID=1 AND meeting_no=? ORDER BY workshop_no }); $sth2->execute($meeting_number); while (@fields2 = $sth2->fetchrow_array()) { $workshops[$icounter][0] = $fields2[0]; $workshops[$icounter][1] = $fields2[1]; # $workshops[$icounter][1] = "$fields2[1] " . "(".$fields2[7].")"; $workshops[$icounter][2][0] = "$fields2[2]"; $workshops[$icounter][2][0] =~ s/,//g; $workshops[$icounter][2][1] = "$fields2[3]"; $workshops[$icounter][2][1] =~ s/,//g; $workshops[$icounter][3] = $fields2[4] . $fields2[5]; $workshops[$icounter][4] = $fields2[6]; $icounter++; } $sth2->finish(); ######## # PBLs # ######## my @pbls = (); my @fields2; my $icounter = 0; my $sth2 = $main::dbh->prepare(qq{ SELECT workshop_no, CONCAT_WS(' - ',name,speaker), IF(late_fee,FORMAT(late_fee,0),0), IF(early_fee,FORMAT(early_fee,0),0), DATE_FORMAT(start_date, '%Y%m%d'), TIME_FORMAT(start_time, '%H%i'),register_acct FROM meeting WHERE eventTypeID=2 AND meeting_no=? ORDER BY workshop_no }); $sth2->execute($meeting_number); while (@fields2 = $sth2->fetchrow_array()) { $pbls[$icounter][0] = "$fields2[0]"; $pbls[$icounter][1] = $fields2[1]; $pbls[$icounter][2][0] = "$fields2[2]"; $pbls[$icounter][2][1] = "$fields2[3]"; $pbls[$icounter][3] = $fields2[4] . $fields2[5]; $pbls[$icounter][4] = $fields2[6]; $icounter++; } $sth2->finish(); ## Format is the same as workshops ####################### # Intensive Workshops # ####################### my @intensive_ws; #@intensive_ws=(["65", "Pediatric Pain Medicine Special Interest Group", [250, 250], "201103311000", "23006"]); # # @intensive_ws = (["1" , "Upper Extremity", [250, 200], "200204250800","40301"], ["2" , "Upper Extremity", [250, 200], "200204251300","40301"], ["3" , "Lower Extremity", [250, 200], "200204250800","40301"], ["4" , "Lower Extremity", [250, 200], "200204251300","40301"]); # # ## Format is the same as workshops ################## # Master Classes # ################## my @master_classes; # # @master_classes = (["23" , "Complications of Regional Anesthesia and Closed claim Cases", [65, 50], "200204261400","40303"], ["24" , "Making Upper Extremity Blocks Work in a Busy Clinical Practice", [65, 50], "200204261600","40303"], ["53" , "Imaging techniques for Chronic Pain Evaluation and Management", [65, 50], "200204270800","40303"], ["54" , "How to Appy Continuous Catheter Techniques for Orthopaedic Pain Management", [65, 50], "200204271000","40303"], ["55" , "Complimentary and Alternative Medical Therapies for Pain", [65, 50], "200204271400","40303"], ["56" , "New Drugs and Novel Techniques for Regional Anesthesia", [65, 50], "200204271600","40303"]); # # @master_classes = (["200", "WSNumber=200", [15, 3], "200204261400", "123"], # ["201", "WSNumber=201", [15, 2], "200204261400", "123"]); ## Format is the same as workshops #################### # Reception Guests # #################### my @guest_cost; #$guest_cost[1]="68"; #Reception guest cost -- Early reg #$guest_cost[0]="78"; #Reception guest cost -- Late reg my $gitem="33"; #WS number for reception (see Daniel) my $gaccount="40305"; # Account number for extra reception guests (see Gail) my $reception="Saturday BBQ"; # Text should read something like "I plan to attend the SPA Reception/Buffet at the Museum of Art" my $reception_guest; #="I plan to bring a guest "; ## This Really should be Intergrated with the Dinner Below ####################################################### # Dinner (different rates for each registration type) # ####################################################### my @receptions; if (!$member || $balance) { # @receptions = # (["3", "Pre-conference Session", # { # "61" => [75,75], # "52" => [75,75], # "72" => [75,75], # "47" => [75,75], # "62" => [100,100], # "53" => [100,100], # "73" => [100,100], # "48" => [100,100] # }, "201712061300", "40327"], # ); } else { # @receptions = # (["3", "Pre-conference Session", # { # "61" => [75,75], # "52" => [75,75], # "72" => [75,75], # "47" => [75,75] # }, "201712061300", "40327"], # ); } my @receptions2; if (!$member || $balance) { @receptions2 = (["4", "PCICS Advanced Practice Provider Curriculum Review Course", { "61" => [200,200], "52" => [200,200], "72" => [200,200], "47" => [200,200], "81" => [200,200], "62" => [200,200], "53" => [200,200], "73" => [200,200], "48" => [200,200], "82" => [200,200] }, "201712050730", "40510"], ); } else { @receptions2 = (["4", "PCICS Advanced Practice Provider Curriculum Review Course", { "61" => [200,200], "52" => [200,200], "72" => [200,200], "47" => [200,200], "81" => [200,200] }, "201712050730", "40510"], ); } # $receptions[0][0] # WS Number # $receptions[0][1] # Dinner Title # $receptions[0][2]{Reg_Type}[0]; # late fee # $receptions[0][2]{Reg_type}[1]; # early fee # $receptions[0][3] # YYYYMMDDhhmm Start Time # $receptions[0][4] # Account Number # $receptions[0][5] # Guests Not Yet Implemented ################# # Research Fund # ################# my $research_fund; # = $society . " Educational/Research Fund Donation (The $society is a 501(c) 3 organization and your donations are tax deductible as allowed by law. All voluntary contributions will be acknowledged.)" ; # Text for the research fund my @research; # = ("40230", "0", "0"); ############################# # Receptions, Dinners, etc. # ############################# my @bbq; #@bbq = (["33" , "Saturday BBQ", [78, 68], "200403060000", "24500"], ["34" , "Saturday Special Children's BBQ", [20, 15], "200403070100", "24500"] ); # like Workshops, but make sure times (which are not displayed on form) are different such as to make each entry unique - this does affect display ordering ################# # Custom Fields # ################# #This doen't work...didn't have time to do custom fields. ################### # Misc. Variables # ################### my $show_mbr_appl = 0; my %category; # %category=("C", "Cardiologist", "S", "Surgeon", "NA", "Neither"); # use O for Other (Other will be put into cat_other field) my $filename = "/tmp/" . lc($society) . "_" . lc($form) . "_"; # where to write the txt files ################################### # Field List, and Required Fields # ################################### my %required_fields=( "ssl_email", "Meeting Confirmation Email Address", "reg_type", "Registration Type", "Nickname", "First Name/Nickname for Badge" ); ## Required Fields my %descriptions = ( "1", "Membership: Physician Tier 1 (\$150)", "2", "Membership: Physician Tier 2 (\$75)", "3", "Membership: Physician Tier 3 (\$30)", "17", "Membership: Physician Tier 4 (\$5)", "4", "Membership: Allied Health Tier 1 (\$100)", "5", "Membership: Allied Health Tier 2 (\$50)", "6", "Membership: Allied Health Tier 3 (\$20)", "15", "Membership: Allied Health Tier 4 (\$3)", "10", "Membership: Fellow/Resident/Trainee Tier 1 (\$100)", "11", "Membership: Fellow/Resident/Trainee Tier 2 (\$50)", "12", "Membership: Fellow/Resident/Trainee Tier 3 (\$20)", "16", "Membership: Fellow/Resident/Trainee Tier 4 (\$3)" ); ############################# # Main Script -- Don't Edit # ############################# my %sold_out; foreach (@sold_out_numbers) { $sold_out{$_} = "1"; } my $cgi = new CGI; my $i =0; my $late_day=substr($late_reg_date, 6, 2); my $late_month=substr($late_reg_date, 4, 2)-1; my $late_year=substr($late_reg_date, 0, 4)-1900; my $cutoff_time = timelocal(59,59,23,$late_day,$late_month,$late_year); my $current_time = time; my $reduced_rate = 0; my $state = ""; if (!$registrant_in_db) { $required_fields{"ssl_first_name"} = "First Name", $required_fields{"ssl_last_name"} = "Last Name", $required_fields{"ssl_ship_to_address1"} = "Address 1", $required_fields{"ssl_ship_to_city"} = "City", $required_fields{"ssl_ship_to_state"} = "State/Providence", $required_fields{"email"} = "Primary Email Address", $required_fields{"ssl_phone"} = "Office Phone" } ################## ## Country Calc ## ################## my $tier; my %world_bank_country; %world_bank_country = ( "Afghanistan", "4", "Albania", "3", "Algeria", "3", "American Samoa", "2", "Andorra", "1", "Angola", "3", "Antigua and Barbuda", "2", "Argentina", "2", "Armenia", "3", "Aruba", "1", "Australia", "1", "Austria", "1", "Azerbaijan", "3", "Bahamas", "2", "Bahrain", "2", "Bangladesh", "4", "Barbados", "2", "Belarus", "3", "Belgium", "1", "Belize", "3", "Benin", "4", "Bermuda", "1", "Bhutan", "3", "Bolivia", "3", "Bosnia and Herzegovina", "3", "Botswana", "3", "Brazil", "2", "Brunei Darussalam", "1", "Bulgaria", "3", "Burkina Faso", "4", "Burundi", "4", "Cabo Verde", "3", "Cambodia", "4", "Cameroon", "4", "Canada", "1", "Cayman Islands", "1", "Central African Republic", "4", "Chad", "4", "Channel Islands", "1", "Chile", "2", "China", "3", "Colombia", "2", "Comoros", "4", "Congo Dem Rep", "4", "Congo Rep", "3", "Costa Rica", "2", "Cote d Ivoire", "4", "Croatia", "2", "Cuba", "2", "Curacao", "1", "Cyprus", "2", "Czech Republic", "2", "Denmark", "1", "Djibouti", "3", "Dominica", "3", "Dominican Republic", "3", "Ecuador", "3", "Egypt", "3", "El Salvador", "3", "Equatorial Guinea", "1", "Estonia", "2", "Ethiopia", "4", "Faeroe Islands", "1", "Fiji", "3", "Finland", "1", "France", "2", "French Polynesia", "1", "Gabon", "2", "Gambia", "4", "Georgia", "3", "Germany", "1", "Ghana", "4", "Greece", "2", "Greenland", "1", "Grenada", "2", "Guam", "1", "Guatemala", "3", "Guinea", "4", "Guinea-Bissau", "4", "Guyana", "3", "Haiti", "4", "Honduras", "3", "Hong Kong SAR, China", "2", "Hungary", "2", "Iceland", "1", "India", "4", "Indonesia", "3", "Iran", "3", "Iraq", "3", "Ireland", "1", "Isle of Man", "1", "Israel", "2", "Italy", "2", "Jamaica", "3", "Japan", "2", "Jordan", "3", "Kazakhstan", "2", "Kenya", "4", "Kiribati", "3", "Korea Dem Rep", "4", "Korea Rep", "2", "Kosovo", "3", "Kuwait", "2", "Kyrgyz Republic", "4", "Lao PDR", "4", "Latvia", "2", "Lebanon", "3", "Lesotho", "3", "Liberia", "4", "Libya", "3", "Liechtenstein", "1", "Lithuania", "2", "Luxembourg", "1", "Macao SAR, China", "1", "Macedonia", "3", "Madagascar", "4", "Malawi", "4", "Malaysia", "2", "Maldives", "3", "Mali", "4", "Malta", "2", "Marshall Islands", "3", "Mauritania", "4", "Mauritius", "2", "Mexico", "2", "Micronesia", "3", "Moldova", "3", "Monaco", "1", "Mongolia", "3", "Montenegro", "3", "Morocco", "3", "Mozambique", "4", "Myanmar", "4", "Namibia", "3", "Nepal", "4", "Netherlands", "1", "New Caledonia", "1", "New Zealand", "2", "Nicaragua", "4", "Niger", "4", "Nigeria", "3", "Northern Mariana Islands", "1", "Norway", "1", "Oman", "2", "Pakistan", "4", "Palau", "2", "Panama", "2", "Papua New Guinea", "3", "Paraguay", "3", "Peru", "3", "Philippines", "3", "Poland", "2", "Portugal", "2", "Puerto Rico", "2", "Qatar", "1", "Romania", "2", "Russian Federation", "2", "Rwanda", "4", "Samoa", "3", "San Marino", "1", "Sao Tome and Principe", "4", "Saudi Arabia", "2", "Senegal", "3", "Serbia", "3", "Seychelles", "2", "Sierra Leone", "4", "Singapore", "1", "Sint Maarten", "1", "Slovak Republic", "2", "Slovenia", "2", "Solomon Islands", "4", "Somalia", "4", "South Africa", "3", "South Sudan", "4", "Spain", "2", "Sri Lanka", "3", "St. Kitts and Nevis", "2", "St. Lucia", "3", "St. Martin", "1", "St. Vincent and the Grenadines", "3", "Sudan", "4", "Suriname", "2", "Swaziland", "3", "Sweden", "1", "Switzerland", "1", "Syrian Arab Republic", "3", "Tajikistan", "4", "Tanzania", "4", "Thailand", "3", "Timor-Leste", "4", "Togo", "4", "Tonga", "3", "Trinidad and Tobago", "2", "Tunisia", "3", "Turkey", "2", "Turkmenistan", "3", "Turks and Caicos Islands", "1", "Tuvalu", "3", "Uganda", "4", "Ukraine", "3", "United Arab Emirates", "1", "United Kingdom", "1", "United States", "1", "Uruguay", "2", "Uzbekistan", "3", "Vanuatu", "3", "Venezuela", "2", "Vietnam", "4", "Virgin Islands", "1", "West Bank and Gaza", "3", "Yemen", "4", "Zambia", "4", "Zimbabwe", "4", ); if (($cgi->param('reg_type') && !$registered) or $cgi->param('WS20161208A')) { # if ($cgi->param('reg_type') != "14" && $cgi->param('reg_type') != "30") { $required_fields{"ssl_card_number"} = "Credit Card Number", $required_fields{"exp_month"} = "Expiration Date: Month", $required_fields{"exp_year"} = "Expiration Date: Year", $required_fields{"ssl_cvv2cvc2"} = "Security Code", $required_fields{"ssl_avs_address"} = "Card Billing Address", $required_fields{"ssl_avs_zip"} = "Card Billing Zip Code" # } elsif (($cgi->param('extras')) && ($cgi->param('reg_type') eq "14" || $cgi->param('reg_type') eq "30")) { # $required_fields{"ssl_card_number"} = "Credit Card Number", # $required_fields{"exp_month"} = "Expiration Date: Month", # $required_fields{"exp_year"} = "Expiration Date: Year", # $required_fields{"ssl_cvv2cvc2"} = "Security Code", # $required_fields{"ssl_avs_address"} = "Card Billing Address", # $required_fields{"ssl_avs_zip"} = "Card Billing Zip Code" # } elsif ($cgi->param('WS201410231130A')) { # $required_fields{"ssl_card_number"} = "Credit Card Number", # $required_fields{"exp_month"} = "Expiration Date: Month", # $required_fields{"exp_year"} = "Expiration Date: Year", # $required_fields{"ssl_cvv2cvc2"} = "Security Code", # $required_fields{"ssl_avs_address"} = "Card Billing Address", # $required_fields{"ssl_avs_zip"} = "Card Billing Zip Code" # } } if ($cgi->param('compFellowship') eq "Yes") { $required_fields{"fellowshipYear"} = "Year Fellowship Completed", $required_fields{"fellowshipLoc"} = "Fellowship Location", $required_fields{"fellowshipCity"} = "Fellowship City", $required_fields{"fellowshipState"} = "Fellowship State", $required_fields{"fellowshipSpec"} = "Specialty" } if ($cgi->param('PBL201609250645A')) { $required_fields{"PBL201609240700A"} = "If selecting the Advanced Fundamentals add-on Basic Fundamentals", } if ((uc($cgi->param('ssl_ship_to_country')) =~ /UNITED STATES/) || (uc($cgi->param('ssl_ship_to_country')) =~ /U\.S\./) || (uc($cgi->param('ssl_ship_to_country')) =~ /US/) || (uc($cgi->param('ssl_ship_to_country')) =~ /USA/)) { $state = $cgi->param('ssl_ship_to_state'); } elsif (uc($cgi->param('ssl_ship_to_state')) ne "INTERNATIONAL") { $state = $cgi->param('ssl_ship_to_state'); } if ($cutoff_time >= $current_time) { $reduced_rate=1; } my $early_bird = 0; my $early_bird_cutoff_time; if ($early_bird_date > 0) { my $late_day=substr($early_bird_date, 6, 2); my $late_month=substr($early_bird_date, 4, 2)-1; my $late_year=substr($early_bird_date, 0, 4)-1900; $early_bird_cutoff_time = timelocal(0,0,0,$late_day,$late_month,$late_year); } if ($early_bird_cutoff_time > $ current_time) { $early_bird=1; } if ($cgi->param('.State') eq "Continue") { my $day = sprintf "%02.0f", $mday; my $date = $month . "/" . $day . "/" . $year; my $orderID=sprintf("%02d%02d%02d%02d%02d%02d%03d",$year % 100, $mon+1,$mday,$hour,$min,$sec,sprintf("%02d", rand(1000))); my $missing = ''; my $sender = $society . " Registration Request CGI "; # my $recipient = "regforms\@societyhq.com"; my $recipient = "matt\@societyhq.com"; my $subject = $society . " " . $form . " - " . $cgi->param('ssl_last_name') . ", ". $cgi->param('ssl_first_name'); my $buffer = 0; my $cost = 0; my $regcost=0; my $j=0; my $counter = 1; my $tab=0; my $card_type = ''; my $card_type_no = substr($main::cgi->param('ssl_card_number'), -4); my $key = ""; my @text; my $subcat=$cgi->param('reg_type') . "reg_type_sub"; my @reg_types_sub=$cgi->param($subcat); # FOR NON-MEMBER TRYING 2 REG FOR MEM WORKSHOPS if (($cgi->param('WS201104030800A') eq "5" || $cgi->param('WS201104041200A') eq "6") && (!$cgi->param('applyingfor'))) { $required_fields{'ws3represent'} = "You have selected a workshop(s) that have member registration fees: You MUST select Non-Member workshops or join the society by completing the membership application."; } if ((%category) && (!$cgi->param('category'))) { $required_fields{'category'} = "Category"; } if (!$auto_renew && ($member && $balance) || (!$member)) { if (($cgi->param('reg_type') eq "61" || $cgi->param('reg_type') eq "52" || $cgi->param('reg_type') eq "72" || $cgi->param('reg_type') eq "47") && (!$cgi->param('applyingfor') || !$cgi->param('member_option'))) { if (!$member && !$balance) { $required_fields{"applyingfor"} = "You have selected a $society Member Registration Category. You must complete the membership application: Category Applying For"; } else { $required_fields{"member_option"} = "You have selected a $society Member Registration Category. You must complete the membership renewal notice: Renewal Notice Section"; } } } if ((!$member) && ($cgi->param('applyingfor'))) { $required_fields{"month"} = "Date of Birth: Month"; $required_fields{"day"} = "Date of Birth: Day"; $required_fields{"year"} = "Date of Birth: Year"; $required_fields{"practicetype"} = "Type of Practice"; $required_fields{"specialty"} = "Specialty"; $required_fields{"workCategory"} = "Location of work"; $required_fields{"cared_for"} = "Location patients are cared for"; } # if ($cgi->param('applyingfor') eq "7" || $cgi->param('applyingfor') eq "8") # { # $required_fields{"school"} = "School"; # $required_fields{"progdir"} = "Program Director"; # $required_fields{"gradmonth"} = "Graduation/Residency Ends: Month"; # $required_fields{"gradyear"} = "Graduation/Residency Ends: Year"; # } if (($cgi->param('haveCode')) && ($cgi->param('needCode'))) { $missing .= "
  • Please select I want to register for discount code or you have a discount code, not both.
  • \n" } else { if ($cgi->param('haveCode')) { my @code_info = (); if (!$cgi->param('code')) { $required_fields{"code"} = "Discount Code"; } else { $cursor = $main::dbh->prepare(qq{ SELECT 1, COUNT(userID), maxUsage,IF(CURDATE() > expire,0,1) FROM promo_code t1 LEFT JOIN promo_code_users t2 ON t2.promoID=t1.promoID WHERE status=1 AND promoCode=? GROUP BY promoCode LIMIT 1 }) || $main::dbh->errstr; $cursor->execute($cgi->param('code')); @code_info = $cursor->fetchrow_array(); if ((!$code_info[0]) || (!$code_info[3])) { $missing .= "
  • The discount code you provided is invalid or has expired. Please try again.
  • \n"; } elsif ($code_info[1] >= $code_info[2]) { $missing .= "
  • The discount code you provided has been used the maximum amount of times. Please register for a new code.
  • \n"; } } } } foreach (keys %required_fields) { if (!$cgi->param($_)) { $missing .= "
  • $required_fields{$_} is required
  • \n"; } if ($_ eq "reg_type") { for ($i=0; defined($reg_types[$i]); $i++) { # if (($reg_types[$i][0] eq $cgi->param('reg_type')) && (defined($reg_types[$i][3]))) { # if ((%category) && (!$cgi->param('category'))) { # $missing .= "
  • Category
  • \n"; # } # } } } } if (($cgi->param('reg_type') eq "81") or ($cgi->param('reg_type') eq "82")) { if (!($cgi->param('dinner201712050730'))) { $missing .= "
  • You must select the PCICS Advanced Practice Provider Curriculum Review Course
  • \n"; } if ($cgi->param('dinner201712061300')) { $missing .= "
  • You must attend the conference in order to select the Pre-Conference Session
  • \n"; } } if ($cgi->param('fund')) { if (!($cgi->param('fund') =~ /^[0-9]*$/)) { $missing .= "
  • Education Research Fund amount contains non-numeric characters
  • \n"; } } if ($cgi->param('extras')) { if (!($cgi->param('extras') =~ /^[0-9]*$/)) { $missing .= "
  • Number of Welcome Reception guest(s) contains non-numeric characters
  • \n"; } } if ($cgi->param('extras2')) { if (!($cgi->param('extras2') =~ /^[0-9]*$/)) { $missing .= "
  • Number of guests contains non-numeric characters
  • \n"; } } if ($cgi->param('kidsmondaynightreception')) { if (!($cgi->param('kidsmondaynightreception') =~ /^[0-9]*$/)) { $missing .= "
  • Number of guest contains non-numeric characters
  • \n"; } } if (($cgi->param('month')) || ($cgi->param('day')) || ($cgi->param('year'))) { if (!($cgi->param('month') =~ /^[0-9]*$/)) { $missing .= "
  • Date of Birth: Month contains non-numeric characters
  • \n"; } if (!($cgi->param('day') =~ /^[0-9]*$/)) { $missing .= "
  • Date of Birth: Day contains non-numeric characters
  • \n"; } if (!($cgi->param('year') =~ /^[0-9]*$/)) { $missing .= "
  • Date of Birth: Year contains non-numeric characters
  • \n"; } } if (($cgi->param('gradmonth')) || ($cgi->param('gradyear'))) { if (!($cgi->param('gradmonth') =~ /^[0-9]*$/)) { $missing .= "
  • Graduation/Residency Ends: Month contains non-numeric characters
  • \n"; } if (!($cgi->param('gradyear') =~ /^[0-9]*$/)) { $missing .= "
  • Graduation/Residency Ends: Year contains non-numeric characters
  • \n"; } } if (($cgi->param('adultguests')) || ($cgi->param('childguests'))) { if (!($cgi->param('adultguests') =~ /^[0-9]*$/)) { $missing .= "
  • Adult guests field contains non-numeric characters
  • \n"; } if (!($cgi->param('childguests') =~ /^[0-9]*$/)) { $missing .= "
  • Child guests field contains non-numeric characters
  • \n"; } } if ($missing) { print p({-style=>'color: #F00'},strong('Error - Required information was not provided on the submitted form. Please use the back button and correct the following:')); print "\n"; print p(''); } else { if (substr($main::cgi->param('ssl_card_number'),0,1) eq "3") { $card_type = "Amex"; } elsif (substr($main::cgi->param('ssl_card_number'),0,1) eq "4") { $card_type = "Visa"; } elsif (substr($main::cgi->param('ssl_card_number'),0,1) eq "5") { $card_type = "MC"; } else { $card_type = "Discover"; } my $checkNumber = "$card_type ***$card_type_no"; print '
    '; $reginfo_buffer2 = ''; $buffer = "\nREGISTRATION\n" . $society . " " . $meeting . "\n\n"; $buffer .= "OrderID: " . $orderID ."\n\n"; if($onsite) { $buffer .= "Click the link below to view your $meeting Mobile Meeting Guide.\n"; $buffer .= "Your mobile meeting guide features all your meeting information and more in the palm of your hand!\n"; $buffer .= "\nMobile Meeting Guide: http://www2.pcics.org/meetings/2017annual/guide/"; $buffer .= "\n\n"; } $sth = $main::dbh->prepare(qq{ SELECT t1.lname, t1.fname, t1.title, t1.mail_address2, t1.mail_address3, t1.mail_city, t1.mail_state, t1.mail_zip, t1.mail_country, t1.phone, t1.email, aba_id, fax, t1.member_id, member, NickName, balance_due, t1.title, CONCAT_WS(' ',t1.fname,t1.m_initial,t1.lname,t1.title), regtype_id, t1.email2 FROM member t1 LEFT JOIN registrants t2 ON t1.member_id=t2.member_id AND meeting_no=? AND workshop_no=0 WHERE email LIKE ? OR email2 LIKE ? LIMIT 1 }) || $main::dbh->errstr; $sth->execute($meeting_number, $reg_email, $reg_email) || $main::dbh->errstr; @reg_fields = $sth->fetchrow; $sth->finish(); foreach $elem (@reg_fields) { $elem = encode_entities($elem); } if (!$registrant_in_db) { $buffer .= "First Name: " . $cgi->param('ssl_first_name'); $buffer .= "\nLast Name: " . $cgi->param('ssl_last_name'); $buffer .= "\nTitle: " . $cgi->param('title'); $buffer .= "\nAddress1: " . $cgi->param('ssl_ship_to_address1'); $buffer .= "\nAddress2: " . $cgi->param('ssl_ship_to_address2'); $buffer .= "\nCity, State, Zip: " . $cgi->param('ssl_ship_to_city') . ", " . $cgi->param('ssl_ship_to_state') . " " . $cgi->param('ssl_ship_to_zip'); $buffer .= "\nCountry: " . $cgi->param('ssl_ship_to_country'); $buffer .= "\nOffice Phone: " . $cgi->param('ssl_phone'); $buffer .= "\nFax: " . $cgi->param('fax'); $buffer .= "\nE-mail: " . $cgi->param('email'); $buffer .= "\nABA Number: " . $cgi->param('AOANumber') if $cgi->param('AOANumber'); } else { $buffer .= "\nIf any of the information below is incorrect, please do one of the following to provide your updated information:\n"; # $buffer .= "\n - Update your profile: https://secure.societyhq.com/sabm/members/mbr_profile.iphtml" if $reg_fields[14]; $buffer .= "\n - Reply to this email with your updated information"; $buffer .= "\n - Call Cynthia Bolden, Administrator, at (804) 565-6398 with your updated information\n\n"; $buffer .= "$reg_fields[18]"; $buffer .= "\n" . $reg_fields[4] if $reg_fields[4]; $buffer .= "\n" . $reg_fields[3] if $reg_fields[3]; $buffer .= "\n" . $reg_fields[5] . ", " . $reg_fields[6] . " " . $reg_fields[7]; $buffer .= "\n" . $reg_fields[8] if $reg_fields[8]; $buffer .= "\n\nOffice Phone: " . $reg_fields[9]; $buffer .= "\nFax: " . $reg_fields[12]; $buffer .= "\nPrimary Email: " . $reg_fields[10]; $buffer .= "\nSecondary Email: " . $reg_fields[20] if $reg_fields[20]; # $buffer .= "\nABA Number: " . $reg_fields[11]; } $buffer .= "\nConfirmation Email: " . $cgi->param('ssl_email'); 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 .= "\n\nFirst Name/Nickname for Badge: " . $cgi->param('Nickname'); # $buffer .= "\n\nAre you staying at the convention hotel? " . $cgi->param('hotel'); # if ($cgi->param('hotel') eq "No") { # $buffer .= "\nReason for not staying at hotel: " . $cgi->param('nostay'); # } if ($cgi->param('ADA')) { $buffer .= "\n\nADA accommodation is needed: Yes"; $buffer .= "\nSpecification: " . $cgi->param('ADASpecification'); } else { # $buffer .= "\n\nADA accommodation is needed: No"; } if ($cgi->param('preference1')) { $buffer .= "\n\nPreference for Shoulder or Knee Lab: " . $cgi->param('preference1'); } if ($cgi->param('preference2')) { $buffer .= "\nPreference of Beach Chair or Lateral Decubitus: " . $cgi->param('preference2') . "\n"; } $buffer .="\n\nRegistered as:\n"; my $tier=1; SWITCH: { if ($cgi->param('country')) { $tier=$world_bank_country{$cgi->param('country')}; last SWITCH; } if ($cgi->param('ssl_ship_to_country')) { $tier=$world_bank_country{$cgi->param('ssl_ship_to_country')}; last SWITCH; } my $nothing = 0; } if (!$registered) { # print "

    TIER: $tier | Country: " . $cgi->param('country') . "

    "; for ($i=0; defined($reg_types[$i]); $i++) { my $regprice = $reg_types[$i][2][$reduced_rate]; my $member_tier_discount=0; if (($tier >= 3) && (($cgi->param('reg_type') eq "61") or ($cgi->param('reg_type') eq "52") or ($cgi->param('reg_type') eq "72") or ($cgi->param('reg_type') eq "47"))) { $regprice = $regprice / 2; $member_tier_discount=1; } if (($cgi->param('needCode') || $cgi->param('haveCode')) && ($tier <= 2)) { if ($cgi->param('needCode')) { $regprice = $regprice - ($regprice * .20); $discount_amt = ($reg_types[$i][2][$reduced_rate] * .20); } elsif ($cgi->param('haveCode')) { $cursor = $main::dbh->prepare(qq{ SELECT discountType,IF(discountType='Percent',discountAmt/100,discountAmt) FROM promo_code WHERE status=1 AND promoCode=? LIMIT 1 }) || $main::dbh->errstr; $cursor->execute($cgi->param('code')); my @code_info = $cursor->fetchrow(); if ($code_info[0] eq "Percent") { $regprice = $regprice - ($regprice * $code_info[1]); $discount_amt = ($reg_types[$i][2][$reduced_rate] * $code_info[1]); } else { $regprice = $regprice - $code_info[1]; $discount_amt = $code_info[1]; } } } 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 .= "\n"; $reginfo_buffer2 .= '\n"; $reginfo_buffer2 .= ''; $reginfo_buffer2 .= '\n"; } else { $buffer .=" \$"; $buffer .= sprintf "%.2f", $regprice; $reginfo_buffer2 .= ""; $reginfo_buffer2 .= '\n"; $reginfo_buffer2 .= ''; $reginfo_buffer2 .= '\n"; $cost = $cost + $regprice; $regcost=$regprice; } } } #end first if $complete } my $extra3_total = $extras3[$reduced_rate] * $cgi->param('extras3'); $cost = $cost + $extra3_total; my $extras3_total = $cgi->param('extras3'); if ($cgi->param('extras3')) { $buffer .= "\n\nI will attend the $extras3[3]"; $buffer .= "\t\t\t\t \$"; $buffer .= $extras3[$reduced_rate]; $reginfo_buffer2 .= "\n"; $reginfo_buffer2 .= '\n"; $reginfo_buffer2 .= '\n"; $reginfo_buffer2 .= "\n"; for (my $i=0; $i < $extras3_total; $i++) { my $sth = $main::dbh->prepare(qq{ INSERT INTO orderDetail (orderID,meetingID,workshopID,breakoutID,regtypeID,memberID,account,description,cost,checkNo) VALUES (?,?,?,?,?,?,?,?,?,?) }) || $main::dbh->errstr(); my $rv = $sth->execute($orderID,$meeting_number,$extras3[4],0,$cgi->param('reg_type'),$member_no,$extras3[2],$meetingshort.' - '.$extras3[3],$extras3[$reduced_rate],$checkNumber) || $main::dbh->errstr(); $error_msg .= "
    Failed to add $extras3[3] - mbr#: $member_no ".$rv if $rv < 1; $text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"$extras3[4]"; $text[2] .= "\",\"0\",\""; $text[2] .= $cgi->param('reg_type') . "\",\""; $text[2] .= $date . "\",\"" . $extras3[2] . "\",\""; $text[2] .= $extras3[$reduced_rate] . "\",\""; $text[2] .= $cgi->param('card_type'); $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 $extra_total = $extras[$reduced_rate] * $cgi->param('extras'); $cost = $cost + $extra_total; my $extras_total = $cgi->param('extras'); if ($cgi->param('extras')) { $buffer .= "\nWelcome Reception - Guest(s): " . $cgi->param('extras') . " \@ \$" . $extras[$reduced_rate] . "/person:\t\t\t\t \$" . $extra_total . "\n"; $reginfo_buffer2 .= "\n"; $reginfo_buffer2 .= '\n"; $reginfo_buffer2 .= ''; $reginfo_buffer2 .= '\n"; for (my $i=0; $i < $extras_total; $i++) { $text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"1"; $text[2] .= "\",\"0\",\""; my $sth = $main::dbh->prepare(qq{ INSERT INTO orderDetail (orderID,meetingID,workshopID,breakoutID,regtypeID,memberID,account,description,cost,checkNo) VALUES (?,?,?,?,?,?,?,?,?,?) }) || $main::dbh->errstr(); my $rv = $sth->execute($orderID,$meeting_number,$extras[4],0,$cgi->param('reg_type'),$member_no,$extras[2],$meetingshort.' - '.$extras[3],$extras[$reduced_rate],$checkNumber,) || $main::dbh->errstr(); $error_msg .= "
    Failed to add $extras[3] - mbr#: $member_no ".$rv if $rv < 1; $text[2] .= $cgi->param('reg_type') . "\",\""; $text[2] .= $date . "\",\"" . $extras[2] . "\",\""; $text[2] .= $extras[$reduced_rate] . "\",\""; $text[2] .= $cgi->param('card_type'); $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 $extra2_total = $extras2[$reduced_rate] * $cgi->param('extras2'); $cost = $cost + $extra2_total; my $extras2_total = $cgi->param('extras2'); if ($cgi->param('extras2')) { $buffer .= "\nGuest(s): " . $cgi->param('extras2') . " \@ \$" . $extras2[$reduced_rate] . "/person:\t\t\t\t \$" . $extra2_total . "\n"; $reginfo_buffer2 .= "\n"; $reginfo_buffer2 .= "\n"; $reginfo_buffer2 .= "\n"; for (my $i=0; $i < $extras2_total; $i++) { $text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"15"; $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 = 15 AND breakout_no = 0}); $main::dbh->do(qq{UNLOCK TABLES}); } $text[2] .= $cgi->param('reg_type') . "\",\""; $text[2] .= $date . "\",\"" . $extras2[2] . "\",\""; $text[2] .= $extras2[$reduced_rate] . "\",\""; $text[2] .= $cgi->param('card_type'); $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 $mondaynightreceptioncost_total = $mondaynightreception[$reduced_rate] * $cgi->param('mondaynightreception'); $cost = $cost + $mondaynightreceptioncost_total; if ($cgi->param('mondaynightreception')) { my $mondaynightreception_total = 1; $buffer .= "\n\nI DO NOT plan to attend the $society Banquet and would like to donate my ticket to a resident"; $buffer .= "\t\t\t \$"; $buffer .= $mondaynightreception[$reduced_rate]; $reginfo_buffer2 .= "\n"; $reginfo_buffer2 .= "\n"; $reginfo_buffer2 .= "\n"; for (my $i=0; $i < $mondaynightreception_total; $i++) { $text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"7"; $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'); $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 = 7 AND breakout_no = 0}); $main::dbh->do(qq{UNLOCK TABLES}); } } } my $kidsmondaynightreceptioncost_total = $kidsmondaynightreception[$reduced_rate] * $cgi->param('kidsmondaynightreception'); $cost = $cost + $kidsmondaynightreceptioncost_total; my $kidsmondaynightreception_total = $cgi->param('kidsmondaynightreception'); if ($cgi->param('kidsmondaynightreception')) { $buffer .= "\nClosing Ceremony and Reception: " . $cgi->param('kidsmondaynightreception') . " Guest(s) \@ \$" . $kidsmondaynightreception[$reduced_rate] . "/person:\t\t\t \$" . $kidsmondaynightreceptioncost_total . "\n"; $reginfo_buffer2 .= "\n"; $reginfo_buffer2 .= "\n"; $reginfo_buffer2 .= "\n"; for (my $i=0; $i < $kidsmondaynightreception_total; $i++) { $text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"19"; $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 = 19 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'); $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('specialneeds')) { $buffer .= "\nI have the following special needs:\n".$cgi->param('specialneeds')."\n"; $text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"2"; $text[2] .= "\",\"0\",\""; my $sth = $main::dbh->prepare(qq{ INSERT INTO orderDetail (orderID,meetingID,workshopID,breakoutID,regtypeID,memberID,description) VALUES (?,?,?,?,?,?,?) }) || $main::dbh->errstr(); my $rv = $sth->execute($orderID,$meeting_number,2,0,$cgi->param('reg_type'),$member_no,$meeting.' - Special Needs') || $main::dbh->errstr(); $error_msg .= "
    Failed to add Special Needs - mbr#: $member_no ".$rv if $rv < 1; $text[2] .= $cgi->param('reg_type') . "\",\""; $text[2] .= $date . "\",\"\",\""; $text[2] .= "0\",\""; $text[2] .= $cgi->param('card_type'); $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('dietary')) { $buffer .= "\nI have the following dietary restrictions:\n".$cgi->param('dietary')."\n"; $text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"1"; $text[2] .= "\",\"0\",\""; my $sth = $main::dbh->prepare(qq{ INSERT INTO orderDetail (orderID,meetingID,workshopID,breakoutID,regtypeID,memberID,description) VALUES (?,?,?,?,?,?,?) }) || $main::dbh->errstr(); my $rv = $sth->execute($orderID,$meeting_number,1,0,$cgi->param('reg_type'),$member_no,$meeting.' - Dietary Restrictions') || $main::dbh->errstr(); $error_msg .= "
    Failed to add Dietary Restrictions - mbr#: $member_no ".$rv if $rv < 1; $text[2] .= $cgi->param('reg_type') . "\",\""; $text[2] .= $date . "\",\"\",\""; $text[2] .= "0\",\""; $text[2] .= $cgi->param('card_type'); $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 request vegetatrian meals\n"; $text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"7"; $text[2] .= "\",\"0\",\""; my $sth = $main::dbh->prepare(qq{ INSERT INTO orderDetail (orderID,meetingID,workshopID,breakoutID,regtypeID,memberID,description) VALUES (?,?,?,?,?,?,?) }) || $main::dbh->errstr(); my $rv = $sth->execute($orderID,$meeting_number,7,0,$cgi->param('reg_type'),$member_no,$meeting.' - Vegetarian Meals') || $main::dbh->errstr(); $error_msg .= "
    Failed to add veg meal - mbr#: $member_no ".$rv if $rv < 1; $text[2] .= $cgi->param('reg_type') . "\",\""; $text[2] .= $date . "\",\"\",\""; $text[2] .= "0\",\""; $text[2] .= $cgi->param('card_type'); $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'); $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\nSessions:\n"; $buffer .="\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] . ":"; # my $subbuffer = $workshops[$j][1] . ":"; $buffer .= $subbuffer; $reginfo_buffer2 .= "\n"; $reginfo_buffer2 .= '\n"; $reginfo_buffer2 .= ''; # HARD CODING WORKSHOP NAME BELOW # $reginfo_buffer2 .= "\n"; # $reginfo_buffer2 .= "\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 .= " \$"; $buffer .= $workshops[$j][2][$reduced_rate]; # $buffer .= "\n My handicap: " . $cgi->param('handicap') . "\n"; # $buffer .= " Requested members of foursome:\n"; # $buffer .= " 1. " . $cgi->param('foursome1') . "\n"; # $buffer .= " 2. " . $cgi->param('foursome2') . "\n"; # $buffer .= " 3. " . $cgi->param('foursome3') . "\n"; $reginfo_buffer2 .= "\n"; my $sth = $main::dbh->prepare(qq{ INSERT INTO orderDetail (orderID,meetingID,workshopID,breakoutID,regtypeID,memberID,account,description,cost,checkNo) VALUES (?,?,?,?,?,?,?,?,?,?) }) || $main::dbh->errstr(); my $rv = $sth->execute($orderID,$meeting_number,$workshops[$j][0],0,$cgi->param('reg_type'),$member_no,$workshops[$j][4],$meetingshort.' - WKSHP: '.substr($workshops[$j][1],0,20),$workshops[$j][2][$reduced_rate],$checkNumber,) || $main::dbh->errstr(); $cost=$cost+$workshops[$j][2][$reduced_rate]; $ws_count++; # $text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\""; # $text[2] .=$workshops[$j][0] . "\",\"0\",\""; # HARD CODING WORKSHOP NUMBER BELOW $text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\"2"; $text[2] .= "\",\"0\",\""; $selected_wkshps .= $workshops[$j][0] . " "; $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'); $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 breakouts\n"; } } # end 2nd if complete if (defined($pbls[0])) { # generate PBLs for buffer and text files $buffer .= "\n\nFundamentals in PBM: \n"; my %u_dates; $u_dates{$_->[3]}++ for @pbls; my @pbldates=sort keys %u_dates; my $k=0; my $PBMdiscount = 0; # if ($cgi->param('PBL201609240700A') and $cgi->param('PBL201609250645A')) # { # $PBMdiscount = 12.5; # } 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 .= "\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] - $PBMdiscount; $reginfo_buffer2 .= "\n"; $reginfo_buffer2 .= "\n"; $reginfo_buffer2 .= "\n"; my $sth = $main::dbh->prepare(qq{ INSERT INTO orderDetail (orderID,meetingID,workshopID,breakoutID,regtypeID,memberID,account,description,cost,checkNo) VALUES (?,?,?,?,?,?,?,?,?,?) }) || $main::dbh->errstr(); my $rv = $sth->execute($orderID,$meeting_number,$pbls[$j][0],0,$cgi->param('reg_type'),$member_no,$pbls[$j][4],$meetingshort.' - PBLD: '.substr($pbls[$j][1],0,20),($pbls[$j][2][$reduced_rate]-$PBMdiscount),$checkNumber) || $main::dbh->errstr(); $cost=$cost+($pbls[$j][2][$reduced_rate]-$PBMdiscount); $selected_wkshps .= $pbls[$j][0] . " "; $text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\""; $text[2] .= $pbls[$j][0] . "\",\"0\",\""; $text[2] .= $cgi->param('reg_type') . "\",\""; $text[2] .= $date . "\",\"" . $pbls[$j][4] . "\",\""; $text[2] .= ($pbls[$j][2][$reduced_rate]-$PBMdiscount) . "\",\""; $text[2] .= $cgi->param('card_type'); $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: " . 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: " . substr($pbls[$j][1],0,25) ."...)"; } } } } else { $k++; } } if ($k==$i) { $buffer .= "\tNo selection\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'); $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'); # 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'); # 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'); # 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'); # 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 .="\nEducation/Research Fund Donation:\t\t\t\t\t \$" . $cgi->param('fund') . "\n"; $reginfo_buffer2 .= "\n"; $reginfo_buffer2 .= ''; $reginfo_buffer2 .= ''; $reginfo_buffer2 .= "\n"; my $sth = $main::dbh->prepare(qq{ INSERT INTO orderDetail (orderID,memberID,account,description,cost,checkNo) VALUES (?,?,?,?,?,?) }) || $main::dbh->errstr(); my $rv = $sth->execute($orderID,$member_no,$research[0],'Education/Research Fund Donation',$cgi->param('fund'),$checkNumber,) || $main::dbh->errstr(); $error_msg .= "
    Failed to add donation - mbr#: $member_no ".$rv if $rv < 1; $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'); # 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 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++) { if ($receptions[$j][2]{$cgi->param('reg_type')}[$reduced_rate]) { # skip section if cost is zero # $buffer .= "\n\nLab:"; # 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]; $reginfo_buffer2 .= "\n"; $reginfo_buffer2 .= '\n"; $reginfo_buffer2 .= ''; $reginfo_buffer2 .= '\n"; my $sth = $main::dbh->prepare(qq{ INSERT INTO orderDetail (orderID,meetingID,workshopID,breakoutID,regtypeID,memberID,account,description,cost,checkNo) VALUES (?,?,?,?,?,?,?,?,?,?) }) || $main::dbh->errstr(); my $rv = $sth->execute($orderID,$meeting_number,$receptions[$j][0],0,$cgi->param('reg_type'),$member_no,$receptions[$j][4],$meeting.' - '.substr($receptions[$j][1],0,20),$receptions[$j][2]{$cgi->param('reg_type')}[$reduced_rate],$checkNumber,) || $main::dbh->errstr(); $error_msg .= "
    Failed to add $receptions[$j][1] - mbr#: $member_no ".$rv if $rv < 1; $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'); # 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++; } } }# end 8th complete if (defined($receptions2[0])) { # 8th complete for dinners my %u_dates; $u_dates{$_->[3]}++ for @receptions2; 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($receptions2[$j]); $j++) { if ($receptions2[$j][2]{$cgi->param('reg_type')}[$reduced_rate]) { # skip section if cost is zero # $buffer .= "\n\nLab:"; # cycle through dinners if ($cgi->param("dinner$wsdates[$i]") eq $receptions2[$j][0]) { # Selected Dinner matches my $Wday=substr($receptions2[$j][3], 6, 2); my $Wmonth=substr($receptions2[$j][3],4,2); $Wmonth--; my $Wyear=substr($receptions2[$j][3],0,4)-1900; my $Whour=substr($receptions2[$j][3],8,2); my $Wmin=substr($receptions2[$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($receptions2[$j][1],0,50); if ($receptions2[$j][1] ne substr($receptions2[$j][1],0,50)) { $subbuffer .= "... :"; } else { $subbuffer .= ":"; } $buffer .= $subbuffer; # my $t_count=(floor((77 - length($receptions2[$j][0]) - length($receptions2[$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 .= $receptions2[$j][2]{$cgi->param('reg_type')}[$reduced_rate]; $cost=$cost+$receptions2[$j][2]{$cgi->param('reg_type')}[$reduced_rate]; $reginfo_buffer2 .= "\n"; $reginfo_buffer2 .= '\n"; $reginfo_buffer2 .= ''; $reginfo_buffer2 .= '\n"; my $sth = $main::dbh->prepare(qq{ INSERT INTO orderDetail (orderID,meetingID,workshopID,breakoutID,regtypeID,memberID,account,description,cost,checkNo) VALUES (?,?,?,?,?,?,?,?,?,?) }) || $main::dbh->errstr(); my $rv = $sth->execute($orderID,$meeting_number,$receptions2[$j][0],0,$cgi->param('reg_type'),$member_no,$receptions2[$j][4],$meeting.' - '.substr($receptions2[$j][1],0,20),$receptions2[$j][2]{$cgi->param('reg_type')}[$reduced_rate],$checkNumber,) || $main::dbh->errstr(); $error_msg .= "
    Failed to add $receptions2[$j][1] - mbr#: $member_no ".$rv if $rv < 1; $ws_count++; $text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\""; $text[2] .=$receptions2[$j][0] . "\",\"0\",\""; $text[2] .= $cgi->param('reg_type') . "\",\""; $text[2] .= $date . "\",\"" . $receptions2[$j][4] . "\",\""; $text[2] .= $receptions2[$j][2]{$cgi->param('reg_type')}[$reduced_rate] . "\",\""; $text[2] .= $cgi->param('card_type'); # 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++; } } }# 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 # ############################ my $membershiptype; if ($cgi->param('applyingfor')) { my $rv = ''; my $joinType = $cgi->param('applyingfor'); my %dues_acct = ("PCICS", "22000"); $tier=1; SWITCH: { if ($cgi->param('country')) { $tier=$world_bank_country{$cgi->param('country')}; last SWITCH; } if ($cgi->param('ssl_ship_to_country')) { $tier=$world_bank_country{$cgi->param('ssl_ship_to_country')}; last SWITCH; } my $nothing = 0; } $application = 1; SWITCH: { $joinType == 1 && do { @acct_nums = ($dues_acct{"PCICS"}); SWITCHTIER: { $tier eq "1" && do { @acct_amts = qw(150); $membershiptype = 1; last SWITCHTIER; }; $tier eq "2" && do { @acct_amts = qw(75); $membershiptype = 2; last SWITCHTIER; }; $tier eq "3" && do { @acct_amts = qw(30); $membershiptype = 3; last SWITCHTIER; }; $tier eq "4" && do { @acct_amts = qw(5); $membershiptype = 17; last SWITCHTIER; }; } @acct_description = ('2017 New PCICS Physician Membership'); last SWITCH; }; $joinType == 4 && do { @acct_nums = ($dues_acct{"PCICS"}); SWITCHTIER: { $tier eq "1" && do { @acct_amts = qw(100); $membershiptype = 4; last SWITCHTIER; }; $tier eq "2" && do { @acct_amts = qw(50); $membershiptype = 5; last SWITCHTIER; }; $tier eq "3" && do { @acct_amts = qw(20); $membershiptype = 6; last SWITCHTIER; }; $tier eq "4" && do { @acct_amts = qw(3); $membershiptype = 15; last SWITCHTIER; }; } @acct_description = ('2017 New PCICS Allied Health Membership'); last SWITCH; }; $joinType == 10 && do { @acct_nums = ($dues_acct{"PCICS"}); SWITCHTIER: { $tier eq "1" && do { @acct_amts = qw(100); $membershiptype = 10; last SWITCHTIER; }; $tier eq "2" && do { @acct_amts = qw(50); $membershiptype = 11; last SWITCHTIER; }; $tier eq "3" && do { @acct_amts = qw(20); $membershiptype = 12; last SWITCHTIER; }; $tier eq "4" && do { @acct_amts = qw(3); $membershiptype = 16; last SWITCHTIER; }; } @acct_description = ('2017 New PCICS Fellow/Resident/Trainee Membership'); last SWITCH; }; } my $sth = $main::dbh->prepare(qq{ INSERT INTO orderDetail (orderID,account,description,cost,checkNo) VALUES (?,?,?,?,?) }) || $main::dbh->errstr(); for (my $i = 0; $i < scalar @acct_nums; ++$i) { $cost += $acct_amts[$i]; $rv = $sth->execute($orderID,$acct_nums[$i],$acct_description[$i],$acct_amts[$i],$checkNumber,) || $main::dbh->errstr(); $error_msg .= "
    Failed to add new member payment $acct_description[$i] : $member_no ".$rv if $rv < 1; $text[2] .= "\"" . $orderID . "\",\"0\",\"" . "0" . "\",\"0\",\""; $text[2] .= $cgi->param('reg_type') . "\",\""; $text[2] .= $date . "\",\"" . $acct_nums[$i] . "\"," . $acct_amts[$i] . ",\""; $text[2] .= $cgi->param('card_type'); $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 .= ''; my $number = $membership_cost{$membershiptype}; $number =~ s/(\d)(?=(\d{3})+(\D|$))/$1\,/g; $reginfo_buffer2 .= '\n"; $reginfo_buffer2 .= ''; $reginfo_buffer2 .= '\n"; ########################## # Membership Information # ########################## $buffer .= "\n============================================================================="; $buffer .= "\nMEMBERSHIP INFORMATION\n"; $buffer .= "\nApplication for: " . $descriptions{$membershiptype}; $buffer .= "\n\nDate of Birth: " . $cgi->param('month') . "/" . $cgi->param('day') . "/" . $cgi->param('year'); $buffer .= "\nGender: " . $cgi->param('gender'); $buffer .= "\nPractice Type: " . $cgi->param('practicetype'); $buffer .="\nHospital Affiliation: " . $cgi->param('hospitalAffiliation') if $cgi->param('hospitalAffiliation') . "\n"; $buffer .="\nUniversity Affiliation: " . $cgi->param('universityAffiliation') if $cgi->param('universityAffiliation') . "\n\n"; $buffer .="\nAcademic Degrees and Other Professional Certification With Dates:\n" . $cgi->param('certifications') if $cgi->param('certifications') . "\n\n"; $buffer .="\nSpecify residencies and fellowships completed with year (or year of anticipated completion):\n" . $cgi->param('completedFellowship') if $cgi->param('completedFellowship') . "\n\n"; $buffer .="\nSpecialty: "; my @specialty = $cgi->param('specialty'); foreach (@specialty) { $buffer .= "\n".$_; } $buffer .= "\n"; $buffer .="\nWhere do you work? "; my @workCategory = $cgi->param('workCategory'); foreach (@workCategory) { $buffer .= "\n".$_; } $buffer .= "\n"; $buffer .="\nWhere are cardiac intensive care patients cared for in your hospital? "; my @cared_for = $cgi->param('cared_for'); foreach (@cared_for) { $buffer .= "\n".$_; } $buffer .= "\n"; $buffer .="\nIn your institution, how many beds are there in each unit?"; $buffer .="\nCICU: " . $cgi->param('bedsCICU'); $buffer .="\nCVICU: " . $cgi->param('bedsCVICU'); $buffer .="\nPICU: " . $cgi->param('bedsPICU'); $buffer .="\nNICU: " . $cgi->param('bedsNICU'); $buffer .="\n\nMy hospital is interested in having a link to its website on www.pcics.org." if ($cgi->param('websiteLink') eq "Yes"); $buffer .="\n\nI wish to unsubscribe to Industry Related Notifications" if ($cgi->param('industryNotice') eq "Yes"); $buffer .="\nSchool: " . $cgi->param('school') if $cgi->param('school'); $buffer .="\nProgram Director: " . $cgi->param('progdir') if $cgi->param('progdir'); $buffer .="\nGraduation/Residency Date: " . $cgi->param('gradmonth') . "/" . $cgi->param('gradyear') if $cgi->param('gradmonth'); } ############################ # Calculate Member Renewal # ############################ my $duestype; if ($cgi->param('member_option') && $cgi->param('member_option') ne "999") { my $rv = ''; my $renewalType = $cgi->param('member_option'); my %dues_acct = ("PCICS", "22000"); if ($cgi->param('country')) { $tier=$world_bank_country{$cgi->param('country')}; } else { $tier = 1; } $auto_renew = 1 if $main::cgi->param('auto_charge'); SWITCH: { $renewalType == 1 && do { @acct_nums = ($dues_acct{"PCICS"}); SWITCHTIER: { $tier eq "1" && do { @acct_amts = qw(150); $duestype = 1; last SWITCHTIER; }; $tier eq "2" && do { @acct_amts = qw(75); $duestype = 2; last SWITCHTIER; }; $tier eq "3" && do { @acct_amts = qw(30); $duestype = 3; last SWITCHTIER; }; $tier eq "4" && do { @acct_amts = qw(5); $duestype = 17; last SWITCHTIER; }; } @acct_description = ('2017 Renewal PCICS Physician Membership'); last SWITCH; }; $renewalType == 4 && do { @acct_nums = ($dues_acct{"PCICS"}); SWITCHTIER: { $tier eq "1" && do { @acct_amts = qw(100); $duestype = 4; last SWITCHTIER; }; $tier eq "2" && do { @acct_amts = qw(50); $duestype = 5; last SWITCHTIER; }; $tier eq "3" && do { @acct_amts = qw(20); $duestype = 6; last SWITCHTIER; }; $tier eq "4" && do { @acct_amts = qw(3); $duestype = 15; last SWITCHTIER; }; } @acct_description = ('2017 Renewal PCICS Allied Health Membership'); last SWITCH; }; $renewalType == 10 && do { @acct_nums = ($dues_acct{"PCICS"}); SWITCHTIER: { $tier eq "1" && do { @acct_amts = qw(100); $duestype = 10; last SWITCHTIER; }; $tier eq "2" && do { @acct_amts = qw(50); $duestype = 11; last SWITCHTIER; }; $tier eq "3" && do { @acct_amts = qw(20); $duestype = 12; last SWITCHTIER; }; $tier eq "4" && do { @acct_amts = qw(20); $duestype = 16; last SWITCHTIER; }; } @acct_description = ('2017 Renewal PCICS Fellow/Resident/Trainee Membership'); last SWITCH; }; } my $sth = $main::dbh->prepare(qq{ INSERT INTO orderDetail (orderID,incomeID,memberID,account,description,cost,checkNo,updateExp,reactivate,newItem,mbrRenewal,autoRenew) VALUES (?,?,?,?,?,?,?,?,?,?,?,?) }) || $main::dbh->errstr; for (my $i = 0; $i < scalar @acct_nums; ++$i) { $cost += $acct_amts[$i]; $rv = $sth->execute($orderID,$duestype,$member_no,$acct_nums[$i],$acct_description[$i],$acct_amts[$i],$checkNumber,1,1,0,1,$auto_renew) || $main::dbh->errstr(); $error_msg .= "
    Failed to add renewal info: $member_no $fields[1] ".$rv if $rv < 1; } $buffer .= "\n============================================================================="; $buffer .= "\nMEMBERSHIP RENEWAL INFORMATION\n"; $buffer .= "\nRenewal for: " . $descriptions{$duestype}; $reginfo_buffer2 .= ''; my $number = $membership_cost{$duestype}; $number =~ s/(\d)(?=(\d{3})+(\D|$))/$1\,/g; $reginfo_buffer2 .= '\n"; $reginfo_buffer2 .= ''; $reginfo_buffer2 .= '\n"; } # End Calculate Member Renwal # my $number = $cost; $number =~ s/(\d)(?=(\d{3})+(\D|$))/$1\,/g; $reginfo_buffer2 .= ''; $reginfo_buffer2 .= ''; $reginfo_buffer2 .= "
    DESCRIPTION UNIT PRICE QUANTITY TOTAL
    $reg_types[$i][1]"; if ($member_tier_discount) { $reginfo_buffer2 .= " (50% Tier ".$tier." discount)"; } if (($cgi->param('needCode') || $cgi->param('haveCode')) && ($tier <= 2)) { $reginfo_buffer2 .= " (20% Discount for Five Colleague Special \$" . $discount_amt . ")"; } 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$'. $reg_types[$i][2][$reduced_rate] . "'.$subtype_count.'$'. $regcost . "
    $'. sprintf "%.2f", $regprice . "1$'. sprintf "%.2f", $regprice . "
    I will attend the $extras3[3]$'. $extras3[$reduced_rate] . "' . $counter++ . "\$$extra3_total
    Welcome Reception - Guest(s)$'. $extras[$reduced_rate] . "'.$cgi->param('extras').'$'. $extra_total . "
    " . $counter++ . "Guest(s): " . $cgi->param('extras2') . " \@ \$" . $extras2[$reduced_rate] . "/person\$$extra2_total
    " . $counter++ . "I DO NOT plan to attend the $society Banquet and would like to donate my ticket to a resident\$$mondaynightreceptioncost_total
    " . $counter++ . "Closing Ceremony and Reception: " . $cgi->param('kidsmondaynightreception') . " Guest(s) \@ \$" . $kidsmondaynightreception[$reduced_rate] . "/person\$$kidsmondaynightreceptioncost_total
    " . $workshops[$j][1] . "$'. $workshops[$j][2][$reduced_rate] . "1$workshops[$j][1]\$$workshops[$j][2][$reduced_rate]
    $pbls[$j][1]\$".($pbls[$j][2][$reduced_rate]-$PBMdiscount)."1\$".($pbls[$j][2][$reduced_rate]-$PBMdiscount)."
    Education/Research Fund Donation$' . $cgi->param('fund') . '1\$" . $cgi->param('fund') . "
    ".substr($receptions[$j][1],0,60)."$'. $receptions[$j][2]{$cgi->param('reg_type')}[$reduced_rate] . "1$'. $receptions[$j][2]{$cgi->param('reg_type')}[$reduced_rate] . "
    ".substr($receptions2[$j][1],0,60)."$'. $receptions2[$j][2]{$cgi->param('reg_type')}[$reduced_rate] . "1$'. $receptions2[$j][2]{$cgi->param('reg_type')}[$reduced_rate] . "
    '.$descriptions{$membershiptype}.'$'. sprintf "%.2f", $number . "1$'. sprintf "%.2f", $number . "
    '.$descriptions{$duestype}.'$'. sprintf "%.2f", $number . "1$'. sprintf "%.2f", $number . "
    Total: $'.sprintf "%.2f", $number.'
    \n"; ############################################## # Totals, Cybercash, Write to file, etc # ############################################## my $sth = $main::dbh->prepare(qq{ UPDATE orderDetail set total = $cost WHERE total IS NULL AND orderID = ? }) || $main::dbh->errstr; my $rv = $sth->execute($orderID) || $main::dbh->errstr(); $error_msg .= "
    Failed to update totals: $member_no ".$rv if $rv < 1; my $exp_date = $main::cgi->param('exp_month') . $main::cgi->param('exp_year'); $buffer .= "\n============================================================================="; $buffer .= "\nTotal:\t\t\t\t\t\t\t\t\t \$" . sprintf "%.2f", $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); # my $new_card_no = $cgi->param('ssl_card_number'); $buffer .= "\n\nCard Type: " . $card_type . "\nCard Number: " . $new_card_no . "\nExpiration. Date: " . $exp_date . "\nName on Card: " . $cgi->param('customer_name'); ########## # Survey # ########## if ($cgi->param('special')) { my $survey_buffer .="\n\n" . $cgi->param('special') ."\n"; my $sth = $main::dbh->prepare(qq{ INSERT INTO orderDetail (orderID,meetingID,workshopID,breakoutID,regtypeID,memberID,description) VALUES (?,?,?,?,?,?,?) }) || $main::dbh->errstr(); my $rv = $sth->execute($orderID,$meeting_number,1,0,$cgi->param('reg_type'),$member_no,$meeting.' - Speial Accommodations') || $main::dbh->errstr(); $error_msg .= "
    Failed to add special accom - mbr#: $member_no ".$rv if $rv < 1; $text[2] .="\"" . $orderID . "\",\"" . $meeting_number . "\",\""; $text[2] .= "1" . "\",\"0\",\""; $text[2] .= $cgi->param('reg_type') . "\",\""; $text[2] .= $date . "\",\"" . $account . "\",\"" . "0" . "\",\""; $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"; $buffer .= $survey_buffer; } if ($cgi->param('primary_specialty')) { my $survey_buffer .="\n\n"; $survey_buffer .= "What is your primary medical specialty? \n"; my @specialtylist = $cgi->param('primary_specialty'); foreach (@specialtylist) { $survey_buffer .= "\t -- $_ \n"; } $buffer .= $survey_buffer; } if ($cgi->param('attended_before')) { my $survey2_buffer = "\n\nHave you attended a PCICS conference before?\n"; my @attended_before = $cgi->param('attended_before'); foreach (@attended_before) { $survey2_buffer .= "\t -- $_ \n"; } $buffer .= $survey2_buffer; } ## End Survey $buffer .= "\n\nRefund Policy: $refund_policy"; ################# # Write to File # ################# $text[1]="\"" . $orderID . "\",\"". $society . "\",\"" . $cgi->param('ssl_last_name') . "\",\""; $text[1] .= $cgi->param('title') . "\",\"" . $cgi->param('ssl_first_name') . "\",\""; $text[1] .= " \",\""; #Address3 field $text[1] .= $cgi->param('ssl_ship_to_address1') . "\",\"" . $cgi->param('ssl_ship_to_address2') . "\",\""; $text[1] .= $cgi->param('ssl_ship_to_city') . "\",\"" . $state . "\",\""; $text[1] .= $cgi->param('ssl_ship_to_zip') . "\",\"" . $cgi->param('ssl_ship_to_country') . "\",\""; $text[1] .= $cgi->param('ssl_phone') ."\",\"" . $cgi->param('fax') . "\",\""; $text[1] .= $cgi->param('email') . "\",\""; $text[1] .= $cgi->param('ssl_email') . "\",\""; $text[1] .= $cgi->param('AOANumber') . "\",\""; $text[1] .= $member_no . "\",\""; $text[1] .= $cgi->param('Nickname') . "\",\""; $text[1] .= $cgi->param('aap_number') . "\"\n"; my $res_end = ""; my $using_disc_code = 0; $using_disc_code = 1 if $cgi->param('haveCode'); $using_disc_code = 2 if $cgi->param('needCode'); $res_end = $cgi->param('gradyear').'-'.$cgi->param('gradmonth').'-01' if $cgi->param('gradyear') && $cgi->param('gradmonth'); if (!$registrant_in_db) { my $sth = $main::dbh->prepare(qq{ REPLACE INTO orderInfo (orderID,form,amount,memberID,cardType,lname,fname,degree,address1,address2,city,state,zip,country,phone,fax,email,receiptEmail,aba_id,nickName,preReg,memberApp,birthdate,gender,mbrType,inDatabase,hospital,practice_type,residencydate,havePromoCode,discountAmt,promoCode) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) }) || $main::dbh->errstr(); my $rv = $sth->execute($orderID,$form,$cost,$member_no,$card_type,$cgi->param('ssl_last_name'),$cgi->param('ssl_first_name'),$cgi->param('title'),$cgi->param('ssl_ship_to_address1'),$cgi->param('ssl_ship_to_address2'),$cgi->param('ssl_ship_to_city'),$state,$cgi->param('ssl_ship_to_zip'),$cgi->param('ssl_ship_to_country'),$cgi->param('ssl_phone'),$cgi->param('fax'),$cgi->param('email'),$cgi->param('ssl_email'),''.$cgi->param('AOANumber'),$cgi->param('Nickname'),$registered,$application,$cgi->param('year').'-'.$cgi->param('month').'-'.$cgi->param('day'),''.$cgi->param('gender'),''.$membershiptype,$registrant_in_db,''.$cgi->param('hospital'),''.$cgi->param('practice'),$res_end,$using_disc_code,$discount_amt,''.$cgi->param('code')) || $main::dbh->errstr(); $error_msg .= "
    Failed to add new registrant $meeting ".$rv if $rv < 1; } else { my $sth = $main::dbh->prepare(qq{ REPLACE INTO orderInfo (orderID,form,amount,memberID,cardType,lname,fname,receiptEmail,nickName,preReg,memberApp,birthdate,gender,mbrType,inDatabase,hospital,practice_type,residencydate,havePromoCode,discountAmt,promoCode) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) }) || $main::dbh->errstr(); my $rv = $sth->execute($orderID, $form, $cost, $member_no, $card_type, ''.$cgi->param('ssl_last_name'), ''.$cgi->param('ssl_first_name'), ''.$cgi->param('ssl_email'),$cgi->param('Nickname'),$registered,$application,$cgi->param('year').'-'.$cgi->param('month').'-'.$cgi->param('day'),''.$cgi->param('gender'),''.$membershiptype,$registrant_in_db,''.$cgi->param('hospital'),''.$cgi->param('practice'),$res_end,$using_disc_code,$discount_amt,''.$cgi->param('code')) || $main::dbh->errstr(); $error_msg .= "
    Failed to add registrant ($registered) to orderInfo table $meeting ".$rv if $rv < 1; } if (!$registered) { my $sth = $main::dbh->prepare(qq{ INSERT INTO orderDetail (orderID,meetingID,workshopID,breakoutID,regtypeID,memberID,account,description,cost,checkNo,total) VALUES (?,?,?,?,?,?,?,?,?,?,?) }) || $main::dbh->errstr(); my $rv = $sth->execute($orderID,$meeting_number,0,0,$cgi->param('reg_type'),$member_no,$account,$meetingshort.' - Registration Fees',$regcost,$checkNumber,$cost) || $main::dbh->errstr(); $error_msg .= "
    Failed to add main mtg - mbr#: $member_no $meeting ".$rv if $rv < 1; $text[2] .= "\"" . $orderID . "\",\"" . $meeting_number . "\",\"0\",\"0\",\""; } if (!$registered) { # if ($cgi->param('category')) { # $text[2] .= $cgi->param('category'). '/' . $cgi->param('reg_type'); # } else { $text[2] .= $cgi->param('reg_type'); # } } if (!$registered) { foreach (@reg_types_sub) { $text[2] .= "/" . $_ ; } } if (!$registered) { $text[2] .= "\",\""; $text[2] .= $date . "\",\"" . $account . "\"," . $regcost . ",\""; $text[2] .= $cgi->param('card_type'); $text[2] .= "\"," . "TOTALCOST" . ",\"" . $society; $text[2] .= "\","; $text[2] .= $cgi->param('ssl_last_name'); $text[2] .= "\",\""; $text[2] .= $cgi->param('ssl_first_name'); $text[2] .= "\"\n"; } my @writefiles; $writefiles[1] = $filename . $orderID . "_1.txt"; $writefiles[2] = $filename . $orderID . "_12.txt"; my $writefile; for ($i=1; defined($text[$i]); $i++) { $text[$i] =~ s/TOTALCOST/$cost/g; } for ($i=1; $i<=2; $i++) { $writefile=$writefiles[$i]; # my $texttofile='$text' . $i; if(open(FILE, ">>$writefile")) { flock(FILE, 2); seek(FILE, 0, 2); print FILE $text[$i]; close FILE; # $main::dbh->disconnect(); } else { die "Could NOT open file $i"; } } my $bufferfile = $filename . $orderID . "_buffer"; if(open(FILE, ">$bufferfile")) { flock(FILE, 2); seek(FILE, 0, 2); print FILE $buffer; close FILE; } else { die "Could NOT write buffer file $bufferfile"; } my $wkshp_selection = $filename . $orderID . "_workshops"; $selected_wkshps =~ s/ $//; if(open(FILE, ">$wkshp_selection")) { flock(FILE, 2); seek(FILE, 0, 2); print FILE $selected_wkshps; close FILE; } # end Write to File print '

    Step 3 of 3

    '; print p("Please verify the following registration and payment information before submitting your registration. Use the back button to make corrections."); print p(''); #print "

    $error_msg

    "; $reginfo_buffer = '

    '; $reginfo_buffer .= $cgi->param('ssl_first_name'); $reginfo_buffer .= " " . $cgi->param('ssl_last_name'); $reginfo_buffer .= " " . $cgi->param('title') . "\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('email'); # $reginfo_buffer .= "

    ABA Number: " . $cgi->param('aba_number') if $cgi->param('aba_number'); $reginfo_buffer .= "

    \n"; if ($cgi->param('ssl_email')) { $reginfo_buffer .= "

    Your confirmation letter will be emailed to this email address: ". $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"; } print "$reginfo_buffer"; print "$reginfo_buffer2"; if ($cost) { print h4('Payment Information:'); my $new_card_no2 = substr($cgi->param('ssl_card_number'), 0, 2) . "********" . substr($cgi->param('ssl_card_number'), -4); print "

    $card_type: " . $new_card_no2 . "
    \n"; print "Expiration Date: " . $exp_date . "

    \n"; print "
    \n"; } else { print "\n"; print ""; print ""; } if (!$registrant_in_db) { print hidden(-name=>'ssl_last_name'); print hidden(-name=>'ssl_first_name'); print hidden(-name=>'title'); } else { print hidden(-name=>'ssl_last_name', -default=>[$reg_fields[0]]); print hidden(-name=>'ssl_first_name', -default=>[$reg_fields[1]]); print hidden(-name=>'title', -default=>[$reg_fields[2]]); } print hidden(-name=>'ssl_ship_to_address1'); print hidden(-name=>'ssl_ship_to_address2'); print hidden(-name=>'ssl_ship_to_city'); print hidden(-name=>'ssl_ship_to_state'); print hidden(-name=>'ssl_ship_to_country'); print hidden(-name=>'ssl_ship_to_zip'); print hidden(-name=>'ssl_phone'); print hidden(-name=>'ssl_email'); print hidden(-name=>'card_type', -default=>$card_type); print hidden(-name=>'ssl_card_number'); print hidden(-name=>'ssl_exp_date', -default=>[$exp_date,$exp_date]); print hidden(-name=>'ssl_cvv2cvc2'); print hidden(-name=>'ssl_avs_address'); print hidden(-name=>'customer_name'); print hidden(-name=>'auto_charge'); my $avs_zip = substr($cgi->param('ssl_avs_zip'), 0, 9); print< EOF print p(strong('Refund Policy')); print p($refund_policy); print p({-style=>'color: #F00'},strong("By clicking submit, you authorize $society to charge your credit card. Please do NOT click submit more than once or you may be charged twice.")); print ' '; print ''; print "\n"; print "
    \n"; } } else { print '

    Step 2 of 3

    '; if ($registrant_in_db) { print '

    '.$reg_fields[18].'
    Click here if you are not '.$reg_fields[18].' or you want to register with a different email address.

    '; } print '
    '.$msg.'
    ' if $msg; print '

     

    '; my @countries = ( "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cabo Verde", "Cambodia", "Cameroon", "Canada", "Cayman Islands", "Central African Republic", "Chad", "Channel Islands", "Chile", "China", "Colombia", "Comoros", "Congo Dem Rep", "Congo Rep", "Costa Rica", "Cote d Ivoire", "Croatia", "Cuba", "Curacao", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Estonia", "Ethiopia", "Faeroe Islands", "Fiji", "Finland", "France", "French Polynesia", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Greece", "Greenland", "Grenada", "Guam", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Hong Kong SAR, China", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Isle of Man", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea Dem Rep", "Korea Rep", "Kosovo", "Kuwait", "Kyrgyz Republic", "Lao PDR", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macao SAR, China", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Montenegro", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nepal", "Netherlands", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Puerto Rico", "Qatar", "Romania", "Russian Federation", "Rwanda", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia", "Seychelles", "Sierra Leone", "Singapore", "Sint Maarten", "Slovak Republic", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Sudan", "Spain", "Sri Lanka", "St. Kitts and Nevis", "St. Lucia", "St. Martin", "St. Vincent and the Grenadines", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Tajikistan", "Tanzania", "Thailand", "Timor-Leste", "Togo", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Virgin Islands", "West Bank and Gaza", "Yemen", "Zambia", "Zimbabwe" ); ###Get Script Name-- $i=script_name(); my @action=split("/", $i); $i=@action; $i--; print<
    EOF if ($registrant_in_db) { print<
    $reg_fields[18]
     
    First Name/Nickname for Badge:*
    Country:*
    Meeting Confirmation Email:*

    All conference registration confirmations and important updates will be sent via email. Please make sure to set your email account to accept emails from societyhq.com and pcics.org.

    EOF if (!$member && !$balance) { &member_app(); } if (!$auto_renew && (($member && $balance) || (!$member && $balance))) { &dues_notice($member_no); } print<
    EOF } else { print< First Name*: Last Name*: Degree: First Name/Nickname for Badge:* Address 1*: Address 2: City*: State*: Postal Code*: Country:* Office Fax: Primary Email*: Meeting Confirmation Email*:

    All conference registration confirmations and important updates will be sent via email. Please make sure to set your email account to accept emails from societyhq.com and pcics.org.

    EOF if (%category) { print ' Category: Are you a: '; foreach (keys %category) { print ""; print ""; if ($_ eq "O") { print " "; } } print ''; } print ' '; if (!$member && !$balance) { &member_app(); } if (($member && $balance) || (!$member && $balance)) { &dues_notice($member_no); } print< EOF } print< Registration Fees EOF if ($registered) { print '

    You are already registered for this meeting; continue if you want to add additional activities

    '; print ''; } else { print<
    Only tiers 3 and 4 PCICS member registrations will receive a 50% reduction on the fees below. Click here to see the membership tiers listing.
    EOF my @code_info = (); $cursor = $main::dbh->prepare(qq{ SELECT institution, promoCode, CONCAT(maxUsage-COUNT(userID),' space(s) available'),IF(CURDATE() > expire,0,1),IF(COUNT(userID)< maxUsage,1,0) FROM promo_code t1 LEFT JOIN promo_code_users t2 ON t2.promoID=t1.promoID WHERE status=1 AND eventID=? GROUP BY promoCode ORDER BY institution }) || $main::dbh->errstr; $cursor->execute($meeting_number); print<
    Limited Time Promotion - Five Colleague Special

    Receive 20% off your registration fee. Five colleagues from one institution may register for this meeting and each person will receive a 20% discount on their registration fee. In order to receive this discount, each person who registers must be from the same institution and all five people must be registered before the deadline for everyone to receive the discount. Please note that this special offer is available in INCREMENTS of five registrants. The offer resets with the sixth registrant and so on. The 20% discount does not apply to registrants in tiers 3 and 4. This offer expires on November 30, 2017.

    There must be five from your institution registering to get 20% off and to count towards your five registrant minimum. If you fail to meet the five registrant minimum, the discount will be void and each person that used the institution code will be charged the 20% balance owed.

    EOF print<   EOF if (!$onsite) { print< Through
    EOF print strftime("%B %d, %Y", (localtime($cutoff_time))); !>
    After
           

    MEMBER FEES' if $reg_types[$i][0] == 1; print ' - You may select member fees if you completed the preceding membership application or renewal notice.' if($reg_types[$i][0] == 1 && (!$auto_renew && (!$member || $balance))); print '

    ' if $reg_types[$i][0] == 1; print '

    NON-MEMBER FEES

    ' if $reg_types[$i][0] == 5; print '

    ONE DAY ONLY FEES (MEMBER AND NON-MEMBER)

    ' if $reg_types[$i][0] == 29; print '

    FACULTY FEES

    ' if $reg_types[$i][0] == 9; print "\n"; print "\t\n"; print ""; print $reg_types[$i][1]; if (defined($reg_types[$i][4])) { for (my $ii=0; defined($reg_types[$i][4][$ii]); $ii++) { print "(" . $reg_types[$i][4][$ii] . ")"; } } if (defined($reg_types[$i][3])) { print "
    "; for (my $j=0; defined($reg_types[$i][3][$j]); $j++) { print "" . $reg_types[$i][3][$j][1] . " "; } print "
    "; } print "\n"; if ($reg_types[$i][2][1] > 0) { print "\$" . $reg_types[$i][2][1] if !$onsite; } else { print "see below" if !$onsite; } if ($reg_types[$i][0] eq "ONEDAY") { print "/day"; } print "\n" if !$onsite; if ($reg_types[$i][2][0] > 0) { print "\t\$" . $reg_types[$i][2][0]; } else { print "\tsee below"; } if ($reg_types[$i][0] eq "ONEDAY") { print "/day"; } print "\n"; print "\n"; } } print ""; for ($i=1; defined($footnotes[$i]); $i++) { print "
      ($i) " . $footnotes[$i]; } print '
    '; if (@extras3) { !> I will attend the
    Must be a SPA registrant to attend $'.$extras3[1].'' if !$onsite; !> $   I DO NOT plan to attend the AOAO Banquet and would like to donate my ticket to a resident $ $   Welcome Reception - Guest(s): $'.$extras[1].'/person' if !$onsite; !> $/person Guest Name(s):
    Additional Guest(s): \$".$extras2[1]."/person" if !$onsite; !> $/person Number of Guest:
    Closing Ceremony & Reception Guest Fee $/person $/person   Free Free $ $           $.00
    (numbers only)     prepare(qq{ SELECT 1 FROM registrants WHERE cancelled IS NULL AND workshop_no IN(3) AND meeting_no = ? AND member_id = ? LIMIT 1}) || $main::dbh->errstr; $sth->execute($meeting_number, $member_no) || $main::dbh->errstr; @fields = $sth->fetchrow; $sth->finish(); $lab_registered = 1 if $fields[0]; if ($lab_registered) { print ''; print ''; print ''; } else { !>
    Pre-Conference Session

    You are already registered for the Pre-Conference Session

    [3]}++ for @receptions; my @dinnerdates=sort keys %u_dates; my $day=0; my $month=0; my $year=0; my $hour=0; my $min=0; my $time=0; my $k=0; foreach (@dinnerdates) { # cycle through dates print "\n"; for ($i=0; defined($receptions[$i]); $i++) { # cycle through dinners if ($dinnerdates[$k]==$receptions[$i][3]) { # Date = Dinner print "\n"; print ""; for (my $j=0; defined($reg_types[$j]); $j++) { # cycle through reg types and print descriptions if ($j==0) { # print "" if !$onsite; } if ($receptions[$i][2]{$reg_types[$j][0]}[1] && $receptions[$i][2]{$reg_types[$j][0]}[0]) { print ""; # print "" if !$onsite; print ""; } } } } $k++; print ""; } } !>
    Pre-conference Session Registration
         
    "; $day=substr($dinnerdates[$k], 6, 2); $month=substr($dinnerdates[$k],4,2); $month--; $year=substr($dinnerdates[$k],0,4)-1900; $hour=substr($dinnerdates[$k],8,2); $min=substr($dinnerdates[$k],10,2); $time=timelocal(0,$min,$hour,$day,$month,$year); print strftime("%B %d %Y -- %I:%M %p", (localtime($time))); print "
    $receptions[$i][1]
        Through
    ".strftime("%B %d, %Y", (localtime($cutoff_time)))."
    After
    ".strftime("%B %d, %Y", (localtime($cutoff_time)))."
     
  • $reg_types[$j][1]
  • \$$receptions[$i][2]{$reg_types[$j][0]}[1]\$$receptions[$i][2]{$reg_types[$j][0]}[0]
     
      prepare(qq{ SELECT 1 FROM registrants WHERE cancelled IS NULL AND workshop_no IN(4) AND meeting_no = ? AND member_id = ? LIMIT 1}) || $main::dbh->errstr; $sth->execute($meeting_number, $member_no) || $main::dbh->errstr; @fields = $sth->fetchrow; $sth->finish(); $lab_registered = 1 if $fields[0]; if ($lab_registered) { print ''; print ''; print ''; } else { !>
    PCICS Advanced Practice Provider Curriculum Review Course

    You are already registered for the PCICS Advanced Practice Provider Curriculum Review Course

    [3]}++ for @receptions2; my @dinnerdates=sort keys %u_dates; my $day=0; my $month=0; my $year=0; my $hour=0; my $min=0; my $time=0; my $k=0; foreach (@dinnerdates) { # cycle through dates print "\n"; for ($i=0; defined($receptions2[$i]); $i++) { # cycle through dinners if ($dinnerdates[$k]==$receptions2[$i][3]) { # Date = Dinner print "\n"; print ""; for (my $j=0; defined($reg_types[$j]); $j++) { # cycle through reg types and print descriptions if ($j==0) { # print "" if !$onsite; } if ($receptions2[$i][2]{$reg_types[$j][0]}[1] && $receptions2[$i][2]{$reg_types[$j][0]}[0]) { print ""; # print "" if !$onsite; print ""; } } } } $k++; print ""; } } !>
    PCICS Advanced Practice Provider Curriculum Review Course Registration

    The PCICS Advanced Practice Provider Curriculum is a compilation of peer-reviewed, evidence-based education modules containing detailed information and recommended reading on topics necessary for managing CICU patients. Through this curriculum, PCICS aims to standardize and endorse an education curriculum for advanced practice providers working in pediatric cardiac intensive/acute care units.

    The review course will provide a comprehensive review of the PCICS APP curriculum content. Registration will include a copy of the curriculum.

    The objectives of the course include:

    • Understand the anatomy and physiology of congenital heart disease lesions, their corrective or palliative interventions, and medical management strategies.
    • Recognize postoperative complications, obtain appropriate diagnostic testing, and develop management plans.
    • Discuss medical therapy for pulmonary hypertension, recognize and develop a management plan for a pulmonary hypertensive crisis.
    • Understand the pediatric cardiomyopathies, and develop management plans for acute and chronic heart failure.
    • Describe indications and contraindications for initiation of mechanical circulatory support (MCS), differentiate different devices, and understand management strategies.
    • Recognize postoperative concerns following heart transplantation and develop appropriate management strategies.
    • Demonstrate a systematic approach to interpretation of EKGs, recognize arrhythmias, and discuss management strategies, including medications and pacemakers.
    • Describe various mechanical ventilation modes and plan ventilation strategies based on understanding of cardiopulmonary interactions and analysis of arterial blood gas results.
    • Using simulation, evaluate patients and implement appropriate management strategies.

    Contact hours will be awarded to nurse practitioners who attend the entire program and complete an evaluation tool. Cincinnati Children's Hospital Medical Center is an approved provider of continuing nursing education by the Ohio Nurses Association, an accredited approver by the American Nurses Credentialing Center's Commission on Accreditation. (OBN-001-91) (OH-046, 9/1/2018).

    Disclosure statement: The review course faculty have no disclosures.

         
    "; $day=substr($dinnerdates[$k], 6, 2); $month=substr($dinnerdates[$k],4,2); $month--; $year=substr($dinnerdates[$k],0,4)-1900; $hour=substr($dinnerdates[$k],8,2); $min=substr($dinnerdates[$k],10,2); $time=timelocal(0,$min,$hour,$day,$month,$year); # print strftime("%B %d %Y -- %I:%M %p", (localtime($time))); print "December 5, 2017 (7:30 AM - 5:30 PM) and December 6, 2017 (7:30 AM - 11:30 AM)"; print "
    SOLD OUT  $receptions2[$i][1]
        Through
    ".strftime("%B %d, %Y", (localtime($cutoff_time)))."
    After
    ".strftime("%B %d, %Y", (localtime($cutoff_time)))."
     
  • $reg_types[$j][1]
  • \$$receptions2[$i][2]{$reg_types[$j][0]}[1]\$$receptions2[$i][2]{$reg_types[$j][0]}[0]
     
              Special Interest Group — Pediatric Pain Medicine
    [3]}++ for @intensive_ws; my @iwsdates=sort keys %u_dates; my $day=0; my $month=0; my $year=0; my $hour=0; my $min=0; my $time=0; my $k=0; foreach (@iwsdates) { print "\n"; for ($i=0; defined($intensive_ws[$i]); $i++) { if ($iwsdates[$k]==$intensive_ws[$i][3]) { if ($sold_out{$intensive_ws[$i][0]} != "1") { print "\n"; print "\n"; } else { print "\n"; print "\n"; } } } $k++; } !>
        
    "; $day=substr($iwsdates[$k], 6, 2); $month=substr($iwsdates[$k],4,2); $month--; $year=substr($iwsdates[$k],0,4)-1900; $hour=substr($iwsdates[$k],8,2); $min=substr($iwsdates[$k],10,2); $time=timelocal(0,$min,$hour,$day,$month,$year); print strftime("%B %d %Y -- %I:%M %p", (localtime($time))); print "
    $intensive_ws[$i][1]\$$intensive_ws[$i][2][1]\$$intensive_ws[$i][2][0]
    Sold Out$intensive_ws[$i][1]Sold Out
     
                    Master Classes
    Please select your 1st choice for each session [3]}++ for @master_classes; my @wsdates=sort keys %u_dates; my $day=0; my $month=0; my $year=0; my $hour=0; my $min=0; my $time=0; my $k=0; foreach (@wsdates) { print ""; for ($i=0; defined($master_classes[$i]); $i++) { if ($wsdates[$k]==$master_classes[$i][3]) { if ($sold_out{$master_classes[$i][0]} != "1") { print ""; if ($master_classes[$i][2][$reduced_rate] > 0) { print ""; } else { print ""; } } else { print ""; print ""; } } } $k++; } !>
        
    Master Class -- "; $day=substr($wsdates[$k], 6, 2); $month=substr($wsdates[$k],4,2); $month--; $year=substr($wsdates[$k],0,4)-1900; $hour=substr($wsdates[$k],8,2); $min=substr($wsdates[$k],10,2); $time=timelocal(0,$min,$hour,$day,$month,$year); print strftime("%B %d %Y -- %I:%M %p", (localtime($time))); print "
    $master_classes[$i][1]\$$master_classes[$i][2][1]\$$master_classes[$i][2][0]
    $master_classes[$i][1]
    Sold Out$master_classes[$i][1]Sold Out
     
            \n"; } if (!$onsite) { print< \n"; } !> [3]}++ for @workshops; my @wsdates=sort keys %u_dates; my $day=0; my $month=0; my $year=0; my $hour=0; my $min=0; my $time=0; my $k=0; my $ii=0; foreach (@wsdates) { print "\n"; print ""; print ""; print "\n"; # print ''; my @wkshp_nums = ("1,2","12"); my $wkshp_registered = 0; $sth = $main::dbh->prepare(qq{ SELECT 1,name,CONCAT_WS(' - ',TIME_FORMAT(t2.start_time,'%l:%i'),TIME_FORMAT(t2.end_time,'%l:%i %p')) FROM registrants t1 LEFT JOIN meeting t2 ON t1.meeting_no=t2.meeting_no AND t1.workshop_no=t2.workshop_no WHERE cancelled IS NULL AND t1.workshop_no IN($wkshp_nums[$ii]) AND t1.meeting_no = ? AND t1.member_id = ? LIMIT 1}) || $main::dbh->errstr; $sth->execute($meeting_number, $member_no) || $main::dbh->errstr; @fields = $sth->fetchrow; $sth->finish(); $wkshp_registered = 1 if $fields[0]; $ii++; if ($wkshp_registered) { print '"; print ''; } else { for ($i=0; defined($workshops[$i]); $i++) { if ($wsdates[$k]==$workshops[$i][3]) { # wsdate matches workshop date if ($sold_out{$workshops[$i][0]} != "1") { print ""; # if ($u_dates{$wsdates[$k]} > 1) { # print "\n "; # } else { print "\n"; # } # if ($u_dates{$wsdates[$k]} > 2) { # print "\n"; # print "\n"; # } else { print "\n"; # } if ($workshops[$i][2][$reduced_rate] > 0) { print ""; print "" if !$onsite; # print ""; print ""; } else { print ""; } } else { print "\n"; print ""; } } # end wsdate matches workshop date } } $k++; } !>
    Sessions

    Earlybird Bonus: Sign up for a Workshop today and get the second workshop free"; print "
    Bonus good until " . strftime("%B %d, %Y", (localtime($early_bird_cutoff_time))) . ". Does not apply to Intensive Workshops, Master Classes or PBL Discussions
            Through
    EOF print strftime("%B %d, %Y", (localtime($cutoff_time))); !>
    After
     

    "; $day=substr($wsdates[$k], 6, 2); $month=substr($wsdates[$k],4,2); $month--; $year=substr($wsdates[$k],0,4)-1900; $hour=substr($wsdates[$k],8,2); $min=substr($wsdates[$k],10,2); $time=timelocal(0,$min,$hour,$day,$month,$year); # print strftime("%A -- %B %d %Y -- %I:%M %p", (localtime($time))); print uc(strftime("%A -- %B %d %Y", (localtime($time)))); print "  

    I am not attending at this Session timeslot

    You are already registered for session:

    '; print "
    • $fields[1]
      
    \ \;\ \;\ \;$workshops[$i][1]\$$workshops[$i][2][1]\$$workshops[$i][2][0]
    $workshops[$i][1]No Charge
    Sold Out$workshops[$i][1]Sold Out
     
     
           
    '; !> [3]}++ for @pbls; my @pbldates=sort keys %u_dates; my $day=0; my $month=0; my $year=0; my $hour=0; my $min=0; my $time=0; my $k=0; my $ii=0; foreach (@pbldates) { print "\n"; # print ""; print "\n"; my @pbld_nums = ("3,4,5","6,7,8","9,10,11"); my $pbld_registered = 0; $sth = $main::dbh->prepare(qq{ SELECT 1,name,CONCAT_WS(' - ',TIME_FORMAT(t2.start_time,'%l:%i'),TIME_FORMAT(t2.end_time,'%l:%i %p')) FROM registrants t1 LEFT JOIN meeting t2 ON t1.meeting_no=t2.meeting_no AND t1.workshop_no=t2.workshop_no WHERE cancelled IS NULL AND t1.workshop_no IN($pbld_nums[$ii]) AND t1.meeting_no = ? AND t1.member_id = ? LIMIT 1}) || $main::dbh->errstr; $sth->execute($meeting_number, $member_no) || $main::dbh->errstr; @fields = $sth->fetchrow; $sth->finish(); $pbld_registered = 1 if $fields[0]; $ii++; if ($pbld_registered) { print '"; print ''; } else { for ($i=0; defined($pbls[$i]); $i++) { if ($pbldates[$k]==$pbls[$i][3]) { if ($sold_out{$pbls[$i][0]} != "1") { print "\n"; # print ""; # print "\n"; # print "\n\n"; if ($pbls[$i][2][$reduced_rate] > 0) { print ""; } else { print ""; } } else { print "\n"; print ""; } } } } $k++; } !>
    Concurrent Breakout Sessions
    There is no additional charge for breakout sessions. Please indicate your preferences below for each time slot.
               

    1st2nd3rdPBLDs -- "; print "
    "; $day=substr($pbldates[$k], 6, 2); $month=substr($pbldates[$k],4,2); $month--; $year=substr($pbldates[$k],0,4)-1900; $hour=substr($pbldates[$k],8,2); $min=substr($pbldates[$k],10,2); $time=timelocal(0,$min,$hour,$day,$month,$year); print strftime("%B %d %Y -- %I:%M %p", (localtime($time))); print "

    You are already registered for a Concurrent Breakout Session:

    '; print "
    • $fields[1] ($fields[2])
      
     $pbls[$i][1]"; print "\$$pbls[$i][2][1]" if !$onsite; my $pbld_price = "\$".$pbls[$i][2][0]; # HARDCODED SECTION FOR SPECIFIC 2015 WORKSHOP NUMBER if ($pbls[$i][0] eq "11") { $pbld_price = "Add ".$pbld_price; } ###### print "$pbld_price
    $pbls[$i][1]
    Sold Out$pbls[$i][1]Sold Out

    Saturday BBQ [3]}++ for @bbq; my @bbqdates=sort keys %u_bbqdates; my $day=0; my $month=0; my $year=0; my $hour=0; my $min=0; my $time=0; my %u_bbqdays; $u_bbqdays{substr($_->[3],0, 8)}++ for @bbq; my @bbqdays=sort keys %u_bbqdays; foreach my $bbqday (@bbqdays) { $day=substr($bbqday, 6, 2); $month=substr($bbqday,4,2); $month--; $year=substr($bbqday,0,4)-1900; $hour=substr($bbqday,8,2); $min=substr($bbqday,10,2); $time=timelocal(0,$min,$hour,$day,$month,$year); # print strftime("%B %d %Y", (localtime($time))); foreach my $times (@bbqdates) { if ($bbqday eq substr($times, 0, 8)) { foreach (@bbq) { if ($_->[3] == $times) { $day=substr($times, 6, 2); $month=substr($times,4,2); $month--; $year=substr($times,0,4)-1900; $hour=substr($times,8,2); $min=substr($times,10,2); $time=timelocal(0,$min,$hour,$day,$month,$year); print ""; print ""; } } } } } !>
       
    [0] . "\">" . $_->[1] . "\$" . $_->[2][1] . "\$" . $_->[2][0] . "
     

    What is your primary medical specialty?
      Cardiology Critical Care Cardiac Surgery Anesthesia
      Neonatology Cardiac Nurse Cardiac Nurse Practitioner Other
     
    Have you attended a PCICS conference before?    
      Yes No  
     
    Do you have any dietary restrictions? If so, please describe below.
     
    Americans with Disabilities Act: The Pediatric Cardiac Intensive Care Society has fully complied with the legal requirements of the ADA and the rules and regulations thereof. If any participant in this educational activity is in need of special accomodations, please describe below.
     
    Payment Information
    Payment information is NOT required if you have already registered and are adding on sessions that have no cost. EOF }!>
    Card Number:
    Expiration Date: /
    Security Code:
    Card Billing Address:
    Card Billing Zip Code:
    Name on Card:
     

    Note: This is a secure transaction system. All of the information you provide is protected in transit and is processed securely. If entering your credit card information online makes you uncomfortable, you may pay by check. Checks should be made payable to $society and should be in US funds.

    If you do not receive a confirmation letter from the within 30 days of submitting your registration, please call the office to confirm that your registration material has been received.

    BACK TO FORM SELECTION PAGE'; } } } sub to_page { submit(-NAME => ".State", -VALUE => shift) } sub member_app { my (@fields) = (); my $cursor = $main::dbh->prepare(qq{ SELECT mail_country FROM member WHERE email= ? LIMIT 1 }); $cursor->execute($main::cgi->param('loginemail')); @fields = $cursor->fetchrow; $cursor->finish; print ""; print<

    Membership Application
    (complete only if joining $society)

    Membership Category Applying For:
    T1 \$150 / T2 \$75 / T3 \$30 / T4 \$5 T1 \$100 / T2 \$50 / T3 \$20 / T4 \$3 T1 \$100 / T2 \$50 / T3 \$20 / T4 \$3
    Rates for your membership category are automatically calculated based on the World Bank list of economies

    Tier 1 - Developed (High)
    Physicians \$150
    Nurses, Other Non-Physician Medical Personnel \$100

    Tier 2 - (Upper Middle)
    Physicians \$75
    Nurses, Other Non-Physician Medical Personnel \$50

    Tier 3 - (Lower Middle)
    Physicians \$30
    Nurses, Other Non-Physician Medical Personnel \$20

    Tier 4 - Least Developed (Low)
    Physicians \$5
    Nurses, Other Non-Physician Medical Personnel \$3
    Date of Birth (MM/DD/YYYY): Gender:  

    Type of practice:

    EOF my $cursor = $main::dbh->prepare(qq{ SELECT practice_id,practice_type FROM practice }); $cursor->execute(); while (my @category = $cursor->fetchrow_array()) { print < $category[1]
    EOF } $cursor->finish(); print < Hospital Affiliation: University Affiliation: Academic Degrees & Other Professional Certification With Dates: Specify residencies and fellowships completed with year (or year of anticipated completion): Specialty:

    EOF my $cursor = $main::dbh->prepare(qq{ SELECT specialty_id,specialty FROM specialty }); $cursor->execute(); while (my @category = $cursor->fetchrow_array()) { print < $category[1]
    EOF } $cursor->finish(); print < Where do you work?

    EOF my $cursor = $main::dbh->prepare(qq{ SELECT workID,workCategory FROM work_category }); $cursor->execute(); while (my @category = $cursor->fetchrow_array()) { print < $category[1]
    EOF } $cursor->finish(); print < Where are cardiac intensive care patients cared for in your hospital?

    EOF my $cursor = $main::dbh->prepare(qq{ SELECT workID,workCategory FROM work_category }); $cursor->execute(); while (my @category = $cursor->fetchrow_array()) { if (($category[1] =~ /ICU/) or ($category[1] eq "N/A")) { print < $category[1]
    EOF } } $cursor->finish(); print < In your institution, how many beds are there in each unit?
    CICU 
    CVICU 
    PICU 
    NICU 
    Would your hospital be interested in having a link to its website on www.pcics.org? Yes No
    Unsubscribe to Industry Related Notifications? Yes No
    EOF } sub dues_notice { my ($mbrID) = @_; my ($member_type) = ''; my (@fields) = (); my $cursor = $main::dbh->prepare(qq{ SELECT balance_due, member_type, mail_country,t1.membertype_id,member FROM member t1,member_type t2 WHERE t1.membertype_id=t2.membertype_id AND t1.member_id= ? LIMIT 1 }); $cursor->execute($mbrID); @fields = $cursor->fetchrow; $cursor->finish; $member_type = $fields[3]; my $member = $fields[4]; print ""; print<

    Membership Renewal Notice

    EOF if ($member) { print< EOF } print< T1 \$150 / T2 \$75 / T3 \$30 / T4 \$5 T1 \$100 / T2 \$50 / T3 \$20 / T4 \$3 T1 \$100 / T2 \$50 / T3 \$20 / T4 \$3
    Rates for your membership category are automatically calculated based on the World Bank list of economies

    Tier 1 - Developed (High)
    Physicians \$150
    Nurses, Other Non-Physician Medical Personnel \$100

    Tier 2 - (Upper Middle)
    Physicians \$75
    Nurses, Other Non-Physician Medical Personnel \$50

    Tier 3 - (Lower Middle)
    Physicians \$30
    Nurses, Other Non-Physician Medical Personnel \$20

    Tier 4 - Least Developed (Low)
    Physicians \$5
    Nurses, Other Non-Physician Medical Personnel \$3 EOF if ($member_type eq "9999") { } else { !>

    Auto Renew Membership

    Auto Renew

    If you select "Auto Renew", your membership will automatically renew for successive one year periods until cancellation. Upon renewal, you authorize to charge the then-current membership fee amount to the payment method provided by you, for as long as you choose to remain a member. You can cancel your membership at any time by contacting the Society. '; } !>