求助静态分页问题
我现在已经生成了静态的分页页面,但是出现了一个问题:第一页正常,第二页产品=第一页+第二页的产品,第三页=第一页+第二页+第三页,一直到最一页=全部的产品,最后一页,根本就不是分页了嘛,这是怎么回事,紧急求助!以下是代码,请各位高手帮忙看看,谢谢了!<%'//修改数据
case "edit"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shopxp_btype where shopxpbe_id="&shopxpbe_id,conn,1,3
oldfolder=rs("shopxpbe_name")
newfolder=request("shopxpbe_name")
rs("shopxpbe_name")=trim(request("shopxpbe_name"))
rs("shopxpbe_idorder")=int(request("shopxpbe_idorder"))
rs("gjz")=request("gjz")
rs("ms")=request("ms")
rs("tit_name")=request("tit_name")
rs("wd")=request("wd")
rs("fudongjia")=int(request("fudongjia"))
rs("filename")="replica-"&Lcase(replace(newfolder," ","-"))&"-handbags.html"
rs.Update
set rs2=server.CreateObject("adodb.recordset")
rs2.Open "select * from shopxp_product where shopxpbe_id="&rs("shopxpbe_id"),conn,1,3
rs2.pagesize=28
totalpage=rs2.pagecount
'分页开始
for n=1 to totalpage
if n=page then
fenye=fenye&"<font color=#ff0000>"&n&"</font> "
else
fenye=fenye&"<a href='replica-"&Lcase(replace(newfolder," ","-"))&"-handbags-"&n&".html'>"&n&"</a> "
end if
next
'分页结束
Set fso=Server.CreateObject("Scripting.FileSystemObject")
for k=1 to totalpage
page=k
rs2.pagesize=rs2.pagesize '每页显示的条数
rs.absolutepage=k
For ii=1 To rs2.pagesize
if rs2.eof then exit for
rightproduct=rightproduct&"<div class=right-3 align=center><div class=right-2>"
rightproduct=rightproduct&"<a href=/"&rs2("foldername")&"/"&rs2("filename")&" target=_blank><img src="&trim(rs2("upfilepic"))&" width=170 height=140 border=0 /></a></div>"
if len(rs2("shopxpptname"))>18 then
rightproduct=rightproduct&"<a href=/"&rs2("foldername")&"/"&rs2("filename")&" target=_blank style=color:#000000;>"&trim(left(rs2("shopxpptname"),10))&"...</a><br />"
else
rightproduct=rightproduct&"<a href=/"&rs2("foldername")&"/"&rs2("filename")&" target=_blank style=color:#000000;>"&trim(rs2("shopxpptname"))&"</a><br />"
end if
rightproduct=rightproduct&"<span class=text-5> Market price:$"&trim(rs2("shopxphyjia"))&" <br />"
rightproduct=rightproduct&"Wholesale price:$"&trim(rs2("shichangjia"))&"</span></div>"
rs2.movenext
next
mobanpath=server.mappath("../mb/product/nclass.html")
set txt=fso.opentextfile(mobanpath,1,false)
'response.write(txt.readline())
aaaaa=txt.readall()'读取全部
aaaaa=replace(aaaaa,"$$selfenlei$$",selfenlei)
aaaaa=replace(aaaaa,"$$classname$$",request("shopxpbe_name"))
aaaaa=replace(aaaaa,"$$gjz$$",request("gjz"))
aaaaa=replace(aaaaa,"$$ms$$",request("ms"))
aaaaa=replace(aaaaa,"$$tit_name$$",request("tit_name"))
aaaaa=replace(aaaaa,"$$wd$$",request("wd"))
aaaaa=replace(aaaaa,"$$leftfenlei$$",leftfenlei)
aaaaa=replace(aaaaa,"$$hotproduct$$",hotproduct)
aaaaa=replace(aaaaa,"$$rightproduct$$",rightproduct)
aaaaa=replace(aaaaa,"$$fenye$$",fenye)
newsfilename1="replica-"&Lcase(replace(newfolder," ","-"))&"-handbags-"&k&".html"
oldFoldername=replace(oldfolder," ","-")
newFoldername=replace(newfolder," ","-")
oldFoldername="../"&oldFoldername
newFoldername="../"&newFoldername
oldpath=Server.MapPath(oldFoldername)
newpath=Server.MapPath(newFoldername)
fso.CreateFolder(newpath)
fso.CopyFolder oldpath,newpath
fso.DeleteFolder(oldpath)
newsfolderpath=server.mappath("/"&newsfilename1)
if fso.fileexists(newsfolderpath)=false then
set txt1=fso.opentextfile(newsfolderpath,2,true)
else
set txt1=fso.opentextfile(newsfolderpath,2,false)
end if
txt1.write(aaaaa)'写入内容
next
rs2.close
rs.Close
set rs=nothing
response.Redirect "shopxpbe_name.asp"
end select
%>