%
Option Explicit
On error resume next
%>
<%
'===========================
'Database Functions
'===========================
sub SaveForm()
Dim adoCmd, DataConn
Set DataConn = Server.CreateObject("ADODB.Connection")
Set adoCmd = Server.CreateObject("ADODB.Command")
DataConn.Open(ConnStr)
adoCmd.ActiveConnection = DataConn
adoCmd.CommandType = 4
adoCmd.CommandText = "spMembershipAdd"
adoCmd.Parameters.Append AdoCmd.CreateParameter("strFirstName", adVarchar, adParamInput, 255, Left(Trim(Request.Form("firstName")), 255))
adoCmd.Parameters.Append AdoCmd.CreateParameter("strLastName", adVarchar, adParamInput, 255, Left(Trim(Request.Form("lastName")), 255))
adoCmd.Parameters.Append AdoCmd.CreateParameter("strCompany", adVarchar, adParamInput, 255, Left(Trim(Request.Form("company")), 255))
adoCmd.Parameters.Append AdoCmd.CreateParameter("strAddress1", adVarchar, adParamInput, 255, Left(Trim(Request.Form("address1")), 255))
adoCmd.Parameters.Append AdoCmd.CreateParameter("strAddress2", adVarchar, adParamInput, 255, Left(Trim(Request.Form("address2")), 255))
adoCmd.Parameters.Append AdoCmd.CreateParameter("strCity", adVarchar, adParamInput, 255, Left(Trim(Request.Form("city")), 255))
adoCmd.Parameters.Append AdoCmd.CreateParameter("strState", adVarchar, adParamInput, 100, Left(Trim(Request.Form("state")), 100))
adoCmd.Parameters.Append AdoCmd.CreateParameter("strZip", adVarchar, adParamInput, 50, Left(Trim(Request.Form("zip")), 50))
adoCmd.Parameters.Append AdoCmd.CreateParameter("strEmail", adVarchar, adParamInput, 255, Left(Trim(Request.Form("email")), 255))
adoCmd.Parameters.Append AdoCmd.CreateParameter("strPhone", adVarchar, adParamInput, 50, Left(Trim(Request.Form("phone")), 50))
adoCmd.Parameters.Append AdoCmd.CreateParameter("strExtension", adVarchar, adParamInput, 50, Left(Trim(Request.Form("ext")),50))
adoCmd.Parameters.Append AdoCmd.CreateParameter("strComments", adVarchar, adParamInput, 5000, Left(Trim(Request.Form("comments")), 5000))
adoCmd.Parameters.Append AdoCmd.CreateParameter("strRemoteIP", adVarchar, adParamInput, 50, Request.ServerVariables("REMOTE_ADDR"))
adoCmd.Execute
dataConn.close
set dataConn = Nothing
set adoCmd = Nothing
end sub
'===========================
'Display Functions
'===========================
sub DisplayForm()
%>
<%
end sub
'===========================
'Other Functions
'===========================
Function ValidateForm()
Dim strError : strError = ""
Dim objValidator
Set objValidator = New Validator
if not objValidator.IsValidName(Trim(Request.Form("FirstName"))) then
strError = strError & "Please enter your First Name.
"
end if
if not objValidator.IsValidName(Trim(Request.Form("LastName"))) then
strError = strError & "Please enter your Last Name.
"
end if
if not objValidator.IsValidAddress(Trim(Request.Form("Address1"))) then
strError = strError & "Please enter a valid Address.
"
end if
if Trim(Request.Form("State")) = "" then
strError = strError & "Please enter a valid State.
"
end if
if not objValidator.IsValidZipCode(Trim(Request.Form("zip"))) then
strError = strError & "Please enter a valid Zip code.
"
end if
if not objValidator.isValidEmail(Trim(Request.Form("email"))) then
strError = strError & "Please enter a valid E-mail Address.
"
end if
'if Trim(Request.Form("phone")) = "" then
' strError = strError & "Please enter your phone number.
"
'end if
'if Trim(Replace(Request.Form("comments"), VbCrLf, "")) = "" then
' strError = strError & "Please enter your Comments/Questions.
"
'end if
Set objValidator = Nothing
ValidateForm = strError
End Function
Function SendFormEmail()
Dim objMailer, strBody
Set objMailer = Server.CreateObject("Persits.MailSender")
objMailer.Queue = true
Dim strFromName : strFromName = Trim(Trim(Request.Form("FirstName")) & " " & Trim(Request.Form("LastName")))
if strFromName = "" then
strFromName = C_MembershipContactFormEmail
else
strFromName = strFromName
end if
Dim strFromEmail : strFromEmail = Trim(Request.Form("email"))
if strFromEmail = "" then
strFromEmail = C_MembershipContactFormEmail
end if
objMailer.FromName = strFromName
objMailer.From = strFromEmail
objMailer.Host = "mail.distanthorizon.com"
objMailer.AddAddress C_MembershipContactFormEmail
objMailer.Subject = "Membership Contact from LCCLUB.com"
strBody = strBody & VbCrLf & VbCrLf
if strFromEmail = C_MembershipContactFormEmail then
strBody = strBody & "*********************************" & VbCRlf
strBody = strBody & " DO NOT REPLY TO THIS E-MAIL " & VbCRlf
strBody = strBody & "*********************************" & VbCRlf & VbCRlf
end if
strBody = strBody & "MEMBERSHIP CONTACT" & VbCRlf & VbCRlf
strBody = strBody & "First Name: " & Trim(Request.Form("firstName")) & VbCRlf & VbCRlf
strBody = strBody & "Last Name: " & Trim(Request.Form("lastName")) & VbCRlf & VbCRlf
'strBody = strBody & "Company: " & Trim(Request.Form("company")) & VbCRlf & VbCRlf
strBody = strBody & "Address: " & Trim(Request.Form("address1")) & VbCRlf & VbCRlf
strBody = strBody & "Address 2: " & Trim(Request.Form("address2")) & VbCRlf & VbCRlf
strBody = strBody & "City: " & Trim(Request.Form("city")) & VbCRlf & VbCRlf
strBody = strBody & "State: " & Trim(Request.Form("state")) & VbCRlf & VbCRlf
strBody = strBody & "Zip: " & Trim(Request.Form("zip")) & VbCRlf & VbCRlf
strBody = strBody & "Email: " & Trim(Request.Form("email")) & VbCRlf & VbCRlf
strBody = strBody & "Phone: " & Trim(Request.Form("phone")) & VbCRlf & VbCRlf
'strBody = strBody & "Ext: " & Trim(Request.Form("ext")) & VbCRlf & VbCRlf
strBody = strBody & "Questions/Comments:" & VbCRlf
strBody = strBody & Trim(Request.Form("comments")) & VbCRlf
strBody = strBody & VbCrLf & VbCrLf & VbCrLf & VbCrLf
objMailer.Body = strBody
objMailer.Send
Set objMailer = Nothing
End Function
'=======================================================================
'Global Variables and Constants
'=======================================================================
'=======================================================================
'Main Code
'=======================================================================
%>
Lake Country Racquet & Athletic Club - Membership
 |
560
Industrial Dr. • Hartland, WI 53029
262-367-4999 |
|
|


<%
Dim strMessage : strMessage = ""
If Request.Form("Submit") <> "" then
strMessage = ValidateForm()
if strMessage = "" then
call SaveForm()
call ErrorCheck("DB")
call SendFormEmail()
call ErrorCheck("DB")
Response.write "Thank you. You have successfully submitted your request.
"
else
Response.write "" & strMessage & " "
Call DisplayForm()
call ErrorCheck("DB")
end if
else
Call DisplayForm()
call ErrorCheck("DB")
end if
call ErrorCheck("DB")
%>

MEMBERSHIP OFFICE HOURS:
 |
| Monday - Thursday |
9:00 a.m. - 8:00 p.m. |
 |
| Friday |
9:00 a.m. - 5:00 p.m. |
 |
| Saturday |
9:00 a.m. - 2:00 p.m. |
 |
| Sunday |
CLOSED |
 |
In addition to our state-of-the-art Fitness, Tennis
and Racquetball Facilities, the Club offers many other features.
Personal Training
- Tennis Lessons/Drills
- Group Fitness
- Pilates
- Racquetball Leagues/Lessons
- Swimming Pool
- Massage
- Tanning
- Pro Shop
- Full Service Bar
- Nursery - Indoor
- Social Events
Included with your membership:
- Group Fitness Classes
- Whirlpool
- Sauna
- Steam Room
- Day Lockers
- Towel Service
Other Sports:
- Basketball
- Wallyball
- Volleyball
|
|
 |
|