| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 324 人关注过本帖
标题:求助静态分页问题
只看楼主 加入收藏
liqiong
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2009-9-20
收藏
 问题点数:0 回复次数:0 
求助静态分页问题
我现在已经生成了静态的分页页面,但是出现了一个问题:第一页正常,第二页产品=第一页+第二页的产品,第三页=第一页+第二页+第三页,一直到最一页=全部的产品,最后一页,根本就不是分页了嘛,这是怎么回事,紧急求助!以下是代码,请各位高手帮忙看看,谢谢了!
<%'//修改数据
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>&nbsp;&nbsp;&nbsp;"
    else
    fenye=fenye&"<a href='replica-"&Lcase(replace(newfolder," ","-"))&"-handbags-"&n&".html'>"&n&"</a>&nbsp;&nbsp;&nbsp;"
    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
%>
搜索更多相关主题的帖子: 静态 
2009-09-20 10:34
快速回复:求助静态分页问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016435 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved