<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%Set rs = Server.CreateObject("ADODB.Recordset")
sql = "select * from news order by sortid desc"
rs.open sql,conn,1,1
if not rs.eof then
rs.PageSize =16
result_num=rs.RecordCount
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
else
result_num=0
maxpage=0
page=0
end if
if not rs.eof then
n=0
for i=1 to rs.PageSize
if n mod 4=0 then response.write "<tr>"
%>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td width="130" height="101" align="center" valign="middle" background="images/picbg1.gif">
<%if rs("firstImageName")<>"" then%>
<a href="#" target="_blank"><img src="<%=rs("firstImageName")%>" border="0" width="120" height="101"></a>
<%else%>
暂无图片
<%end if%>
</td>
</tr>
<tr align="center">
<td><%=rs("title")%></td>
</tr>
</table></td>
<%
if n mod 4=1 then response.write "</tr>"
n=n+1
rs.MoveNext:if rs.EOF then Exit For
next
end if
%>
</table>