<!--#include FILE="conn.asp"-->
<!-- #include file="../conn.asp" -->
<!--#include FILE="../admin.asp"-->
<%

Call head()
Call saycarda("所有笑话")


set rs=server.createobject("adodb.recordset")
sql="select * from jiudian order by time desc"
rs.open sql,connsms,1,1

Server.ScriptTimeout=999
iduse=Session("useid")
%>
【所有笑话】<br/>

<%
 if rs.eof and rs.bof then str="暂无笑话!"
 if str="" then
   rs.pagesize=10
   pages=rs.pagecount
   records=rs.recordcount
   currentpage=request("currentpage")
if currentpage="" or currentpage<1 then              currentpage=1
   currentpage=cint(currentpage)
if currentpage>pages then currentpage=pages
   rs.absolutepage=currentpage
else
   currentpage=1
   records=0
   pages=1
 end If
 
 nuber=1
 %>

  <%linenumber=rs.pagesize%> <%do while (not rs.eof) and (line<linenumber)%>
[<a href="delyf.asp?id=<%=rs("id")%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>">删</a>|<a href="edit.asp?id=<%=rs("id")%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>">修</a>]<%=nuber%>.<a href="view.asp?id=<%=rs("id")%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>"><%=rs("name")%></a><br/>


 <%rs.movenext%> <%line=line+1%> <%nuber=nuber+1%><%loop%> 
 第<%=currentpage%>页|共<%=Records%>条|共<%=Pages%>页<br/>
<%
 ii=currentpage-5
 iii=currentpage+10
 if ii < 1 then
    ii=1
 end if
 if iii > pages then
    iii=pages
 end if
 if currentpage > 6 then
  %>
<a href="all.asp?currentpage=1&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>">1</a>... 
<%
 end if
 for i=ii to iii
   If i<>currentpage then
  %>

|<a href="all.asp?currentpage=<%=i%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>"><%=i%></a>
<%else%> 
<%=i%>
<%end if
 next
 if pages > currentpage+5 then
 %>... <a href="all.asp?currentpage=<%=pages%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>">(最后一页)<%=pages%></a>

<%end If%>
<br/>--------------<br/><a href="index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[笑话管理]</a>
<br/><a href="../index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[后台管理]</a>
<%
Call headsay()
rs.close
set rs=nothing
connsms.close
set connsms=nothing
%>


