<%@LANGUAGE="VBSCRIPT"%> SETEM - Buy and Sell
Web en Castellano Site français SETEM


Buy and Sell Insert Offer

 

Insert Offer

<% if not Request.ServerVariables("REQUEST_METHOD") = "POST" then 'no recibo formulario, entonces lo muestro %>

Contact details

Name*
Surnames*
Email
Telephone*
Fax

Equipment information

Type of product*
Brand*
Model*
Accessories
User's Manual* Yes No  
Attach image
  (the file must be smaller than 100 kB and its extension BMP, GIF, JPEG, PNG o TIFF )

Offer Information

Asking price*
General condition* Impeccable Good Regular
Working condition* Complete Partial

Observations:


 


NOTE
: the fields marked (*) are required.

<% else 'si que recibo un formulario, entonces lo trato 'recojo los datos Dim sNombre, sApellidos, sEmail, sTelefono, sFax, sTipoProducto, sMarca, sModelo, sAccesorios Dim sManualUsuario, sPrecioOferta, sEstadoEstetico, sEstadoFuncional, sObservaciones, cuerpo, fecha Dim sExt, bEnviar sExt = "" 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 %>
The file is too large.
Remember that the maximum size allowed is 100 kB.
Please try it again.
<% Else If Err <> 0 Then %>
Error!! It has not been possible to complete the operation.
<% Else fecha = now() sNombre = Upload.Form("Nombre") sApellidos = Upload. form("Apellidos") sEmail = Upload.Form("Email") sTelefono = Upload.Form("Telefono") sFax = Upload.Form("Fax") sTipoProducto = Upload.Form("TipoProducto") sMarca = Upload.Form("Marca") sModelo = Upload.Form("Modelo") sAccesorios = Upload.Form("Accesorios") sManualUsuario = Upload.Form("ManualUsuario") sPrecioOferta = Upload.Form("PrecioOferta") sEstadoEstetico = Upload.Form("EstadoEstetico") sEstadoFuncional = Upload.Form("EstadoFuncional") sObservaciones = Upload.Form("Observaciones") cuerpo = "OFERTA INSERTADA EL DIA " & fecha & vbnewline & vbnewline & vbnewline cuerpo = cuerpo & "DATOS DE CONTACTO" & vbnewline & vbnewline cuerpo = cuerpo & "Nombre: " & sNombre & vbnewline cuerpo = cuerpo & "Apellidos: " & sApellidos & vbnewline if not sEmail = "" then cuerpo = cuerpo & "Email: " & sEmail & vbnewline end if cuerpo = cuerpo & "Telefono: " & sTelefono & vbnewline if not sFax = "" then cuerpo = cuerpo & "Fax: " & sFax & vbnewline end if cuerpo = cuerpo & vbnewline cuerpo = cuerpo & "DATOS DEL EQUIPO" & vbnewline & vbnewline cuerpo = cuerpo & "Tipo de producto: " & sTipoProducto & vbnewline cuerpo = cuerpo & "Marca: " & sMarca & vbnewline cuerpo = cuerpo & "Modelo: " & sModelo & vbnewline if not sAccesorios = "" then cuerpo = cuerpo & "Accesorios: " & sAccesorios & vbnewline end if cuerpo = cuerpo & "Manual de usuario: " & sManualUsuario & vbnewline & vbnewline cuerpo = cuerpo & "DATOS DE LA OFERTA" & vbnewline & vbnewline cuerpo = cuerpo & "Precio oferta: " & sPrecioOferta & " Euros" & vbnewline cuerpo = cuerpo & "Estado estético: " & sEstadoEstetico & vbnewline cuerpo = cuerpo & "Estado funcional: " & sEstadoFuncional & vbnewline & vbnewline cuerpo = cuerpo & "OBSERVACIONES" & vbnewline & vbnewline if not sObservaciones = "" then cuerpo = cuerpo & sObservaciones & vbnewline end if cuerpo = cuerpo & vbnewline '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 = "mail.setem.es" mail.username = "parts@setem.es" mail.password = "setem2004" 'indico la dirección de correo del remitente mail.from = "parts@setem.es" 'indico la dirección del destinatario del mensaje mail.addAddress "parts@setem.es" 'indico el asunto del mensaje mail.Subject = "Inserción oferta dia " & fecha ' 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 %>
The file is not a valid image file, check if it is BMP, GIF, JPEG, PNG or TIFF and try it again.
<% else Mail.AddAttachmentMem archivo.Name, archivo.Binary sExt = archivo.ext cuerpo = cuerpo & "Extension archivo adjunto: " & sExt 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 %>
Error!! It has not been possible to complete the operation.

 

<% else %>
Thank you for filling in the form. It has been correctly sent and your offer is being processed.

<% end if ' err <> 0 end if 'bEnviar set mail = nothing End If ' err <> 0 End If 'error.number Set Upload = nothing end if %>