?? admin_mailist.asp
字號:
<!--#include file=conn.asp-->
<!-- #include file="inc/const.asp" -->
<!--#include file=inc/char.asp-->
<!--#include file=inc/email.asp-->
<!--#include file=chkuser.asp-->
<title><%=ForumName%>--管理頁面</title>
<link rel="stylesheet" type="text/css" href="forum.css">
<BODY <%=ForumBody%>>
<%
if instr(session("flag"),"54")=0 then
Errmsg=Errmsg+"<br>"+"<li>本頁面為管理員專用,請<a href=admin_index.asp target=_top>登陸</a>后進入。<br><li>您沒有管理本頁面的權限。"
call Error()
else
dim rs,sql
dim topic,mailbody,email
dim i
i=1
set rs= server.createobject ("adodb.recordset")
call main()
end if
sub main()
%>
<table cellpadding=0 cellspacing=0 border=0 width=<%=tablewidth%> bgcolor=<%=tablebackcolor%> align=center>
<tr>
<td>
<table cellpadding=3 cellspacing=1 border=0 width=100%>
<tr bgcolor='<%=Tabletitlecolor%>'>
<td><font color="<%=TablefontColor%>">歡迎<b><%=membername%></b>進入管理頁面</fnot>
</td>
</tr>
<tr bgcolor=<%=tablebodycolor%>>
<td width="100%" valign=top><font color="<%=TableContentColor%>">
<%
if request("action")="send" then
call sendmail()
else
call mail()
end if
%></font>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
end sub
sub mail()
%>
<form action="admin_mailist.asp?action=send" method=post>
<table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<td colspan="2" bgcolor=<%=atabletitlecolor%> height=20> <font color="<%=TableContentColor%>">
<b>論壇郵件列表</b><br>
注意:在完整填寫以下表單后點擊發送,信息將發送到所有注冊時完整填寫了信箱的用戶,郵件列表的使用將消耗大量的服務器資源,請慎重使用。</font>
</td>
</tr>
<tr>
<td> <font color="<%=TableContentColor%>">郵件標題:</font></td>
<td><input type=text name=topic size=25></td>
</tr>
<tr>
<td> <font color="<%=TableContentColor%>">郵件內容:</font></td>
<td><textarea cols=35 rows=6 name="content"></textarea></td>
</tr>
<tr>
<td colspan="2" bgcolor=<%=atabletitlecolor%> height=20>
<input type=Submit value="發 送" name=Submit"> <input type="reset" name="Clear" value="清 除">
</td>
</tr>
</table>
</form>
<%
end sub
sub sendmail()
if request("topic")="" then
Errmsg=Errmsg+"<br>"+"<li>請輸入郵件標題。"
founderr=true
else
topic=request("topic")
end if
if request("content")="" then
Errmsg=Errmsg+"<br>"+"<li>請輸入郵件內容。"
founderr=true
else
mailbody=request("content")
end if
if founderr=false then
on error resume next
sql="select username,useremail from [user]"
rs.open sql,conn,1,1
if not rs.eof and not rs.bof then
alluser=rs.recordcount
do while not rs.eof
if rs("useremail")<>"" then
email=rs("useremail")
if EmailFlag=0 then
errmsg=errmsg+"<br>"+"<li>本論壇不支持發送郵件。"
exit sub
elseif EmailFlag=1 then
call jmail(email)
elseif EmailFlag=2 then
call Cdonts(email)
elseif EmailFlag=3 then
call aspemail(email)
end if
i=i+1
end if
rs.movenext
loop
Errmsg=Errmsg+"<br>"+"<li>成功發送"&i&"封郵件。"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
response.write ""&Errmsg&""
end sub
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -