% Response.CacheControl = "no-cache" Response.AddHeader "Pragma", "no-cache" Response.Expires = -1 Response.Buffer = True 'On Error Resume Next dim blnErr, strSQL, rs dim address, designation, company_name, company_phone, company_address, remarks, other_4_14, other_7 menu = "INQUIRE" strConn= gf_Connection() if Request.ServerVariables ("REQUEST_METHOD") = "POST" and trim(request.Form("hidSubmit")) = "1" then dim v_strFrom, v_strTo, v_strCc, v_strCc2, v_strSubject, v_strBody, v_other dim v_strFromN, v_strToN, v_strSubjectN, v_strBodyN dim project if trim(Request.Form("other_4_1")) <> "" then v_other = v_other & trim(Request.Form("other_4_1")) & vbCrLf if trim(Request.Form("other_4_2")) <> "" then v_other = v_other & trim(Request.Form("other_4_2")) & vbCrLf if trim(Request.Form("other_4_3")) <> "" then v_other = v_other & trim(Request.Form("other_4_3")) & vbCrLf if trim(Request.Form("other_4_4")) <> "" then v_other = v_other & trim(Request.Form("other_4_4")) & vbCrLf if trim(Request.Form("other_4_5")) <> "" then v_other = v_other & trim(Request.Form("other_4_5")) & vbCrLf if trim(Request.Form("other_4_6")) <> "" then v_other = v_other & trim(Request.Form("other_4_6")) & vbCrLf if trim(Request.Form("other_4_7")) <> "" then v_other = v_other & trim(Request.Form("other_4_7")) & vbCrLf if trim(Request.Form("other_4_8")) <> "" then v_other = v_other & trim(Request.Form("other_4_8")) & vbCrLf if trim(Request.Form("other_4_9")) <> "" then v_other = v_other & trim(Request.Form("other_4_9")) & vbCrLf if trim(Request.Form("other_4_10")) <> "" then v_other = v_other & trim(Request.Form("other_4_10")) & vbCrLf if trim(Request.Form("other_4_11")) <> "" then v_other = v_other & trim(Request.Form("other_4_11")) & vbCrLf if trim(Request.Form("other_4_12")) <> "" then v_other = v_other & trim(Request.Form("other_4_12")) & vbCrLf if trim(Request.Form("other_4_13")) <> "" then v_other = v_other & trim(Request.Form("other_4_13")) & vbCrLf if trim(Request.Form("other_4_14")) <> "" then v_other = v_other & trim(Request.Form("other_4_14")) & vbCrLf project = request.form("project") v_strFrom = "popmailer@crownasia.com.ph" 'trim(Request.Form("email")) if request.form("project") = "No Specific" then if request.form("txtinquiries") Mod 2 = 0 then 'even number v_strTo = "inquiries@crownasia.com.ph" else 'odd number v_strTo = "inquiries@crownasia.com.ph" end if cnn.execute"UPDATE tblInquiryCounter SET inquiries = '" & request.form("txtinquiries") + 1 & "' WHERE id = '1' " elseif request.form("project") = "Presidio at Brittany Bay" or request.form("project") = "Presidio New Manila" or request.form("project") = "Crown Sky Arts" then if request.form("txtpolar") Mod 2 = 0 then 'even number v_strTo = "presidio@crownasia.com.ph" else 'odd number v_strTo = "inquiries@crownasia.com.ph" end if cnn.execute"UPDATE tblInquiryCounter SET polar = '" & request.form("txtpolar") + 1 & "' WHERE id = '1' " 'send to polar 'v_strTo = "presidio@crownasia.com.ph" 'v_strTo = "renz_sabinorio@cmphomes.com" elseif request.form("project") = "Cottonwoods" or request.form("project") = "Maia Alta" or request.form("project") = "Mia Vita" or request.form("project") = "Mille Luce" or request.form("project") = "Woodberry" then if request.form("txtinorth") Mod 2 = 0 then 'even number v_strTo = "inorth@crownasia.com.ph" else 'odd number v_strTo = "inquiries@crownasia.com.ph" end if cnn.execute"UPDATE tblInquiryCounter SET polar = '" & request.form("txtinorth") + 1 & "' WHERE id = '1' " 'send to north 'v_strTo = "inorth@crownasia.com.ph" 'v_strTo = "renz_sabinorio@cmphomes.com" elseif request.form("project") = "Amalfi" or request.form("project") = "Amici" or request.form("project") = "Beacon Place" or request.form("project") = "Centerville" or request.form("project") = "Citta Italia" or request.form("project") = "Fortezza" then if request.form("txtisouth") Mod 2 = 0 then 'even number v_strTo = "crowncares@crownasia.com.ph" 'isouth@crownasia.com.ph else 'odd number v_strTo = "inquiries@crownasia.com.ph" end if cnn.execute"UPDATE tblInquiryCounter SET polar = '" & request.form("txtisouth") + 1 & "' WHERE id = '1' " 'send to south 'v_strTo = "isouth@crownasia.com.ph" elseif project = "La Brea" or request.form("project") = "Ponticelli" or request.form("project") = "Residenza" or request.form("project") = "Valenza" or request.form("project") = "Vivace" then if request.form("txtisouth") Mod 2 = 0 then 'even number v_strTo = "crowncares@crownasia.com.ph" 'isouth@crownasia.com.ph else 'odd number v_strTo = "inquiries@crownasia.com.ph" end if cnn.execute"UPDATE tblInquiryCounter SET polar = '" & request.form("txtisouth") + 1 & "' WHERE id = '1' " 'send to south 'v_strTo = "isouth@crownasia.com.ph" 'v_strTo = "renz_sabinorio@cmphomes.com" end if v_strSubject = "Crown Asia Inquiry" v_strBody = "Personal Information" & vbCrLf & _ "Property Selected: " & trim(Request.Form("project")) & vbCrLf & _ "----------------------------------------------------" & vbCrLf & vbCrLf & _ "Personal Information" & vbCrLf & _ "----------------------------------------------------" & vbCrLf & _ "First Name: " & trim(Request.Form("fname")) & vbCrLf & _ "Last Name: " & trim(Request.Form("lname")) & vbCrLf & _ "Maiden Name: " & trim(Request.Form("mname")) & vbCrLf & _ "Birthdate: " & trim(Request.Form("birthmonth")) & " " & trim(Request.Form("birthday")) & ", " & trim(Request.Form("birthyear")) & vbCrLf & _ "Address: " & trim(Request.Form("address")) & vbCrLf & _ "Telephone: " & trim(Request.Form("phone")) & vbCrLf & _ "Mobile: " & trim(Request.Form("mobile")) & vbCrLf & _ "Gender: " & trim(Request.Form("gender")) & vbCrLf & _ "Email: " & trim(Request.Form("email")) & vbCrLf & _ "Civil Status: " & trim(Request.Form("civilstatus")) & vbCrLf & _ "----------------------------------------------------" & vbCrLf & vbCrLf & _ "About your Company" & vbCrLf & _ "----------------------------------------------------" & vbCrLf & _ "Type of Employment: " & trim(Request.Form("employment")) & vbCrLf & _ "Occupation/Position: " & trim(Request.Form("designation")) & vbCrLf & _ "Industry: " & trim(Request.Form("industry")) & vbCrLf & _ "Company Name: " & trim(Request.Form("company_name")) & vbCrLf & _ "Company Address: " & trim(Request.Form("company_address")) & vbCrLf & _ "Company Phone No.: " & trim(Request.Form("company_phone")) & vbCrLf & _ "Remarks: " & trim(Request.Form("remarks")) & vbCrLf & _ "----------------------------------------------------" & vbCrLf & vbCrLf & _ "Other Information" & vbCrLf & _ "----------------------------------------------------" & vbCrLf & _ "1. Do you plan to buy a residential property? " & trim(Request.Form("other_1")) & vbCrLf & _ "2. If yes, what type of property? " & trim(Request.Form("other_2")) & vbCrLf & _ "3. If yes, when do you plan to buy a house? " & trim(Request.Form("other_3")) & vbCrLf & _ "4. If yes, where is your preferred location? " & trim(v_other) & vbCrLf & _ "5. How much is your budget? " & trim(Request.Form("other_5")) & vbCrLf & _ "6. Do you know anyone who is willing to buy a house? " & trim(Request.Form("other_6")) & vbCrLf & _ "7. If yes, what location? " & trim(Request.Form("other_7")) & vbCrLf & _ "----------------------------------------------------" & vbCrLf & vbCrLf & _ "Referrals" & vbCrLf & _ "----------------------------------------------------" & vbCrLf & _ "1. " & trim(Request.Form("ref_name_1")) & " - " & trim(Request.Form("ref_contact_1")) & vbCrLf & _ "2. " & trim(Request.Form("ref_name_2")) & " - " & trim(Request.Form("ref_contact_2")) & vbCrLf & _ "3. " & trim(Request.Form("ref_name_3")) & " - " & trim(Request.Form("ref_contact_3")) & vbCrLf & _ "4. " & trim(Request.Form("ref_name_4")) & " - " & trim(Request.Form("ref_contact_4")) & vbCrLf & _ "5. " & trim(Request.Form("ref_name_5")) & " - " & trim(Request.Form("ref_contact_5")) & vbCrLf v_strFromN = "popmailer@crownasia.com.ph" v_strToN = trim(Request.Form("email")) v_strSubjectN = "Please verify your Crown Asia email address" v_strBodyN = "Dear " & trim(Request.Form("fname")) & "," & vbCrLf & _ "" & vbCrLf & _ "To verify your Crown Asia Inquiry email address, please click on the link below: " & vbCrLf & _ "" & vbCrLf & _ "http://www.crownasia.com.ph/verifyemail.asp?email=" & trim(Request.Form("email")) & "&code=" & trim(Request.Form("code")) & " " & vbCrLf & _ "" & vbCrLf & _ "=============================================================" & vbNewLine & _ "Note: This e-mail has been sent to the address you have entered in the Crown Asia " & vbNewLine & _ "website inquiry form. This e-mail was sent from a notification address that " & vbNewLine & _ "cannot accept incoming e-mails. Please do not reply to this message." 'save inquiry to database to CrownAsia_v2 the new one address = replace(request("address"), "'", "''") designation = replace(request("designation"), "'", "''") company_address = replace(request("company_address"), "'", "''") company_name = replace(request("company_name"), "'", "''") company_phone = replace(request("company_phone"), "'", "''") remarks = replace(request("remarks"), "'", "''") other_7 = replace(request("other_7"), "'", "''") cnn.execute"Insert Into tblInquiry Values " & _ " ('" & trim(Request.Form("fname")) & "','" & request("lname") & "','" & request("mname") & "','" & request("birthmonth") & "','" & request("birthday") & "','" & request("birthyear") & "','" & address & "','" & request("phone") & "','" & request("mobile") & "','" & request("gender") & "','" & request("email") & "','" & request("civilstatus") & "'," & _ "'" & request("employment") & "','" & designation & "','" & request("industry") & "','" & request.form("company_name") & "','" & company_address & "','" & company_phone & "','" & remarks & "'," & _ "'" & request("other_1") & "','" & request("other_2") & "','" & request("other_3") & "','" & v_other & "' ,'" & request.form("other_5") & "','" & request("other_6") & "','" & other_7 & "'," & _ "'" & request("ref_name_1") & "','" & request("ref_contact_1") & "','" & request("ref_name_2") & "','" & request.form("ref_contact_2") & "','" & request.form("ref_name_3") & "','" & request("ref_contact_3") & "','" & request("ref_name_4") & "','" & request.form("ref_contact_4") & "','" & request("ref_name_5") & "','" & request("ref_contact_5") & "','" & request.form("project") & "','" & v_strTo & "','" & request("code") & "','" & Now() & "') " 'sending mails 'sales and marketing gf_Mail v_strFrom, v_strTo, v_strCc, v_strSubject, v_strBody 'nitification mail 'gf_Notification v_strFromN, v_strToN, v_strSubjectN, v_strBodyN response.redirect "inquire_thanks.asp" end if If Err.Number <> 0 Then 'srtERRmsg = "error" response.Write("Unable to process your inquiry. Please check your entry before sending.") End If %>