
PK 
<!--#include file="includes/openconn.asp" -->
<!--#include file="includes/checkadmin.asp" -->
<%rs.Open "SELECT * FROM Pedidos WHERE idpedido = " & request("idpedido"),conn,2,2
rs.movefirst%>
<!--#include file="includes/datos_pedido.asp" -->
<%rs.Update
rs.Close
'--------------------------- CUENTA CORRIENTE%>
<!--#include file="includes/cuentacorriente.asp" -->
<%'--------------------------
if request("enviar") = "SI" then
dim textmail1,filemail,f,omail,Mailconf
rs.open "SELECT * FROM Q_pedidos WHERE idpedido = " & request("idpedido"),conn,3,1
rs.movefirst
Set filemail = server.CreateObject("Scripting.FileSystemObject")
Set f = filemail.OpenTextFile(server.MapPath("\") & "\mails\compra_iniciada.asp",1)
textmail1=f.Readall
set filemail = Nothing
set f = Nothing
textmail1 = replace(textmail1,"|||idpedido|||",rs("idpedido"))
textmail1 = replace(textmail1,"|||ped_monto|||",rs("ped_monto"))
textmail1 = replace(textmail1,"|||ped_costoenvio|||",rs("ped_costoenvio"))
textmail1 = replace(textmail1,"|||cli_estadocc|||",rs("cli_estadocc"))
textmail1 = replace(textmail1,"|||ped_nombre|||",rs("ped_nombre"))
textmail1 = replace(textmail1,"|||ped_email|||",rs("ped_email"))
Err=0
Set omail = Server.CreateObject("CDO.Message")
omail.To= rs("ped_email")
omail.From= "WEB Fe-cort<ventasonline@Fe-cortferreteriaindustrial.com>"
omail.Subject = "Acceso a estado de pedido " & rs("ped_nombre")
omail.htmlBody = textmail1
Set Mailconf = Server.CreateObject ("CDO.Configuration")
' Outgoing SMTP server
Mailconf.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1"
Mailconf.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
Mailconf.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
Mailconf.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
Set omail.Configuration = Mailconf
omail.send
Set omail=Nothing
rs.close
end if
conn.close
Response.Redirect("Pedidos.asp")%>


PK 99