<% '==================================================== ' = ' Forms To Go 4.1.1 = ' http://www.bebosoft.com/ = ' = '==================================================== '==================================================== ' Function: FilterControlChars = '==================================================== Function FilterCchar(TextToFilter) Dim regEx Set regEx = New RegExp regEx.Global = true regEx.IgnoreCase = true regEx.Pattern ="[\x00-\x1F]" filterCchar = regEx.Replace(TextToFilter, "") End Function '==================================================== ' Function: SQLQuoteReplace = '==================================================== Function SQLQuoteReplace(FieldValue) SQLQuoteReplace = Replace(FieldValue, "'", "''") End Function '==================================================== ' Function: ShowDate = '==================================================== Function ShowDate(ftgdf) Dim FTGNow, FTGDay, FTGMonth, FTGYearS, FTGYearL, FTGHour, FTGMinute, FTGSecond, AMPM FTGNow = Now FTGDay = CStr(Day(FTGNow)) FTGMonth = CStr(Month(FTGNow)) FTGYearS = Right(CStr(Year(FTGNow)), 2) FTGYearL = CStr(Year(FTGNow)) FTGHour = CStr(Hour(FTGNow)) FTGMinute = CStr(Minute(FTGNow)) FTGSecond = CStr(Second(FTGNow)) If FTGDay < 10 Then FTGDay = "0" & FTGDay If FTGMonth < 10 Then FTGMonth = "0" & FTGMonth If FTGHour < 10 Then FTGHour = "0" & FTGHour If FTGMinute < 10 Then FTGMinute = "0" & FTGMinute If FTGSecond < 10 Then FTGSecond = "0" & FTGSecond If ftgdf = 1 Then ShowDate = FTGMonth & "/" & FTGDay & "/" & FTGYearS If ftgdf = 2 Then ShowDate = FTGDay & "/" & FTGMonth & "/" & FTGYearS If ftgdf = 3 Then ShowDate = FTGDay & "/" & FTGMonth & "/" & FTGYearL If ftgdf = 4 Then ShowDate = FTGYearL & "-" & FTGMonth & "-" & FTGDay If ftgdf = 6 Then ShowDate = FTGHour & ":" & FTGMinute & ":" & FTGSecond If ftgdf = 7 Then ShowDate = FTGYearL & "-" & FTGMonth & "-" & FTGDay & " " & FTGHour & ":" & FTGMinute & ":" & FTGSecond If ftgdf = 5 Then AMPM = "AM" FTGHour = Hour(FTGNow) If FTGHour > 12 Then FTGHour = FTGHour - 12 AMPM = "PM" If FTGHour < 10 Then FTGHour = "0" & FTGHour ElseIf FTGHour = 12 Then AMPM = "PM" ElseIf FTGHour < 10 Then FTGHour = "0" & FTGHour End If ShowDate = FTGHour & ":" & FTGMinute & ":" & FTGSecond & " " & AMPM End If End Function Dim ClientIP if Request.ServerVariables("HTTP_X_FORWARDED_FOR") <> "" then ClientIP = Request.ServerVariables("HTTP_X_FORWARDED_FOR") else ClientIP = Request.ServerVariables("REMOTE_ADDR") end if Dim objCDOSYSMail Set objCDOSYSMail = Server.CreateObject("CDO.Message") Dim objCDOSYSCnfg Set objCDOSYSCnfg = Server.CreateObject("CDO.Configuration") FTGemailto = request.form("emailto") FTGemailfrom = request.form("emailfrom") FTGemailsubject = request.form("emailsubject") FTGemailconfirm = request.form("emailconfirm") FTGMessageType = request.form("MessageType") FTGSubject = request.form("Subject") FTGSubjectOther = request.form("SubjectOther") FTGComments = request.form("Comments") FTGname = request.form("name") FTGUserEmail = request.form("UserEmail") FTGUserTel = request.form("UserTel") FTGUserFAX = request.form("UserFAX") FTGContactRequested = request.form("ContactRequested") FTGsubmit = request.form("submit") '==================================================== ' Code: ErrorMessage = '==================================================== If (validationFailed = true) Then ErrorPage = "ErrorErrors found: " ErrorPage = Replace(ErrorPage, "", ErrorList) ErrorPage = Replace(ErrorPage, "", FTGemailto) ErrorPage = Replace(ErrorPage, "", FTGemailfrom) ErrorPage = Replace(ErrorPage, "", FTGemailsubject) ErrorPage = Replace(ErrorPage, "", FTGemailconfirm) ErrorPage = Replace(ErrorPage, "", FTGMessageType) ErrorPage = Replace(ErrorPage, "", FTGSubject) ErrorPage = Replace(ErrorPage, "", FTGSubjectOther) ErrorPage = Replace(ErrorPage, "", FTGComments) ErrorPage = Replace(ErrorPage, "", FTGname) ErrorPage = Replace(ErrorPage, "", FTGUserEmail) ErrorPage = Replace(ErrorPage, "", FTGUserTel) ErrorPage = Replace(ErrorPage, "", FTGUserFAX) ErrorPage = Replace(ErrorPage, "", FTGContactRequested) ErrorPage = Replace(ErrorPage, "", FTGsubmit) Response.Write ErrorPage Response.End End If ' Owner Email: cdosys objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.capecorallive.com" objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = "1" objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "russ@capecorallive.com" objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "7323429" objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objCDOSYSCnfg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 objCDOSYSCnfg.Fields.Update objCDOSYSMail.Configuration = objCDOSYSCnfg emailSubject = FilterCchar("Tell us") emailBodyText = "emailto : " & FTGemailto & "" & vbCrLf _ & "emailfrom : " & FTGemailfrom & "" & vbCrLf _ & "emailsubject : " & FTGemailsubject & "" & vbCrLf _ & "emailconfirm : " & FTGemailconfirm & "" & vbCrLf _ & "MessageType : " & FTGMessageType & "" & vbCrLf _ & "Subject : " & FTGSubject & "" & vbCrLf _ & "SubjectOther : " & FTGSubjectOther & "" & vbCrLf _ & "Comments : " & FTGComments & "" & vbCrLf _ & "name : " & FTGname & "" & vbCrLf _ & "UserEmail : " & FTGUserEmail & "" & vbCrLf _ & "UserTel : " & FTGUserTel & "" & vbCrLf _ & "UserFAX : " & FTGUserFAX & "" & vbCrLf _ & "ContactRequested : " & FTGContactRequested & "" & vbCrLf _ & "submit : " & FTGsubmit & "" & vbCrLf _ & "" & vbCrLf _ & "" ' Owner Email: cdosys emailFrom = FilterCchar("Tell-us@capecorallive.com") objCDOSYSMail.To = "Tell Us " objCDOSYSMail.From = emailFrom objCDOSYSMail.Subject = emailSubject objCDOSYSMail.TextBody = emailBodyText objCDOSYSMail.BodyPart.Charset = "ISO-8859-1" objCDOSYSMail.Send '==================================================== ' Code: SuccessRedirect = '==================================================== Response.Redirect "http://www.capecorallive.com/tell_us_confirm.htm" %>