<% Option Explicit %>
<!--#include file="../Inc/Cls_DB.asp" -->
<!--#include file="../Inc/Const.asp" -->
<%
if request("MemName")="" then
      Response.Write("<script>alert(""错误的参数"");location=""javascript:history.back()"";</script>")  
      Response.End
end if
Dim DBC,Conn
Set DBC = New DataBaseClass
Set Conn = DBC.OpenConnection()
Set DBC = Nothing
%>
<!--#include file="../Inc/MemberCheck.asp" -->
<%
dim Password,RsmessageObj,Messages,i
MemName = Session("MemName")
PassWord = Session("MemPassWord")
MemID = Session("MemID")
if request.Form("action")="dell" then
	if request.Form("actions")="del" then
 	 	 for i=1 to request.form("MeID").count
		conn.execute("Delete from Message where MeID="&clng(Request.form("Meid")(i)))
		Next
			  Response.Write("<script>alert(""删除成功"");location=""Message.asp?MemName="&session("MemName")&""";</script>")  
			  Response.End
	end if
	if request.Form("actions")="dels" then
 	 	 for i=1 to request.form("MeID").count
				conn.execute("Update Message set IsRecyle=true where MeID="&Request.form("Meid")(i))
		Next
			  Response.Write("<script>alert(""删除成功到回收站"");location=""Message.asp?MemName="&session("MemName")&""";</script>")  
			  Response.End
	end if
end if
%>
<html>
<head>
<link href="../CSS/css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>登陆成功_短信中心</title>
</head>

<body>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
  <tr> 
    <td><table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr bgcolor="#EFEFEF"> 
          <td width="26" height="32">&nbsp;</td>
          <td width="445"><b><font color="#000000"><b>登陆成功！</b></font></b></td>
          <td width="96"><div align="center"><a href="Usermain.asp">会员中心首页 </a></div></td>
          <td width="52"><div align="center"><font color="#FF0000"><a href="../Help/">帮助</a></font></div></td>
          <td width="72"><div align="center"><a href="Logout.asp"><font color="#FF0000">安全退出</font></a></div></td>
          <td width="9"></td>
        </tr>
      </table></td>
  </tr>
</table>
<br>
<table width="700" border="0" align="center" cellpadding="8" cellspacing="1" bgcolor="#CACACA" class="tabbgcolor">
  <tr> 
    <td height="315" valign="top" bgcolor="#FFFFFF" class="tabbgcolorli"> 
      <form name="form1" method="post" action="">
        <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="35"><font color="#FF0000"><a href="Messagewrite.asp?MemName=<%=session("MemName")%>"><img src="images/m_write.gif" width="40" height="40" border="0"></a><a href="Message1.asp?MemName=<%=Session("MemName")%>"><img src="images/M_recycle.gif" width="40" height="40" border="0"></a><a href="Message.asp?MemName=<%=Session("MemName")%>"><img src="images/o_inbox.gif" width="40" height="40" border="0"></a></font></td>
          </tr>
        </table>
        <table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
          <tr bgcolor="#EEEEEE" class="tabbgcolorlibg"> 
            <td width="6%"> <div align="center" class="Nblue9pt"><strong>已读</strong></div></td>
            <td width="57%"> <div align="center" class="Nblue9pt"><strong>主题</strong></div></td>
            <td width="29%"> <div align="center" class="Nblue9pt"><strong>日期</strong></div></td>
            <td width="8%"> <div align="center" class="Nblue9pt"><strong>操作</strong></div></td>
          </tr>
          <%
set RsMessageObj = Conn.Execute("select * from Message where MeRead='"& MemName &"' and IsRecyle=false order by MeID desc")
do while Not RsMessageObj.Eof
%>
          <tr bgcolor="#FFFFFF"> 
            <td> 
              <%
		  if RsMessageObj("ReadTF")=false then
%>
              <img src="images/m_news.gif" width="21" height="14"> 
              <%		  else%>
              <img src="images/m_olds.gif" width="21" height="14"> 
              <%end if
		  %>
            </td>
            <td> 
              <%
		  if RsMessageObj("ReadTF")=false then
		  response.Write("<a href=ReadMessage.asp?MemName="& MemName &"&MeID="&RsMessageObj("MeID")&"><b>"&RsMessageObj("MeTiTle")&"</b></a>")
		  else
		  response.Write("<a href=ReadMessage.asp?MemName="& MemName &"&MeID="&RsMessageObj("MeID")&">"&RsMessageObj("MeTiTle")&"</a>")
		  end if
		  %>
            </td>
            <td> 
              <%
		  if RsMessageObj("ReadTF")=false then
		  response.Write("<b>"&RsMessageObj("FromDate")&"</b>")
		  else
		  response.Write(""&RsMessageObj("FromDate")&"")
		  end if
		  %>
            </td>
            <td><div align="center"> 
                <input name="MeID" type="checkbox" id="MeID" value="<%=RsMessageObj("MeID")%>">
              </div></td>
          </tr>
          <%
	RsMessageObj.movenext
Loop
%>
          <tr bgcolor="#FFFFFF"> 
            <td colspan="4"><input name="actions" type="radio" value="del" checked>
              彻底删除 
              <input type="radio" name="actions" value="dels">
              删除到回收站 
              <input type="submit" name="Submit" value="执行操作">
              <input name="action" type="hidden" id="action" value="dell"></td>
          </tr>
        </table>
      </form> </td>
  </tr>
  <tr>
    <td bgcolor="#DFDFDF" class="tabbgcolorlileft">
<div align="center"> 
        <p class="tabbgcolorlileft">
          <%
		Dim Rsconfig
		set Rsconfig=conn.execute("select * from config")
		Response.Write(""&Rsconfig("Copyright")&"")
		Rsconfig.close
		set Rsconfig=nothing
		%>
        </p>
      </div></td>
  </tr>
</table>
</body>
</html>
