%@ LANGUAGE="VBSCRIPT" %>
<% PageStrings = "14, 33, 697, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1143, 1717, 1773, 1774, 1775" %>
<%
'-----------------------------------------------
'SET PAGETITLE TAG
'-----------------------------------------------
strPageTitleHTML = GetString("PageTitle_ContactUs") & GetString("PageTitle_Separator") & GetString("Config_Webshopname")
%>
<%
'===============================================
' CactuShop ASP Shopping Cart
' ©1999-2006 Cactusoft International FZ-LLC
' www.cactusoft.com
'===============================================
' All rights reserved.
' Use of this code is covered by the terms and
' conditions in the license agreement. No
' unauthorized duplication or distribution is
' permitted. Cactusoft's copyright notices must
' remain in the ASP sections of the code.
'===============================================
'-----------------------------------------------
'CONTACT FORM AND HANDLER
'-----------------------------------------------
'-----------------------------------------------
'READ PAGE TEMPLATE FROM FILE
'-----------------------------------------------
Call ReadFromTemplate(strTemplateLocation, aryPageTemplate)
'-----------------------------------------------
'WRITE FIRST HALF OF PAGE HTML
'-----------------------------------------------
response.write(aryPageTemplate(0))
blnSubmitted = request.form("submit") <> ""
strCallMode = ListSafe(DualRequest("strCallMode"), "contact,enquiry", "contact")
strAppBasketContentsOnContact = GetAppVar("basketcontentsoncontact")
%>
<%= Replace(GetString("ContentText_AddressAndPhoneContact"), vbcrlf, "
") %>
Please fill out the details below. Click Submit to send the information to us.
Fields marked with
* are mandatory.
<%
If blnSubmitted then
'-----------------------------------------------
'PROCESS FORM
'-----------------------------------------------
'Collect values from form. Make sure they're not really silly lengths
strContactName = Left(request.form("strContactName"), 255)
strContactEmail = Left(request.form("strContactEmail"), 255)
strContactComments = Left(request.form("strContactComments"), 8000)
strContactLastName = Left(request.form("strContactLastName"), 255)
strContactJobTitle = Left(request.form("strContactJobTitle"), 255)
strContactCompany = Left(request.form("strContactCompany"), 255)
strContactCountry = Left(request.form("strContactCountry"), 255)
strContactState = Left(request.form("strContactState"), 255)
strContactPhone1 = Left(request.form("strContactPhone1"), 255)
strContactPhone2 = Left(request.form("strContactPhone2"), 255)
strContactIndustry = Left(request.form("strContactIndustry"), 255)
strContactNumEmployees = Left(request.form("strContactNumEmployees"), 255)
strContactRole = Left(request.form("strContactRole"), 255)
strContactHearAbout = Left(request.form("strContactHearAbout"), 255)
strContactKeepUpdated = Left(request.form("strContactKeepUpdated"), 255)
strContactMe = Left(request.form("strContactMe"), 255)
blnIncludeBasket = (strAppBasketContentsOnContact = "always") or (strAppBasketContentsOnContact = "enquiry" and strCallMode = "enquiry") or (strAppBasketContentsOnContact = "user" and request.Form("strIncludeBasket") = "y")
'Error checks
strErrors = strErrors & CheckBlank(GetString("ContentText_YourName"), strContactName, "strContactName")
strErrors = strErrors & CheckEmail(GetString("FormLabel_EmailAddress"), strContactEmail, "strContactEmail")
strErrors = strErrors & CheckBlank(GetString("ContentText_YourMessageComments"), strContactComments, "strContactComments")
strErrors = strErrors & CheckBlank("Last Name",strContactLastName , "strContactLastName")
strErrors = strErrors & CheckBlank("Job Title",strContactJobTitle, "strContactJobTitle")
strErrors = strErrors & CheckBlank("Company",strContactCompany , "strContactCompany")
strErrors = strErrors & CheckBlank("Country", strContactCountry, "strContactCountry")
strErrors = strErrors & CheckBlank("Area Code", strContactPhone1 , "strContactPhone1")
strErrors = strErrors & CheckBlank("Telephone Number",strContactPhone2, "strContactPhone2")
strErrors = strErrors & CheckBlank("Industry",strContactIndustry, "strContactIndustry")
If strErrors = "" then
'Send email
strBodyText = GetString("EmailText_ContactStart") & vbcrlf & "http://" & request.ServerVariables("HTTP_HOST") & request.ServerVariables("URL") & vbcrlf & vbcrlf
strBodyText = strBodyText & GetString("EmailText_ContactEmailBreaker") & vbcrlf
strBodyText = strBodyText & GetString("EmailText_ContactName") & ": " & strContactName & vbcrlf
strBodyText = strBodyText & "Last Name: " & strContactLastName & vbcrlf
strBodyText = strBodyText & "Job Title: " & strContactJobTitle & vbcrlf
strBodyText = strBodyText & "Company: " & strContactCompany & vbcrlf
strBodyText = strBodyText & "Phone Number: " & strContactPhone1 & "-" & strContactPhone2 & vbcrlf
strBodyText = strBodyText & GetString("EmailText_ContactEmail") & ": " & strContactEmail & vbcrlf
strBodyText = strBodyText & "Country/State: " & strContactCountry & "/" & strContactState & vbcrlf
strBodyText = strBodyText & GetString("EmailText_ContactEmailBreaker") & vbcrlf
strBodyText = strBodyText & "Interested in: " & strContactComments & vbcrlf
strBodyText = strBodyText & GetString("EmailText_ContactEmailBreaker") & vbcrlf
strBodyText = strBodyText & "Industry: " & strContactIndustry & vbcrlf
strBodyText = strBodyText & "Number of employees: " & strContactNumEmployees & vbcrlf
strBodyText = strBodyText & "Description: " & strContactRole & vbcrlf
strBodyText = strBodyText & "How did you hear about us: " & strContactHearAbout & vbcrlf
strBodyText = strBodyText & GetString("EmailText_ContactEmailBreaker") & vbcrlf
strBodyText = strBodyText & "Have a BCA representative contact me?: " & strContactMe & vbcrlf
strBodyText = strBodyText & "Keep me updated?: " & strContactKeepUpdated & vbcrlf
strBodyText = strBodyText & GetString("EmailText_ContactEmailBreaker") & vbcrlf
strBodyText = strBodyText & GetString("EmailText_ContactIP") & ": " & request.ServerVariables("REMOTE_ADDR") & vbcrlf
strBodyText = strBodyText & GetString("EmailText_ContactDateStamp") & ": " & NowOffset & vbcrlf
strBodyText = strBodyText & GetString("EmailText_ContactEmailBreaker") & vbcrlf
If Application(LICENSENUMBER & "spoofcontactemail") = "y" then
Call SendEMail(GetAppVar("emailmethod"), GetAppVar("mailserver"), strEmailToContact, "", "", strEmailToContact, strContactName, strEmailToContact, strContactName, GetString("Config_SubjectLine4"), strBodyText, "", false)
Else
Call SendEMail(GetAppVar("emailmethod"), GetAppVar("mailserver"), strEmailToContact, "", "", strContactEmail, strContactName, strContactEmail, strContactName, GetString("Config_SubjectLine4"), strBodyText, "", false)
End If %>
<% WriteString("ContentText_MailWasSent") %>
<%
End if
Else
'Default the values to the session
strContactName = objCactuSession.Value("C_CardholderName")
strContactEmail = objCactuSession.Value("C_EmailAddress")
If strCallMode = "enquiry" then blnIncludeBasket = true
End If
If not blnSubmitted or strErrors <> "" then
If strErrors <> "" then
strErrors = FormatErrors(strErrors) %>
<% WriteString("ContentText_CorrectErrors") %><%= strErrors %>
<%
end if
'-----------------------------------------------
'DISPLAY FORM
'-----------------------------------------------
%>
<% end if %>
<%
'-----------------------------------------------
'WRITE LAST HALF OF PAGE HTML
'-----------------------------------------------
response.write(aryPageTemplate(1))
Call EndPage()
%>