这是我自定义文章列表标签,想要实现分页功能。里面自定义了SQL代码,但是没有实现。请帮我看看哪儿出的问题。谢谢
<!--#include file="../conn.asp"-->
[loop=10]
<table width="650px" border="0" cellpadding="0" cellspacing="0" >
<tbody>
<tr>
<td width="3%" background="../images/icon071.jpg" valign="middle" align="center"></td>
<td width="80%" align="left" background="../images/point1.jpg" height="33"><a href="{@linkurl}" >{@title}</a></td>
<td width="10%" background="../images/point1.jpg" height="33">{@adddate}</td>
</tr>
</tbody>
</table>
[/loop]
<br />
<br />
<%
dim i,intPage,page,pre,last,filepath
set rs = server.CreateObject("adodb.recordset")
sql="select * from KS_U_syxx where Tid='20106431646246' order by user_ID desc"
rs.PageSize = 10
rs.CursorLocation = 3
rs.Open sql,conn,0,2,1
pre = true
last = true
page = trim(Request.QueryString("page"))
if len(page) = 0 then
intpage = 1
pre = false
else
if cint(page) =< 1 then
intpage = 1
pre = false
else
if cint(page) >= rs.PageCount then
intpage = rs.PageCount
last = false
else
intpage = cint(page)
end if
end if
end if
if not rs.eof then
rs.AbsolutePage = intpage
end if
%>
<table width="650" border="0" cellpadding="0" cellspacing="0" >
<tr>
<%if rs.pagecount > 0 then%>
<td width="13%" align="left">当前页<%=intpage%>/<%=rs.PageCount%></td>
<%else%>
<td width="41%" align="left">当前页0/0</td><%end if%>
<td width="46%" align="right"> <a href="本页.asp?page=1">首页</a>|
<%if pre then%>
<a href="本页.asp?page=<%=intpage -1%>">上页</a>| <%end if%>
<%if last then%>
<a href="本页.asp?page=<%=intpage +1%>">下页</a> |<%end if%>
<a href="本页.asp?page=<%=rs.PageCount%>">尾页</a>|转到第
<select name="sel_page">
<%
for i = 1 to rs.PageCount
if i = intpage then%>
<option value="本页.asp?page=<%=i%>" selected><%=i%></option>
<%else%>
<option value="本页.asp?page=<%=i%>"><%=i%></option>
<%
end if
next
%>
</select>页</font>
</td>
</tr>
</table>