%@ Language=VBScript %> <% good = false if request.form("name") <> "" and request.form("email") <> "" and request.form("address") <> "" and request.form("city") <> "" and request.form("state") <> "" and request.form("zip") <> "" and request.form("nightphone") <> "" then good = true end if function bad_words(text) dim bad_word(20), i bad_word(0) = "shit" bad_word(1) = "fuck" bad_word(2) = "adultgames" bad_word(3) = "pornoaccess" bad_word(4) = "porno" bad_word(5) = "sex" bad_word(6) = "sexual" bad_word(7) = "viagra" bad_word(8) = "cialis" bad_word(9) = "c1al1s" bad_word(10) = "v1agra" bad_word(11) = "v!agra" bad_word(12) = "c1alis" bad_word(13) = "c1alis" bad_word(14) = "pedophile" bad_word(15) = "pornographic" bad_word(16) = "ghay" bad_word(17) = "gay" bad_word(18) = "http" bad_word(19) = "https" i = 0 for each word in bad_word if InStr(16, text, word, 1) then i = i + 1 end if next bad_words = i end function if good then set mail = server.createobject("CDO.Message") mail.to = "susan@hubbellhomes.com" mail.from = request.form("email") mail.cc = "rachel.flint@hubbellrealty.com, april.bitterrman@hubbellrealty.com" mail.subject = "Conservation Communities Info Request" body = "Date: " & cdate(date) & vbcrlf body = body & "Name: " & request.form("name") & vbcrlf body = body & "Email: " & request.form("email") & vbcrlf & vbcrlf body = body & "Address: " & request.form("address") & ", " body = body & "Suite/Apt: " & request.form("apt") & vbcrlf body = body & "City: " & request.form("city") & vbcrlf body = body & "State: " & request.form("state") & vbcrlf body = body & "Zip: " & request.form("zip") & vbcrlf body = body & "Day Phone: " & request.form("dayphone") & vbcrlf body = body & "Night Phone: " & request.form("nightphone") & vbcrlf & vbcrlf if request.form("hotsheet") <> "" then body = body & "Hotsheet: Yes" & vbcrlf & vbcrlf else body = body & "Hotsheet: No" & vbcrlf & vbcrlf end if if request.form("sendCD") <> "" then body = body & "Send CD: Yes" & vbcrlf & vbcrlf else body = body & "Send CD: No" & vbcrlf & vbcrlf end if body = body & "Message: " & request.form("message") & vbcrlf & vbcrlf body = body & "Communities of interest: " & vbcrlf if request.form("ap") <> "" then body = body & "Ambrose Place" & vbcrlf if request.form("df") <> "" then body = body & "Danamere Farms" & vbcrlf if request.form("gv") <> "" then body = body & "Glynn Village" & vbcrlf if request.form("ms") <> "" then body = body & "Meadowlark South" & vbcrlf if request.form("gwh") <> "" then body = body & "The Greens at Woodland Hills" & vbcrlf mail.textbody = body if not bad_words(body) > 1 then mail.send else good = false end if set mail = nothing end if %>
|