|
Lodge & Grounds
Adventures & Tours
Region
What to bring
Reservations
|
TELL A FRIEND
<%
' #### This script Copyright (c) 2001 ASPjar.com, All Rights Reserved. NO WARRANTEE.
' #### You need CDONTS installed to be able to send mail
' #### Your sites information starts here ####
' Email Subject
EmailSubject="Check out this website!!"
' Footer Messages sent with each email
EmailFooter1="This message was sent to you by a vistor to our site at:"
EmailFooter2="www.yoursite.com"
EmailFooter3="Where everything is great!"
' Do you also want to recieve all emails? YES or NO
WebmasterMail="NO"
' Your Email Address - must be a valid domain or the mail will not send
sYourEmail="you@yoursite.com"
' Heading font color
FontColor="#000000"
' Heading Background Color
HeadColor="#FFFFFF"
' Form Font Color
FormFontColor="#000000"
' Form Background Color
FormBackColor="#FFFFFF"
'Error Message Color
ErrorColor="red"
' That's it! - you may now wish to customize the header and footer files to suit your site.
' ####################################################################################
Function ValidateField(sFieldValue, sFieldType)
Dim bFieldIsOkay, Email, Friend, Message
bFieldIsOkay = true
Select Case LCase(sFieldType)
Case "uemail"
If Len(sFieldValue) < 5 Then
bFieldIsOkay = False
Else
If InStr(1, sFieldValue, "@", 1) < 2 Then
bFieldIsOkay = False
Else
If InStr(1, sFieldValue, ".", 1) < 4 Then
bFieldIsOkay = False
End If
End If
End If
Case "name"
If Len(sFieldValue) = 0 Then bFieldIsOkay = False
Case "fname"
If Len(sFieldValue) = 0 Then bFieldIsOkay = False
Case "email"
If Len(sFieldValue) < 5 Then
bFieldIsOkay = False
Else
If InStr(1, sFieldValue, "@", 1) < 2 Then
bFieldIsOkay = False
Else
If InStr(1, sFieldValue, ".", 1) < 4 Then
bFieldIsOkay = False
End If
End If
End If
Case "message"
If Len(sFieldValue) = 0 Then bFieldIsOkay = False
Case "else"
bFieldIsOkay = False
End Select
ValidateField = bFieldIsOkay
End Function
Sub ShowFormField(Bert)
%> Tell a friend about Turtle Beach Lodge or send a reminder to yourself about
our resort.
<%
End Sub
Sub Send
sPunterFriend = Request.Form("name")
sPunterEmail = Request.Form("uemail")
fName = Request.Form("fname")
femail= Request.Form("email")
Message = Request.Form("message")
sSubject = "Check out all this Free Stuff"
sMessage = "Dear " & fName & vbcrlf _
& "We received a message from your friend " & sPunterFriend & " ( " & sPunterEmail & " ) which said:" & vbcrlf _
& vbcrlf _
& Message & vbcrlf _
& vbcrlf _
& "_____________________________________________ " & vbcrlf _
& EmailFooter1 & vbcrlf _
& EmailFooter2 & vbcrlf _
& EmailFooter3 & vbcrlf
Set objNewMail = CreateObject("CDONTS.NewMail")
objNewMail.Send sPunterEmail, femail, EmailSubject, sMessage
Set objNewMail = Nothing
If WebmasterMail="YES" then
Set objNewMail = CreateObject("CDONTS.NewMail")
objNewMail.Send sPunterEmail, sYourEmail, EmailSubject, sMessage
Set objNewMail = Nothing
End IF
Response.Write sPunterEmail
End Sub
Dim Field
Dim dictFields
Set dictFields = Server.CreateObject("Scripting.Dictionary")
For Each Field in Request.Form
If ValidateField(Request.Form(Field), Field) = False Then
dictFields.Add LCase(Field), true
End If
Next
If Request.Form.Count <> 0 And dictFields.Count = 0 Then
%>
Your message has been mailed!
It was sent to:
<%
Call Send
%>
Thank you for recommending us.
<%
Else
ShowFormField("Bert")
End If
%>
back to top
Lodge & Grounds | Adventures & Tours | Region | What to bring | Reservations
|
|