<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../conn/nosql.asp"-->
<!--#include file="../../conn/config.asp"-->
<!--#include file="../../conn/md5.asp"-->
<!--#include file="../../conn/headpage.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
 <%
if session("user")="" then
response.write "<script language='javascript'>"
response.write "alert('您没还有登录，请登录后再访问本页！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
end if
if session("id")="" then 
response.write "<script language='javascript'>"
response.write "alert('您没还有登录，请登录后再访问本页！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
end if
show=request("show")
if show="del" then
selAnnounce=nosql(request("selAnnounce"))
set rs=server.createobject("adodb.recordset")

sql="delete from [snsn_getprice1] where id in ("&selAnnounce&")"
conn.execute sql
response.write"<SCRIPT language=JavaScript>alert('删除成功，请返回！');"
response.write"location.href='sendmessagelist.asp'</SCRIPT>"
response.end
else
sql="select * from snsn_user where id="&session("id")&""
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>交易助手管理操作平台_<%=webname%></title>
<link rel="stylesheet" href="/css.css" type="text/css">
</head>
<body><!--#include file="../../top.asp"-->
<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
    <td width="970"><table width="970"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="10"><img src="/img/m_left.gif" width="10" height="20"></td>
          <td width="950" bgcolor="#FFFFFF"></td>
          <td width="10"><img src="/img/m_right.gif" width="10" height="20"></td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td height="188" colspan="3"><table width="950"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="1" bgcolor="efefef"></td>
                <td width="200" height="77" valign="top"><!--#include file="../left.asp"--></td>
                <td width="1" bgcolor="efefef"></td>
                <td valign="top"><p>
                  <%

sendcid=nosql(session("id"))
set rs=server.createobject("adodb.recordset") 
sql="select snsn_getprice1.*,snsn_user.username from snsn_getprice1,snsn_user where snsn_getprice1.sendcid="&sendcid&" and snsn_user.id=snsn_getprice1.sendcid order by snsn_getprice1.id desc"
'response.write sql
rs.open sql,conn,1,1 
if rs.eof or rs.bof then 
response.write "<p align='center'>对不起，没有您要查询的信息</p>" 
else 
rs.pagesize=msg_per_page '定义分页记录集每页显示记录数
if not (rs.eof and rs.bof) then
	totalrec=RS.RecordCount'总记录条数
	if rs.recordcount mod msg_per_page=0 then'计算总页数,recordcount:数据的总记录数
		n=rs.recordcount\msg_per_page'n:总页数
	else
		n=rs.recordcount\msg_per_page+1                        
	end if                                                                
	currentpage=request("page")'currentpage:当前页
	If currentpage <> "" then
		currentpage =  cint(currentpage)
		if currentpage < 1 then  
			currentpage = 1
		end if  
		if err.number <> 0 then '错误处理
			err.clear
			currentpage=1
		end if
	else
		currentpage=1
	End if                                                                
	if currentpage*msg_per_page > totalrec and not((currentpage-1)*msg_per_page < totalrec)then 
		currentPage=1
	end if
	rs.absolutepage=currentpage'absolutepage：设置指针指向某页开头
	rowcount=rs.pagesize'pagesize：设置每一页的数据记录数
end if

if not isempty(request("selAnnounce")) then
idlist=replace_text(request("selAnnounce"))
if instr(idlist,",")>0 then
idArr=split(idlist)
for i = 0 to ubound(idarr)
id=cint(idarr(i))
call deleteannounce(id)
next
response.Redirect"?page="&currentpage&""
else
call deleteannounce(cint(idlist))
response.Redirect"?page="&currentpage&""
end if
end if %>
                    </p>
                    <CENTER>
                      <Form name="search" method="POST" action="?show=del">
                        <TABLE border=0 cellPadding=3 cellSpacing=1 align="center">
                          <TBODY>
                            <TR>
                              <TD height=10>
                                <%
response.write"<b>您发出"
sql1="select count(id) from snsn_getprice1 where sendcid="&sendcid&" and sendflag<>1"
set totle=conn.execute(sql1)
totle1=totle(0)
response.write"<font color='#ff0000'> "&totle1&"</font> 条新留言</b>"
totle.close 
set totle=nothing
%></td>
                            </TR>
                          </TBODY>
                        </TABLE>
                        <TABLE width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolorlight="#D7EBFF" bordercolordark="#D7EBFF" bgcolor="#BBD7FF" 退定文件夹中。\	???毎??style="border-collapse: collapse">
                          <TR height=25 bgcolor="#e8f4ff">
                            <TD height="22" align="center"><font color="#Ff6600"><b>状态</b></font></TD>
                            <TD align="center"><font color="#Ff6600"><b>标题</b></font></TD>
                            <TD align="center"><font color="#Ff6600"><b>发给</b></font></TD>
                            <TD align="center"><font color="#FF6600"><b>时间</b></font></TD>
                            <TD width="40" align="center"><input name="submit" type='submit' value='删除' class="go-wenbenkuang"></TD>
                          </TR>
                          <%do while not rs.eof and rowcount > 0%>
                          <TR height="20" bgcolor="#ffffff">
                            <TD height="22" align="center">
                              <% if rs("sendFlag")=1 then %>
                              <font color="#666666">已读</font>
                              <%else%>
                              <font color="#FF0000">未读</font>
                              <%end if%></td>
                            <TD bgcolor="#ffffff">&nbsp;&nbsp;<a title="<%=rs("title")%>" href="readmessage1.asp?id=<%=rs("id")%>"><%=rs("title")%></a>　</td>
                            <TD align="center" bgcolor="#ffffff"><%=rs("username")%>　</td>
                            <TD align="center" bgcolor="#ffffff"> <%=rs("datetime")%></td>
                            <TD align="center" bgcolor="#ffffff"><input type='checkbox' name='selAnnounce' value='<%=cstr(rs("ID"))%>'></td>
                          </TR>
                          <%
rowcount=rowcount-1
rs.movenext
loop
%>
                        </TABLE>
                        <br>
                        <TABLE width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolorlight="#D7EBFF" bordercolordark="#D7EBFF" bgcolor="#BBD7FF" style="border-collapse: collapse">
                          <TR height=25 bgcolor="#e8f4ff">
                            <td bgcolor="#e8f4ff"><div align="center">
                                <%call listPages()%>
                            </div></td>
                          </tr>
                        </table>
                        <BR>
                        <BR>
                      </form>
                      <%end if%>
                    </center>
                </td>
              </tr>
          </table></td>
        </tr>
    </table></td>
    <td valign="top"><img src="/img/index_img.jpg" width="10"></td>
  </tr>
</table>
<%end if%>
<!--#include file="../../end.asp"-->
</body>
</html>
