<!--#include file="Top.asp" -->
<%
GetErrInfo=" 【提示：下面是您的短消息列表,请及时删除短消息,节省空间!】"
IF CblogObj.FormRequest("Action")="delete" And CblogObj.FormRequest("ArticleID")<>"" Then
	Dim ArticleID
	ArticleID=CblogObj.FormRequest("ArticleID")
	Conn.Execute "Delete From Message Where UserID="& Session("UserID") &" And ID IN("& ArticleID &")"
	CblogObj.GetHttpUrl("")
	Set CblogObj=Nothing
End IF
%>
<script language="javascript" src="../inc/js.js"></script>
<table width="99%" border="0" align="center" cellpadding="5" cellspacing="0">
  <tr> 
    <td height="30" bgcolor="#FFFFFF"><table width="200" border="0" align="right" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="120" class="box3"> <div align="center"><a href="Message_Post.Asp">发消息</a></div></td>
          <td>-</td>
          <td width="120" class="box3"> <div align="center"><a href="Message_List.Asp">我的消息</a></div></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td height="30" bgcolor="#FFFFFF" class="h1"><img src="img/GuestBook.gif" width="23" height="21"> 
      消息列表 
      <hr size="0"></td>
  </tr>
  <tr> 
    <td valign="top" bgcolor="#FFFFFF" class="h1"> <table width="100%" border="0" cellspacing="0" cellpadding="10">
        <tr> 
          <td class="box"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="2%" valign="middle"><img src="img/3.gif" width="16" height="16"></td>
                <td width="98%" valign="middle"><%=GetErrInfo%></td>
              </tr>
            </table></td>
        </tr>
        <tr height="5"> 
          <td height="5"></td>
        </tr>
      </table>
      <table width="100%" border="0" cellpadding="2" cellspacing="1" class="box2">
        <tr bgcolor="#CCCCCC"> 
          <td width="23" height="20"><img src="img/page.gif" width="20" height="20"></td>
          <td width="513"><strong>消息内容</strong></td>
          <td width="104"><strong>时间</strong></td>
          <td width="65"><strong>发送人</strong></td>
        </tr>
        <form name="form1" method="post" action="">
          <%
Dim SqlStr,RsCount,ArticleArr
Conn.Execute("Update Message Set Type=1 Where UserID="&Session("UserID")&" And Type=0")
SqlStr="select ID,Username,Message,Messdate from Message Where UserID="&Session("UserID")&" Order by ID desc"
Set Rs = Server.CreateObject("Adodb.RecordSet")
Rs.open SqlStr,Conn, 1, 1
SqlCount=SqlCount+1
If rs.eof Then
	response.write("<tr><td height=25 colspan=5><div align=center>没有任何短消息</div></td></tr>")
	RsCount=0
	MaxP=1
	Rs.Close:Set Rs=nothing
Else
	Rs.PageSize = 15
	MaxP=rs.PageCount
	rs.AbsolutePage=CblogObj.QueryPage
	RsCount=Rs.RecordCount
	ArticleArr = Rs.GetRows(15)
	Rs.Close:Set Rs=nothing
for iii=0 to Ubound(ArticleArr,2)
%>
          <tr class="tr2" onmouseover="this.className='tr1'" onmouseout="this.className='tr2'"> 
            <td><input type="checkbox" name="ArticleID" value="<%=ArticleArr(0,iii)%>"></td>
            <td><%=ArticleArr(2,iii)%></td>
            <td><%=ArticleArr(3,iii)%></td>
            <%IF ArticleArr(1,iii)="系统消息" OR ArticleArr(1,iii)="匿名网友" Then%>
            <td><%=ArticleArr(1,iii)%></td>
            <%Else%>
            <td><a href="Message_Post.asp?UserName=<%=ArticleArr(1,iii)%>" title="点击回复"><%=ArticleArr(1,iii)%></a></td>
            <%End IF%>
          </tr>
          <%
Next
End IF
%>
          <tr class="tr2"> 
            <td height="30" colspan="4"><div align="center"> 
                <INPUT name="all" type="button" onclick="CheckAll(this.form)" value="全选">
                <INPUT name="sall" type="button" onclick="CheckOthers(this.form)" value="反选">
                <input name="Submit" type="reset" value="重选">
                <INPUT name="subimt" type="submit" onClick="return ConfirmDel();" value="删除">
                <input name="Action" type="hidden" id="Action" value="delete">
              </div></td>
          </tr>
        </form>
        <tr class="tr2"> 
          <td height="30" colspan="4"> 
            <%CblogObj.PageList RsCount,CblogObj.QueryPage,15,20,false%>
          </td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td bgcolor="#FFFFFF">&nbsp;</td>
  </tr>
  <tr bgcolor="#0066CC" height="2"> 
    <td height="2"></td>
  </tr>
</table>


<!--#include file="Foot.asp" -->
