<% 'if this is a request to send the form details to the client if request("action") = "doSendEmail" then DateRequired=TRIM(replace(Request("DateRequired"),"'","''")) TimeRequired=TRIM(replace(Request("TimeRequired"),"'","''")) Location=TRIM(replace(Request("Location"),"'","''")) CeremonyType=TRIM(replace(Request("CeremonyType"),"'","''")) FullName=TRIM(replace(Request("FullName"),"'","''")) Address=TRIM(replace(Request("Address"),"'","''")) Phone=TRIM(replace(Request("Phone"),"'","''")) Email=TRIM(replace(Request("Email"),"'","''")) SpecialComments=TRIM(replace(Request("SpecialComments"),"'","''")) Comments=TRIM(replace(Request("Comments"),"'","''")) 'lets check the captcha string SubmittedCaptchaCode=TRIM(replace(Request("hdcaptcha"),"'","''")) TheActualCaptchaCode=Session("HDWCAPTCHA") set cks = Server.CreateObject("CkString.CkString") cks.Str = TheActualCaptchaCode caseSensitive = 0 if cks.Matches(SubmittedCaptchaCode,caseSensitive) then else response.redirect "availability.asp?hdwmsg=invalid" end if ip1=Request.Servervariables("REMOTE_ADDR") browserlang=Request.ServerVariables("HTTP_ACCEPT_LANGUAGE") browsertype=Request.ServerVariables("HTTP_USER_AGENT") referer=Request.ServerVariables("HTTP_REFERER") 'now we need to set some variables in the email MailTo="info@andrewhunter.eu" MailFrom="DO-NOT-REPLY@andrewhunter.eu" MailSubject="Availability Form from " & FullName & " Time: " & FormatDateTime(Now, 4) 'create the email body EmailBody = EmailBody & "Availability Form from andrewhunter.eu" & vbCRLF EmailBody = EmailBody & "" & vbCRLF EmailBody = EmailBody & "Time Stamp: " & FormatDateTime(Date, 1) & " - " & FormatDateTime(Now, 4) & vbCRLF EmailBody = EmailBody & "" & vbCRLF EmailBody = EmailBody & "Contact Details" & vbCRLF EmailBody = EmailBody & "-------------------------------" & vbCRLF EmailBody = EmailBody & "Name: " & FullName & vbCRLF EmailBody = EmailBody & "Email: " & Email & vbCRLF EmailBody = EmailBody & "Tel: " & Phone & vbCRLF EmailBody = EmailBody & "Address: " & Address & vbCRLF EmailBody = EmailBody & "" & vbCRLF EmailBody = EmailBody & "Ceremony Details" & vbCRLF EmailBody = EmailBody & "-------------------------------" & vbCRLF EmailBody = EmailBody & "Date Required: " & DateRequired & vbCRLF EmailBody = EmailBody & "Time: " & TimeRequired & vbCRLF EmailBody = EmailBody & "Location: " & Location & vbCRLF EmailBody = EmailBody & "Special Comments: " & SpecialComments & vbCRLF EmailBody = EmailBody & "Comments: " & Comments & vbCRLF EmailBody = EmailBody & "" & vbCRLF EmailBody = EmailBody & "Session Details" & vbCRLF EmailBody = EmailBody & "-------------------------" & vbCRLF EmailBody = EmailBody & "IP: " & ip1 & vbCRLF EmailBody = EmailBody & "Browser Language: " & browserlang & vbCRLF EmailBody = EmailBody & "Browser Type: " & browsertype & vbCRLF Set objMessage = CreateObject("CDO.Message") objMessage.Subject = MailSubject objMessage.From = MailFrom objMessage.To = MailTo objMessage.TextBody = EmailBody objMessage.Send Set objMessage = nothing response.redirect "/availability.asp?s=1" end if %> Availability
Availability


Availability

<% if request("s") = "1" then %>
Thank You.

Your details have been submitted and we will get back to you as soon as possible.
<% else %>
<% If request.querystring("errors") = "1" or request("hdwmsg") = "invalid" Then %>
Form Error - Please correct one or more errors with the form.
<% response.write "
" end if %>
Before completing the form below, please go to my availability calendar (click here) to see if I have availability for the day you have in mind. If there is restricted availability or the date shows no restrictions – please contact me using the form below to ensure I can offer you the time you are seeking.

If I can confirm the date, I will send you all relevant documentation and hold your date provisionally for one full calendar month. A “confirm by” date will be given and if, by that date, your confirmation and deposit have not been received, the date will automatically be made available to other enquirers.

* = required information
  security code

Please enter the code from the box above into the field below before sending your form.


<% if Request.QueryString("hdwmsg") = "invalid" then response.write "
" end if %> <% HDWCaptchaInvalidMessage %> <% if Request.QueryString("hdwmsg") = "invalid" then response.write "
" end if %>
 
<% end if %>