<% if not theUser.master then connclose() response.redirect ("index.asp") end if dim name,pass, exec, rs, x, i name=encodestr(request.form("name")) pass=encodestr(request.form("pass")) main() sub main() dim RecordCount,pageCount,page rcperPage=40 page=request.querystring("page") if page="" or not isNumeric(page) then page=1 else page=int(page) end if exec="select top 1 userNum from const" set rs=conn.execute(exec) if not rs.eof then RecordCount=rs("userNum")-1 end if rsclose() pageCount=int(recordCount/rcPerpage) if recordCount mod rcPerPage >0 then pageCount=pageCount+1 end if if pageCount=0 then pageCount=1 end if if page>pageCount then page=pageCount end if if page<=1 then exec="select top "& rcPerPage &" * from blyh where name<>'"& request.cookies("gbook")("username") &"' order by id desc" else exec="select top "& rcPerPage &" * from blyh where name<>'"& request.cookies("gbook")("username") &"' and id <%=sitetitle%> <% i=0 do while not rs.eof if rs("bz")=0 then response.write "" else response.write "" end if rs.movenext loop %>
· 本 留 言 本 所 有 保 留 用 户 · (不包括您)
"& rs("name") &" [添加版主" else response.write ""& rs("name") &" [取消版主" end if response.write " 删除]" i=i+1 if i mod 4=0 then response.write "
<% rsclose() connclose() response.write pageList(RecordCount,pageCount,page,pageLinkNum) end sub function pageList(RecordCount,pageCount,page,pageLinkNum) dim p,i 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 %>