%@LANGUAGE="VBSCRIPT"%>
<%
'--> Logica de la pagina
bValidado = false 'Variable que checa si se validó todo o no
bSubmit = false
bSubmit = getPostVar("submitting")
If bSubmit="1" then
bSubmit = true
Else
bSubmit = false
End if
set oErrores = new clsErrBag
'Definir variables
Dim sName, sAmPm, sHour 'etc....
sName = Trim(receiveURI(request.Form("name")))
'dtActualDate = Trim(receiveURI(request.Form("actual_date")))
dtReceiveDate = Trim(receiveURI(request.Form("receive_date")))
sEmail = Trim(receiveURI(request.Form("email")))
sAmPm = Trim(receiveURI(request.Form("am/pm")))
sHour = Trim(receiveURI(request.Form("hour")))
sHourCom = sHour & " " & sAmPm
sService = Trim(receiveURI(request.Form("service")))
iPassengers = Trim(receiveURI(request.Form("passengers")))
sRoute = Trim(receiveURI(request.Form("route")))
iLength = Trim(receiveURI(request.Form("length")))
sNeeds = Trim(receiveURI(request.Form("needs")))
'EMpieza validación
If bSubmit then
bValidado = true
dim arr(10,2) 'Arreglo para formar correo
'Name ---> OBLIGATORIO
If valIsNull(sName) then ' Para campo OBLIGATORIO
oErrores.addError VAL_ERR_NAME, "name" 'Texto del error está en validation.asp, el "name" es el nombre con el que vamos a buscar el error mas adelante
bValidado = false 'Hay por lo menos UN error
End if
arr(0,0) = sName 'Se guarad el valor de la variable
arr(0,1) = "Name" 'Se guarad el nombre de la variable, para el correo
'Actual date
' If valIsNull(dtActualDate) then
' oErrores.addError VAL_ERR_DATE, "Actualdate"
' bValidado = false
' End if
' If IsDate(dtActualDate) then
' oErrores.addError VAL_ERR_DATE, "Actualdate"
' bValidado = false
' End if
arr(1,0) = now()
arr(1,1) = "Actual date"
'Service date
If valIsNull(dtReceiveDate) then
oErrores.addError VAL_ERR_DATE, "Servicedate"
bValidado = false
End if
If not IsDate(dtReceiveDate) then
oErrores.addError VAL_ERR_DATE, "Servicedate"
bValidado = false
End if
arr(2,0) = dtReceiveDate
arr(2,1) = "Service date"
'Number of passengers
If valIsNull(iPassengers) then
oErrores.addError VAL_ERR_PASSENGERS, "passengers"
bValidado = false
End if
If not IsNumeric(iPassengers) then
oErrores.addError VAL_ERR_PASSENGERS, "passengers"
bValidado = false
End if
arr(3,0) = iPassengers
arr(3,1) = "Number of passengers"
'Email
If valIsNull(sEmail) then
oErrores.addError VAL_ERR_EMAIL, "email"
bValidado = false
End if
If not valIsValidEmail(sEmail) then
oErrores.addError VAL_ERR_EMAIL_INVALID, "email"
bValidado = false
End if
arr(4,0) = sEmail
arr(4,1) = "Email"
arr(5,0) = sHourCom
arr(5,1) = "Hour"
arr(6,0) = sService
arr(6,1) = "Service Type"
arr(7,0) = sRoute
arr(7,1) = "Route"
arr(8,0) = iLength
arr(8,1) = "Length"
arr(9,0) = sNeeds
arr(9,1) = "Special needs"
If bValidado then 'SI no hubo errores, se forma el cuerpo del correo
'body = "
" & vbCrLf
body = ""
for i=0 to 10
body = body _
& arr(i,1) _
& ": " _
& arr(i,0) & vbCrLf
'& "
" _
'& "
" _
'& arr(i,1) _
'& ":
" _
'& ": " _
'& "
" _
'& arr(i,0)
'& "
" _
'& "
" & vbCrLf
next
'body = body & "
" & vbCrLf
'***********Direccion de FROM en el correo
' If IsNada(sEmail) then
' replyTo="no-reply@caboonline.com"
' Else
' replyTo = sEmail
' End if
'*********************** EMAIL!!!
recipients = "info@vipclasstours.com" 'TO
replyTo = recipients ' FROM
'*********************** SUBJECT!!!
subject = "Correo página de reservaciones"
'Se manda el correo
sendMail recipients,replyTo,subject,body,sName
response.Redirect("reservation_thankyou.htm")
End if
End if
bOnloadEvent = true 'To populate the textarea
%>
Tours Reservations - VIP Class Tours and Services. Puerto Vallarta, México
Pre-scheduling your airport transfer is an easy and convenient way to get ahead star on a great vacation! It’s simple… Just fill the following form and a driver will be waiting for your arrival at the Puerto Vallarta International Airport holding a sign with our logo, your name and your destination.