📄 admin_emaillist.asp
字号:
<td bgcolor="<% =strForumCellColor %>" align="center">
<% '--------Does user want spam?
if rs("M_RECMAIL") = "1" then
%>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><B>X</B></font>
<% else %>
<input type="checkbox" name="ID" value="<% =rs("MEMBER_ID") %>"><input type="hidden" name="Mail_ALL" value="<% =rs("MEMBER_ID") %>">
<% end if %>
</td>
<td><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="pop_profile.asp?mode=display&id=<%=RS("MEMBER_ID")%>"><% =rs("M_NAME") %></a></font></td>
<td><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="mailto:<% =rs("M_EMAIL") %>"><% =rs("M_EMAIL") %></a></font></td>
<td align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =rs("M_POSTS") %></font></td>
<td align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =MyRank %></td>
<td align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =ChkDate(rs("M_DATE"))%></font></td>
<td align=center><a href="pop_profile.asp?mode=Modify&ID=<% =rs("MEMBER_ID") %>&name=<% =rs("M_NAME") %>"><img src="images/icon_pencil.gif" alt="编辑会员" border="0" hspace="0"></a><a href="JavaScript:openWindow('pop_delete.asp?mode=Member&MEMBER_ID=<% =rs("MEMBER_ID") %>')"><img src="images/icon_trashcan.gif" alt="删除会员" border="0" hspace="0"></a></td>
</tr>
<%
rs.MoveNext
rec = rec + 1
loop
%>
<% end if %>
</table>
</td>
</tr>
<tr>
<td>分页:<% call Paging() %></td>
</tr>
<tr>
<td align="center"><BR><input type="button" value="选择本页全部会员" onClick="selectAll(this.form,1)">
<input type="submit" name="action" value="将讯息寄给所选择的会员">
<input type="submit" name="action" value="将讯息寄给所有会员"> <input type="reset" name="Reset" value="全部清除"></td>
</tr>
</table>
<%
'---------end pagename zip-o
elseif pagename="send" then
'-------------Start sending
%>
<%
My_ID = request.form("id")
Mail_All = request.form("Mail_All")
if My_ID = "*" then
THISESCUELL = "select * from " & strMemberTablePrefix & "MEMBERS where MEMBER_ID in (" & Mail_All & ")"
THISESCUELL = THISESCUELL & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1
THISESCUELL = THISESCUELL & " AND " & strMemberTablePrefix & "MEMBERS.M_EMAIL <> " & "''"
else
THISESCUELL = "select * from " & strMemberTablePrefix & "MEMBERS where MEMBER_ID in (" & My_ID & ")"
THISESCUELL = THISESCUELL & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1
THISESCUELL = THISESCUELL & " AND " & strMemberTablePrefix & "MEMBERS.M_EMAIL <> " & "''"
end if
strSQL= THISESCUELL
set RS=Server.CreateObject("ADODB.Recordset")
RS.Open strSQL, my_Conn, 1, 3
rs.MoveFirst
while not rs.EOF
strRecipientsName = RS.Fields("M_NAME")
strRecipients = RS.Fields("M_email")
strFrom = strSender
strSubject = request.form("SUBJECT")
strMessage = request.form("MESSAGE")
strArchive = request.form("ARCHIVE")
strL_DATE = DateToStr(now())
%>
<!--#INCLUDE FILE="inc_mail.asp" -->
<%
rs.MoveNext
wend
%>
<p><center><font face="<% =strDefaultFontFace %>"><h2>讯息已寄出</h2></font>
<BR>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">信件已寄给所选收件人。 <a href="admin_emaillist.asp">按这里</a>继续</center></font></p>
<%
if request.form("save") <> "" then
strSubject = replace(request.form("SUBJECT"),"'","''")
strMessage = replace(request.form("MESSAGE"),"'","''")
set conn = server.createobject ("adodb.connection")
conn.open My_Conn
conn.Execute "insert into FORUM_SPAM (SUBJECT, MESSAGE, F_SENT, ARCHIVE) values (" _
& "'" & strSubject & "', " _
& "'" & strMessage & "', " _
& "'" & strL_DATE & "', " _
& "'" & request.form("ARCHIVE") & "')"
end if
%>
<%
'---------end sending
elseif pagename="compose" then
'-------------Start composing
%>
<%
myMSG = Request.Form("MSG")
function getFormObject ()
if Request.ServerVariables("REQUEST_METHOD") = "GET" then
set getFormObject=Request.QueryString
else
set getFormObject=Request.Form
end if
end function
%>
<%
set oFormVars=GetFormObject()
if inStr(ucase(oFormVars("Action")),"SELECTED") > 0 then
selected=true
if oFormVars("ID") = "" then
%>
<h1>没有选择收件人</h1>
<%
response.end
end if
strSQL="select * from FORUM_MEMBERS where MEMBER_ID in (" & request.form("id") & ")"
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_EMAIL <> " & "''"
else
selected=false
strSQL="select * from FORUM_MEMBERS where MEMBER_ID in (" & request.form("Mail_All") & ")"
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_EMAIL <> " & "''"
end if
set RS=Server.CreateObject("ADODB.Recordset")
RS.Open strSQL, My_Conn, 1, 2
if myMSG <> "" then
strSql2 = "SELECT * FROM " &strMemberTablePrefix & "SPAM WHERE ID =" & myMSG
set rsSP = Server.CreateObject("ADODB.Recordset")
rsSP.open strSql2, My_Conn, 3
mySUBJECT = Server.HTMLEncode(rsSP("SUBJECT"))
myMESSAGE = rsSP("MESSAGE")
else
end if
Mail_All = request.form("Mail_All")
%>
<TABLE width="<% =strTableWidth %>" align="center">
<TR>
<TD align="center">
<h2>传送讯息</h2>
<form method="post" action="admin_emaillist.asp">
<input type="hidden" name="pagename" value="send">
<input type="hidden" name="Mail_All" value="<%= Mail_All %>">
<table bordercolor="<% =strTableBorderColor %>" border="0" cellspacing="0" cellpadding="4">
<tr>
<td><font face="arial">标题:</font></td><td><input type="text" name="SUBJECT" size="50" value="<%= mySUBJECT%>"></td>
</tr>
<tr>
<td colspan="2"><font face="arial">信件内容:</font></td>
</tr>
<tr>
<td colspan="2" align="center"><textarea name="MESSAGE" cols="50" rows="10" wrap="PHYSICAL"><%= myMESSAGE %></textarea></td>
</tr>
</table>
<input type="checkbox" name="save" value="1"> <font face="arial">以何种方式储存本讯息?</font>
<font face="宋体, Arial, Helvetica" size="2">
<select name="ARCHIVE" size="1">
<option value="0" SELECTED> 即时列表</option>
<option value="1"> 档案</option>
</select>
</font>
<input type="Submit" value="送出"> <input type="reset">
<%
if selected then
%>
<h4><i>此讯息将寄给下列用户:</i></h4>
<TABLE width="50%" BORDER=1 bordercolor="<% =strTableBorderColor %>" CELLSPACING=0 align="center" width="100%">
<TR>
<TH BGCOLOR=<% =strHeadCellColor %>><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">会员名</FONT></TH>
<TH BGCOLOR=<% =strHeadCellColor %>><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">邮件地址</FONT></TH>
</TR>
<%
On Error Resume Next
RS.MoveFirst
do while Not RS.eof
%>
<TR VALIGN=TOP>
<td bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><input type="hidden" name="ID" value="<%=RS("MEMBER_ID")%>"><a href="pop_profile.asp?mode=display&id=<%=RS("MEMBER_ID")%>"><% =rs("M_NAME") %></a></FONT> </TD>
<td bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =rs("M_EMAIL") %></FONT> </TD>
</TR>
<%
RS.MoveNext
loop%>
</table>
<%
else
%>
<h4><i>信息将发送至全部会员.</i></h4>
<input type="hidden" name="ID" value="*"><%
end if
%></form>
<%
else %>
<h1>Unknown Action</h1>
<p>You have specified an unknown action. Please try again.</p>
<%
response.end
end if
%>
</TD>
</TR>
</TABLE>
<%
set rsSP = nothing
set rs = nothing
%><!--#INCLUDE file="inc_footer.asp" --><% else %><%Response.Redirect "admin_login.asp" %>
<% end iF %>
<%
sub Paging2()
if maxpages > 1 then
if Request.QueryString("whichpage") = "" then
sPageNumber = 1
else
sPageNumber = Request.QueryString("whichpage")
end if
if Request.QueryString("method") = "" then
sMethod = "postsdesc"
else
sMethod = Request.QueryString("method")
end if
sScriptName = Request.ServerVariables("script_name")
Response.Write("<form name=""PageNum"" action=""members.asp?method=" & sMethod & """>")
Response.Write("<select name=""whichpage"" size=""1"" onchange=""ChangePage()"">")
for counter = 1 to maxpages
if counter <> cint(sPageNumber) then
Response.Write "<OPTION VALUE=""" & counter & """>第 " & counter & " 页"
else
Response.Write "<OPTION SELECTED VALUE=""" & counter & """>第 " & counter & " 页"
end if
next
Response.Write("</select>")
end if
end sub
sub Paging()
if maxpages > 1 then
if Request.QueryString("whichpage") = "" then
sPageNumber = 1
else
sPageNumber = Request.QueryString("whichpage")
end if
if Request.QueryString("method") = "" then
sMethod = "postsdesc"
else
sMethod = Request.QueryString("method")
end if
sScriptName = Request.ServerVariables("script_name")
Response.Write "<B>[ "
if myPage-10 > 0 then
Response.Write "<a href=""" & sScriptName & "?whichpage=" & StartPageNum-1 & "&method=" & sMethod & """>←</a> "
end if
For I = StartPageNum to EndPageNum
if I <> myPage then
Response.Write "<a href=""" & sScriptName & "?whichpage=" & I & "&method=" & sMethod & """>" & I & "</a> "
else
Response.Write "<font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & " color=" & strInsistFontColor & ">" & I & "</FONT> "
end if
Next
if EndPageNum < maxpages then
Response.Write "<a href=""" & sScriptName & "?whichpage=" & EndPageNum + 1 & "&method=" & sMethod & """>→</a> "
end if
Response.Write "]</B>"
end if
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -