<!--#include file="conn.asp" -->
<% adm_power_page=6 '分配本页的用户访问权限 %>
<!--#include file="admin_dn.asp" -->
<!--#include file="..\inc/config.asp" -->
<!--#include file="..\inc/mail_inc.asp" -->
<% 
 if Trim(Request.QueryString("w"))="out" then
  Set myfileobject=server.createobject("scripting.filesystemobject")
   if  Trim(Request.Form("txt"))="" then 
     txt="maillist.txt"
	 else
	 txt=Trim(Request.Form("txt"))
	 end if
   FilePath=server.mappath(txt)
  set fileName=myfileobject.createtextfile(FilePath,true)
  rs.open "user",conn,1,1
  s=0
  while not rs.eof 
  s=s+1
  fileName.writeline rs("email")
  rs.movenext
  wend 
  rs.close
 end if 

if Trim(Request.QueryString("w"))="send" then
 if jmail_info then
 rs.open "user",conn,1,1
 s=0
 while not rs.eof
 s=s+1
 
call SendMail(rs("email"),Request.Form("title"),Trim(Request.Form("body"))&jmail_qname)

rs.movenext
wend

%>
<script language="VBScript" type="text/VBScript">
msgbox "发送成功",64
</script>

<%
 Response.Write("邮件发送成功，一共发送了:"&s&"封email")
 end if
end if
 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>:::管理页面:::</title>
<link href="css.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="2" topmargin="0">
<div align="center"><font color="#FF0000"> </font></div>
<form name="form1" method="post" action="adm_mail.asp?w=send">
  <table width="80%" height="223" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#E8E8E8" bordercolorlight="" bordercolordark="ffffff">
    <tr> 
      <td height="19" colspan="2" bgcolor="#F3F3F3">将向所有用注册用户发送邮件</td>
    </tr>
    <tr> 
      <td width="20%" height="30" bgcolor="#F6F6F6">邮件主题：</td>
      <td width="80%"><input name="title" type="text" id="title"></td>
    </tr>
    <tr> 
      <td bgcolor="#F6F6F6">邮件内容：</td>
      <td><font color="#FF0000"> 
        <textarea name="body" cols="50" rows="8" id="body"></textarea>
        以html方式发送</font></td>
    </tr>
    <tr> 
      <td bgcolor="#F6F6F6">&nbsp;</td>
      <td><input type="submit" name="Submit" value="发送"></td>
    </tr>
  </table>
</form>
<p>&nbsp;</p>
<form name="form2" method="post" action="?w=out">
  <div align="center"> 
    <p><font color="#FF0000">E_mail地址导出 导出文件名: 
      <input name="txt" type="text" id="txt" value="maillist.txt" size="15">
      <input type="submit" name="Submit2" value="开始导出">
<% if Trim(Request.QueryString("w"))="out" then
 %>
      <a href="<%=txt%>" target="_blank">下载Email地址</a> 
      <% end if %></font></p>
  </div>
</form>
<p>&nbsp;</p>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><p><font color="#FF0000"><strong>注：</strong></font>这封email将发送到您所有的注册用户的邮箱里，用户比较多将会占用很大的服务器资源.最好是把Email地址导出后用email群发软件进行群发.</p>
      <p>下载破解版的Email群发软件<a href="http://www.52z.com/Index.asp?CateID=13&SubCateID=311" target="_blank">.请点这里.</a></p>
      <p></p>
</td>
  </tr>
</table>
<p>&nbsp; </p>
</body>
</html>
