<%@LANGUAGE= " VBSCRIPT " CODEPAGE= " 1252 " %>
<%
Ustalony objConn = Server.CreateObject ("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Dane Source=" & _
Server.MapPath ("/ATO/NOCCDB/NOCCUsers.mdb") &"; "
objConn.Open
strMessage = prośba. Forma ("Wiadomość")
strMessage = zamieniać (strMessage, "'", "'' ")
strMessage = zamieniać (strMessage, vbCrLf, " ")
strSubject = prośba. Forma ("Temat")
strPersonAddedOn = prośba. Forma ("PersonAddedOn")
strComputerName = prośba. Forma ("ComputerName")
strLoggedBy = prośba. Forma ("LoggedBy")
strLog = prośba. Forma ("Bela")
'tworzyć podłączeniowy przedmiot
Ustawiać MesIns=CreateObject ("ADODB.Command")
MesIns.ActiveConnection=objConn
MesIns.com mandtext = "wszywka w Wyemitowany (Temat, PersonAddedOn, Wiadomość, ComputerName, LoggedBy, Bela) WARTOŚĆ (? ? ? ? ? ?)"
MesIns.Parameters.Append MesIns.CreateParameter ("@Subject", 200, (1), 255, strSubject)
MesIns.Parameters.Append MesIns.CreateParameter ("@PersonAddedOn", 200, (1), 255, strPersonAddedOn)
MesIns.Parameters.Append MesIns.CreateParameter ("@Message", 200, (1), 255, strMessage)
MesIns.Parameters.Append MesIns.CreateParameter ("@ComputerName", 200, (1), 255, strComputerName)
MesIns.Parameters.Append MesIns.CreateParameter ("@LoggedBy", 200, (1), 255, strLoggedBy)
MesIns.Parameters.Append MesIns.CreateParameter ("@Log", 200, (1), 255, strLog)
MesIns.Execute
Ciemnawy rsMailList
Ciemnawy rsMailList_numRows
Ustalony rsMailList = Server.CreateObject ("ADODB.Recordset")
rsMailList.ActiveConnection = objConn
rsMailList.Source = "WYBIÓRKA * OD ATO_Pagers"
rsMailList.CursorType = (0)
rsMailList.CursorLocation = 2
rsMailList.LockType = (1)
rsMailList.Open ()
rsMailList_numRows = (0)
%>
<%
Ciemnawy Repeat1__numRows
Ciemnawy Repeat1__index
Repeat1__numRows = -1
Repeat1__index = (0)
rsMailList_numRows = rsMailList_numRows + Repeat1__numRows
%>
Broadcast Message
<%
Podczas Gdy ((Repeat1__numRows <> (0)) I (NIE rsMailList.EOF))
%>
<%
Ciemnawy myBody
Ciemnawy mySubject
myBody = Request.Form ("Wiadomość") &" Sent "& Request.Form ("LoggedBy") & " "
mySubject = Request.Form ("temat")
Ciemnawy myMail
Ustalony myMail = Server.CreateObject ("CDONTS.NewMail")
myMail.BodyFormat=0
myMail.MailFormat=0
myMail.From = "[email protected]"
myMail.To = (rsMailList.Fields.Item ("PagerEmail"). Wartość) &"; "& (rsMailList.Fields.Item ("Email"). Wartość)
myMail.Subject = mySubject
myMail.Body = myBody
myMail.Send
ustalony myMail=nothing
%>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsMailList.MoveNext ()
Wend
%>
<%Response.Redirect "ThankYou1.asp " %>
<%
rsMailList.Close ()
Ustalony rsMailList = Nic
%>
|