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

📄 sold2.asp

📁 上海购物网设计的购物系统是基于WEB开发的大型购物系统。   它以构建电子商务网站为目标
💻 ASP
字号:
<title><%=webname%>--销售排行</title>
<TABLE WIDTH="253" height="98" BORDER="0" CELLPADDING="0" CELLSPACING="0">
  <TR> 
    <TD VALIGN="TOP"> 
      <%
				Const MaxPerPage=6
   				dim totalPut   
   				dim CurrentPage
   				dim TotalPages
   				dim j
   				dim sql
    			if Not isempty(request("page")) then
      				currentPage=Cint(request("page"))
   				else
      				currentPage=1
   				end if 
		 set rs=server.CreateObject("adodb.recordset")
		  rs.open "select id,prename,name,company,mark,intro,introduce,predate,productdate,pretype,type,viewnum,price,price1,price2,other,grade,discount,pic from product where iscx=1 and isfb=0 order by solded desc",conn,1,1
		  
				if err.number<>0 then
				response.write "<p align='center'>数据库中暂时无数据</p>"
				end if
				
  				if rs.eof And rs.bof then
       				Response.Write "<p align='center'> 对不起,目前还没有这种商品!</p>"
   				else
	  				totalPut=rs.recordcount

      				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
            			showContent
            			showpage totalput,MaxPerPage,"sold.asp"
       				else
          				if (currentPage-1)*MaxPerPage<totalPut then
            				rs.move  (currentPage-1)*MaxPerPage
            				dim bookmark
            				bookmark=rs.bookmark
            				showContent
             				showpage totalput,MaxPerPage,"sold.asp"
        				else
	        				currentPage=1
           					showContent
           					showpage totalput,MaxPerPage,"sold.asp"
	      				end if
	   				end if
   				   				end if

   				sub showContent
       			dim i
	   			i=0

			%>
      <%do while not rs.eof%>
      <TABLE WIDTH="96%" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="0">
        <TR> 
          <TD WIDTH="50%" ROWSPAN="3" align="center"> 
            <TABLE style="LETTER-SPACING: 1px" cellSpacing=0 cellPadding=0 
            width=112 border=0>
              <TBODY>
                <TR vAlign=top> 
                  <TD height=112 
                background=images/skin/default/jingpin_bg.gif style="PADDING-LEFT: 2px; PADDING-TOP: 2px"><a href=product.asp?id=<% = rs("id") %> target="_blank"> 
                    <% if trim(rs("pic"))<>"" then %>
                    <img src=<% = trim(rs("pic"))%> BORDER=0 width="<% = webimg9 %>"  height="<% = webimg10 %>"> 
                    </a> 
                    <%  else %>
                    <img src=images/emptybook.jpg  border=0> 
                    <% end if %>
                  </TD>
                </TR>
              </TBODY>
            </TABLE>
          </TD>
          <TD width="43%" height="30" valign="bottom"><a href=product.asp?id=<%=rs("id")%> target=_blank><font color=#FF6600><strong><%=trim(rs("name"))%></strong></font></a></TD>
        </TR>
        <TR> 
          <TD valign="middle">市场价:<%=rs("price1")%>元<br>
            会员价:<font color="#FF6600"><%=rs("price2")%>元</font><br>
            节&nbsp;&nbsp;省:<%=rs("price1")-rs("price2")%>元</TD>
        </TR>
      </TABLE>
      <%i=i+1
			if i>=MaxPerPage then Exit Do
			rs.movenext
			loop
			rs.close
			set rs=nothing%>
      <%  
				End Sub   
  
				Function showpage(totalnumber,maxperpage,filename)  
  				Dim n
  				
				If totalnumber Mod maxperpage=0 Then  
					n= totalnumber \ maxperpage  
				Else
					n= totalnumber \ maxperpage+1  
				End If %>
      <%
				End Function  
			%>
    </TD>
  </TR>
</TABLE>

⌨️ 快捷键说明

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