<% dim exec, rs, page, recordcount dim rs1, pagecount, strpageList rem strpagelist是分页显示的字符串 dim topNum if theUser.master then exec="select top 1 privateNum from const" else exec="select top 1 privateNum from blyh where name='"& theUser.name &"' " end if set rs=conn.execute(exec) RecordCount=rs(0) rs.close page=encodestr(Request.querystring("page")) if page="" or not isNumeric(page) then page=1 else page=int(page) end if pageCount=RecordCount/rcPerPage pageCount=int(pageCount) if (RecordCount mod rcPerPage)>0 then PageCount=PageCount +1 end if if page>pageCount then page=pageCount end if %> <%=sitetitle%>
<% strPageList=pageList() response.write (strPageList) if theUser.master then if page<=1 then exec="select top "&rcPerpage&" * from ly where rt=0 and IsPrivate<>0 order by istop desc,reid desc" else exec="select count(*) from ly where istop=1 and rt=0 and IsPrivate<>0" set rs=conn.execute(exec) topNum=rs(0) exec="select count(*) from ly where istop=1 and rt=0 and IsPrivate<>0 and reid1 and rt=0 and isPrivate<>0 order by reid desc) " set rs=conn.execute(exec) topNum=rs(0) rs.close exec="select top "&rcPerpage&" * from ly where rt=0 and istop<>1 and isPrivate<>0 and reid0 order by reid desc) order by reid desc" end if else if page<=1 then exec="select top "&rcPerpage&" * from ly where rt=0 and IsPrivate<>0 and bl=1 and name='"& theUser.name &"' order by istop desc,reid desc" else exec="select count(*) from ly where istop=1 and rt=0 and IsPrivate<>0 and bl=1 and name='"& theUser.name &"'" set rs=conn.execute(exec) topNum=rs(0) exec="select count(*) from ly where istop=1 and rt=0 and IsPrivate<>0 and bl=1 and name='"& theUser.name &"' and reid1 and rt=0 and isPrivate<>0 and bl=1 and name='"& theUser.name &"' order by reid desc) " set rs=conn.execute(exec) topNum=rs(0) rs.close exec="select top "&rcPerpage&" * from ly where rt=0 and istop<>1 and isPrivate<>0 and bl=1 and name='"& theUser.name &"' and reid0 and bl=1 and name='"& theUser.name &"' order by reid desc) order by reid desc" end if end if if style=1 then %> <%else %> <%end if%> <%=strPageList %> <% if theUser.master then %>
全选 全不选 反选  
<% end if %> <% function pageList() dim p,i if page<1 then page=1 end if if pagecount<1 then pagecount=1 end if pageList=pageList & "" pageList=pageList & "" pageList=pageList & "
共有悄悄话 "& RecordCount &" 个,共 "& pageCount &"" if page=1 then pageList=pageList & " 留言首页" else pageList=pageList & " 留言首页" end if if page=1 then pageList=pageList & " 前一页" else pageList=pageList & " 前一页" end if if pagecount-page=0 then pageList=pageList & " 下一页" else pageList=pageList & " 下一页" end if pageList=pageList & "" 'pagecount=2 p=int(page/pageLinkNum) if page mod pageLinkNum>0 then p=p+1 end if p=(p-1)*pageLinkNum+1 'response.write p 'response.end i=p+(pageLinkNum-1) if i> pagecount then i=pagecount end if if p>pageLinkNum then pageList=pageList & "[<<]" end if do while p<=i if p=page then pageList=pageList & "["&p&"]" else pageList=pageList & "["&p&"]" end if p=p+1 loop p=p-1 if p< pagecount then pageList=pageList & "[>>]" end if pageList=pageList & "
" end function %>