<%if session("user")="" or session("pwd")="" then
response.redirect "index.asp"
end if
%>
<!--#include file="../INC/BBS_CONN.inc" -->
<%'管理员删除邮件-----------
if request("submit")="删除" then
 delsql="delete from mail where id="&request("id")
 conn.execute(delsql)
end if
'删除结束---------------

'管理员更新邮件-----------
if request("submit")="更新" then
 yijiban=request("yijiban")
 xcz_soft=request("xcz_soft")
 tzzh=request("tzzh")
 lu_stock=request("lu_stock")
 '设置订阅更新中的不订邮件
  if yijiban="" then
     yijiban=0
  end if
  if xcz_soft="" then
     xcz_soft=0
  end if
  if tzzh="" then
     tzzh=0
  end if
  if lu_stock="" then
     lu_stoc=0
  end if
'设置订阅更新中的不订邮件结束
 set rs1=server.createobject("ADODB.Recordset")
 sql="select * from mail where id="&request("id")
 rs1.open sql,conn,1,3
 rs1("yijiban")=cint(yijiban)
 rs1("xcz_soft")=cint(xcz_soft)
 rs1("tzzh")=cint(tzzh)
 rs1("lu_stock")=cint(lu_stock)
 rs1.update
 rs1.close
end if
'更新结束---------------

set rs=server.createobject("ADODB.Recordset")
sql="select * from mail"
rs.open sql,conn,1,3%>
<html>
<head>
<title>邮件列表：发送邮件</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../stockbbs.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellpadding="4">
  <tr> 
    <td align="center" bgcolor="#000099"><font color="#FFFFFF" size="5"><b>stockbbs网站信息管理中心</b></font></td>
  </tr>
</table>
<table width="100%" border="0">
  <tr> 
    <td align="right">如果暂时离开，请<a href="logout.asp"><font color="#FF0000">退出登录</font></a></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="px14">
  <tr align="center"> 
    <td width="20%"><a href="index.asp">新闻动态</a></td>
    <td width="20%"><a href="user.asp">用户管理</a></td>
    <td width="20%" bgcolor="#CFE0FA"><a href="mail.asp">邮件列表</a></td>
    <td width="20%">&nbsp;</td>
    <td width="20%">&nbsp;</td>
  </tr>
  <tr bgcolor="#CFE0FA" align="center"> 
    <td colspan="5"><a href="mail.asp"><span class="pt9">发送邮件</span></a><span class="pt9"><a href="modi_delete.asp"></a> 
      </span></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="3">
  <tr> 
    <td align="center" bgcolor="#F2F2F2"><font color="#0000CC" size="4">邮件管理</font></td>
  </tr>
</table>
<table width="100%" border="0">
  <tr>
    <td> 
      <table width="90%" border="0" align="center">
        <tr bgcolor="#FFFFCC"> 
          <td width="25%">邮 件</td>
          <td width="14%">一级半市场股票</td>
          <td width="13%">幸存者软件</td>
          <td width="13%">投资组合探讨</td>
          <td width="13%">老鲁股市杂谈</td>
          <td width="22%">更新/删除</td>
        </tr>
		<%while not rs.eof%>
		<form name="form<%=rs("id")%>" method="post" action="mail_manage.asp">
          <tr bgcolor="#F6F6F6"> 
            <td width="25%"><%=rs("email")%>&nbsp;</td>
            <td width="14%"> 
              <input type="checkbox" name="yijiban" value="1" <%if rs("yijiban")=True then%>checked<%end if%>>
            </td>
            <td width="13%"> 
              <input type="checkbox" name="xcz_soft" value="1" <%if rs("xcz_soft")=True then%>checked<%end if%>>
            </td>
            <td width="13%"> 
              <input type="checkbox" name="tzzh" value="1" <%if rs("tzzh")=True then%>checked<%end if%>>
            </td>
            <td width="13%"> 
              <input type="checkbox" name="lu_stock" value="1" <%if rs("lu_stock")=True then%>checked<%end if%>>
            </td>
            <td width="22%"> 
              <input type="hidden" name="id" value="<%=rs("id")%>">
              <input type="submit" name="Submit" value="更新">
              <input type="submit" name="Submit" value="删除">
            </td>
        </tr>
		</form>
		<%rs.movenext
		wend%>
      </table>
	  <%if rs.recordcount=0 then%>
      <div align="center"><font color="#FF0000" size="3">没有任何记录！</font> </div>
        <%end if
	  rs.close%>      
    </td>
  </tr>
</table>
</body>
</html>
