图片显示页和分面的页面
<%set connGraph=server.CreateObject("ADODB.connection")
connGraph.Open "driver={Microsoft Access Driver (*.mdb)};dbq="& Server.MapPath("database/cai.mdb")
set rec=server.createobject("ADODB.recordset")
strsql="select * from shou"
rec.open strsql,connGraph,1,3
if not(rec.eof and rec.bof) then
dim page_size
dim page_no
dim page_total
dim number
page_size=3
if request.queryString("page_no")="" then
page_no=1
else
page_no=cint(request.queryString("page_no"))
end if
rec.pagesize=page_size
page_total=rec.pagecount
rec.absolutePage=page_no
number=page_size
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
background-image: url(image/17.jpg);
}
.STYLE1 {
font-size: 16px;
font-family: "宋体";
color: #333333;
}
.STYLE2 {color: #FFFFFF}
.STYLE3 {font-family: "华文彩云"; font-size: 18px;}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #006600;
}
a:active {
text-decoration: none;
color: #000000;
}
.STYLE12 {font-size: 18px}
.STYLE13 {font-family: "华文彩云"}
.STYLE15 {color: #000000}
a {
font-family: 宋体;
font-size: 14px;
}
.STYLE17 {
font-family: "隶书";
font-size: 18px;
}
-->
</style>
</head>
<body topmargin="0">
<table width="766" border="0" align="center">
<tr>
<td background="image/itemback.gif">
<%
do while not rec.eof and number>0
number=number-1
temp=rec("s_id")
%>
<table border="0" align="center">
<tr>
<td align="center" valign="middle" bgcolor="#FFFF66"><img src="a2.asp?id=<%=temp%>"></td>
</tr>
</table>
<%
rec.movenext
loop
%>
<table width="506" border="0" align="center">
<tr>
<td width="500"><font color="#000000" size="2">共有:<font color="red"><%=rec.recordcount%></font>张图片</font>
<% if page_no>1 then %>
<font color="#000099" size="2"><a href="a1.asp?page_no=<%=page_no-1%>">上一张</a></font>
<%else%>
<font color="#000099" size="2">上一页</font>
<%end if%>
<% if page_no< page_total then%>
<font color="#000099" size="2"><a href="a1.asp?page_no=<%=page_no+1%>">下一张</a></font>
<%else%>
<font color="#000099" size="2">下一页</font>
<%end if%>
<font color="#000000" size="2">一共有:<font color="red"><%=page_no%></font>/<font color="red"><%=page_total%></font>页</font> </td>
</tr>
</table>
<%
end if
rec.close
set rec=nothing
conngraph.Close
set conngraph=nothing
%></td>
</tr>
</table>
<table width="766" height="223" border="0" align="center">
</table>
</body>
</html>
图片排列的页面
<!--#include file="Conn.asp"-->
<%
set Rs=server.createobject("adodb.recordset")
Sql="select * from photo order by id desc"
Rs.open sql,conn,1,1
If Rs.Eof and Bof Then
Response.Write("暂无图片")
Else
i=1
%>
<table width="98" height="91" cellpadding="0" bgcolor="#F6F6F6" class="Photo_Tabel">
<%if i mod 4=0 then%><tr><%End if%>
<% do while not Rs.Eof %>
<td align="center" valign="middle">
<img src="<%=rs("photo")%>" alt="<%=Rs("id")%>" width="90" height="120" class="Photo_Tabel" style=""></td>
<%if i mod 4=0 then%></tr><%End if%>
<%
i=i+1
Rs.MoveNext
Loop
%>
</table>
<%End if%>
现在主要是想把图片排列用到前面的那个页面.我自己加入时就出现两个do语句产生冲突,那么解决呀