page=cint(request("page"))
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from "&table&" order by id asc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<tr><td>对不起,还没有添加!</td></tr>"
else
rs.PageSize=6
if page=0 then page=1
pages=rs.pagecount
if page > pages then page=pages
rs.AbsolutePage=page
i=0
for j=1 to rs.PageSize
%>
<td align="center" width="33%"><Table><tr><td>
<a href="连接地址" target="_blank"><img src="记录的图片路径如:<%=rs("img")%>" alt="图片说明,可不填,如:<%=rs("title")%>" width="110" height="143" border="0"></a>
</td>
</tr>
<tr><td align="center"><%=rs("title")%>-->图片标题
</td></tr></Table></td>
<!--下面的不需要改-->
<%
rs.movenext
i=i+1
if i =3 then%>
</tr><tr>
<%
i=0
end if
if rs.eof then exit for
next
%>
<tr bgcolor="#FFFFFF"><td height="24" colspan="6"> <p> </p>
<div align="center"><%if Page<2 then
response.write "首页 上一页 "
else
response.write "<a href=?page=1>首页</a> "
response.write "<a href=?page=" & Page-1 & ">上一页</a> "
end if
if rs.pagecount-page<1 then
response.write "下一页 尾页"
else
response.write "<a href=?page=" & (page+1) & ">"
response.write "下一页</a> <a href=?page="&rs.pagecount&">尾页</a>"
end if
response.write " 页次:<strong><font color=red>"&Page&"</font>/"&rs.pagecount&"</strong>页 "
response.write " 共<b><font color='#FF0000'>"&rs.recordcount&"</font></b>条记录 <b>"&rs.pagesize&"</b>条记录/页"
%>
</div></td></tr>
<%
end if
rs.close
set rs=nothing
%></table>
<%
conn.close
set conn=nothing
<%
page=cint(request("page"))
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from honor order by id asc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<tr><td>对不起,还没有添加!</td></tr>"
else
rs.PageSize=6
if page=0 then page=1
pages=rs.pagecount
if page > pages then page=pages
rs.AbsolutePage=page
i=0
for j=1 to rs.PageSize
%>
<td align="center" width="33%"><Table><tr><td>
<a href="<%=rs("imges")%>" target="_blank"><img src="<%=rs("img")%>" alt="<%=rs("title")%>" width="110" height="143" border="0"></a>
</td>
</tr>
<tr><td align="center"><%=rs("title")%></td></tr></Table></td>
<%
rs.movenext
i=i+1
if i =3 then%>
</tr><tr>
<%
i=0
end if
if rs.eof then exit for
next
%>
<tr bgcolor="#FFFFFF"><td height="24" colspan="6"> <p> </p>
<div align="center"><%if Page<2 then
response.write "首页 上一页 "
else
response.write "<a href=zzry.asp?page=1>首页</a> "
response.write "<a href=zzry.asp?page=" & Page-1 & ">上一页</a> "
end if
if rs.pagecount-page<1 then
response.write "下一页 尾页"
else
response.write "<a href=zzry.asp?page=" & (page+1) & ">"
response.write "下一页</a> <a href=zzry.asp?page="&rs.pagecount&">尾页</a>"
end if
response.write " 页次:<strong><font color=red>"&Page&"</font>/"&rs.pagecount&"</strong>页 "
response.write " 共<b><font color='#FF0000'>"&rs.recordcount&"</font></b>条记录 <b>"&rs.pagesize&"</b>条记录/页"
%>
</div></td></tr>
<%
end if
rs.close
set rs=nothing
%>
<%
if ym="" then
ym=1
end if
if ym<=0 then
ym=1
end if
if not rs.eof then
all=rs.recordcount
page=2
if (all/(page*4))=(all\(page*4)) then
totalpage=(all\(page*4))
else
totalpage=(all\(page*4))+1
end if
if ym=1 then
rs.movefirst
else
rs.move (ym-1)*8
end if
for i=1 to page
if rs.eof then
exit for
end if
%>
<% for ii=1 to 4
if rs.eof then
exit for
end if
%>
<td height="12" align="left"><table><tr><td><a href="content.asp?id=<%= rs("id") %>" ><img src="/infoimg/<% =rs("tou") %>.jpg" width="155" height="155" hspace="6" vspace="6" /></a></td>
</tr>
<tr>
<td>(<%= formatdatetime(rs("date"),2) %>) </td>
</tr>
</table>
<div align="center"></div></td>
<%rs.movenext
next %>
</tr>
<%
if rs.eof then
exit for
end if
rs.movenext
next
else
%>
<tr>
<td height="20" colspan="3" align="left">数据库中没有记录</td>