codice:
<%@LANGUAGE="Vbscript"%>
<%server.scripttimeout = 90000%>
<html>
<head>
<title>Invia richiesta aa</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
percorso = "/public/filebiglietti/"
ByteRicevuti = Request.TotalBytes
if ByteRicevuti > 0 then
DatiRicevuti = Request.BinaryRead(ByteRicevuti)
For i = 1 To lenB(DatiRicevuti)
FileBinario = FileBinario & chr(ascB(midB(DatiRicevuti,i,1)))
Next
FirmaFile = left(FileBinario,instr(FileBinario,"" & vbCrLf)-1)
ArrPezzi = split(FileBinario,FirmaFile)
for item = 1 to ubound(ArrPezzi)-1
Inizio = instr(ArrPezzi(item),"" & vbCrLf & "" & vbCrLf)
Intestazione = left(ArrPezzi(item),Inizio-1)
Inizio = Inizio + len("" & vbCrLf) + len("" & vbCrLf)
ContenutoFile = mid(ArrPezzi(item),Inizio,len(ArrPezzi(item))-Inizio-1)
if instr(Intestazione,"camponome") > 0 then
Cnome = ContenutoFile
Cnome = replace(Cnome,chr(34),""")
Cnome = replace(Cnome,"£","£")
Cnome = replace(Cnome,"&","&")
Cnome = replace(Cnome,"ì","ì")
Cnome = replace(Cnome,"<","<")
Cnome = replace(Cnome,">",">")
Cnome = replace(Cnome,"è","è")
Cnome = replace(Cnome,"é","é")
Cnome = replace(Cnome,"ò","ò")
Cnome = replace(Cnome,"ç","ç")
Cnome = replace(Cnome,"à","à")
Cnome = replace(Cnome,"°","°")
Cnome = replace(Cnome,"ù","ù")
Cnome = replace(Cnome,"§","§")
Cnome = replace(Cnome,"€","€")
end if
Response.Write(Cnome)
if instr(Intestazione,"campocognome") > 0 then
Ccognome = ContenutoFile
Ccognome = replace(Ccognome,chr(34),""")
Ccognome = replace(Ccognome,"£","£")
Ccognome = replace(Ccognome,"&","&")
Ccognome = replace(Ccognome,"ì","ì")
Ccognome = replace(Ccognome,"<","<")
Ccognome = replace(Ccognome,">",">")
Ccognome = replace(Ccognome,"è","è")
Ccognome = replace(Ccognome,"é","é")
Ccognome = replace(Ccognome,"ò","ò")
Ccognome = replace(Ccognome,"ç","ç")
Ccognome = replace(Ccognome,"à","à")
Ccognome = replace(Ccognome,"°","°")
Ccognome = replace(Ccognome,"ù","ù")
Ccognome = replace(Ccognome,"§","§")
Ccognome = replace(Ccognome,"€","€")
end if
if instr(Intestazione,"campotelefono") > 0 then
Ctelefono = ContenutoFile
Ctelefono = replace(Ctelefono,chr(34),""")
Ctelefono = replace(Ctelefono,"£","£")
Ctelefono = replace(Ctelefono,"&","&")
Ctelefono = replace(Ctelefono,"ì","ì")
Ctelefono = replace(Ctelefono,"<","<")
Ctelefono = replace(Ctelefono,">",">")
Ctelefono = replace(Ctelefono,"è","è")
Ctelefono = replace(Ctelefono,"é","é")
Ctelefono = replace(Ctelefono,"ò","ò")
Ctelefono = replace(Ctelefono,"ç","ç")
Ctelefono = replace(Ctelefono,"à","à")
Ctelefono = replace(Ctelefono,"°","°")
Ctelefono = replace(Ctelefono,"ù","ù")
Ctelefono = replace(Ctelefono,"§","§")
Ctelefono = replace(Ctelefono,"€","€")
end if
if instr(Intestazione,"campoemail") > 0 then
Cemail = ContenutoFile
Cemail = replace(Cemail,chr(34),""")
Cemail = replace(Cemail,"£","£")
Cemail = replace(Cemail,"&","&")
Cemail = replace(Cemail,"ì","ì")
Cemail = replace(Cemail,"<","<")
Cemail = replace(Cemail,">",">")
Cemail = replace(Cemail,"è","è")
Cemail = replace(Cemail,"é","é")
Cemail = replace(Cemail,"ò","ò")
Cemail = replace(Cemail,"ç","ç")
Cemail = replace(Cemail,"à","à")
Cemail = replace(Cemail,"°","°")
Cemail = replace(Cemail,"ù","ù")
Cemail = replace(Cemail,"§","§")
Cemail = replace(Cemail,"€","€")
end if
if instr(Intestazione,"campocitta") > 0 then
Ccitta = ContenutoFile
Ccitta = replace(Ccitta,chr(34),""")
Ccitta = replace(Ccitta,"£","£")
Ccitta = replace(Ccitta,"&","&")
Ccitta = replace(Ccitta,"ì","ì")
Ccitta = replace(Ccitta,"<","<")
Ccitta = replace(Ccitta,">",">")
Ccitta = replace(Ccitta,"è","è")
Ccitta = replace(Ccitta,"é","é")
Ccitta = replace(Ccitta,"ò","ò")
Ccitta = replace(Ccitta,"ç","ç")
Ccitta = replace(Ccitta,"à","à")
Ccitta = replace(Ccitta,"°","°")
Ccitta = replace(Ccitta,"ù","ù")
Ccitta = replace(Ccitta,"§","§")
Ccitta = replace(Ccitta,"€","€")
end if
if instr(Intestazione,"camporichiesta") > 0 then
Crichiesta = ContenutoFile
Crichiesta = replace(Crichiesta,chr(34),""")
Crichiesta = replace(Crichiesta,"£","£")
Crichiesta = replace(Crichiesta,"&","&")
Crichiesta = replace(Crichiesta,"ì","ì")
Crichiesta = replace(Crichiesta,"<","<")
Crichiesta = replace(Crichiesta,">",">")
Crichiesta = replace(Crichiesta,"è","è")
Crichiesta = replace(Crichiesta,"é","é")
Crichiesta = replace(Crichiesta,"ò","ò")
Crichiesta = replace(Crichiesta,"ç","ç")
Crichiesta = replace(Crichiesta,"à","à")
Crichiesta = replace(Crichiesta,"°","°")
Crichiesta = replace(Crichiesta,"ù","ù")
Crichiesta = replace(Crichiesta,"§","§")
Crichiesta = replace(Crichiesta,"€","€")
Crichiesta = replace(Crichiesta,chr(13),"
")
end if
if instr(Intestazione,"campoallegato1") > 0 then
i = instr(Intestazione,"filename=")
j = instr(i + 10,Intestazione,chr(34))
NomeUpload = mid(Intestazione,i + 10,j-i-10)
i = instrRev(NomeUpload,"\")
if i<>0 then
NomeFile = mid(NomeUpload,i + 1)
else
NomeFile = NomeUpload
end if
if i<>0 then
Set FSO = CreateObject("Scripting.FileSystemObject")
Upload1 = True
DimensioneFile1 = len(ContenutoFile)
EstensioneFile1 = right(ContenutoFile,3)
Callegato1 = replace(NomeFile," ","")
Set textStream = FSO.CreateTextFile(server.mappath(percorso & Cnome & Ccognome & Callegato1), True, False)
textStream.Write ContenutoFile
textStream.Close
Set textStream = Nothing
Set FSO = Nothing
end if
end if
if instr(Intestazione,"campoallegato2") > 0 then
i = instr(Intestazione,"filename=")
j = instr(i + 10,Intestazione,chr(34))
NomeUpload = mid(Intestazione,i + 10,j-i-10)
i = instrRev(NomeUpload,"\")
if i<>0 then
NomeFile = mid(NomeUpload,i + 1)
else
NomeFile = NomeUpload
end if
if i<>0 then
Set FSO = CreateObject("Scripting.FileSystemObject")
Upload1 = True
DimensioneFile1 = len(ContenutoFile)
EstensioneFile1 = right(ContenutoFile,3)
Callegato2 = replace(NomeFile," ","")
Set textStream = FSO.CreateTextFile(server.mappath(percorso & Cnome & Ccognome & Callegato2), True, False)
textStream.Write ContenutoFile
textStream.Close
Set textStream = Nothing
Set FSO = Nothing
end if
end if
if instr(Intestazione,"campoallegato3") > 0 then
i = instr(Intestazione,"filename=")
j = instr(i + 10,Intestazione,chr(34))
NomeUpload = mid(Intestazione,i + 10,j-i-10)
i = instrRev(NomeUpload,"\")
if i<>0 then
NomeFile = mid(NomeUpload,i + 1)
else
NomeFile = NomeUpload
end if
if i<>0 then
Set FSO = CreateObject("Scripting.FileSystemObject")
Upload1 = True
DimensioneFile1 = len(ContenutoFile)
EstensioneFile1 = right(ContenutoFile,3)
Callegato3 = replace(NomeFile," ","")
Set textStream = FSO.CreateTextFile(server.mappath(percorso & Cnome & Ccognome & Callegato3), True, False)
textStream.Write ContenutoFile
textStream.Close
Set textStream = Nothing
Set FSO = Nothing
end if
end if
next
dim html
html = html & "<HTML>"
html = html & "<BODY bgcolor=#FFFFFF>"
html = html & "<FONT size='3' face='verdana' color='#000000'>EMAIL DA WWW.AA.IT - OFFERTA BIGLIETTI DA VISITA - AR
</font>"
html = html & "<FONT size='2' face='verdana' color='#000000'>Nome: " & Cnome & "
"
html = html & "Cognome: " & Ccognome & "
"
html = html & "Telefono: " & Ctelefono & "
"
html = html & "E-mail: " & Cemail & "
"
html = html & "Città: " & Ccitta & "
"
html = html & "RICHIESTA:
" & Crichiesta & "
"
html = html & "ALLEGATO1: " & Cnome & Ccognome & Callegato1 & "
"
html = html & "ALLEGATO2: " & Cnome & Ccognome & Callegato2 & "
"
html = html & "ALLEGATO3: " & Cnome & Ccognome & Callegato3 & "</font>"
html = html & "</body>"
html = html & "</html>"
DIM iMsg, Flds, iConf
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds.Update
With iMsg
Set .Configuration = iConf
.To = "aa@aa.it"
.From = "info@aa.it"
.Sender = "info@aa.it"
.Subject = "E-MAIL DA WWW.AA.IT - OFFERTA BIGLIETTI DA VISITA"
.htmlBody = html
.Send
End With
Response.Redirect("ringraziamentibiglietti AR.html")
end if
%>
</body>
</html>