| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 628 人关注过本帖
标题:怎么修改前面显示的商品数量
只看楼主 加入收藏
故事人生
Rank: 2
等 级:论坛游民
帖 子:58
专家分:36
注 册:2010-3-30
结帖率:92.31%
收藏
已结贴  问题点数:20 回复次数:4 
怎么修改前面显示的商品数量
'=================================================
'过程名:ShowProduct
'=================================================
sub ShowProduct(TitleLen)
    if TitleLen<0 or TitleLen>200 then
        TitleLen=50
    end if
    if currentpage<1 then
           currentpage=1
    end if
    if (currentpage-1)*MaxPerPage>totalput then
        if (totalPut mod MaxPerPage)=0 then
               currentpage= totalPut \ MaxPerPage
        else
               currentpage= totalPut \ MaxPerPage + 1
        end if
       end if
    if currentPage=1 then
        sqlProduct="select top " & MaxPerPage   
    else
        sqlProduct="select "
    end if

    sqlProduct=sqlProduct & " ID,Product_Id,BigClassName,SmallClassName,IncludePic,Title,Price,Spec,Unit,Memo,DefaultPicUrl,UpdateTime,Hits from Product where Passed=True "
   
    if BigClassName<>"" then
        sqlProduct=sqlProduct & " and BigClassName='" & BigClassName & "' "
        if SmallClassName<>"" then
            sqlProduct=sqlProduct & " and SmallClassName='" & SmallClassName & "' "
        end if
    end if
    sqlProduct=sqlProduct & " order by UpdateTime desc"
    Set rsProduct= Server.CreateObject("ADODB.Recordset")
    rsProduct.open sqlProduct,conn,1,1
    if rsProduct.bof and  rsProduct.eof then
        response.Write("<br><li>没有任何产品</li>")
    else
        if currentPage=1 then
            call ProductContent(TitleLen)
        else
            if (currentPage-1)*MaxPerPage<totalPut then
                    rsProduct.move  (currentPage-1)*MaxPerPage
                 dim bookmark
                   bookmark=rsProduct.bookmark
                call ProductContent(TitleLen)
            else
                currentPage=1
                   call ProductContent(TitleLen)
            end if
        end if
    end if
    rsProduct.close
    set rsProduct=nothing
end sub

sub ProductContent(intTitleLen)
          dim i,strTemp,ViewList
         i=1
         ViewList=3
        strTemp=""
        strtemp= strtemp & "<p>"
        strTemp= strTemp & "<TABLE width='98%' align=center  BORDER=0 CELLSPACING=1 CELLPADDING=0>"
        strTemp= strTemp & "<tr>"
    do while not rsProduct.eof
     strTemp= strTemp & "<td width=170>"               
        strTemp= strTemp & "<table align=center width=170 border=0 cellspacing=2 cellpadding=0>"
                strTemp= strTemp & "<tr>"
                strTemp= strTemp & "<td colspan=2>"
              strTemp= strTemp &"<TABLE  border=0 cellPadding=0 cellSpacing=5>"
   strTemp= strTemp &"<TR>"
   strTemp= strTemp &"<TD align=middle > <TABLE align=center border=0 cellPadding=0 cellSpacing=0>"      
   strTemp= strTemp &"<TR>"
   strTemp= strTemp &"<TD  height=10><IMG height=10 src='Img/bg_0ltop.gif' width=10></TD>"
   strTemp= strTemp &"<TD background='Img/bg_01.gif' height=10></TD>"
   strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0rtop.gif' width=10></TD>"
   strTemp= strTemp &"</TR>"
   strTemp= strTemp &"<TR> "
   strTemp= strTemp &"<TD background='Img/bg_03.gif' width=10>&nbsp;</TD>"
   strTemp= strTemp & "<td width=130 height=100>"&"<div align=center>"
   strTemp= strTemp & "<a href=ProductShow.asp?ID=" & rsProduct("id") & ">" & "<img src=" & rsProduct("DefaultPicUrl") & " width='180' height='130' border='0'>" & "</a><br></div>"  
   strTemp= strTemp & "</td>"
   strTemp= strTemp &"<TD background='Img/bg_04.gif' width=10>&nbsp;</TD>"
   strTemp= strTemp &"</TR>"
   strTemp= strTemp &"<TR>"
   strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0lbottom.gif' width=10></TD>"
   strTemp= strTemp &"<TD background=Img/bg_02.gif height=10></TD>"
   strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0rbottom.gif' width=10></TD>"
   strTemp= strTemp &"</TR>"         
   strTemp= strTemp &"</TABLE></TD>"
   strTemp= strTemp &"</TR>"  
   strTemp= strTemp &"</TABLE>"
                strTemp= strTemp & "</a></div></td>"
                strTemp= strTemp & "</tr><tr>"
                strTemp= strTemp & "<td align=right >"
                strTemp= strTemp & "名称:</td>"
                strTemp= strTemp & "<td width=80% >"
                strTemp= strTemp & "<a href=ProductShow.asp?ID=" & rsProduct("id") & ">" & rsProduct("Title") & ""
                strTemp= strTemp & "</a></td>"
               
                strTemp= strTemp & "</tr><tr>"
                strTemp= strTemp & "<td align=right >"
                strTemp= strTemp & "编号:</td>"
                strTemp= strTemp & "<td>"
                strTemp= strTemp & rsProduct("Product_Id") & ""
                strTemp= strTemp & "</a></td>"                     
               
                strTemp= strTemp & "</tr><tr>"
                strTemp= strTemp & "<td colspan=2>"
                strTemp= strTemp & "<table width=100% border=0 cellpadding=0 cellspacing=0>"
                strTemp= strTemp & "<tr>"
                strTemp= strTemp & "<td>"
                strTemp= strTemp & "<div align=center></div></td>"            
               strTemp= strTemp & "<tr>"
                strTemp= strTemp & "<td width=50% height=12>"
                strTemp= strTemp & "<div align=center></div></td>"
               
                strTemp= strTemp & "<td width=50% height=12>"
                strTemp= strTemp & "<div align=center><input name='Product_Id' type='checkbox'    id='Product_Id' value="&cstr(rsProduct("Product_Id"))&"> 选取"
                strTemp= strTemp & "</div></td>"
               
                strTemp= strTemp & "</tr>"
               
                strTemp= strTemp & "</tr>"
                strTemp= strTemp & "</table>"
                strTemp= strTemp & "</td>"
                strTemp= strTemp & "</tr><tr>"
                strTemp= strTemp & "<td height=1 colspan=3 bgcolor=#CCCCCC></td>"
                strTemp= strTemp & "</tr>"
                strTemp= strTemp & "</table>"        
        if i mod ViewList =0 then
           strTemp= strTemp & "</td></tr>"
        end if
           rsProduct.MoveNext      
        i=i+1
        if i>MaxPerPage then exit do            
    loop
        strtemp= strtemp & "</tr></table>"
        response.write strTemp  
end sub


前面产品展业只显示10个商品就翻页了,想要让他显示12个产品修改哪个参数!
搜索更多相关主题的帖子: 数量 商品 
2010-06-29 08:44
hams
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:18
帖 子:912
专家分:3670
注 册:2008-7-30
收藏
得分:20 
MaxPerPage

俺不高手,俺也是来学习的。
俺的意见不一定就对,当你不认同时请点忽视按钮。
当走到十字路口不知该如何走时,可在论坛问下路,但你若希望别人能一路把你送到目的地,显然是不现实的,因为别人也有自己要走的路。
2010-06-29 09:04
故事人生
Rank: 2
等 级:论坛游民
帖 子:58
专家分:36
注 册:2010-3-30
收藏
得分:0 
没有反映,还是显示的十个产品啊.应当怎么修改啊.我是菜鸟!
2010-06-29 10:15
故事人生
Rank: 2
等 级:论坛游民
帖 子:58
专家分:36
注 册:2010-3-30
收藏
得分:0 
搞定了,谢谢,不过不是我想要的结果!
2010-06-29 11:29
hams
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:18
帖 子:912
专家分:3670
注 册:2008-7-30
收藏
得分:0 
搞定了还不是你要的结果……这叫搞定么

俺不高手,俺也是来学习的。
俺的意见不一定就对,当你不认同时请点忽视按钮。
当走到十字路口不知该如何走时,可在论坛问下路,但你若希望别人能一路把你送到目的地,显然是不现实的,因为别人也有自己要走的路。
2010-06-29 15:21
快速回复:怎么修改前面显示的商品数量
数据加载中...
 
   



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

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