|
|
Vintage Pièces
<%
if not Request.ServerVariables("REQUEST_METHOD") = "POST" then
'no recibo formulario, entonces lo muestro
%>
Si vous souhaitez que nous vous fassions parvenir une pièce de rechange pour votre équipement, remplissez le formulaire suivant. Les champs marqués d'un astérisque (*) sont obligatoires.N'oubliez pas de préciser le code de la pièce de rechange sinon 3€ supplémentaires vous seront facturés pour la codifier indépendamment des unités sollicitées. Frais de port : confère tarifs.
NOTE: Les champs marqués d'un astérisque (*) sont ogligatoires.
<%Else
'recojo los datos
Dim sMarca, sModelo, sNumserie, sCodigo,sUnidades, sDescripcion, sNombre, sApellidos
Dim sDireccion, sPoblacion, sProvincia, sCodPostal, sEmail, sTelefono, sFax
Dim sSistemaEntrega, sTipoEntrega, sSistemaPago, sNoInfoComercial, cuerpo, bEnviar
bEnviar = true
Set Upload = Server.CreateObject("Persits.Upload")
' we use memory uploads, so we must limit file size
Upload.SetMaxSize 100000, True
' capture an upload and save uploaded files (if any) in temp directory
On Error Resume Next
Upload.Save
' 8 is the number of "File too large" exception
If Err.Number = 8 Then
%>
Le fichier est trop grand.
La taille maximale autorisée est de 100kB.
Veuillez reéssayer.
|
<%
Else
If Err <> 0 Then
%>
Erreur, l'opération n'a pu être aboutie. |
<%
Else
sMarca = Upload.form("Marca")
sModelo = Upload.form("Modelo")
sNumserie = Upload.form("Numserie")
sCodigo = Upload.form("Codigo")
sUnidades = Upload.form("Unidades")
sDescripcion = Upload.form("Descripcion")
sNombre = Upload.form("Nombre")
sApellidos = Upload.form("Apellidos")
sDireccion = Upload.form("Direccion")
sPoblacion = Upload.form("Poblacion")
sProvincia = Upload.form("Provincia")
sCodPostal = Upload.form("CodPostal")
sEmail = Upload.form("Email")
sTelefono = Upload.form("Telefono")
sFax = Upload.form("Fax")
sSistemaEntrega = Upload.form("SistemaEntrega")
sTipoEntrega = Upload.form("TipoEntrega")
sSistemaPago = Upload.form("SistemaPago")
if sSistemaPago = "Otro" then
sSistemaPago = sSistemaPago & " - " & Upload.Form("txtOtro")
end if
sNoInfoComercial = Upload.form("NoInfoComercial")
'compongo el cuerpo del mensaje
cuerpo = "DATOS DEL RECAMBIO" & VBNEWLINE & VBNEWLINE
cuerpo = cuerpo & "Marca: " & sMarca & VBNEWLINE
cuerpo = cuerpo & "Modelo: " & sModelo & VBNEWLINE
'if not sNumSerie = "" then
cuerpo = cuerpo & "Número de serie: " & sNumSerie & VBNEWLINE
'end if
'if not sCodigo = "" then
cuerpo = cuerpo & "Código de recambio: " & sCodigo & VBNEWLINE
'end if
'if not sDescripcion = "" then
cuerpo = cuerpo & "Número de unidades: " & sUnidades & VBNEWLINE
'end if
'if not sDescripcion = "" then
cuerpo = cuerpo & "Descripción de recambio: " & sDescripcion & VBNEWLINE
'end if
cuerpo = cuerpo & VBNEWLINE
cuerpo = cuerpo & "DATOS DEL CLIENTE " & VBNEWLINE & VBNEWLINE
cuerpo = cuerpo & "Nombre: " & sNombre & VBNEWLINE
cuerpo = cuerpo & "Apellidos: " & sApellidos & VBNEWLINE
cuerpo = cuerpo & "Dirección: " & sDireccion & VBNEWLINE
cuerpo = cuerpo & "Población: " & sPoblacion & VBNEWLINE
cuerpo = cuerpo & "Provincia: " & sProvincia & VBNEWLINE
cuerpo = cuerpo & "Código Postal: " & sCodPostal & VBNEWLINE
'if not sEmail = "" then
cuerpo = cuerpo & "Correo Electrónico: " & sEmail & VBNEWLINE
'end if
cuerpo = cuerpo & "Teléfono: " & sTelefono & VBNEWLINE
'if not sFax = "" then
cuerpo = cuerpo & "Fax: " & sFax & VBNEWLINE
'end if
cuerpo = cuerpo & VBNEWLINE
cuerpo = cuerpo & "DATOS DE LA ENTREGA" & VBNEWLINE & VBNEWLINE
cuerpo = cuerpo & "Sistema de Entrega: " & sSistemaEntrega & VBNEWLINE
'if not sTipoEntrega = "" then
cuerpo = cuerpo & "Tipo de Entrega: " & sTipoEntrega & VBNEWLINE
'end if
'if not sSistemaPago = "" then
cuerpo = cuerpo & "Sistema de Pago: " & sSistemaPago & VBNEWLINE
'end if
cuerpo = cuerpo & VBNEWLINE
'if not sNoInfoComercial = "" then
cuerpo = cuerpo & "Protección de datos: " & sNoInfoComercial & VBNEWLINE
'end if
cuerpo = cuerpo & VBNEWLINE
'creo un cuerpo2 para el mensaje de la tranquilidad que se envia automaticamente
cuerpo2 = "Su solicitud está en curso, en breve recibirá la valoración de su pedido y el sistema de pago." & VBNEWLINE & "Gracias por contactar con nosotros." & VBNEWLINE & VBNEWLINE & VBNEWLINE
cuerpo2 = cuerpo2 & "DATOS DEL RECAMBIO" & VBNEWLINE & VBNEWLINE
cuerpo2 = cuerpo2 & "Marca: " & sMarca & VBNEWLINE
cuerpo2 = cuerpo2 & "Modelo: " & sModelo & VBNEWLINE
'if not sNumSerie = "" then
cuerpo2 = cuerpo2 & "Número de serie: " & sNumSerie & VBNEWLINE
'end if
'if not sCodigo = "" then
cuerpo2 = cuerpo2 & "Código de recambio: " & sCodigo & VBNEWLINE
'end if
'if not sDescripcion = "" then
cuerpo2 = cuerpo2 & "Número de unidades: " & sUnidades & VBNEWLINE
'end if
'if not sDescripcion = "" then
cuerpo2 = cuerpo2 & "Descripción de recambio: " & sDescripcion & VBNEWLINE
'end if
cuerpo2 = cuerpo2 & VBNEWLINE
cuerpo2 = cuerpo2 & "DATOS DEL CLIENTE " & VBNEWLINE & VBNEWLINE
cuerpo2 = cuerpo2 & "Nombre: " & sNombre & VBNEWLINE
cuerpo2 = cuerpo2 & "Apellidos: " & sApellidos & VBNEWLINE
cuerpo2 = cuerpo2 & "Dirección: " & sDireccion & VBNEWLINE
cuerpo2 = cuerpo2 & "Población: " & sPoblacion & VBNEWLINE
cuerpo2 = cuerpo2 & "Provincia: " & sProvincia & VBNEWLINE
cuerpo2 = cuerpo2 & "Código Postal: " & sCodPostal & VBNEWLINE
'if not sEmail = "" then
cuerpo2 = cuerpo2 & "Correo Electrónico: " & sEmail & VBNEWLINE
'end if
cuerpo2 = cuerpo2 & "Teléfono: " & sTelefono & VBNEWLINE
'if not sFax = "" then
cuerpo2 = cuerpo2 & "Fax: " & sFax & VBNEWLINE
'end if
cuerpo2 = cuerpo2 & VBNEWLINE
cuerpo2 = cuerpo2 & "DATOS DE LA ENTREGA" & VBNEWLINE & VBNEWLINE
cuerpo2 = cuerpo2 & "Sistema de Entrega: " & sSistemaEntrega & VBNEWLINE
'if not sTipoEntrega = "" then
cuerpo = cuerpo & "Tipo de Entrega: " & sTipoEntrega & VBNEWLINE
'end if
if not sSistemaPago = "" then
cuerpo2 = cuerpo2 & "Sistema de Pago: " & sSistemaPago & VBNEWLINE
end if
cuerpo2 = cuerpo2 & VBNEWLINE
'mando el correo
'creo el objeto correo
set mail = server.createObject("Persits.MailSender")
'configuro el mensaje
'señalo el servidor de salida para enviar el correo
mail.host = Application("Mail_Host")
mail.username = Application("Mail_User_Name_Recambios")
mail.password = Application("Mail_Password_Recambios")
'indico la dirección de correo del remitente
mail.from = Application("Mail_From_Recambios")
'indico la dirección del destinatario del mensaje
mail.addAddress Application("Mail_Address_Recambios")
'indico el asunto del mensaje
mail.Subject = "Pedido: " & sApellidos
' Handle attached file via Upload.Files collection.
' Check if a file was ineed uploaded
Set archivo = Upload.Files("Attachment")
If Not archivo Is Nothing Then
if archivo.imagetype = "UNKNOWN" then
bEnviar = false
%>
Le fichier n'est pas une image de type valide, veuillez vérifier au'elle soit en BMP, GIF, JPEG, PNG ou TIFF et reéssayez. |
<%
else
Mail.AddAttachmentMem archivo.filename, archivo.Binary
end if ' archivo.imagetype
End If ' archivo is nothing
'indico el cuerpo del mensaje
mail.body = cuerpo
if bEnviar then
'lo envio
'aseguro que no se presenten errores en la página si se producen
On Error Resume Next
mail.send
if Err <> 0 then
%>
Erreur, l'opération n'a pu être aboutie. |
<%
else
%>
Merci d'avoir remplit le formulaire, votre demande à bien été enregistrée. |
<%
'envio el mail de la tranquilidad
set mail2 = server.createObject("Persits.MailSender")
'configuro el mensaje
'señalo el servidor de salida para enviar el correo
mail2.host = Application("Mail_Host")
mail2.username = Application("Mail_User_Name_Recambios")
mail2.password = Application("Mail_Password_Recambios")
'indico la dirección de correo del remitente
mail2.from = Application("Mail_From_Recambios")
'indico la dirección del destinatario del mensaje
mail2.addAddress sEmail
'indico el asunto del mensaje
mail2.Subject = "Petición de recambio SETEM para " & sNombre & " " & sApellidos
mail2.body = cuerpo2
mail2.send
end if ' err <> 0
end if 'bEnviar
set mail = nothing
End If ' err <> 0
End If 'error.number
Set Upload = nothing
end if
%>
|
|