%@LANGUAGE="VBSCRIPT"%>
<%
'--------------------------------------------------------
' Shop-At-Home Form
' Created on: 3/04/2006
' Created by: John Simonson, Webstream Dynamics
' Last modified on: 3/04/2006
' The page requires the follwoing files:
' 1. shop-at-home.css
' 2. shop-at-home.js
' 3. A redirect thank you page
'
' ***Be sure to edit the variables with ***
'--------------------------------------------------------
'---- *** EMAIL TO ADDRESS *** ----
Dim varEmailTo
varEmailTo = "info@flooringexpress.com"
'---- *** email subject line *** ----
Dim varSubject
varSubject = "Shop At Home Appointment Request"
'---- *** Message to alert user that certain days may not apply *** ----
Dim varDateMessage
varDateMessage = "Please note: We do not offer Sunday appointments."
'---- *** Redirect Page if form was completed successfully *** ----
Dim varRedirectURL
varRedirectURL = "thank-you.html"
'---- *** Actual Store Name *** ----
Dim varStorename
varStoreName = "Flooring Express"
'---- *** Confirmation paragraph of customer *** ----
Dim customermsg
customermsg = "Thank you for the Shop-At-Home Request. Below is a copy of the information you submitted to customer service at " & varStoreName & ". We will be calling you to confirm the information and the appointment date."
'---- *** State Code for the shop-at-home service *** ----
Dim state
state = Request.Form("state")
'---- Today's Date
Dim varCurrentDate
varCurrentDate = Date()
'---- Current Month
Dim varMonth
varMonth = Month(varCurrentDate) - 1
'---- Current Day
Dim varDay
varDay = Day(varCurrentDate)
'---- Current Year
Dim varYear
varYear = Year(varCurrentDate)
'---- Months of the Year
Dim Mnth
Mnth = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
dim timeslot, areas, products, hearabout, request_dated
dim fullname, address, city, zipcode, dayphone, eveningphone, email, comments
dim msg, printmsg, errormsg, x, y
msg = ""
errormsg = ""
if request.form("btnSubmit") = "SUBMIT" then
msg = "Date Submitted: " & varCurrentDate & vbCRLF & vbCRLF
if trim(request.form("fullname")) <> "" then
fullname = trim(request.form("fullname"))
msg = msg & "Name: " & fullname & vbCRLF
else
errormsg = errormsg & "Please be sure to tell us your Full Name.
"
End if
if trim(request.form("address")) <> "" then
address = trim(request.form("address"))
msg = msg & "Address: " & address & vbCRLF
else
errormsg = errormsg & "Please be sure to tell us your Address.
"
End if
if trim(request.form("city")) <> "" then
city = trim(request.form("city"))
msg = msg & "City: " & city & vbCRLF
else
errormsg = errormsg & "Please be sure to tell us your City.
"
End if
if trim(request.form("state")) <> "" then
state = trim(request.form("state"))
msg = msg & "State: " & state & vbCRLF
else
errormsg = errormsg & "Please be sure to tell us your State.
"
End if
if trim(request.form("zipcode")) <> "" then
zipcode = trim(request.form("zipcode"))
msg = msg & "Postal Code: " & zipcode & vbCRLF
else
errormsg = errormsg & "Please be sure to tell us your Postal Code.
"
End if
if trim(request.form("dayphone")) <> "" then
dayphone = trim(request.form("dayphone"))
msg = msg & "Daytime Phone: " & dayphone & vbCRLF
else
errormsg = errormsg & "Please be sure to tell us your Daytime Phone Number.
"
End if
if trim(request.form("eveningphone")) <> "" then
eveningphone = trim(request.form("eveningphone"))
msg = msg & "Evening Phone: " & eveningphone & vbCRLF
else
errormsg = errormsg & "Please be sure to tell us your Evening Phone Number.
"
End if
if trim(request.form("email")) <> "" then
email = trim(request.form("email"))
msg = msg & "Email address: " & email & vbCRLF
else
errormsg = errormsg & "Please be sure to tell us your Email address.
"
End if
if request.form("hearabout") <> "0" and request.form("hearabout") <> "" then
hearabout = request.form("hearabout")
msg = msg & vbCRLF & "Heard About Us: " & hearabout & vbCRLF
else
errormsg = errormsg & "Please tell us how you heard about us.
"
End if
if request.form("timeslot") <> "0" and request.form("timeslot") <> "" then
timeslot = request.form("timeslot")
msg = msg & "Appointment Time Slot: " & timeslot & vbCRLF
else
errormsg = errormsg & "Please select an appointment Time Slot.
"
End if
if (request.form("mnth") <> "" and request.form("dy") <> "" and request.form("yrs") <> "") then
request_dated = request.form("mnth") & "/" & request.form("dy") & "/" & request.form("yrs")
if (CSTR(varCurrentDate) = CSTR(request_dated)) then
errormsg = errormsg & "Please select a Date for your appointment.
"
else
msg = msg & "Appointment Date: " & request_dated & vbCRLF
end if
else
errormsg = errormsg & "Please select at an Appointment Date.
"
End if
if request.form("areas") <> "" then
msg = msg & "Decorating Areas: " & request.form("areas") & vbCRLF
areas = request.form("areas")
else
errormsg = errormsg & "Please select at least one area you are decorating.
"
End if
if request.form("products") <> "" then
msg = msg & "Products: " & request.form("products") & vbCRLF
products = request.form("products")
else
errormsg = errormsg & "Please select at least one Product Type that you are thinking" &_
" of using.
"
End if
if trim(request.form("comments")) <> "" then
comments = trim(request.form("comments"))
'-- no scripting code allowed in comments
comments = replace(comments, "javascript", "")
comments = replace(comments, "<", "")
comments = replace(comments, "script", "")
comments = replace(comments, ">", "")
msg = msg & vbCRLF & "Customer Comments:" & vbCRLF & vbCRLF & comments
else
comments = ""
end if
if errormsg = "" then
sendmail varEmailTo, email, varSubject, msg
Response.Redirect varRedirectURL
end if
printmsg = replace(msg, vbCRLF, "
")
End if
'----------------------------------------------------
' sendmail - send an email to recipient
'----------------------------------------------------
sub sendmail(emailTo, emailFrom, subject, emailMSG)
dim oMail, iConf
Set oMail = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.flooringexpress.com"
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 30
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
'Your UserID on the SMTP server
iConf.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "info@flooringexpress.com"
'Your password on the SMTP server
iConf.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "Christ1"
iConf.Fields.Update
Set oMail.Configuration = iConf
oMail.To = emailTo
oMail.From = emailFrom
oMail.Subject = subject
oMail.TextBody = emailMSG
oMail.Send
Set omail = nothing
Set iConf = Nothing
end sub
%>
![]() |
Flooring Express™ Flooring
Express™ Hours:
|
|
|
| Copyright © 2007-2008, Flooring Express™, Inc. Davie and Cooper City, FL All Rights Reserved |