|
<%
mycid=session("id")
response.Write mycid
set rs=server.createobject("adodb.recordset")
'
sql="select getprice.*,corporation.qymc from getprice,corporation where getprice.mycid="&mycid&" and corporation.id=getprice.sendcid order by getprice.id desc"
'response.write sql
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.write "对不起,没有您要查询的信息 "
else
msg_per_page=10 '定义每页显示记录条数
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"receivemessagelist.asp?page="¤tpage&""
else
call deleteannounce(cint(idlist))
response.Redirect"receivemessagelist.asp?page="¤tpage&""
end if
end if
%>
<%
response.write"您收到"
sql1="select count(id) from getprice where mycid="&mycid&" and sendflag<>1"
set totle=conn.execute(sql1)
totle=totle(0)
response.write" "&totle&" 条新留言"
totle.close
set totle=nothing
%> |
<%end if%>
|