You did not provide a password."; if ($shopper_vpwd == "") $err_str .= "
  • You did not provide a confirmation password."; if ($shopper_pwd != $shopper_vpwd) $err_str .= "
  • Your password and password confirmation entries did not match."; if ($shopper_id == "") $err_str .= "
  • You did not provide an user name."; // check for duplicate user. $query_dup = "SELECT shopper_id FROM shopper WHERE shopper_id !='' and shopper_id='".$shopper_id."'"; $result_dup = dbQuery($query_dup); dbSqlError($result_dup); if ($row=dbResults($result_dup)) { $err_str .= "
  • This account already exsist. Please choose another user name."; } if ($shad_fname == "") $err_str .= "
  • You did not provide a first name."; if ($shad_lname == "") $err_str .= "
  • You did not provide a last name."; if (!$shad_company_type) $err_str .= "
  • You did not provide a company type."; if ($comp_name == "") $err_str .= "
  • You did not provide a billing company name."; if ($comp_title == "") $err_str .= "
  • You did not provide a billing title."; if ($comp_street1 == "") $err_str .= "
  • You did not provide a billing address."; if ($comp_city == "") $err_str .= "
  • You did not provide a billing city."; if ($comp_state == "") $err_str .= "
  • You did not provide a billing state."; if ($comp_zipc == "") $err_str .= "
  • You did not provide a billing zip code."; if ($comp_wphone == "") $err_str .= "
  • You did not provide a billing phone number."; if ($comp_wphone) { $comp_wphone = CheckPhone($comp_wphone); if (!$comp_wphone) { $err_str .= "
  • You did not provide a correct billing phone number."; } } if ($comp_wfax) { $comp_wfax = CheckPhone($comp_wfax); if (!$comp_wfax) { $err_str .= "
  • You did not provide a correct billing fax number."; } } if(!ereg("@", $shad_email)) $err_str .= "
  • You provided an incorrect email address."; if (!$err_str) { $shopper_id = addslashes(trim($shopper_id)); $shopper_pwd = addslashes(trim($shopper_pwd)); $shopper_pwd = ereg_replace("[[:space:].]", "", $shopper_pwd); $shopper_vpwd = addslashes(trim($shopper_vpwd)); $shopper_vpwd = ereg_replace("[[:space:].]", "", $shopper_vpwd); $comp_name = addslashes(trim($comp_name)); $shad_fname = addslashes(trim($shad_fname)); $shad_mname = addslashes(trim($shad_mname)); $shad_lname = addslashes(trim($shad_lname)); $comp_title = addslashes(trim($comp_title)); $comp_street1 = addslashes(trim($comp_street1)); $comp_street2 = addslashes(trim($comp_street2)); $comp_city = addslashes(trim($comp_city)); $comp_state = addslashes(trim($comp_state)); $comp_zipc = addslashes(trim($comp_zipc)); $comp_zipc = preg_replace("/\D/", "", $comp_zipc); $comp_wphone = addslashes(trim($comp_wphone)); $comp_wphone = preg_replace("/\D/", "", $comp_wphone); $comp_wfax = addslashes(trim($comp_wfax)); $comp_wfax = preg_replace("/\D/", "", $comp_wfax); $shad_street1 = addslashes(trim($shad_street1)); $shad_street2 = addslashes(trim($shad_street2)); $shad_city = addslashes(trim($shad_city)); $shad_state = addslashes(trim($shad_state)); $shad_zipc = addslashes(trim($shad_zipc)); $shad_zipc = preg_replace("/\D/", "", $shad_zipc); $shad_wphone = addslashes(trim($shad_wphone)); $shad_wphone = preg_replace("/\D/", "", $shad_wphone); $shad_email = addslashes(trim($shad_email)); $today = date("Y-m-d"); $query_str = "UPDATE shopper SET shopper_id='$shopper_id',shopper_pwd='$shopper_pwd', shopper_type='M', shopper_date='$today' WHERE shopper_ref='".SHOPPER_REF."'"; $result_id = dbQuery($query_str); dbSqlError($result_id); $shad_ip = (string)getenv("REMOTE_ADDR"); $shad_ref = KeyManager("shopperAddress"); $shad_ship = 0; // register billing address. $query_str = "INSERT INTO shopperAddress (shad_ref, shad_title, shad_fname, shad_mname, shad_lname, shad_street1, shad_street2, shad_city, shad_state, shad_zipc, shad_email, shad_wphone, shad_fax, shad_date, shad_ip, shad_shref, shad_company, shad_ship, shad_company_type) VALUES ('".$shad_ref."' ,'".$comp_title."' ,'".$shad_fname."', '".$shad_mname."', '".$shad_lname."', '".$comp_street1."', '".$comp_street2."' , '".$comp_city."', '".$comp_state."', '".$comp_zipc."', '".$shad_email."', '".$comp_wphone."', '".$comp_wfax."', '".$today."', '".$shad_ip."', '".SHOPPER_REF."', '".$comp_name."', '".$shad_ship."', '".$shad_company_type."')"; $result_id = dbQuery($query_str); dbSqlError($result_id); // register ship to address. if ($bill_ship) { $shad_company = $comp_name; $shad_street1 = $comp_street1; $shad_street2 = $comp_street2; $shad_city = $comp_city; $shad_state = $comp_state; $shad_zipc = $comp_zipc; } if (!$shad_street1) $shad_street1 = $comp_street1; if (!$shad_street2) $shad_street2 = $comp_street2; if (!$shad_city) $shad_city = $comp_city; if (!$shad_zipc) $shad_zipc = $comp_zipc; $shad_ref = KeyManager("shopperAddress"); $shad_ship = 1; $query_str = "INSERT INTO shopperAddress (shad_ref, shad_street1, shad_street2, shad_city, shad_state, shad_zipc, shad_shref, shad_ship) VALUES ('".$shad_ref."' , '".$shad_street1."', '".$shad_street2."' , '".$shad_city."', '".$shad_state."', '".$shad_zipc."', '".SHOPPER_REF."', '".$shad_ship."')"; $result_id = dbQuery($query_str); dbSqlError($result_id); $comp_brewer = addslashes(trim($comp_brewer)); $comp_volume = addslashes(trim($comp_volume)); $comp_bottle = addslashes(trim($comp_bottle)); $comp_labeltype = addslashes(trim($comp_labeltype)); $comp_grain = addslashes(trim($comp_grain)); $comp_hops = addslashes(trim($comp_hops)); $comp_chemicals = addslashes(trim($comp_chemicals)); $comp_labels = addslashes(trim($comp_labels)); $comp_crowns = addslashes(trim($comp_crowns)); $comp_cpg = addslashes(trim($comp_cpg)); $comp_sportswear = addslashes($comp_sportswear); $comp_other = addslashes(trim($comp_other)); $comp_brewpub = addslashes(trim($comp_brewpub)); $comp_update = addslashes(trim($comp_update)); //$comp_shref = SHOPPER_REF; $comp_ref = KeyManager("company"); $query_str = "insert into company (comp_ref, comp_brewer, comp_volume, comp_bottle, comp_labeltype, comp_grain, comp_hops, comp_chemicals, comp_labels, comp_crowns, comp_cpg, comp_sportswear, comp_other, comp_brewpub, comp_update, comp_shref) values ('$comp_ref', '$comp_brewer', '$comp_volume', '$comp_bottle', '$comp_labeltype', '$comp_grain', '$comp_hops', '$comp_chemicals', '$comp_labels', '$comp_crowns', '$comp_cpg', '$comp_sportswear', '$comp_other', '$comp_brewpub', '$comp_update', '".SHOPPER_REF."')"; $result_id = dbQuery($query_str); dbSqlError($result_id); header("Location: tutorial.php3"); } } //***************************** // CHECK TO SEE IF REGISTERED. //***************************** if ($reg) { $action = "change"; // get current info $query_str = "select * from company where comp_shref=".SHOPPER_REF; $result_id = dbQuery($query_str); dbSqlError($result_id); if ($row = dbResults($result_id)) { $comp_brewer = $row->comp_brewer; $comp_volume = $row->comp_volume; $comp_bottle = $row->comp_bottle; $comp_labeltype = $row->comp_labeltype; $comp_grain = $row->comp_grain; $comp_hops = $row->comp_hops; $comp_chemicals = $row->comp_chemicals; $comp_labels = $row->comp_labels; $comp_crowns = $row->comp_crowns; $comp_cpg = $row->comp_cpg; $comp_sportswear = $row->comp_sportswear; $comp_other = $row->comp_other; $comp_brewpub = $row->comp_brewpub; $comp_update = $row->comp_update; $comp_chemicals = $row->comp_chemicals; } // get billing information. $query_str = "select * from shopperAddress where shad_ship=0 and shad_shref=".SHOPPER_REF; $result_id = dbQuery($query_str); dbSqlError($result_id); if ($row = dbResults($result_id)) { $shad_fname = $row->shad_fname; $shad_mname = $row->shad_mname; $shad_lname = $row->shad_lname; $shad_email = $row->shad_email; $comp_name = $row->shad_company; $comp_title = $row->shad_title; $comp_street1 = $row->shad_street1; $comp_street2 = $row->shad_street2; $comp_city = $row->shad_city; $comp_state = $row->shad_state; $comp_zipc = $row->shad_zipc; $comp_wphone = $row->shad_wphone; $comp_wfax = $row->shad_fax; $comp_shad_ref = $row->shad_ref; $comp_wphone = CheckPhone($comp_wphone); $comp_wfax = CheckPhone($comp_wfax); } // get shipping address $query_str = "select * from shopperAddress where shad_ship=1 and shad_shref=".SHOPPER_REF; $result_id = dbQuery($query_str); dbSqlError($result_id); if ($row = dbResults($result_id)) { $shad_street1 = $row->shad_street1; $shad_street2 = $row->shad_street2; $shad_city = $row->shad_city; $shad_state = $row->shad_state; $shad_zipc = $row->shad_zipc; $shad_ref = $row->shad_ref; } $query_str = "select shopper_id, shopper_pwd from shopper where shopper_ref=".SHOPPER_REF." and not(shopper_type='T')"; $result_id = dbQuery($query_str); dbSqlError($result_id); if ($row = dbResults($result_id)) { $old_shopper_id = $shopper_id = $row->shopper_id; $shopper_pwd = $row->shopper_pwd; } } ?> Welcome to BevBuy.com
    Account Information
    "; print ""; print ""; ?>
    The following errors were found:
      "; print $err_str; print "

    "; } // ************************* ?>

    Account Information (Fill in the following billing and shipping fields below. * Required Field)
    * First Name
    Middle Name
    * Last Name
    * Company Name
    * Company type
    * Title
     
    * Address1
    Address2
    * City
    * State
    * Zip
    * Phone (Area code needed.)
    Fax
    * Email
    * Username
    * Password
    * Verify Password
     
    Shipping Information
    Shipping address is the same as billing address.
    Address1
    Address2
    City
    State
    Zip
    Company Information (Fill in the following company fields below.)
    Head Brewer
    Annual Volume in barrels
    Bottle Sizes
    type="radio" id="12" name="comp_bottle" value="12" > 12
    type="radio" id="22" name="comp_bottle" value="22" > 22
    type="radio" id="other" name="comp_bottle" value="other"> Other
    Label Types
    type="radio" id="front" name="comp_labeltype" value="front" > Front
    type="radio" id="back" name="comp_labeltype" value="back" > Back
    type="radio" id="neck" name="comp_labeltype" value="neck" > Neck
    type="radio" id="other" name="comp_labeltype" value="other" > Other
     
    Please list your primary vendors in the following categories.
    Grain
    Hops
    Chemicals
    Labels
    Crowns
    Coasters and Pint Glasses
    Sportswear
    Other
    Yes! I am a brewpub.
    Please email me about updates, industry news and vendor specials.