% ' ******************************** ' devis suregrip ' ******************************** ' ' cette page permet d'envoyer un mail à contact@alliance-pm.fr ' on recupere les champs du formulaire ' on upload si il y un fichier à uploadé ' on envoie le mail mailsend = 0 ' traitements if request.totalbytes > 0 then '''''''''''''''''Debut d'upload''''''''''''''''' ' Variables ' ********* Dim mySmartUpload Dim file1,file2 Dim intcount Dim nom_du_fichier1 Dim nom_du_fichier2 Dim fonction Dim nom Dim prenom Dim adresse Dim code_postal Dim ville Dim telephone Dim fax Dim email Dim infoplus Dim projet Dim maitreoeuvre Dim maitreouvrage Dim responsablechantier Dim telephonechantier Dim lieuduchantier Dim dateintersouhait Dim surface Dim typebitume Dim etatbitume Dim agebitume Dim ouvertbitume Dim typebeton Dim etatbeton Dim agebeton Dim ouvertbeton Dim precision Dim precisionsautres Dim couleurbauxite Dim traitementlargeur Dim intervention Dim gestioncircul Dim balayeuse Dim fso Dim MyString Dim plan Dim schema Dim ind Dim msg Dim mail nom_du_fichier1 = "" nom_du_fichier2 = "" Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload") 'fichiers refusés mysmartUpload.DeniedFilesList = "exe,bat,com" ' taille max = 5 Meg mysmartUpload.MaxFileSize = 5000000 mySmartUpload.Upload ' recuperation des informations fonction = mySmartUpload.form("fonction") nom = mySmartUpload.form("nom") prenom = mySmartUpload.form("prenom") adresse = mySmartUpload.form("adresse") code_postal = mySmartUpload.form("code_postal") ville = mySmartUpload.form("ville") telephone = mySmartUpload.form("telephone") fax = mySmartUpload.form("fax") email = mySmartUpload.form("email") infoplus= mySmartUpload.form("infoplus") projet = mySmartUpload.form("projet") maitreoeuvre= mySmartUpload.form("maitreoeuvre") maitreouvrage= mySmartUpload.form("maitreouvrage") responsablechantier= mySmartUpload.form("responsablechantier") telephonechantier= mySmartUpload.form("telephonechantier") lieuduchantier= mySmartUpload.form("lieuduchantier") dateintersouhait = mySmartUpload.form("dateintersouhait") surface = mySmartUpload.form("surface") typebitume= mySmartUpload.form("typebitume") etatbitume= mySmartUpload.form("etatbitume") agebitume= mySmartUpload.form("agebitume") ouvertbitume= mySmartUpload.form("ouvertbitume") typebeton= mySmartUpload.form("typebeton") etatbeton= mySmartUpload.form("etatbeton") agebeton= mySmartUpload.form("agebeton") ouvertbeton= mySmartUpload.form("ouvertbeton") precision= mySmartUpload.form("precision") precisionsautres= mySmartUpload.form("precisionsautres") couleurbauxite= mySmartUpload.form("couleurbauxite") traitementlargeur= mySmartUpload.form("traitementlargeur") intervention= mySmartUpload.form("intervention") gestioncircul= mySmartUpload.form("gestioncircul") balayeuse= mySmartUpload.form("balayeuse") For each file In mySmartUpload.Files If not file.IsMissing Then set fso = server.CreateObject("scripting.FileSystemObject") MyString = Split(file.FileName, ".", -1) nom_du_fichier = LCase(Mystring(0) &"."& Mystring(1)) ind = 0 While fso.FileExists(Server.MapPath("../../pieces_jointes/" &nom_du_fichier)) ind = ind + 1 nom_du_fichier = Mystring(0) & ind &"."& Mystring(1) Wend file.saveAs(Server.MapPath("../../pieces_jointes/" &nom_du_fichier)) select case file.Name case "fichier1" : plan =nom_du_fichier case "fichier2" : schema = nom_du_fichier End select intCount = intCount + 1 'permet de compter le nombre de fichiers uploadés End If Next Set mySmartUpload=nothing '''''''''''''''''''''fin d'upload''''''''''''''''''''''''' ' construction du message msg = "Envoi d'e-mail de la page 'devis général' du site APM" & vbNewLine & vbNewLine &_ "Expéditeur : " & nom & " " & prenom & vbNewLine &_ "fonction : " & fonction & vbNewLine &_ "adresse : " & adresse & vbNewLine &_ "cp/ville : " & code_postal & "/" & ville & vbNewLine &_ "telephone : " & telephone & vbNewLine &_ "fax : " & fax & vbNewLine & vbNewLine &_ "informations supplémentaires : " & infoplus & vbNewLine & vbNewLine &_ "Description du projet : "& vbNewLine & projet & vbNewLine & vbNewLine &_ "maitre d'oeuvre : " & maitreoeuvre & vbNewLine &_ "maitre d'ouvrage : " & maitreouvrage & vbNewLine &_ "responsable de chantier : " & responsablechantier & vbNewLine &_ "telephone chantier : " & telephonechantier & vbNewLine &_ "lieu du chantier : " & lieuduchantier & vbNewLine &_ "dateintersouhait : " & dateintersouhait & vbNewLine &_ "surface : " & surface & vbNewLine &_ "typebitume : " & typebitume & vbNewLine &_ "etatbitume : " & etatbitume & vbNewLine &_ "agebitume : " & agebitume & vbNewLine &_ "ouvertbitume : " & ouvertbitume & vbNewLine &_ "typebeton : " & typebeton & vbNewLine &_ "etatbeton : " & etatbeton & vbNewLine &_ "agebeton : " & agebeton & vbNewLine &_ "ouvertbeton : " & ouvertbeton & vbNewLine &_ "precision : " & precision & vbNewLine &_ "precisionsautres : " & precisionsautres & vbNewLine &_ "couleurbauxite : " & couleurbauxite & vbNewLine &_ "traitementlargeur : " & traitementlargeur & vbNewLine &_ "intervention : " & intervention & vbNewLine &_ "gestioncircul : " & gestioncircul & vbNewLine &_ "balayeuse : " & balayeuse & vbNewLine & vbNewLine &_ "fichiers joints : "& vbNewLine &_ "fichiers plan : "& plan & vbNewLine &_ "fichiers schema : "& schema ' envoi du mail Set mail = Server.CreateObject("CDONTS.NewMail") mail.To = "contact@alliance-pm.fr" mail.From = email mail.Subject = "Demande de devis suregrip APM" mail.Body = msg if plan <> "" Then mail.attachFile server.mapPath("../../pieces_jointes/"& plan) End if if schema <> "" Then mail.attachFile server.mapPath("../../pieces_jointes/"& schema) End if mail.Send mailsend = 1 end if %>
|