admin_mailist.asp
上传用户:comthink
上传日期:2021-05-06
资源大小:1280k
文件大小:3k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

HTML/CSS

  1. <!--#include file=conn.asp-->
  2. <!-- #include file="inc/const.asp" -->
  3. <!--#include file=inc/email.asp-->
  4. <title><%=txl_info(0)%>--管理页面</title>
  5. <!--#include file="inc/admin_css.asp"-->
  6. <meta NAME=GENERATOR Content="Microsoft FrontPage 3.0" CHARSET=GB2312>
  7. <BODY leftmargin="0" bottommargin="0" rightmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="#DDEEFF">
  8. <%
  9. if not supermaster or session("flag")="" then
  10. Errmsg=Errmsg+"<br>"+"<li>本页面为管理员专用,请<a href=admin_index.asp target=_top>登陆</a>后进入。<br><li>您没有管理本页面的权限。"
  11. call txl_error()
  12. else
  13. dim topic,mailbody
  14. i=1
  15. set rs= server.createobject ("adodb.recordset")
  16. if request("action")="send" then
  17. call sendmail()
  18. else
  19. call mail()
  20. end if
  21. end if
  22. sub mail()
  23. %>
  24. <form action="admin_mailist.asp?action=send" method=post>
  25. <table cellpadding="2" cellspacing="1" border="0" width="95%" class="tableBorder" align=center>
  26.                 <tr> 
  27.                   <th colspan="2">同学录邮件列表
  28.                   </th>
  29.                 </tr>
  30.                 <tr> 
  31.                   <td width="20%" class=txlrow>注意事项:</td>
  32.   <td class=txlrow>在完整填写以下表单后点击发送,信息将发送到所有注册时完整填写了信箱的用户,邮件列表的使用将消耗大量的服务器资源,请慎重使用。</td>
  33.                 </tr>
  34.                 <tr> 
  35.                   <td width="20%" class=txlrow>邮件标题:</td>
  36.   <td class=txlrow><input type=text name=topic size=60></td>
  37.                 </tr>
  38.                 <tr> 
  39.                   <td width="20%" class=txlrow>邮件内容:</td>
  40.   <td class=txlrow><textarea cols=80 rows=6 name="content"></textarea></td>
  41.                 </tr>
  42.                 <tr>  <td width="20%" class=txlrow></td>
  43.                   <td height=20 class=txlrow>
  44. <input type=Submit value="发 送" name=Submit"> &nbsp; <input type="reset" name="Clear" value="清 除">
  45.                   </td>
  46.                 </tr>
  47.               </table>
  48. </form>
  49. <%
  50. end sub
  51. sub sendmail()
  52. if request("topic")="" then
  53. Errmsg=Errmsg+"<br>"+"<li>请输入邮件标题。"
  54. founderr=true
  55. else
  56. topic=request("topic")
  57. end if
  58. if request("content")="" then
  59. Errmsg=Errmsg+"<br>"+"<li>请输入邮件内容。"
  60. founderr=true
  61. else
  62. mailbody=request("content")
  63. end if
  64. if founderr=false then
  65. on error resume next
  66. sql="select realname,email from [user]"
  67. rs.open sql,conn,1,1
  68. if not rs.eof and not rs.bof then
  69. alluser=rs.recordcount
  70. do while not rs.eof
  71. if rs("email")<>"" then
  72. useremail=rs("email")
  73. if txl_set(4)=0 then
  74. errmsg=errmsg+"<br>"+"<li>本同学录不支持发送邮件。"
  75. exit sub
  76. elseif txl_set(4)=1 then
  77. call jmail(useremail,topic,mailbody)
  78. elseif txl_set(4)=2 then
  79. call Cdonts(useremail,topic,mailbody)
  80. elseif txl_set(4)=3 then
  81. call aspemail(useremail,topic,mailbody)
  82. end if
  83. i=i+1
  84. end if
  85. rs.movenext
  86. loop
  87. Errmsg=Errmsg+"<br>"+"<li>成功发送"&i&"封邮件。"
  88. end if
  89. rs.close
  90. set rs=nothing
  91. conn.close
  92. set conn=nothing
  93. end if
  94. response.write ""&Errmsg&""
  95. end sub
  96. %>