<% Dim sCurrentPage, sPCMID sCurrentPage="contactus" sPCMID = "PCM_CONTACTUS" sPageID= "13" Dim sSuccess, sSubscriberID, sCategoryID, sMail, sCategories, rsCategories %> <% ''''''Get an delete Session'''''''''''''''''''''''''''''''''''''''''''''''''''' If Not(IsNull(Session("sSuccess"))) And Not(Trim(Session("sSuccess"))="") Then sSuccess=Session("sSuccess") Session("sSuccess")=Null end if ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Select Case Request("cmd") Case "Subscribe" if blnCAPTCHAcodeCorrect = true or gsCaptchaContactus<>"on" Then 'Set rsData= Server.CreateObject("ADODB.Recordset") 'sSQL = "SELECT * FROM mmSubscribers WHERE Email = '" & killChars(Request("email")) & "'" 'rsData.Open sSQL, conDB, adOpenKeyset, adLockOptimistic, adCmdText 'If IsRSEmpty(rsData) Then ' rsData.AddNew ' rsData("Email") = Request("email") 'End If 'rsData("FirstName") = ToDB(Request("fname")) 'rsData("LastName") = ToDB(Request("lname")) 'rsData("Company") = ToDB(Request("company")) 'rsData("Address1") = ToDB(Request("address1")) 'rsData("Address2") = ToDB(Request("address2")) 'rsData("City") = ToDB(Request("city")) 'rsData("State") = ToDB(Request("State")) 'rsData("PostalCode") = ToDB(Request("PostalCode")) 'rsData("Country") = ToDB(Request("Country")) 'rsData("Phone") = ToDB(Request("Phone")) 'rsData("Fax") = ToDB(Request("Fax")) 'rsData("Notes") = ToDB(Request("Notes")) 'On Error Resume Next 'rsData.Update 'If Err.Number = 0 Then ' sSubscriberID = rsData("SubscriberID") ' rsData.Close ' If Len(Request("category"))>0 Then ' For Each sCategoryID In Request("category") ' sSQL = "INSERT INTO mmSubscriptions VALUES (" & killChars(sSubscriberID) & ", " & killChars(sCategoryID) & ")" ' conDB.Execute sSQL ' Next ' End If ' Session("sSuccess") = smSuccessAdded ' if request("recordevent")="recordevent" then ' recordConversionEvent smConversionContactusSubscribe,Request("fname")&" "&request("lname"),Request("phone"),Request("email"),Request("notes"),"ContactUs","","" ' end if 'Else ' Session("sSuccess") = smNoAdded ' errorMessageByModule = smNoAdded 'End If 'If Len(Request("category"))>0 Then ' sSQL = "SELECT Name FROM mmCategories WHERE CategoryID IN (" & killChars(Request("category")) & ")" ' Set rsCategories = conDB.Execute(sSQL) ' sCategories = "" ' rsCategories.Close ' Set rsCategories = Nothing 'End If sMail = "" _ & "" _ & "" _ & "

" & sPageHeading & "


" _ & "

" & smHeaderMail & "

" _ & "

" & Request("fname") & " " & Request("lname") & "
" _ & Request("company") & "
" _ & Request("address1") & "
" _ & Request("address2") & "
" _ & Request("city") & ", " & Request("state") & "
" _ & Request("postalcode") & "
" _ & Request("country") & "
" _ & "" & smPhone & ": " & Request("phone") & "
" _ & "" & smFax & ": " & Request("fax") _ & "

Comments:

" _ & "

" _ & Request("Notes") _ & "

" 'On Error Resume Next Set objEmail = CreateObject("CDO.Message") objEmail.BodyPart.ContentTransferEncoding = "quoted-printable" objEmail.From = gsContactUsEMail objEmail.ReplyTo = Request("email") objEmail.To = gsContactUsEMail objEmail.Subject = smSubjectSubscribe objEmail.HTMLBody = sMail objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = gsSMTPServer objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 If gsCDoAuthenticate = 1 Then objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = "1" objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = gsContactUsEMail objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = gsCDOPassword End If objEmail.Configuration.Fields.Update objEmail.Send 'If Not err.number=0 Then ' Response.write "ERROR: " & err.Description ' err.Clear 'end if Set objEmail = Nothing 'On Error Goto 0 'autoresponder sEmail2 = "Hi " & Request("fname") & " " & Request("lname") & "

" _ & "Thank you for your interest. We will contact you shortly.



SLA Team" Set objEmail2 = CreateObject("CDO.Message") objEmail2.BodyPart.ContentTransferEncoding = "quoted-printable" objEmail2.From = gsContactUsEMail objEmail2.ReplyTo = gsContactUsEMail objEmail2.To = Request("email") objEmail2.Subject = "Your information has been received" objEmail2.HTMLBody = sEmail2 objEmail2.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objEmail2.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = gsSMTPServer objEmail2.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 If gsCDoAuthenticate = 1 Then objEmail2.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = "1" objEmail2.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = gsContactUsEMail objEmail2.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = gsCDOPassword End If objEmail2.Configuration.Fields.Update objEmail2.Send Set objEmail2 = Nothing if gsCaptchaContactus="on" then blnCAPTCHAcodeCorrect = false else if gsCaptchaContactus="on" then Session("sSuccess")=smSecurityCodenotvalid blnCAPTCHAcodeCorrect = false end if end if 'Response.Redirect FriendlyURL(sPCMID) Response.Redirect strUrl & "thankyou.html" Case "Unsubscribe" 'If blnCAPTCHAcodeCorrect = True or gsCaptchaContactus<>"on" Then sSQL = "SELECT COUNT(*) FROM mmSubscribers WHERE Email = '" & killChars(Request("unsubcribeemail")) & "'" Set rsData = conDB.Execute(sSQL) If rsData(0) = 0 Then Session("sSuccess") = smEmailNotFound Else sSQL = "DELETE FROM mmSubscribers WHERE Email = '" & killChars(Request("unsubcribeemail")) & "'" conDB.Execute sSQL Session("sSuccess") = smProfileRemoved if request("recordevent")="recordevent" then recordConversionEvent smConversionContactusUnsubscribe,"","",Request("unsubcribeemail"),"","ContactUs","","" end if sMail = "" _ & "" _ & "" _ & "

" & gsSiteName & " - " & gsSiteDomain & "


" _ & "

" & smUnsubscribeFromList & "

" _ & "
" 'On Error Resume Next Set objEmail = CreateObject("CDO.Message") objEmail.BodyPart.ContentTransferEncoding = "quoted-printable" objEmail.From = gsContactUsEMail objEmail.To = Request("unsubcribeemail") objEmail.Subject = smSubjectUnsubscribe objEmail.HTMLBody = sMail objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = gsSMTPServer objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 If gsCDOAuthenticate = 1 Then objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = "1" objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = gsContactUsEMail objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = gsCDOPassword End If objEmail.Configuration.Fields.Update objEmail.Send ' If Not err.number=0 Then ' Response.write "ERROR: " & err.Description ' err.Clear ' end if Set objEmail = Nothing End IF 'On Error Goto 0 Response.Redirect FriendlyURL(sPCMID) End Select %>

<% LeftSearchChar = "=%" LeftPos = Instr(1, sPageContent, LeftSearchChar, 1) If LeftPos > 0 Then RightSearchChar = "%=" RightPos = Instr(1, sPageContent, RightSearchChar, 1) BeforeCallContent = Left(sPageContent,LeftPos-1) AfterCallContent = Right(sPageContent,len(sPageContent)-(RightPos+1)) Response.write BeforeCallContent RSSFeedSub rssfeedurl Response.write AfterCallContent Else Response.write sPageContent End If %>

<%If Not(IsNull(sSuccess)) And Not(Trim(sSuccess)="") Then%>

<%=sSuccess%>

<%End If%> <% 'Use this variable to load the javascript validations 'Remember to reset the variable after rendering it into the javascript function that performs the validation function DIM formValidateForm:formValidateForm="" %>
<% Dim sGroup, sChecked sSQL = ""_ &"SELECT CategoryID, Group, Name "_ &"FROM mmCategories "_ &"WHERE IsActive<>0 "_ &"AND LangID="&killChars(iDefLangID)&" "_ &"ORDER BY Group, SortOrder" Set rsData = conDB.Execute(sSQL) If Not IsRsEmpty(rsData) Then %> <% End If if gsCaptchaContactus="on" then %> <% end if%>
<%=smSubscribe%>
<%=smFirstName%>: <%addInputText "fname", "30", "80", "text", smFirstName, "", "", ""%>
<%=smLastName%>: <%addInputText "lname", "30", "80", "text", smLastName, "", "", ""%>
<%=smCompany%>: <%addInputText "company", "30", "100", "", "", "", "", ""%>
<%=smAddress%>: <%addInputText "address1", "30", "150", "", "", "", "", ""%>
<%addInputText "address2", "30", "150", "", "", "", "", ""%>
<%=smCity%>: <%addInputText "city", "30", "40", "", "", "", "", ""%>
<%=smState%>: <%addInputText "state", "30", "40", "", "", "", "", ""%>
<%=smPostalCode%>: <%addInputText "postalcode", "30", "15", "", "", "", "", ""%>
<%=smCountry%>: <% Set rscontries = conDB.Execute("SELECT name, abbr FROM countries order by Name") countryInformation = informationCollection (rscontries, "name", "name") addInputSelect "country", countryInformation, gsDefCountry, "", "", "", "", "" 'To make this field required, add a blank option and don't select the default country, use this: 'addInputSelect "country",countryInformation, "", "yes", smCountry, "", "", "" %>
<%=smPhone%>: <%addInputText "phone", "30", "15", "", "", "", "", ""%>
<%=smFax%>: <%addInputText "fax", "30", "15", "", "", "", "", ""%>
<%=smEmail%>: <%addInputText "email", "30", "60", "email", smEmail, "", "", ""%>
<%=smComments%>: <%addInputTextarea "notes", "25", "3", "", "", "", "", ""%>
<% '* Clear the javascript validation variable after rendering it so the next form has its own javascript validations formValidateForm="" %> <% '* Clear the javascript validation variable after rendering it so the next form has its own javascript validations formValidateForm="" %>