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

📄 best.asp

📁 网上商场 帐户管理方面     1.实现了购物车和收藏夹的功能。     2.实现了历史订单查询以及即时订单跟踪。     3.实现了个人资料修改,查询以及送货人信息修改和查询。  
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<%dim nclassid
nclassid=request.querystring("nid")%>
<html>
<head>
<title><%=webname%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>
.pad {
	PADDING-LEFT: 2px
}
</style>
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<!--#include file="top8.asp" -->

<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="162" valign="top" bgcolor="#efefef"> 
      <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#efefef">
        <tr> 
          <td> <!--#include file="userinfo.asp"--> </td>
        </tr>
      </table>
            <!--#include file="fenlei.asp"--> </td>
    <td width="604" valign="top"> 
	<%
	'if request("aid")<>"" and request("nid")="" then
	'set rs=server.CreateObject("adodb.recordset")
	'rs.open "select * from shop_books where anclassid="&request("aid")&" and bestbook=1",conn,1,1 
	'response.Write("<table width=100% border=0 cellspacing=0 cellpadding=0><tr>")
	'do while not rs.eof
	 '  response.Write("<td><a href='class.asp?aid="&request("aid")&"&nid="&rs("nclassid")&"'>"&rs("nclass")&"</a></td>")
	 '  rs.movenext
	  ' response.Write("</tr></table>")
	'loop
	'response.End()
	'end if
	%>
	<%'开始分页
				Const MaxPerPage=8 
   				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 top 100 bookname,bookzz,bookid,huiyuanjia,shichangjia,dazhe,bookpic from shop_books where bestbook=1 order by adddate desc",conn,1,1
		 dim lu,bookpic,bookid,scj,hyj,bookname,bookzz
		  	if err.number<>0 then
				response.write "数据库中无数据"
				end if
								if rs.eof And rs.bof then
       				Response.Write "<p align='center' class='contents'> 对不起,此分类暂时还没有商品!</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,"best.asp"
       				else
          				if (currentPage-1)*MaxPerPage<totalPut then
            				rs.move  (currentPage-1)*MaxPerPage
            				dim bookmark
            				bookmark=rs.bookmark
            				showContent
             				showpage totalput,MaxPerPage,"best.asp"
        				else
	        				currentPage=1
           					showContent
           					showpage totalput,MaxPerPage,"best.asp"
	      				end if
	   				end if
   				   				end if
   				sub showContent
       			dim i
	   			i=0
		%> <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" background="images/menu_bar01.jpg">
              <tr>  <td width="2"  bgcolor="#FFFFFF"><img name="qw" src="" width="1" height="1" alt="" style="background-color: #FFFFFF"></td>
                <td><div align="left"><font color="#FFFFFF">::<strong>热卖商品</strong>::</font></div></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td> 
            <table width="570" border="0" cellspacing="0" cellpadding="0" height="60">
              <tr> 
                <td width="132"> 
              <tr> 
                <%
		 dim lu,bookpic,bookid,scj,hyj,bookname,bookzz
  lu=0
		 do while not rs.eof
	     lu=lu+1
		 bookzz=rs("bookzz")
		 bookname=rs("bookname")
		 bookpic=rs("bookpic")
		 bookid=rs("bookid")
		 scj=rs("shichangjia") 
		 hyj=rs("huiyuanjia") 
            if rs.eof then
            %>
                <td width="132" valign="top" align="left" bgcolor="#FFFFFF">暂且没有推荐商品</td>
                <%end if		
			%>
                <td align="left" valign="bottom" bgcolor="#FFFFFF" width="450"> 
                  <TABLE width="163" height="157" border=0 align="center" cellPadding=0 cellSpacing=0>
                    <TBODY>
                      <TR> 
                        <TD height=25 align=middle vAlign=middle background=images/s_box_name.gif class=text1><img src="IMAGES/login_im5.gif" width="24" height="16" border="0" align="absmiddle"> 
                          <A class=a4 
                        href=product.asp?id=<%=bookid%> ><font color=#FF6600><b><%=bookname%></b></font></A><font color="#000000">&nbsp;</font></TD>
                      </TR>
                      <TR> 
                        <TD height="140" vAlign=top> <TABLE cellSpacing=0 cellPadding=0 width="100%" 
                              border=0>
                            <TBODY>
                              <TR> 
                                <TD width=1 bgColor=#999999></TD>
                                <TD vAlign=middle> <TABLE width="100%" border=0 cellPadding=0 cellSpacing=0>
                                    <TBODY>
                                      <TR> 
                                        <TD align=middle width=136 height=110> 
                                          <div align="center"><A  href=product.asp?id=<%=rs("bookid")%>><IMG 
                        height=75 alt=点击查看具体信息 hspace=5 
                        src=<%if trim(bookpic)="" then
				  response.write "images/emptybook.gif"
				  else
				  response.write trim(bookpic)
				  end if%> width=75 vspace=3 
                        border=0></A><br>
                                            <a href=showpic.asp?id=<%=rs("bookid")%> target=_blank><img src='images/piczoom.gif' width='81' height='20' border='0'></a> 
                                            <br>
                                          </div></TD>
                                        <TD width=10><div align="center"> <IMG height=94 alt=border=0 src="images/s_h_line.gif" width=1></div></TD>
                                        <TD vAlign=center align=middle width=133 height="100%"> 
                                          <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr align="center"> 
                                              <td height="20" colspan="2"> <div align="left"></div>
                                                <div align="left"><font color="#000000"> 
                                                  &nbsp;&nbsp; 
                                                  <INPUT name=onlyone  type=button id="onlyone" style="BORDER-RIGHT: #000000 1px solid; BACKGROUND-POSITION: 0% 50%; BORDER-TOP: #000000 1px solid; FONT-WEIGHT: normal; FONT-SIZE: 12px; BACKGROUND-ATTACHMENT: scroll; BORDER-LEFT: #000000 1px solid; COLOR: #000000; LINE-HEIGHT: normal; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-REPEAT: repeat; FONT-STYLE: normal; HEIGHT: 16px; BACKGROUND-COLOR: #ffdb29; FONT-VARIANT: normal" onClick="javascript:window.open('onlyone.asp?id=<%=bookname%> ','','width=632,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;" value=团体采购>
                                                  </font></div></td>
                                            </tr>
                                            <tr> 
                                              <td width="40%" height="20" align="center"> 
                                                <div align="center">品 牌</div></td>
                                              <td width="55%" align="left"> <div align="center"><font color="#000000"><b><%=trim(bookzz)%></b></font></div></td>
                                            </tr>
                                            <tr> 
                                              <td height="20" align="center"> 
                                                市场价</td>
                                              <td align="center"> <div align="center"><b>¥<%=formatnumber(scj,0)%></b>元</div></td>
                                            </tr>
                                            <tr> 
                                              <td height="17" align="center"> 
                                                会员价</td>
                                              <td height="17" align="center"><font color="#D03430"><b>¥</b></font><font color=#D03430><b><%=formatnumber(hyj,0)%></b></font>元 </td>
                                            </tr>
                                            <tr> 
                                              <td height="28"><div align="center"> 
                                                  <INPUT style="BORDER-RIGHT: #000000 1px solid; BACKGROUND-POSITION: 0% 50%; BORDER-TOP: #000000 1px solid; FONT-WEIGHT: normal; FONT-SIZE: 12px; BACKGROUND-ATTACHMENT: scroll; BORDER-LEFT: #000000 1px solid; COLOR: #000000; LINE-HEIGHT: normal; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-REPEAT: repeat; FONT-STYLE: normal; HEIGHT: 16px; BACKGROUND-COLOR: #ffdb29; FONT-VARIANT: normal" onClick="javascript:window.open('gouwu.asp?id=<%=bookid%>&action=add ','','width=632,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"  type=button value=购买 name=Submit2232>
                                                </div></td>
                                              <td height="28"><INPUT style="BORDER-RIGHT: #000000 1px solid; BACKGROUND-POSITION: 0% 50%; BORDER-TOP: #000000 1px solid; FONT-WEIGHT: normal; FONT-SIZE: 12px; BACKGROUND-ATTACHMENT: scroll; BORDER-LEFT: #000000 1px solid; COLOR: #000000; LINE-HEIGHT: normal; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-REPEAT: repeat; FONT-STYLE: normal; HEIGHT: 16px; BACKGROUND-COLOR: #ffdb29; FONT-VARIANT: normal" onClick="javascript:window.open('shoucang.asp?id=<%=bookid%>&action=add ','','width=632,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"  type=button value=收藏 name=Submit223></td>
                                            </tr>
                                          </table></TD>
                                      </TR>
                                    </TBODY>
                                  </TABLE></TD>
                                <TD width=1 bgColor=#999999 height=140></TD>
                              </TR>
                            </TBODY>
                          </TABLE></TD>
                      </TR>
                      <TR> 
                        <TD height="5"> <IMG height=5 src="images/box_down.gif" width=281></TD>
                      </TR>
                    </TBODY>
                  </TABLE></td>
                <%		  
		  i=i+1
			if i>=MaxPerPage then Exit Do	  
		  rs.movenext
		   if lu>=2 then
		     lu=0
		   %>
              </tr>
              <tr> 
                <% end if
   loop
   rs.close
   set rs=nothing
   %>
              </tr>
            </table>
      </td>
        </tr>
      </table>
      <%  
				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
				Response.Write "<form method=Post action="&filename&">"  
				Response.Write "<p align='center' class='contents'> "  
				If CurrentPage<2 Then  
					Response.Write "<font class='contents'>首页 上一页</font> "  
				Else  
					Response.Write "<a href="&filename&"?page=1 class='contents'>首页</a> "  
					Response.Write "<a href="&filename&"?page="&CurrentPage-1&" class='contents'>上一页</a> "  
				End If				
				If n-currentpage<1 Then  
					Response.Write "<font class='contents'>下一页 尾页</font>"  
				Else  
					Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&" class='contents'>"  
					Response.Write "下一页</a> <a href="&filename&"?page="&n&" class='contents'>尾页</a>"  
				End If  
					Response.Write "<font class='contents'> 页次:</font><font class='contents'>"&CurrentPage&"</font><font class='contents'>/"&n&"页</font> "  
					Response.Write "<font class='contents'> 共有"&totalnumber&"种商品 "&maxperpage&"种商品/页</font> " 
					Response.Write "<font class='contents'>转到:</font><input type='text' name='page' size=2 maxlength=10 class=smallInput value="&currentpage&">"  
					Response.Write "&nbsp;<input type='submit'  class='contents' value='GO' name='cndok'></form>"  
				End Function  
			%> </td>
  </tr>
</table>
<!--#include file="service.asp"-->

</body>
</html>

⌨️ 快捷键说明

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