%
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 |
|
|

View Larger Map
| Hartland |
Delafield |
Oconomowoc |
Pewa |
| Ukee |
Merton |
North Lake |
Chenequa |
| Okauchee |
Stone Bank |
Dousman |
Wales |
| Waukesha |
Brookfield |
Hartford |
Erin |
| Ashippun |
Nashotah |
Sussex |
Summit |
| Mapleton |
Genesee |
Lisbon |
Colgate |
| Stone Bank |
Monches |
Ixonia |
Monterey |

|
|
 |
|