<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
<!--#include file="../inc.asp"-->
<!--#include file="../ydzq.asp"-->
<!--#INCLUDE file="conn1.asp"-->
<%call head()
page=request("page")
if page="" then page="1"
Server.ScriptTimeout=999

pag=10
call cardz("江湖消息","/bbs/yxxe/qliao.asp?mm="&time&"&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;page="&page&"")%>
<% 
dim rs,rsstr
set rs=Server.CreateObject("ADODB.Recordset")
rsstr="select lid,name,txt,tm from l order by tm desc"
rs.open rsstr,liao,1,2

if rs.eof then 
response.write("暂无消息！<br/>")
else
%>
<a href='/bbs/yxxe/add.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>'>发言</a>|<a href='/bbs/yxxe/qliao.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>&amp;ttp=<%=time%>'>刷新</a><br/>
<%
response.write("----及时信息------<br/>")
dim page,maxpage
page=cint(request.QueryString("page"))
if page="" or page<1 then page=1
maxpage=int((rs.recordcount-1)/pag)+1
if page>maxpage then page=maxpage

rs.Move((page-1)*pag)
dim j
j=1
do while ((not rs.EOF) and j <=cint(pag))
%>

<%=((page-1)*pag+j)%>.<a href='/bbs/uinfo.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>&amp;id=<%=rs("lid")%>'><%=rs("name")%></a>:<%=rs("txt")%><br/>
[<%=rs("tm")%>]
<br/>

<%
    rs.Movenext  
j=j+1
loop
end if

if page*pag<rs.recordcount then response.write("<a href='qliao.asp?sid=" & sid & "&amp;page=" & page+1 & "'>下一页</a>")
if page>1 then response.write("<a href='qliao.asp?sid=" & sid & "&amp;page=" & page-1 & "'>上一页</a>")

if page*pag<rs.recordcount or page>1 then response.write("<br/>")
if page*pag<rs.recordcount then response.write("----------<br/>("& page & "/" & (int(rs.recordcount/pag+1)) &"/" & rs.recordcount & ")<br/>")
%>

<%if page*pag<rs.recordcount or page>1 then%>
跳到第<input name="gpage<%=minute(now)%><%=second(now)%>" title="页码" type="text" format="*N" emptyok="true" size="3" value="<%response.write(page+1)%>" maxlength="3"/>页
<a href="qliao.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>&amp;page=$(gpage<%=minute(now)%><%=second(now)%>)">[GO]</a><br/>
<%end if%>
<%
rs.close
set rs=nothing
liao.close
set liao=nothing
%>
----------<br/>
<a href='index.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>'>江湖首页</a>|<a href='/bbs/index.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>'>社区首页</a>
<%call head1()%>