%@LANGUAGE="VBSCRIPT" CODEPAGE="1253"%>
<% if Request.QueryString("action") = "send" then %>
<%
Dim formErrors, invalidFDate, invalidSDate, invalidDates
formErrors = "no"
invalidFDate = "no"
invalidSDate = "no"
invalidDates = "no"
if request.Form("FullName") = "" OR request.Form("Age") = "" OR request.Form("EMail") = "" OR Request.Form("model") = "" OR Request.Form("fDate") = "" OR Request.Form("sDate") = "" OR Request.Form("pickupLocation") = "" OR Request.Form("dropBackLocation") = "" then
formErrors = "yes"
end if
If Request.Form("addDriver") = "yes" then
if Request.Form("addDriverFullName") = "" OR Request.Form("addDriverAge") = "" then
formErrors = "yes"
end if
end if
If Request.Form("PaymentMethod") = "Credit Card" then
if Request.Form("ccType") = "" OR Request.Form("ccNum") = "" OR Request.Form("ccDateMon") = "" OR Request.Form("ccDateYear") = "" then
formErrors = "yes"
end if
end if
todayDate = date()
todayDateYYYYPart = DatePart("YYYY", todayDate)
if Len(DatePart("M", todayDate)) = 1 then
todayDateMPart = "0" & DatePart("M", todayDate)
else
todayDateMPart = DatePart("M", todayDate)
end if
if Len(DatePart("D", todayDate)) = 1 then
todayDateDPart = "0" & DatePart("D", todayDate)
else
todayDateDPart = DatePart("D", todayDate)
end if
todayDateSerial = todayDateYYYYPart & todayDateMPart & todayDateDPart
If Request.Form("fDate") <> "" then
fDateDate = Request.Form("fDate")
fDateDateYYYYPart = DatePart("YYYY", fDateDate)
if Len(DatePart("M", fDateDate)) = 1 then
fDateDateMPart = "0" & DatePart("M", fDateDate)
else
fDateDateMPart = DatePart("M", fDateDate)
end if
if Len(DatePart("D", fDateDate)) = 1 then
fDateDateDPart = "0" & DatePart("D", fDateDate)
else
fDateDateDPart = DatePart("D", fDateDate)
end if
fDateSerial = fDateDateYYYYPart & fDateDateMPart & fDateDateDPart
If todayDateSerial >= fDateSerial then
invalidFDate = "yes"
end if
end if
If Request.Form("sDate") <> "" then
sDateDate = Request.Form("sDate")
sDateDateYYYYPart = DatePart("YYYY", sDateDate)
if Len(DatePart("M", sDateDate)) = 1 then
sDateDateMPart = "0" & DatePart("M", sDateDate)
else
sDateDateMPart = DatePart("M", sDateDate)
end if
if Len(DatePart("D", sDateDate)) = 1 then
sDateDateDPart = "0" & DatePart("D", sDateDate)
else
sDateDateDPart = DatePart("D", sDateDate)
end if
sDateSerial = sDateDateYYYYPart & sDateDateMPart & sDateDateDPart
If todayDateSerial >= sDateSerial then
invalidSDate = "yes"
end if
end if
If Request.Form("fDate") <> "" AND Request.Form("sDate") <> "" then
If fDateSerial >= sDateSerial then
invalidDates = "yes"
end if
end if
If formErrors = "no" then
' ******************** move on *******************************
mailFrom = "FullName: " & request.Form("FullName") & vbcrlf
mailAge = "Age: " & request.Form("Age") & vbcrlf
mailFrommail = "E-mail: " & request.Form("EMail") & vbcrlf
mailPeronalDetails = "PERSONAL DETAILS" & vbcrlf & "----------------------------------------------------------------------" & vbcrlf & mailFrom & mailAge & mailFrommail & vbcrlf & vbcrlf
' *************************************
mailLocalPhone = "Local Phone No: " & request.Form("LocalPhone") & vbcrlf
mailMobilePhone = "Mobile No: " & request.Form("MobilePhone") & vbcrlf
mailContactDetails = "CONTACT DETAILS" & vbcrlf & "----------------------------------------------------------------------" & vbcrlf & mailLocalPhone & mailMobilePhone & vbcrlf & vbcrlf
' *************************************
mailSecondDriverName = "Additional driver details: " & Request.Form("addDriverFullName") & vbcrlf
mailSecondDriverAge = "Additional driver age: " & Request.Form("addDriverAge") & vbcrlf
If Request.Form("addDriver") = "yes" then
mailSecondDriverDetails = "ADDITIONAL DRIVER DETAILS" & vbcrlf & "----------------------------------------------------------------------" & vbcrlf & mailSecondDriverName & mailSecondDriverAge & vbcrlf & vbcrlf
else
mailSecondDriverDetails = "ADDITIONAL DRIVER DETAILS" & vbcrlf & "----------------------------------------------------------------------" & vbcrlf & "No additional driver" & vbcrlf & vbcrlf
end if
' *************************************
mailVehicle = "Vehicle: " & request.Form("model") & vbcrlf
if request.Form("addBabySeat") = "yes" then
mailVehicle = mailVehicle & "Baby seat: yes" & vbcrlf
else
mailVehicle = mailVehicle & "Baby seat: no" & vbcrlf
end if
mailFirstday = "Pick up Date: " & Request.Form("fDate") & " | " & "Pick up Time: " & Request.Form("fTime") & vbcrlf
mailLastday = "Return Date: " & Request.Form("sDate") & " | " & "Return Time: " & Request.Form("sTime") & vbcrlf
mailPickupPlace = "Pick up place: " & Request.Form("pickupPlace") & vbcrlf
if Request.Form("pickupPlace") = "Airport" then
mailPickupPlace = mailPickupPlace & "Flight Number: " & Request.Form("flightNo") & vbcrlf
elseif Request.Form("pickupPlace") = "Port" then
mailPickupPlace = mailPickupPlace & "Sea Company: " & Request.Form("seaComp") & vbcrlf
elseif Request.Form("pickupPlace") = "Hotel" then
mailPickupPlace = mailPickupPlace & "Hotel name & address: " & Request.Form("hotelDet") & vbcrlf
end if
mailPickupPlace = mailPickupPlace & " / " & Request.Form("pickupLocation")
mailDeliveryPlace = "Return place: " & Request.Form("deliveryPlace") & vbcrlf & " / " & Request.Form("pickupLocation")
mailOrderDetails = "ORDER DETAILS" & vbcrlf & "----------------------------------------------------------------------" & vbcrlf & mailVehicle & mailFirstday & vbcrlf & mailPickupPlace & vbcrlf & vbcrlf & mailLastday & vbcrlf & mailDeliveryPlace & vbcrlf & vbcrlf
' *************************************
mailPaymentMethod = "Payment Method: " & request.Form("PaymentMethod") & vbcrlf
If Request.Form("PaymentMethod") = "Credit Card" then
mailPaymentMethod = mailPaymentMethod & "Credit Card Type: " & Request.Form("ccType") & vbcrlf & "Credit Card Number: " & Request.Form("ccNum") & vbcrlf & "CVV: " & Request.Form("ccNum0") & vbcrlf & "Credit Card Expires: " & Request.Form("ccDateMon") & "/" & Request.Form("ccDateYear") & vbcrlf
end if
' *************************************
mailComments = "Comments: " & request.Form("Comments")
mailSubj = "OnLine Booking :: SANTORINI"
emailFromAccount = "onlinebooking@odysseys.gr"
emailPass = "0dy553y5b00"
smtpAccount = "mail.odysseys.gr"
emailToAccount = "rentals@odysseys.gr"
' emailToAccount = "vadim@nidus.gr"
%>
<%
set Message = Server.CreateObject("CDO.Message")
Message.From = emailFromAccount
Message.Subject = mailSubj
Message.BodyPart.charset = "windows-1253"
Message.TextBody = "ONLINE BOOKING :: SANTORINI" & vbcrlf & vbcrlf & mailPeronalDetails & mailContactDetails & mailSecondDriverDetails & mailOrderDetails & mailPaymentMethod & mailComments
Message.To = emailToAccount
with Message.Configuration
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpAccount
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = "25"
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = emailFromAccount
.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = emailPass
.Fields.Update
end with
Message.Send
Set Message = Nothing
set ReplyMessage = Server.CreateObject("CDO.Message")
ReplyMessage.From = emailFromAccount
ReplyMessage.Subject = "odysseys.gr > AUTO RESPONDER"
ReplyMessage.BodyPart.charset = "windows-1253"
ReplyMessage.TextBody = "Please do not reply to this message." & vbcrlf & vbcrlf & "_______________________________________________________________________" & vbcrlf & vbcrlf & "Your application form has been sent to our department. Thank you for using our agency. We will be in touch with you shortly to confirm your reservation." & vbcrlf & vbcrlf & "_______________________________________________________________________"
ReplyMessage.To = Trim(request.Form("EMail"))
with ReplyMessage.Configuration
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpAccount
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = "25"
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = emailFromAccount
.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = emailPass
.Fields.Update
end with
ReplyMessage.Send
Set ReplyMessage = Nothing
if err.number = 0 then
Response.Redirect("thankyou.htm")
else
Response.Redirect("index04.asp?mailRes=error")
end if
' ******************** move on END *******************************
end if
%>
<% end if %>
<%
if Request.QueryString("action") = "send" AND formErrors = "yes" then
pageStatus = "0"
end if
%>
Santorini Rent a Car - Odysseys Car Rentals