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

📄 list.asp

📁 一个ASP做的购物车
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="Ubb.asp"-->
<html>
<head>
<title><%=webname%>--商品信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="webtop.asp"-->
<table width="770" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="EDECEC">
  <tr> 
    <td width="178" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
      <!--#include file="info_class.asp"-->
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td background="images/bj_x.gif" height="1"></td>
        </tr>
        <tr> 
          <td height="22"> <img src="images/main/yqgg.gif" width="178" height="34"></td>
        </tr>
        <tr> 
          <td height="1" background="images/bj_x.gif"></td>
        </tr>
        <tr> 
          <td> <br>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" >
              <tr> 
                <td height="65" width="181"> 
                  <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr> 
                      <td> 
                        <div align="right"><a href=<%=gg1url%> target="_blank"><img src=<%=gg1%> border="0" width="166" height="55"></a></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr> 
                <td height="65" width="181"> 
                  <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr> 
                      <td> 
                        <div align="right"><a href=<%=gg2url%> target="_blank"><img src=<%=gg2%>  border="0" width="166" height="55"></a></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>      
    </td>
    <td width="1" valign="top" background="images/bj_x.gif"></td>
    <td width="410" valign="top" bgcolor="#FFFFFF" bordercolor="#FFFFFF"> 
      <div align="center"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td background="images/bj_x.gif" height="1"></td>
          </tr>
          <tr> 
            <td height="34" background="images/main/th_bg.gif"> 
              <div align="center">
                <!--#include file="info.asp"-->
              </div>
            </td>
          </tr>
          <tr> 
            <td background="images/bj_x.gif" height="1"></td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="4" align="center">
          <tr> 
            <td colspan="4" align="center"><font color="#FF0000"><b>商品信息</b></font></td>
          </tr>
          <tr>
            <td colspan="4" background="images/bj_x1.gif" height="1"></td>
          </tr>
        </table>
		<%dim id
		id=trim(request("id"))
		if IsNumeric(request.QueryString("id"))=False or request.QueryString("id")="" then
		response.write"<SCRIPT language=JavaScript>alert('参数错误');"
		response.write"javascript:history.go(-1)</SCRIPT>"
		response.end	
		end if
		sql="select * from wq_books where bookid=" &id & ""
		Set rs= Server.CreateObject("ADODB.Recordset")
		rs.open sql,conn,1,3
		if rs.bof and rs.eof then
		response.write"<SCRIPT language=JavaScript>alert('参数错误!');"
		response.write"javascript:history.go(-1)</SCRIPT>"
		response.end
		else
		rs("liulancount")=rs("liulancount")+1
		rs.update
		'call history
		if request.cookies("cnhww")("username")<>"" then 
		set rs_s=server.CreateObject("adodb.recordset")
		rs_s.open "select * from [wq_user] where username='"&request.cookies("cnhww")("username")&"'",conn,1,1
		t_userid=rs_s("userid")
		rs_s.close
		    set rs_s=server.createobject("adodb.recordset")
		    rs_s.open "select * from wq_his where bookid="&request("id")&" and username='"&request.cookies("cnhww")("username")&"' and lx=1",conn,1,3
		    if rs_s.recordcount>0 then 
			rs_s("ltime")=now()
			rs_s("userid")=t_userid
			rs_s.update
			rs_s.close
			set rs_s=nothing
		    else
		    	rs_s.close
		    	set rs_s=server.createobject("adodb.recordset")
		    	rs_s.open "select * from wq_his where username='"&request.cookies("cnhww")("username")&"' and lx=1 order by ltime",conn,1,3
		    	if rs_s.recordcount>=4 then
		    	    rs_s.delete
		    	    rs_s.update
		    	end if
		    	rs_s.addnew
		    	    rs_s("username")=request.cookies("cnhww")("username")
		    	    rs_s("bookid")=request("id")
		    	    rs_s("bookname")=rs("bookname")
			    rs_s("userid")=t_userid
		    	    rs_s("lx")=1
		    	    rs_s("ltime")=now()
		        rs_s.update
			rs_s.close
			set rs_s=nothing
		    end if
		end if
		%>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td> 
              <table width="100%%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td valign="top" width="160"> 
                    <table width="100%" border="0" cellspacing="0" cellpadding="2">
                      <tr> 
                        <td> 
                          <div align="center"> 
                            <%if rs("zhuang")="" then 
								response.write "<img src=images/emptybook.gif width=150 border=0>"
								else
							%>
                            <a href="<%=trim(rs("zhuang"))%>" target=_blank><img src="<%=trim(rs("bookpic"))%>"  width=130 border=0 alt="点击浏览商品大图" height="130"></a> 
                            <%end if%>
                          </div>
                        </td>
                      </tr>
					  <tr> 
                        <td> 
                          <div align="center"><a href="<%=trim(rs("zhuang"))%>" target=_blank><img src="images/view2.gif" width="115" height="36" border="0"></a></div>
                        </td>
                      </tr>
                      <tr> 
                        <td align="center"> 市场价:<s><%=rs("shichangjia")%>元</s></td>
                      </tr>
                      <tr> 
                        <td align="center"> 会员价:<font color="#FF0000"><strong><%=rs("huiyuanjia")%>元</strong></font></td>
                      </tr>
                      <tr> 
                        <td align="center">VIP价:<%if Request.Cookies("cnhww")("reglx")=2 then%><%=trim(rs("Vipjia"))%>元<%else%><font color="#FF9999">更优惠</font><%end if%>
                        </td>
                      </tr>
                    </table>
                  </td>
                  <td valign="top"> 
                    <table width="100%%" border="0" cellspacing="0" cellpadding="2">
                      <%
					end if
					%><br>
                      <tr> 
                        <td height="30"><font color="#990000" size="3"><strong><%=rs("bookname")%></strong></font></td>
                      </tr>
                      <tr> 
                        <td>【商品规格】 <%=rs("isbn")%></td>
                      </tr>
                      <tr> 
                        <td>【商品单位】 <font color="#FF0000"><%=rs("bookchuban")%></font></td>
                      </tr>
                      <tr> 
                        <td>【商品状态】 <%if rs("kucun")>0 then%>有货<%else%>暂时缺货<%end if%>
                        </td>
                      </tr>
                      <tr> 
                        <td>【所属类别】 
                          <%set rs2=server.createobject("adodb.recordset")

⌨️ 快捷键说明

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