Postales/Cartoline <% Flag = request.form("Flag") If IsEmpty(Flag) or Flag = "" then %>

Un dovere morale Una lotta costante

Mondo Latino
Indice

Postal



Escribe el encabezamiento:




Escoge tu postal:

CUMPLEAÑOS

  ANIVERSARIOS


EVENTOS

 
NOSOTROS



Escribe tu mensaje:
  Mensaje:    
  A:
  Email:
  De:
  Email:


<% end if if flag = 1 then adestinatario = request.form("destinatario") aemail1 = request.form("email1") amittente = request.form("mittente") aemail2 = request.form("email2") atesto = request.form("testo") atitolo = request.form("titolo") apostale = request.form("postale") atesto = server.HTMLencode(Request.form("testo")) atesto = Replace(atesto, vbCrLf, "
") %>

Un dovere morale Una lotta costante

Mondo Latino
Indice

Postal
Anteprima

<%= atitolo %>

<%= atesto %>

A: <%= adestinatario %>


<%= aemail1 %>


De: <%= amittente %>


<%= aemail2 %>

<% End If If Flag = 2 then Randomize apass = int(rnd*99999)+1 adags = now() adestinatario = request.form("destinatario") aemail1 = request.form("email1") amittente = request.form("mittente") aemail2 = request.form("email2") atesto = request.form("testo") atitolo = request.form("titolo") apostale = request.form("postale") 'INSERT INTO kort (pass,dags,destinatario,email1,mittente,email2,testo,titolo,postale) Set Conn = Server.CreateObject("ADODB.Connection") strConn="DRIVER={Microsoft Access Driver (*.mdb)}; " strConn=strConn & "DBQ=" & Server.Mappath("/mdb-database/kort.mdb") Conn.Open strConn Set rs = Server.CreateObject("ADODB.Recordset") sql = "SELECT * FROM kort" rs.Open sql, conn,3,3 rs.AddNew() rs("pass") = apass rs("dags") = adags rs("destinatario") = adestinatario rs("email1") = aemail1 rs("mittente") = amittente rs("email2") = aemail2 rs("testo") = atesto rs("titolo") = atitolo rs("postale") = apostale rs.Update() rs.Close set rs = Nothing If err.number>0 then response.write "VBScript error:" & "

" response.write "Numero=" & err.number & "

" response.write "Descrizione.=" & err.description & "

" response.write "Help Context=" & err.helpcontext & "

" response.write "Help Path=" & err.helppath & "

" response.write "Native Error=" & err.nativeerror & "

" response.write "Source=" & err.source & "

" response.write "SQLState=" & err.sqlstate & "

" end if IF conn.errors.count> 0 then response.write "Errore accesso database" & "

" response.write rs & "

" for counter= 0 to conn.errors.count response.write "Errore #" & conn.errors(counter).number & "

" response.write "Descrizione. -> " & conn.errors(counter).description & "

" next Conn.Close set conn = nothing else Conn.Close set conn = nothing Set Conn = Server.CreateObject("ADODB.Connection") strConn="DRIVER={Microsoft Access Driver (*.mdb)}; " strConn=strConn & "DBQ=" & server.MapPath("/mdb-database/kort.mdb") Conn.Open strConn sql = "SELECT * FROM kort WHERE destinatario = " sql = sql & "'" & adestinatario & "'" sql = sql & " AND pass = " sql = sql & apass sql = sql & " ORDER BY id DESC;" 'rs.Open sqlstmt,conn,3,3 set rs = conn.Execute(sql) id = rs("id") Conn.Close Set conn = nothing nomeDominio = Request.ServerVariables ("HTTP_HOST") dim mailbody scriptname = Request.ServerVariables("script_name") scriptname = Replace(scriptname,"postale.asp","visione.asp") scriptname = "http://" & nomeDominio & scriptname mailbody = amittente & " te ha enviado una postal / ti ha inviato una cartolina" & Vbcrlf & vbcrlf mailbody = mailbody & "Puedes verla en la página / Puoi vederla alla pagina :" & vbcrlf mailbody = mailbody & ScriptName & "?id=" & id & "&pass=" & apass mailbody = mailbody & vbcrlf & vbcrlf mailbody = mailbody & "O visitar/O visitare " & scriptname & vbcrlf mailbody = mailbody & "Y introducir/E inserire" & vbcrlf mailbody = mailbody & "Id Postal/Id Cartolina = " & id & vbcrlf mailbody = mailbody & "Password Postal/Cartolina = " & apass & vbCrlf & vbcrlf blabla = "Postal de/ Cartolina da " & amittente 'Response.Write mailbody DIM iMsg, Flds, iConf 'Create message and configuration objects Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") Set Flds = iConf.Fields Flds(cdoSendUsingMethod) = cdoSendUsingPort Flds(cdoSMTPServer) = "smtp.aruba.it" Flds(cdoSMTPServerPort) = 25 Flds(cdoSMTPAuthenticate) = cdoAnonymous ' 0 Flds.Update With iMsg Set .Configuration = iConf .To = aemail1 .Sender = aemail2 .Subject = blabla .TextBody = mailbody .Send End With %>

Un dovere morale Una lotta costante

Mondo Latino
Indice


Gracias !

Postal enviada a : <%= adestinatario %>

De : <%= amittente %>


<% end if end if %>