<!--#include file="conn.asp"-->
<!-- #include file="../inc.asp" -->
<!-- #include file="../ydzq1.asp" -->
<%

Call head()
Call saycarda("脑筋急转弯")

if myid<>0 then
mz="[url=/bbs/uinfo.asp?id="&myid&"&amp;saytk=[saytk]&amp;sid=[sid]]"&myni&"[/url]"
else
mz="游客"&Replace(time(),":","")&""
end if
conn.execute("insert into sqdt(shijian,dz)values('"&now&"','"&mz&"逛到了(url=/saytkcom/niaojing/?saytk=[saytk]&amp;sid=[sid])脑筋急转弯(/url)')")

set rs=server.createobject("adodb.recordset")
sql="select * from data order by id desc"
rs.open sql,connniaojing,1,1


%>
<img src="logo.gif" alt=""/><br/>
【脑筋急转弯】<br/>

<% nuber=1
 if rs.eof and rs.bof then str="暂无!"
 if str="" then
   rs.pagesize=6
   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
 

 %>

  <%linenumber=rs.pagesize%> <%do while (not rs.eof) and (line<linenumber)%>
<%=nuber%>.<a href="niaojing.asp?id=<%=rs("id")%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>"><%=rs("question")%></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="index.asp?currentpage=1&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>">1</a>... 
<%
 end if
 for i=ii to iii
   If i<>currentpage then
  %>

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

<%end If%>
 <!--#include file="../../bbs/fanhui.asp"-->
<%
Call headsay()
rs.close
set rs=nothing
connniaojing.close
set connniaojing=nothing
%>


