Advertisement
Guest User

Untitled

a guest
Nov 12th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
  2. <!--redirect.asp-->
  3. <!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows 2000 Library" -->
  4. <!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4" NAME="ADODB Type Library" -->
  5. <%
  6. pp = Request.QueryString("link_pp")
  7.  
  8. set conn = server.createObject("ADODB.Connection")
  9. conn.open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & server.mapPath("\mdb-database\Easy.mdb")
  10.  
  11. sql = "SELECT link_url, link_id, link_name, link_sk, link_offerte, link_offerte2, link_offerteLM, link_mail, link_pp, comune, pr, PPmail FROM clicks WHERE link_pp = '" & Replace(pp, "'", "''") & "'"
  12. set rs = conn.execute(sql)
  13. if not rs.eof then
  14. codice = rs("link_id")
  15. nome = rs("link_name")
  16. comune = rs("comune")
  17. pr = rs("pr")
  18. PPmail = rs("PPmail")
  19. conn.execute("UPDATE clicks SET link_click = link_click + 1 WHERE link_id = " & codice)
  20. end if
  21. rs.close
  22. set rs = nothing
  23.  
  24. conn.close
  25. set conn = nothing
  26.  
  27.  
  28. DIM corpoMessaggio, numeroCampi, invioA, invioDa, nomeDominio, indirizzoIp, modulo, browserSistemaOperativo
  29.  
  30. '* voce da modificare con il proprio indirizzo email
  31.  
  32. invioA = "[email protected]"
  33. invioA = "PPmail"
  34.  
  35. '* voce da modificare con un indirizzo email che funga da mittente:
  36. '* in caso di errore riceverete notifica a questo indirizzo un MAILER-DAEMON
  37. '* dato che cdosys supporta questa notifica
  38.  
  39. invioDa = "[email protected]"
  40.  
  41. '------------fine modifiche necessarie------------------
  42.  
  43. nomeDominio = Request.ServerVariables("HTTP_HOST")
  44. indirizzoIp = Request.ServerVariables("REMOTE_ADDR")
  45. modulo = Request.ServerVariables("HTTP_REFERER")
  46. browserSistemaOperativo = Request.ServerVariables("HTTP_USER_AGENT")
  47.  
  48. '*aggiungo il messaggio relativo alla url cliccata
  49.  
  50. corpoMessaggio = "URL cliccata: " & mail
  51. corpoMessaggio = corpoMessaggio & " Struttura: " & codice & " - " & nome & " sita in " & comune & " (" & pr & ")"
  52.  
  53.  
  54. '* creo gli oggetti cdosys sul server e li gestisco
  55.  
  56. DIM iMsg, Flds, iConf
  57.  
  58. Set iMsg = CreateObject("CDO.Message")
  59. Set iConf = CreateObject("CDO.Configuration")
  60. Set Flds = iConf.Fields
  61.  
  62. Flds(cdoSendUsingMethod) = cdoSendUsingPort
  63. Flds(cdoSMTPServer) = "smtp.aruba.it"
  64. Flds(cdoSMTPServerPort) = 25
  65. Flds(cdoSMTPAuthenticate) = cdoAnonymous ' 0
  66. Flds.Update
  67.  
  68. With iMsg
  69. Set .Configuration = iConf
  70. .To = invioA
  71. .From = Request.Form("email")
  72. .Sender = invioDa
  73. .Subject = " Click di Redirect_PP!!! " & nomeDominio
  74. .TextBody = " Questi i dati relativi al click di Redirect_PP " & modulo & " da utente con indirizzo IP " & indirizzoIp & " browser e sistema operativo " & browserSistemaOperativo & vbCrLf & corpoMessaggio & ""
  75. .Send
  76. End With
  77.  
  78. Response.Redirect pp
  79. %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement