<%
id = request("id")
msg = request("msg")
ann = request("ann")
evaso = request("evaso")
track = request("track")
sconto= request("sconto")
paginaOriginale="../ordine2.asp?id="& id
if track = "" and sconto = "" then
sql = "SELECT * FROM tracking"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3
rs.addnew
rs.fields("ido") = id
rs.fields("tipo") = msg
rs.fields("data") = now
rs.update
end if
sql = "SELECT * FROM ordini where id = "&id
Set rs2 = Server.CreateObject("ADODB.Recordset")
rs2.Open sql, conn, 3, 3
ling = rs2.fields("ling")
idm = rs2.fields("idm")
if evaso <> "" then
rs2.fields("evaso") = "s"
end if
if ann <> "" then
rs2.fields("annulato") = "s"
end if
if evaso <> "" or ann <> "" then
rs2.update
end if
if track <> "" then
rs2.fields("track") = track
end if
if sconto <> "" then
rs2.fields("sconto") = sconto
end if
if sconto <> "" or track <> "" then
rs2.update
end if
on error resume next
sql = "SELECT * FROM membri where id = "&idm
Set rs3 = Server.CreateObject("ADODB.Recordset")
rs3.Open sql, conn, 3, 3
if ling = "ita" then
strMsgHeader = "Ciao" & rs3.fields("nome") & " " & rs3.fields("cnome") & " c'e' stata o hai fatto una modifica all'ordine n°:" & id & vbCrLf & vbCrLf
strMsgHeader = strMsgHeader & "Potrai visionare il tuo ordine alla pagina"& vbCrLf & vbcrlf
strMsgHeader = strMsgHeader & "http://www.gtworld.tv/ordine.asp?id="& id & vbCrLf & vbcrlf
strMsgHeader = strMsgHeader & "------------------------------------------------------------------" & vbcrlf
strMsgHeader = strMsgHeader & "Ciao"& vbCrLf
strMsgHeader = strMsgHeader & "Foxxy"& vbcrlf & vbcrlf
Set Mail2 = Server.CreateObject("CDONTS.NewMail")
Mail2.MailFormat = html
Mail2.from = "ordini@gtworld.tv"
Mail2.to = rs3.fields("email")
Mail2.Subject = "Modifica dell' Ordine n°:" & id
Mail2.Body = (strMsgHeader) & vbCrLf & vbCrLf & "** Original-IP:" & Request.ServerVariables("REMOTE_ADDR")
Mail2.Importance = 2
Mail2.Send
end if
if ling <> "ita" then
strMsgHeader = "Hello" & rs3.fields("nome") & " " & rs3.fields("cnome") & " your order N°" & id & "had a change " & vbCrLf & vbCrLf
strMsgHeader = strMsgHeader & "Yuo can see your order on page"& vbCrLf & vbcrlf
strMsgHeader = strMsgHeader & "http://www.gtworld.tv/ordine.asp?id="& id & vbCrLf & vbcrlf
strMsgHeader = strMsgHeader & "------------------------------------------------------------------" & vbcrlf
strMsgHeader = strMsgHeader & "bye"& vbCrLf
strMsgHeader = strMsgHeader & "Foxxy"& vbcrlf & vbcrlf
Set Mail2 = Server.CreateObject("CDONTS.NewMail")
Mail2.MailFormat = html
Mail2.from = "ordini@gtworld.tv"
Mail2.to = rs3.fields("email")
Mail2.Subject = "Modded on order n°:" & id
Mail2.Body = (strMsgHeader) & vbCrLf & vbCrLf & "** Original-IP:" & Request.ServerVariables("REMOTE_ADDR")
Mail2.Importance = 2
Mail2.Send
end if
%>
<script language="JavaScript">
window.location.replace("<%=paginaOriginale%>");
</script>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>

Rispondi quotando