⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sub.asp

📁 多多网店系统v3.01 完全免费可用版-功能简介: 支持多模板皮肤色切换[8套] 支持按商品特性[推荐商品/特价商品/新品分类]浏览 支持按商品类别浏览 支持单件商品用支付宝交易按钮直接支付订
💻 ASP
📖 第 1 页 / 共 2 页
字号:
            call PageControl(iCount,maxpage,page)
            response.write "</table>"    
        end if
    else
        response.write "参数错误"
    end if
    rs.close
    set rs=nothing
end sub
'*********************************************************

'*************************************************************************************************
' 目的:    按商品特性-显示商品列表
' 输入:    flag,NumsPerPage,NumsPerRow
' 说明:    flag:商品特性(1=新 2=荐 3=特);  NumsPerPage:每页记录条数;  NumsPerRow:每行显示的商品数量;
'*************************************************************************************************
Sub Product_ListFlag(flag,NumsPerRow,NumsPerPage)
    if IsNumeric(NumsPerRow)=false or IsNumeric(NumsPerPage)=false then
        check="false"
    end if
    if check<>"false" then
        response.write "<table cellspacing=0 cellpadding=2 style='border-collapse: collapse' width='100%'>"
        response.write "<tr align=center>"
        
        select case flag
            case 1
                sql="select id,Product_info_Name,Product_info_PriceM,Product_info_PriceS,Product_info_PicS from Product_info where Product_info_OnOff=0 and instr(Product_info_flag,1)"
            case 2
                sql="select id,Product_info_Name,Product_info_PriceM,Product_info_PriceS,Product_info_PicS from Product_info where Product_info_OnOff=0 and instr(Product_info_flag,2)"
            case 3
                sql="select id,Product_info_Name,Product_info_PriceM,Product_info_PriceS,Product_info_PicS from Product_info where Product_info_OnOff=0 and instr(Product_info_flag,3)"
        end select
        'response.write sql
        'response.end
        
        set rs=server.createobject("adodb.recordset")
        rs.open sql,conn,1,1
        if rs.eof then 
            response.write "<td align=center>对不起,暂时没有相关商品信息!</td></tr></table>"
        else
            rs.PageSize =NumsPerPage '每页记录条数
		    iCount=rs.RecordCount '记录总数
	        iPageSize=rs.PageSize
    	    maxpage=rs.PageCount 
    	    page=request("page")
            if Not IsNumeric(page) or page="" then
                page=1
            else
                page=cint(page)
            end if
            if page<1 then
                page=1
            elseif  page>maxpage then
                page=maxpage
            end if
            rs.AbsolutePage=Page
	        if page=maxpage then
		        x=iCount-(maxpage-1)*iPageSize
	        else
		        x=iPageSize
	        end if
            i=1

            set id                  =rs(0)
            set Product_info_Name   =rs(1)
            set Product_info_PriceM =rs(2)
            set Product_info_PriceS =rs(3)
            set Product_info_PicS   =rs(4)
            xxx=1/NumsPerRow*100

            while not rs.eof and i<=rs.pagesize
                
                response.write "<td align=center width="&xxx&"% >"
                response.write "  <table width='100%' border=0 align=center cellpadding=0 cellspacing=0 style='border-collapse: collapse'>"
                response.write "    <tr>"
                response.write "      <td align=center valign=top>"
                response.write "        <table border=1 cellspacing=0 cellpadding=4 style='border-collapse: collapse' bordercolor='#E4E4E4'>"
                response.write "          <tr><td align=center><a href=Product_Detail.asp?id="&id&"><img border=0 src=UPloadpic/"&Product_info_PicS&" onload='loaded(this,"&root_option_WidthSPic&","&root_option_HeighSPic&")' /></a></td></tr>"
                response.write "        </table>"
                response.write "        <a href=Product_Detail.asp?id="&id&">"&Product_info_Name&"</a><br />"
                response.write "        市场价:¥"&formatnumber(Product_info_PriceM,2,-1)&"<br>"
                response.write "        网站价:<b><font color=#FF6600>¥"&FormatNumber(Product_info_PriceS,2,-1)&"</font></b>"
                response.write "      </td>"
                response.write "    </tr>"
                response.write "  </table>"
                response.write "</td>"

                if i mod NumsPerRow = 0 then
                    response.write "</tr>"
                end if
                
                 rs.movenext
                 i=i+1
            wend
            call PageControl(iCount,maxpage,page)
            response.write "</table>"    
        end if
    else
        response.write "参数错误"
    end if
    rs.close
    set rs=nothing
end sub
'*********************************************************

'***********************************************
' 目的: 按商品搜索-显示商品列表
' 输入: Search,NumsPerPage,NumsPerRow
' 说明: Search:搜索参数集;  NumsPerPage:每页记录条数;  NumsPerRow:每行显示的商品数量;
'***********************************************
Sub Product_ListSearch(Search,NumsPerRow,NumsPerPage)
    if IsNumeric(NumsPerRow)=false or IsNumeric(NumsPerPage)=false then
        check="false"
    end if
    if check<>"false" then
        response.write "<table cellspacing=0 cellpadding=2 style='border-collapse: collapse' width='100%'>"
        response.write "<tr align=center>"
        
        if Search<>"" then
            sql="select id,Product_info_Name,Product_info_PriceM,Product_info_PriceS,Product_info_PicS from Product_info where Product_info_OnOff=0 "&Search
        else
            sql="select id,Product_info_Name,Product_info_PriceM,Product_info_PriceS,Product_info_PicS from Product_info where Product_info_OnOff=0"
        end if
        
        set rs=server.createobject("adodb.recordset")
        rs.open sql,conn,1,1
        if rs.eof then 
            response.write "<td align=center>对不起,暂时没有相关商品信息!</td></tr></table>"
        else
            rs.PageSize =NumsPerPage '每页记录条数
		    iCount=rs.RecordCount '记录总数
	        iPageSize=rs.PageSize
    	    maxpage=rs.PageCount 
    	    page=request("page")
            if Not IsNumeric(page) or page="" then
                page=1
            else
                page=cint(page)
            end if
            if page<1 then
                page=1
            elseif  page>maxpage then
                page=maxpage
            end if
            rs.AbsolutePage=Page
	        if page=maxpage then
		        x=iCount-(maxpage-1)*iPageSize
	        else
		        x=iPageSize
	        end if
            i=1

            set id                  =rs(0)
            set Product_info_Name   =rs(1)
            set Product_info_PriceM =rs(2)
            set Product_info_PriceS =rs(3)
            set Product_info_PicS   =rs(4)
            xxx=1/NumsPerRow*100

            while not rs.eof and i<=rs.pagesize
                
                response.write "<td valign=top align=center width="&xxx&"% >"
                response.write "  <table width='100%' border=0 align=center cellpadding=0 cellspacing=0 style='border-collapse: collapse'>"
                response.write "    <tr>"
                response.write "      <td align=center valign=top>"
                response.write "        <table border=1 cellspacing=0 cellpadding=4 style='border-collapse: collapse' bordercolor='#E4E4E4'>"
                response.write "          <tr><td align=center><a href=Product_Detail.asp?id="&id&"><img border=0 src=UPloadpic/"&Product_info_PicS&" onload='loaded(this,"&root_option_WidthSPic&","&root_option_HeighSPic&")' /></a></td></tr>"
                response.write "        </table>"
                response.write "        <a href=Product_Detail.asp?id="&id&">"&Product_info_Name&"</a><br />"
                response.write "        市场价:¥"&formatnumber(Product_info_PriceM,2,-1)&"<br>"
                response.write "        网站价:<b><font color=#FF6600>¥"&FormatNumber(Product_info_PriceS,2,-1)&"</font></b>"
                response.write "      </td>"
                response.write "    </tr>"
                response.write "  </table>"
                response.write "</td>"

                if i mod NumsPerRow = 0 then
                    response.write "</tr>"
                end if
                
                 rs.movenext
                 i=i+1
            wend
            call PageControl(iCount,maxpage,page)
            response.write "</table>"    
        end if
    else
        response.write "参数错误"
    end if
    rs.close
    set rs=nothing
end sub
'***********************************************

%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -