EOD; $states_l = array ( "AL" => "Alabama", "AK" => "Alaska", "AB" => "Alberta", "AR" => "Arizona", "AZ" => "Arkansas", "BC" => "British Columbia", "CA" => "California", "CO" => "Colorado", "CT" => "Connecticut", "DE" => "Delaware", "DC" => "Disctrict of Columbia", "FL" => "Florida", "GA" => "Georgia", "HI" => "Hawaii", "ID" => "Idaho", "IL" => "Illinois", "IN" => "Indiana", "IA" => "Iowa", "KS" => "Kansas", "KY" => "Kentucky", "LA" => "Lousiana", "ME" => "Maine", "MB" => "Manitoba", "MD" => "Maryland", "MA" => "Massachusetts", "MI" => "Michigan", "MN" => "Minnesota", "MS" => "Mississippi", "MO" => "Missouri", "MT" => "Montana", "NE" => "Nebraska", "NS" => "Nova Scotia", "NV" => "Nevada", "NB" => "New Brunswick", "NH" => "New Hampshire", "NJ" => "New Jersey", "NM" => "New Mexico", "NY" => "New York", "NL" => "Newfoundland and Labrador", "NC" => "North Carolina", "ND" => "North Dakota", "NT" => "Northwest Territories", "NU" => "Nunavut", "OH" => "Ohio", "OK" => "Oklahoma", "ON" => "Ontario", "OR" => "Oregon", "PA" => "Pennsylvania", "PE" => "Prince Edward Island", "QC" => "Quebec", "RI" => "Rhode Island", "SK" => "Saskatchewan", "SC" => "South Carolina", "SD" => "South Dakota", "TN" => "Tennessee", "TX" => "Texas", "UT" => "Utah", "VT" => "Vermont", "VA" => "Virgina", "WA" => "Washington", "WV" => "West Virginia", "WI" => "Wisconsin", "WY" => "Wyoming", "YT" => "Yukon"); //need to ensure at least one camp and deposit selected to proceed... if($_GET['regstep'] == '2') { if(is_array($event_array = $_POST['event_array'])) { //echo "
";
//print_r($event_array);
//echo "
"; $vars_to_pass=''; $num_events_enrolled=0; foreach($event_array as $key) { if(array_key_exists('event',$key)) { if(is_array($key)) { foreach($key as $key2 => $value) { // this is where we handle the event_id and amount if(is_array($value)) { // this is where the options are evaluated serialize them into a string for later $options_string = serialize($value); } else { if($key2 == 'event') { $signup_event = $value; } elseif($key2 == 'amount') { $signup_amount = $value; } } } } else { // nothing should happen here because the initial array contains no vars } if (!$signup_amount) { header("Location: https://www.deraneyhockeyschools.com/register.html?regstep=1&err_msg=2&nodep=$signup_event"); } $num_events_enrolled++; $vars_to_pass .= ''; $vars_to_pass .= ''; $signup_amount=0; //echo "html to pass is $vars_to_pass\n"; //echo "You've selected event $signup_event with a deposit of \$$signup_amount
\n"; if ($options_string) { $vars_to_pass .= ''; } } } // the following code used to handle whether a camp was selected // but had to be modified because of the addition of text fields // triggering a false selection of an event // } else { // header("Location: https://www.deraneyhockeyschools.com/register.html?regstep=1&err_msg=1"); } if (!$num_events_enrolled) { // handles if no event selected at all header("Location: https://www.deraneyhockeyschools.com/register.html?regstep=1&err_msg=1"); } } include_once('/usr/wwws/users/bderaney/bin/php/page_head.inc.php'); include_once('/usr/wwws/users/bderaney/bin/php/page_top.inc.php'); include_once('/usr/wwws/users/bderaney/bin/php/page_col1.inc.php'); /* Excluding include and displaying actual HTML include_once('/usr/wwws/users/bderaney/bin/php/page_col2.inc.php'); */ switch($_GET['regstep']) { case '1': $content = get_content('17'); break; case '2': $content = get_content('18'); break; case '3': $content = get_content('19'); break; case '4': $content = get_content('20'); break; case '': $content = get_content('21'); break; } ?>

Online Registration

You must select a Camp and select a deposit type to continue\n"; } elseif ($_GET['err_msg'] == 2) { echo "You selected a Camp but you need to indicate a deposit for each Camp selected\n"; } ?>

Choose Your Session

get_results("SELECT * FROM bderaney_dB.reg_events WHERE event_end > '$now'")) { //if($camps = $ezdb->get_results("SELECT * FROM bderaney_dB.reg_events")) { // $ezdb->debug(); // echo $now . '
'; echo ''; foreach($camps AS $camp) { echo ''; echo ''; } echo "
' . $camp->event_title . '
'; echo $camp->event_descr . '
"; } ?>

Player Registration Info

'; echo "$vars_to_pass\n"; } ?>
First name:
Last name:
Date of birth: (MM/DD/YYYY)
Address:
City:
State/Province:
Country:
Zip:
Telephone:
Email address:
Position:

Parent Registration Info

First name:
Last name:
Address:
City:
State/Province:
Zip:
Country:
Phone number:
Email address:
$value) { @$key = $ezdb->escape($value); } $profile_check = $ezdb->get_var("SELECT count(*) from bderaney_dB.profiles where billing_email='$billing_email'"); if (!$profile_check) { if($ezdb->query("INSERT INTO bderaney_dB.profiles (profile_id,login,password,password_hint,password_hint_answer,billing_title,billing_firstname,billing_lastname,billing_company,billing_phone,billing_fax,billing_address,billing_city,billing_state,billing_country,billing_zipcode,billing_email,shipping_title,shipping_firstname,shipping_lastname,shipping_company,shipping_phone,shipping_fax,shipping_address,shipping_city,shipping_state,shipping_country,shipping_zipcode,first_login,last_login,status) VALUES (NULL,'$login','$password','$password_hint','$password_hint_answer','$billing_title','".$ezdb->escape($billing_firstname)."','".$ezdb->escape($billing_lastname)."', '$billing_company','$billing_phone','$billing_fax','".$ezdb->escape($billing_address)."','$billing_city','$billing_state','$billing_country','$billing_zipcode','$billing_email','$shipping_title','$shipping_firstname','$shipping_lastname','$shipping_company','$shipping_phone','$shipping_fax','$shipping_address','$shipping_city','$shipping_state','$shipping_country','$shipping_zipcode','$first_login','$last_login','1')")) { // $ezdb->debug(); // echo ( "Reg/ Profile entered" ); } else { echo "error executing profile ez_sql statement"; } if($ezdb->query("INSERT INTO bderaney_dB.registration (registration_id,profile_id,firstname,lastname,address,city,state,country,zipcode,phone,email,birthday,gender,position,status) VALUES (NULL,LAST_INSERT_ID(),'".$ezdb->escape($firstname)."','".$ezdb->escape($lastname)."','".$ezdb->escape($address)."','$city','$state','$country','$zipcode','$phone','$email','$birthday','Female','$position','1')")) { // $ezdb->debug(); // echo ( "Reg/ Profile entered" ); $reg_id = $ezdb->get_var("SELECT max(registration_id) from bderaney_dB.registration"); $profile_id = $ezdb->get_var("SELECT profile_id from bderaney_dB.registration WHERE registration_id=$reg_id"); } else { echo "error executing reg ez_sql statement"; } } else { //there is an existing profile with this e-mail address so we'll skip past adding a new profile record for now.... $profile_id = $ezdb->get_var("SELECT profile_id from bderaney_dB.profiles where billing_email='$billing_email'"); if($ezdb->query("INSERT INTO bderaney_dB.registration (registration_id,profile_id,firstname,lastname,address,city,state,country,zipcode,phone,email,birthday,gender,position,status) VALUES (NULL,$profile_id,'".$ezdb->escape($firstname)."','".$ezdb->escape($lastname)."','".$ezdb->escape($address)."','$city','$state','$country','$zipcode','$phone','$email','$birthday','Female','$position','1')")) { // $ezdb->debug(); // echo ( "Reg/ Profile entered" ); $reg_id = $ezdb->get_var("SELECT max(registration_id) from bderaney_dB.registration"); } else { echo "error executing reg ez_sql (dup email address?) statement"; } } $amt_to_bill = 0.00; $es_id=''; for ($i=1;$i<=$num_camps_selected;$i++) { $id = "eventid".$i; $options = "eventoptions".$i; $amount = "eventamt".$i; $id_val = $$id; $id_options = $$options; $id_amt = $$amount; $amt_to_bill += $id_amt; $ezdb->query("INSERT INTO bderaney_dB.event_signup (event_signup_id,event_id,options,registration_id,date,status) VALUES (NULL,$id_val,'".$ezdb->escape($id_options)."',$reg_id,CURRENT_TIMESTAMP(),'1')"); $signup_id = $ezdb->get_var("SELECT max(event_signup_id) from bderaney_dB.event_signup where registration_id = $reg_id"); $es_id .= ''; $r_id .= ''; $prof_id .= ''; $es_amt .= ''; } $bill_amount = ''; $num_events = ''; $clean_player_name = $ezdb->escape($firstname)." ".$ezdb->escape($lastname); $pname = ''; ?>

Payment By Credit Card

First name:
Last name:
Address:
City:
State/Province:
Zip:
Country:
Phone number:
Email address:
Credit card number:
Month:
Year:
get_var("SELECT count(*) from bderaney_dB.event_payments where registration_id='$regid' and event_id='$id_val'"); if (!$reg_check) { if($ezdb->query("INSERT INTO bderaney_dB.event_payments (payment_id,registration_id,total,payment_date,status,details,event_id) VALUES (NULL,'$regid','$id_amt',CURRENT_TIMESTAMP(),'0','','$id_val')")) { $p_id = $ezdb->get_var("SELECT max(payment_id) from event_payments where registration_id = '$regid' and event_id = '$id_val'"); } else { //$ezdb->debug(); echo "something wrong w/ event payments ez_sql statement"; } } else { $p_id = $ezdb->get_var("SELECT max(payment_id) from event_payments where registration_id = '$regid' and event_id='$id_val'"); //no need to do anything else, we only got here because user chose to edit shipping details/cc numbers, etc... in step 3!! //otherwise we'd be duplicating event_payment records.... } $event_detail = $ezdb->get_results("SELECT a.event_title, a.event_descr, a.event_fee, b.options from bderaney_dB.reg_events as a, bderaney_dB.event_signup as b where a.event_id=b.event_id and b.event_signup_id=$id_val"); foreach ($event_detail as $event_info) { $event_cost = $event_info->event_fee; $disp_html .= "$event_info->event_title
$event_info->event_descr
"; $descript_html .= "$event_info->event_title".", "; if ($event_info->options) { $nice_options = unserialize($event_info->options); foreach($nice_options as $key) { $disp_html.= "$key
\n"; } } } if ($id_amt == $event_cost) { $disp_html .= "You have chosen to pay the \$$id_amt cost of the camp in full

\n"; } else { $disp_html .= "You have chosen to pay a deposit in the amount of \$$id_amt

\n"; } } ?>

Signups

\n"; ?>

Confirm Information

$value) { echo "escape($value)."\">\n"; } $masked_cc_num = str_pad(substr($ccnumber, -4), strlen($ccnumber), '*', STR_PAD_LEFT); //if($ezdb->query("UPDATE bderaney_dB.profiles set shipping_firstname='$firstname', shipping_lastname='$lastname', shipping_phone='$phone', // shipping_address='$address', shipping_city='$city', shipping_state='$state', shipping_country='$country', // shipping_zipcode='$zip' WHERE profile_id='$custid'")) { // $ezdb->debug(); //} else { // echo "something wrong w/ profile update ez_sql statement"; //} $descript_html .= " for player ".$_POST[player_name]; ?>
Charge amount:
First name:
Last name:
Address:
City:
State/Province:
Zip:
Country:
Phone number:
Email address:
Credit card number:
Expiration Month:
Expiration Year: