<% set rs=server.CreateObject("adodb.recordset")
strsql="select * from web_pic where Classid=2 order by id desc"
rs.open strsql,conn,3,3
if rs.bof and rs.eof then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"> 对不起,该类暂时没有任何信息!</td>
</tr>
</table>
<p>
<%else
rs.pagesize=12
if pagecount>rs.pagecount or pagecount<=0 then
pagecount=1
end if
rs.AbsolutePage=pagecount
i=1
%>
</p><br>
<% do while not rs.eof %>
<table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top"><a href="jyzx.asp?action=look&ID=<%=rs("ID")%>"><img src="admin/image/<%=rs("pic")%>" width="100" border="0" alt="<%=rs("Topic")%>"></a></td>
</tr>
<tr>
<td height="30" align="center"><%=rs("Topic")%></td>
</tr>
</table></td>
<%
i=i+1
rs.movenext
if not rs.eof then
%>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top"><a href="jyzx.asp?action=look&ID=<%=rs("ID")%>"><img src="admin/image/<%=rs("pic")%>" width="100" border="0" alt="<%=rs("Topic")%>"></a></td>
</tr>
<tr>
<td height="30" align="center"><%=rs("Topic")%></td>
</tr>
</table></td>
<%
i=i+1
rs.movenext
if not rs.eof then
%>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top"><a href="jyzx.asp?action=look&ID=<%=rs("ID")%>"><img src="admin/image/<%=rs("pic")%>" width="100" border="0" alt="<%=rs("Topic")%>"></a></td>
</tr>
<tr>
<td height="30" align="center"><%=rs("Topic")%></td>
</tr>
</table></td>
<%
i=i+1
rs.movenext
if not rs.eof then
%>
</tr>
<% i=i+1
rs.movenext
if i>=rs.PageSize+1 then exit do
end if
end if
end if
loop
%>
这是我个人的做法