%
function TestCaptcha(byval valSession, byval valCaptcha)
dim tmpSession
valSession = Trim(valSession)
valCaptcha = Trim(valCaptcha)
if (valSession = vbNullString) or (valCaptcha = vbNullString) then
TestCaptcha = false
else
tmpSession = valSession
valSession = Trim(Session(valSession))
Session(tmpSession) = vbNullString
if valSession = vbNullString then
TestCaptcha = false
else
valCaptcha = Replace(valCaptcha,"i","I")
if StrComp(valSession,valCaptcha,1) = 0 then
TestCaptcha = true
else
TestCaptcha = false
end if
end if
end if
end function
%>
<%
opt=Request.QueryString("opt")
destinatario = Request.QueryString("destinatario")
IF opt="invia" THEN
if TestCaptcha("ASPCAPTCHA", Request.Form("captchacode")) then
'The code you enter verified
else
Response.Write "" & vbcrlf
Response.End()
end if
tipo_mail=1 ' 1=HTML - 0=TESTO
destinatario = "ycc@pidierre.it"
nome = Request.Form ("nome")
cognome = Request.Form ("cognome")
lnascita = Request.Form ("lnascita")
dnascita = Right("0"&Request.Form ("gg"),2)&"/"&Right("0"&Request.Form ("mm"),2)&"/"&Request.Form ("aaaa")
gg = Request.Form ("gg")
mm = Request.Form ("mm")
aaaa = Request.Form ("aaaa")
istituto = Request.Form ("istituto")
cittaistituto = Request.Form ("cittaistituto")
telefono = Request.Form ("telefono")
cellulare = Request.Form ("cellulare")
disciplina = Request.Form ("disciplina")
gruppo = Request.Form ("gruppo")
elenco_studenti = "
" & Replace(""&Request.Form ("elenco_studenti"),chr(13),"
")
email = Request.Form ("email")
note = Request.Form ("note")
messaggio = "" & vbcrlf
messaggio = messaggio & "Grazie per averci informato che stai lavorando alla presentazione di un progetto per il Concorso Young Creative Chevrolet 2013.
" & vbcrlf
messaggio = messaggio & "Di seguito riportiamo i dati da te inseriti:
" & vbcrlf
messaggio = messaggio & "" & "Nome: " & "" & " " & nome & "
" & vbcrlf
messaggio = messaggio & "" & "Cognome: " & "" & " " & cognome & "
" & vbcrlf
messaggio = messaggio & "" & "Data di nascita: " & "" & " " & dnascita & "
" & vbcrlf
messaggio = messaggio & "" & "Istituto di appartenenza: " & "" & " " & istituto & "
" & vbcrlf
messaggio = messaggio & "" & "Cittā Istituto: " & "" & " " & cittaistituto & "
" & vbcrlf
messaggio = messaggio & "" & "Disciplina: " & "" & " " & disciplina & "
" & vbcrlf
messaggio = messaggio & "" & "Telefono: " & "" & " " & telefono & "
" & vbcrlf
messaggio = messaggio & "" & "Cellulare: " & "" & " " & cellulare & "
" & vbcrlf
IF gruppo=1 THEN messaggio = messaggio & "" & "Gruppo altri studenti: " & "" & " " & elenco_studenti & "
" & vbcrlf
messaggio = messaggio & "" & "Note:" & "" & " " & note & "
" & vbcrlf
messaggio = messaggio & "" & "Indirizzo e-mail:" & "" & " " & Request.Form ("email") & "
" & vbcrlf
messaggio = messaggio & "" & "Privacy: " & "" & " " & Request.Form ("privacy") & "
" & vbcrlf
messaggio = messaggio & "Visita il sito del Concorso: ycc.pidierre.it/" & vbcrlf
messaggio = messaggio & "" & vbcrlf
subj = "Concorso YCC 2013"
Set oMail = Server.CreateObject("Persits.MailSender")
oMail.Host = "www.pdir.it"
oMail.FromName = "Chevrolet - Concorso YCC 2013"
oMail.From = email
oMail.Subject = subj
oMail.Body = messaggio
if tipo_mail = 1 then
oMail.IsHTML = true
else
oMail.IsHTML = False
end if
oMail.addAddress destinatario
oMail.addAddress email
On Error Resume Next
oMail.Send
If Err <> 0 Then
msg="Si č verificato un errore durate l'invio.
Controllate l'indirizzo inserito."
colore="#990000"
Else
msg="Registrazione effettuata con successo"
colore="#000000"
End If
set oMail= nothing
END IF
%>
![]() |
||||||||||
<% IF opt="invia" AND Len(""&msg)>0 THEN Response.Write "" & msg & "" ELSE %> Compila tutti campi oppure scarica il modulo ed invialo a ycc@piderre.it
|