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

📄 class.asp

📁 网上商场 帐户管理方面     1.实现了购物车和收藏夹的功能。     2.实现了历史订单查询以及即时订单跟踪。     3.实现了个人资料修改,查询以及送货人信息修改和查询。  
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<%dim nclassid
nclassid=request.querystring("nid")
dim anclassid
anclassid=request.querystring("aid")%>
<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="180" 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 bookid,bookname,bookzz,shichangjia,huiyuanjia,dazhe,bookpic from shop_books where nclassid="&nclassid&" order by adddate desc",conn,1,1 

				if err.number<>0 then
				response.write "数据库中无数据"
				end if	
  				if rs.eof And rs.bof then%>
       				<table width='100%' border='0' align='center' cellpadding='0' cellspacing='0' background='images/menu_bar01.jpg'>
             			 			  			          <tr>
		<%

				dim rs3,rs5
				set rs3=server.CreateObject("adodb.recordset")
				rs3.open "select anclass from shop_anclass where anclassid="&request("aid")&"",conn,1,1
				set rs5=server.CreateObject("adodb.recordset")
				rs5.open "select nclass from shop_nclass where nclassid="&request("nid")&"",conn,1,1
			%> 
		
		 <TD width=11><IMG height=25 
                        src="images/cruises_top1b.gif" 
                        width=11></TD> 
						 <TD width="22" 
                      background="images/cruises_topbg.gif"><IMG height=15 
                              src="images/icon03.gif" 
                              width=13></TD><TD width="519" background="images/cruises_topbg.gif"><FONT 
                              color=#ffffff><STRONG><%=rs3("anclass")%>商城---<%=rs5("nclass")%>系列</STRONG></FONT></TD>
                      <TD align=right width=18><IMG height=25 
                        src="images/cruises_top2b.gif" 
                        width=18></TD>
						
						                <%
				   rs3.close
    set rs3=nothing
	 rs5.close
    set rs5=nothing
	%>
						
        </tr></table>
           <br><br><br><br><br><br><div align=center>对不起,本商城暂时没有将此类商品放在网站上销售<br>如果您需要此类商品,请直接和我们联系,我们将给予您市场上最优惠的价格<br></div>		
				<%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,"class.asp"
       				else
          				if (currentPage-1)*MaxPerPage<totalPut then
            				rs.move  (currentPage-1)*MaxPerPage
            				dim bookmark
            				bookmark=rs.bookmark
            				showContent
             				showpage totalput,MaxPerPage,"class.asp"
        				else
	        				currentPage=1
           					showContent
           					showpage totalput,MaxPerPage,"class.asp"
	      				end if
	   				end if
   				   				end if
   				sub showContent
       			dim i
	   			i=0

				set rs3=server.CreateObject("adodb.recordset")
				rs3.open "select anclass from shop_anclass where anclassid="&request("aid")&"",conn,1,1
				set rs5=server.CreateObject("adodb.recordset")
				rs5.open "select nclass from shop_nclass where nclassid="&request("nid")&"",conn,1,1
			%> <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=11><IMG height=25 
                        src="images/cruises_top1b.gif" 
                        width=11></TD> 
						 <TD width="22" 
                      background="images/cruises_topbg.gif"><IMG height=15 
                              src="images/icon03.gif" 
                              width=13></TD><TD width="519" background="images/cruises_topbg.gif"><FONT 
                              color=#ffffff><STRONG><%=rs3("anclass")%>商城---<%=rs5("nclass")%>系列</STRONG></FONT></TD>
                      <TD align=right width=18><IMG height=25 
                        src="images/cruises_top2b.gif" 
                        width=18></TD>
						
        </tr>
            </table></td>
        </tr>
        <tr> 
          <td> 
            <table width="570" border="0" cellspacing="0" cellpadding="0" height="60">
              <tr> 
                <td width="132"> 
              <tr> 
                <%
				   rs3.close
    set rs3=nothing
	 rs5.close
    set rs5=nothing
		 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=80 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' 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> 
                                              <td height="20" colspan="2"> <div align="center"></div>
                                                <div align="left"><font color="#000000"> 
                                                  &nbsp;&nbsp; 
                                                  <INPUT name=onlyone  type=image src="images/tt.gif" id="onlyone2" 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="47%" height="20" align="center"> 
                                                <div align="center">【品 &nbsp;牌】</div></td>
                                              <td width="53%" 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  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;"  src="images/buy.gif" type=image value=购买 name=Submit2232>
                                                </div></td>
                                              <td height="28" align="center">
<INPUT  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;"  src="images/love.gif" type=image 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&"?nid="&nclassid&"&aid="&anclassid&">"  
				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&nid="&nclassid&"&aid="&anclassid&" class='contents'>首页</a> "  
					Response.Write "<a href="&filename&"?page="&CurrentPage-1&"&nid="&nclassid&"&aid="&anclassid&" 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)&"&nid="&nclassid&"&aid="&anclassid&" class='contents'>"  
					Response.Write "下一页</a> <a href="&filename&"?page="&n&"&nid="&nclassid&"&aid="&anclassid&" 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&"种商品 " 
					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 + -