<!-- #include file="../conn.asp" -->
<!-- #include file="admin.asp" -->
<%call ling()
Call Head%>
<%
p=cint(request.QueryString("p"))
if p="" or p<1 then p=1
%><%
call saycardd("留言管理")
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from [gbook] order by [ID] desc",conn,1,1
If Not rs.eof	Then
Dim PageSize,i
	PageSize=10							
	Dim Count,page,pagecount,gopage	
	gopage="Admin_ly.asp?sid="&sid&"&amp;p="&p&"&amp;saytk="&saytk&"&amp;"
	Count=conn.execute("Select count(ID) from [gbook]")(0)
	page=int(request.QueryString ("page"))
	if page<=0 or page="" then page=1		
	pagecount=(count+pagesize-1)\pagesize
        if page>pagecount then page=pagecount	
	rs.move(pagesize*(page-1))
        Response.write ""&now()&"<br/>"
        response.write ("共"&count&"条留言<br/>")				
	For i=1 To PageSize       						
	If rs.eof Then Exit For%>
[<a href="del_ly.asp?sid=<%=sid%>&amp;ID=<%=rs("ID")%>&amp;p=<%=p%>&amp;saytk=<%=saytk%>">删除</a>]<%=i+(page-1)*PageSize%>.<a href='readd.asp?sid=<%=sid%>&amp;ID=<%=rs("ID")%>&amp;p=<%=p%>&amp;saytk=<%=saytk%>'><%=UBB(rs("title"))%></a><% if rs("retext")<>"" then %>[已回]<% end if%><br/>
<%
	rs.moveNext 								
	Next
	if page-pagecount<0 then response.write "<a href="""&gopage&"page="&page+1&""">下页</a>"
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上页</a>"
	if pagecount>1 then response.write "<br/><b>"&page&"</b>/"&pagecount&"页"
if saytk=1 then
response.write "<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page=$(page)"">[GO]</a><br/>"
end if
Else
Response.write ("暂时没有留言！<br/>")
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
----------<br/>
<a href="../index.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>">[后台管理]</a><br/>
报时: <%=String(2-Len(hour(now)),"0") & hour(now) %>:<%=String(2-len(minute(now)),"0") & minute(now) %>
<%response.write""
call headsay()%>
