Facebook Twitter Instagram TikTok

Take-out Signup

query($q); $row = $r->fetch_array(); $_SESSION["intro"] = stripslashes(urldecode($row["content"])); $_SESSION["thanks"] = stripslashes(urldecode($row["zone"])); // get prix fixe box content & Verify blurb $bq = "select content,zone from cms_site_content where alias='takeout_verify_boxed'"; $br = $etomite_db->query($bq); $brow = $br->fetch_array(); $_SESSION["box_text"] = stripslashes(urldecode($brow["content"])); $_SESSION["verify_blurb"] = stripslashes(urldecode($brow["zone"])); $cuisineq = "select * from cuisines order by cuisine"; $cuisiner = $etomite_db->query($cuisineq); $n = $cuisiner->num_rows; for ($i=0; $i<$n; $i++) { $rw = $cuisiner->fetch_array(); $cuisines[] = $rw["cuisine"]; } $_SESSION["cuisines"] = $cuisines; } $amt = 495.00; if ($_POST["bundle_social"]=="Yes") $amt += 69.95; if ($_POST["bundle_lirn"]=="Yes") $amt += 149.95; if ($_POST["bundle_lirw"]=="Yes") $amt += 59.95; if ($_POST["bundle_all"]=="Yes") $amt += 549.95; if ($_POST["add_lirn_dir"]=="Yes") $amt += 29.95; if ($_POST["add_enhanced"]=="Yes") $amt += 34.95; if ($_POST["add_lirn_fb"]=="Yes") $amt += 29.95; if ($_POST["add_lirn_ig"]=="Yes") $amt += 14.95; if ($_POST["add_lirw_fb"]=="Yes") $amt += 29.95; if ($_POST["add_lirw_ig"]=="Yes") $amt += 14.95; if ($_POST["add_eblast_group"]=="Yes") $amt += 99; if ($_POST["add_eblast_solo"]=="Yes") $amt += 350; if ($_POST["add_lirn_article"]=="Yes") $amt += 295; if ($_POST["add_lirn_ad"]=="Yes") $amt += 125; if ($_POST["add_marketing"]=="Yes") $amt += 199; $_POST["tx_amt"] = $amt; $_SESSION["tx_amt"] = $amt; // fields in form/table $c = 0; $fields = array( $c++ => array("field_name" => "first_name", "field_label" => "First Name", "req" => true), $c++ => array("field_name" => "last_name", "field_label" => "Last Name", "req" => true), $c++ => array("field_name" => "title", "field_label" => "Title", "req" => false), $c++ => array("field_name" => "contact_person", "field_label" => "Contact person for LIRW (if different from name above)", "req" => false), $c++ => array("field_name" => "company", "field_label" => "Name of Long Island Restaurant", "req" => true), $c++ => array("field_name" => "address", "field_label" => "Restaurant Address", "req" => true), $c++ => array("field_name" => "city", "field_label" => "City", "req" => true), $c++ => array("field_name" => "county", "field_label" => "County", "req" => true), $c++ => array("field_name" => "state", "field_label" => "State", "req" => true), $c++ => array("field_name" => "zip", "field_label" => "Zip", "req" => true), $c++ => array("field_name" => "areacode", "field_label" => "Area Code", "req" => true), $c++ => array("field_name" => "phone_first3", "field_label" => "Phone (first half)", "req" => true), $c++ => array("field_name" => "phone_last4", "field_label" => "Phone (last half)", "req" => true), $c++ => array("field_name" => "fax", "field_label" => "Fax", "req" => false), $c++ => array("field_name" => "cell", "field_label" => "Cell Phone (if applicable)", "req" => false), $c++ => array("field_name" => "email", "field_label" => "Contact Email", "req" => true), $c++ => array("field_name" => "url", "field_label" => "Website Address (if applicable)", "req" => false), $c++ => array("field_name" => "facebook", "field_label" => "Facebook Address", "req" => false), $c++ => array("field_name" => "twitter", "field_label" => "Twitter Address", "req" => false), $c++ => array("field_name" => "cuisine_std", "field_label" => "Type of Cuisine", "req" => true), $c++ => array("field_name" => "userfile", "field_label" => "Uploaded menu file", "req" => false), $c++ => array("field_name" => "userfile_new", "field_label" => "Uploaded menu file (unique file name)", "req" => false), $c++ => array("field_name" => "lirw_alum", "field_label" => "Have you participated in LIRW before?", "req" => false), $c++ => array("field_name" => "opentable", "field_label" => "Uses OpenTable", "req" => false), $c++ => array("field_name" => "howheard_signups_open", "field_label" => "Where you heard it was time to sign up", "req" => true), $c++ => array("field_name" => "bundle_social", "field_label" => "Social Marketing Bundle", "req" => false), $c++ => array("field_name" => "bundle_lirn", "field_label" => "Long Island Restaurant News Marketing Bundle", "req" => false), $c++ => array("field_name" => "bundle_lirw", "field_label" => "Long Island Restaurant Week Marketing Bundle", "req" => false), $c++ => array("field_name" => "bundle_all", "field_label" => '"All in" Marketing Bundle', "req" => false), $c++ => array("field_name" => "add_lirn_dir", "field_label" => "Directory listing on Long Island Restaurant News website", "req" => false), $c++ => array("field_name" => "add_enhanced", "field_label" => "Enhanced listing on Long Island Restaurant Week website", "req" => false), $c++ => array("field_name" => "add_lirn_fb", "field_label" => "Long Island Restaurant News sponsored Facebook post", "req" => false), $c++ => array("field_name" => "add_lirn_ig", "field_label" => "Long Island Restaurant News sponsored Instagram post", "req" => false), $c++ => array("field_name" => "add_lirw_fb", "field_label" => "Long Island Restaurant Week sponsored Facebook post", "req" => false), $c++ => array("field_name" => "add_lirw_ig", "field_label" => "Long Island Restaurant Week sponsored Instagram post", "req" => false), $c++ => array("field_name" => "add_eblast_group", "field_label" => "Inclusion in group email blast", "req" => false), $c++ => array("field_name" => "add_eblast_solo", "field_label" => "Dedicated email blast", "req" => false), $c++ => array("field_name" => "add_lirn_article", "field_label" => "Article on Long Island Restaurant News website", "req" => false), $c++ => array("field_name" => "add_lirn_ad", "field_label" => "Ad on Long Island Restaurant News website", "req" => false), $c++ => array("field_name" => "add_marketing", "field_label" => "Marketing Consultation", "req" => false), $c++ => array("field_name" => "bill_first_name", "field_label" => "First Name on Credit Card", "req" => true), $c++ => array("field_name" => "bill_last_name", "field_label" => "Last Name on Credit Card", "req" => true), $c++ => array("field_name" => "bill_address", "field_label" => "Billing Address", "req" => true), $c++ => array("field_name" => "bill_city", "field_label" => "Billing City", "req" => true), $c++ => array("field_name" => "bill_state", "field_label" => "Billing State", "req" => true), $c++ => array("field_name" => "bill_zip", "field_label" => "Billing Zip", "req" => true), $c++ => array("field_name" => "bill_phone", "field_label" => "Billing Phone", "req" => true), $c++ => array("field_name" => "cc_type", "field_label" => "Credit Card Type", "req" => true), $c++ => array("field_name" => "cc_num", "field_label" => "Credit Card Number", "req" => true), $c++ => array("field_name" => "cc_code", "field_label" => "Credit Card Security Code", "req" => true), $c++ => array("field_name" => "cc_month", "field_label" => "Expiration Month", "req" => true), $c++ => array("field_name" => "cc_year", "field_label" => "Expiration Year", "req" => true), $c++ => array("field_name" => "agree_rules", "field_label" => "You must agree to the rules of participation", "req" => true), $c++ => array("field_name" => "authnet_result", "field_label" => "authnet_result", "req" => false), $c++ => array("field_name" => "authnet_message", "field_label" => "authnet_message", "req" => false), $c++ => array("field_name" => "authnet_response", "field_label" => "authnet_response", "req" => false), $c++ => array("field_name" => "tx_amt", "field_label" => "Transaction Amount", "req" => false) ); /* $c++ => array("field_name" => "captcha", "field_label" => "6-digit Validation Code", "req" => true) $c++ => array("field_name" => "ot_url", "field_label" => "OpenTable Account", "req" => false), */ // LOGIC: if ($_POST["submitted"]=="Continue") { $_SESSION["screen1"] = serialize($_POST); $uploaded_file = true; // fcn returns filename or FALSE, writes to file_error string $file_error = ""; $uploaded_file = manage_file(); $is_valid = validate_form($fields); //returns TRUE/FALSE and writes to error string if (!$is_valid) { echo $error; include "inc/form_signup_takeout.inc"; } else { echo $_SESSION["verify_blurb"] .'
'; for ($i=0; $i
'.$fields[$i]["field_label"] . "
\n"; if (is_array(${$fields[$i]["field_name"]})) { echo '
'.implode(", ",${$fields[$i]["field_name"]}) . "
\n"; } else { echo '
'.$_POST[$fields[$i]["field_name"]] . "
\n"; } echo "
\n"; } } echo '
Transaction Amount
$'.$_POST["tx_amt"]."
"; echo '

Please click the button only ONE time when registering.
More than once may result in more than one registration/payment!

'; } } else if ($_POST["submitted"]=="Edit") { echo $_SESSION["intro"]; $_POST = unserialize($_SESSION["screen1"]); include "inc/form_signup_takeout.inc"; } else if ($_POST["submitted"]=="Submit") { $_POST = unserialize($_SESSION["screen1"]); // post form to authorize.net if ($_POST["cc_num"]=="LIRN") { $_POST["cc_num"]='4111111111111111'; $_POST["test"]=1; } include "inc/authorize_net.inc"; // incorporates authorization result into _POST /* if ($results[0]=="2" || $results[0]=="3") { */ if ($results[0] != "1") { // the auth.net result array from include file echo "

Transaction ".$_POST["authnet_result"].": "; echo $_POST["authnet_message"]."
"; echo "Please review the payment fields and resubmit the form.

If you continue to have problems, please email this information to info@longislandrestaurantweek.com:

".$_POST["authnet_message"]."


"; include "inc/form_signup_takeout.inc"; } else { // transaction went through -- // clear CC num and v-code out of global array before inserting/emailing $_POST["cc_num"] = "last four: ".substr($_POST["cc_num"],-4); $_POST["cc_code"] = "xxx"; $mailmsg = generate_msg($fields); $query_arrays = generate_arrays_object($fields); $all_fields = $query_arrays->all_fields; $all_values = $query_arrays->all_values; if ($_SESSION["bundle_lirw"]=="Yes" || $_SESSION["bundle_all"]=="Yes" || $_SESSION["add_enhanced"]=="Yes") { $all_fields[] = "enhance"; $all_values[] = "Yes"; } $mailintro = "Spring Participation Form Submitted from LIRW Site\n\n"; $subject = "LIRW Spring 2020 Participation Form Submission"; $from = "From: LIRW Participation Form \r\n"; $mailintro_client = "This is your receipt for Long Island Restaurant Week sign-up\n\n"; $subject_client = "LIRW Participation Receipt"; $from_client = "From: Long Island Restaurant Week \r\n"; mail("jwfuchs@gmail.com", $subject, $mailintro.$mailmsg, $from); mail("marketing@longislandrestaurantweek.com", $subject, $mailintro.$mailmsg, $from); mail("press@longislandrestaurantweek.com", $subject, $mailintro.$mailmsg, $from); mail("lirestaurantweek@gmail.com", $subject, $mailintro.$mailmsg, $from); mail("jenn@wordhampton.com", $subject, $mailintro.$mailmsg, $from); $insert_fields = implode(",",$all_fields); $insert_values = implode(",",$all_values); $stamp = date("Y-m-d H:i:s"); $query="insert into participation_form (".$insert_fields.", stamp, season) values (".$insert_values.", '".$stamp."', 'spring2020')"; $etomite_db->query($query); if ($_POST["bundle_lirn"]=="Yes" || $_POST["add_lirn_dir"]=="Yes" || $_POST["bundle_all"]=="Yes") { include "inc/import_to_LIRN_directory.inc"; $dir_info = " \n\n List on LIRN/all in bundle? ".$_POST["bundle_all"]." \n\nList on LIRN/LIRN bundle? ".$_POST["bundle_lirn"]." \n\nList on LIRN/a la carte? ".$_POST["add_lirn_dir"]." \n\n".$cuisine_id_query."\n\n" .$directory_insert. " \n\n LIRN insert result: ".$insert_res; } else { $dir_info = ""; } mail("popcorn@gmail.com", $subject, $query."\n\n".$mailintro.$mailmsg.$dir_info, $from); $thanks_txt = strip_tags($_SESSION["thanks"]); $thanks_html = $_SESSION["thanks"]; echo $_SESSION["thanks"]; # SEND AS HTML TO CLIENT send_html_conf($_POST["email"], $thanks_html, $thanks_txt); unset($_POST); unset($_SESSION); $_SESSION = array(); session_unset(); session_destroy(); session_write_close(); } } else { echo $_SESSION["intro"]; include "inc/form_signup_takeout.inc"; } $etomite_db->close(); ?>

Questions about participating? Contact us:


Phone:
(631) 329-2111

Email:
marketing@longislandrestaurantweek.com