留言中心
<% id=ad if not isnumeric(id) then Response.Write "" Response.End() end if set rs=server.createobject("adodb.recordset") exec="select top "&config("lyclass")&" * from ly where sh=1 order by id desc" rs.open exec,conn,1,1 if rs.eof then response.Write "
暂无记录!
"
else
rs.PageSize =""&TD_lyclass&""
iCount=rs.RecordCount
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
end if
%>
|
<%
if i mod 1 =0 then
response.Write "|||||||||
-
<%'以下显示分页
call PageControl(iCount,maxpage,page,"border=0 align=center","
") rs.close set rs=nothing %>