%
FUNCTION CheckString (s, endchar)
pos = InStr(s, "'")
While pos > 0
s = Mid(s, 1, pos) & "'" & Mid(s, pos + 1)
pos = InStr(pos + 2, s, "'")
Wend
CheckString="'" & s & "'" & endchar
END FUNCTION
Sendto = "rookie@journey.com"
Sendto2 = "info@w3.skatelandfunzone.com"
RinkName = "Skateland FunZone"
Function verifyemail(emailaddress,isgood)
'split the email address at the @
breakemail=split(emailaddress, "@")
'how many parts are there? should be two.
maxparts=ubound(breakemail)
if maxparts>0 then
'good split, check the second part - split at the .
breakdomain=split(breakemail(1), ".")
'find out how many parts
maxdomain=ubound(breakdomain)
if maxdomain>0 then
'good - now check the lengths of everything to make sure its all there.
if (len(breakemail(0))>0) and (len(breakdomain(0))>0) and (len(breakdomain(1))>0) then
'set the flag - email should be good.
isgood=1
end if
end if
end if
verifyemail = isgood
end function
if request("action") = "sendit" then
isgood = 0
verifyResult = verifyemail(Request("sender"), isgood)
if isgood=0 or request("name") = "" or request("email_body") = "" or request("request_type") = "" then
result="Error"
msg="Error: Bad Email Address or missing information.
Please re-enter and try again."
end if
if result <> "Error" then
mySessionHandle = Int((6 ^ 9 * Rnd) + 1)
Set mail1 = CreateObject("Scripting.FileSystemObject")
filepath = "c:\inetpub\mailroot\pickup\" & mySessionHandle & ".eml"
'filepath = "c:\" & mySessionHandle & ".eml"
Set mail2 = mail1.CreateTextFile(filepath, True)
mail2.WriteLine "To: <" & Sendto & ">"
mail2.WriteLine "From: " & request("sender")
mail2.WriteLine "Subject: Info Request from a SkatelandFunzone.com visitor..."
'mail2.WriteLine "Date: " & Now() & " -500"
mail2.WriteLine "X-Priority: 1"
mail2.WriteLine "X-MSMail-Priority: High"
mail2.WriteLine "Importance: High"
mail2.WriteLine "X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700"
mail2.WriteLine ""
mail2.WriteLine ""
mail2.WriteLine ""
mail2.WriteLine "Senders Name: " & request("name")
mail2.WriteLine "Senders Email: " & request("sender")
mail2.WriteLine "Senders Phone: " & request("phone")
mail2.WriteLine "Information Request Type:" & Request("request_type")
mail2.WriteLine "Mail Text:"
mail2.WriteLine Request("email_body")
mail2.close
Set mailNotify = CreateObject("Scripting.FileSystemObject")
filepath2 = "c:\inetpub\mailroot\pickup\" & mySessionHandle & "b.eml"
'filepath2 = "c:\" & mySessionHandle & "b.eml"
Set mail3 = mailNotify.CreateTextFile(filepath2, True)
mail3.WriteLine "To: <" & Sendto2 & ">"
mail3.WriteLine "From: mailer@skatelandfunzone.com"
mail3.WriteLine "Subject: Info Request from a SkatelandFunzone.com visitor..."
'mail2.WriteLine "Date: " & Now() & " -500"
mail3.WriteLine "X-Priority: 1"
mail3.WriteLine "X-MSMail-Priority: High"
mail3.WriteLine "Importance: High"
mail3.WriteLine "X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700"
mail3.WriteLine ""
mail3.WriteLine ""
mail3.WriteLine "----------Informational Notfication Only-----------"
mail3.WriteLine "------Please Process Via the www-info account------"
mail3.WriteLine "-----SENT VIA A SERVICE MAILER - DO NOT REPLY------"
mail3.WriteLine ""
mail3.WriteLine "Senders Name: " & request("name")
mail3.WriteLine "Senders Email: " & request("sender")
mail3.WriteLine "Senders Phone: " & request("phone")
mail3.WriteLine "Information Request Type:" & Request("request_type")
mail3.WriteLine "Mail Text:"
mail3.WriteLine Request("email_body")
mail3.close
set Conn2 = Server.CreateObject("ADODB.Connection")
Conn2.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=F:\goskate.com\data\data\gosk8.mdb"
Name=Request("name")
EmailAdd =Request("sender")
SentTo="Skateland Funzone"
MessageText=Request("email_body")
ipaddr=request.servervariables("REMOTE_ADDR")
insert_sql = "INSERT INTO MailOut "
insert_sql = insert_sql & "("
insert_sql = insert_sql & "Name, "
insert_sql = insert_sql & "Email, "
insert_sql = insert_sql & "Message,"
insert_sql = insert_sql & "IPAddress, "
insert_sql = insert_sql & "WhichCenter)"
'values start here...
insert_sql = insert_sql & "VALUES("
insert_sql = insert_sql & CheckString(Request("Name"),",")
insert_sql = insert_sql & CheckString(EmailAdd,",")
insert_sql = insert_sql & CheckString(MessageText,",")
insert_sql = insert_sql & CheckString(ipaddr,",")
insert_sql = insert_sql & CheckString(SentTo,"")
insert_sql = insert_sql & ")"
Set RS2 = Conn2.Execute(insert_sql)
result = "Success"
end if
end if
%>
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() ![]() |
![]() |
![]() |
|||||