<% If request.cookies("timesshop")("username")="" Then dim url url=url&request.ServerVariables("SCRIPT_NAME") if(len(trim(request.ServerVariables("QUERY_STRING")))>0) then url=url & "?" & request.ServerVariables("QUERY_STRING") end if response.write url response.Redirect "/shop/user/login.asp?url='"&url&"'" end if%> <%=webname%>  ----  会员中心 - 购物车
购物车
<% set rs=server.CreateObject("adodb.recordset") rs.open "select orders.actionid,orders.id,tproduct.tproduct,tproduct.tprice,tproduct.tpricenet,tproduct.tprice1,tproduct.tprice2,tproduct.tprice3,tproduct.tprice4,tproduct.discount,tproduct.score,tproduct.stock,orders.productnum,tproduct.tproduct_bh,orders.kind from tproduct inner join orders on tproduct.id=orders.id where orders.username='"&request.cookies("timesshop")("username")&"' and orders.state=0 ",conn,1,1 %>
<% response.write "" %> <% iactionid=request("actionid") Quatity = CInt( Request.form( "shop"&iactionid) ) if request("action")<>"" then if quatity<=0 then response.write "" end if set rs1=server.CreateObject("adodb.recordset") rs1.open "select id,username,productnum from orders where actionid="&iactionid&" ",conn,1,3 rs1("productnum")=Quatity rs1.update rs1.close response.Redirect "bag.asp" set rs1=nothing end if sum1=0 sum=0 sums1=0 do while not rs.eof %> <%' strscore=rs("score") productnum=rs("productnum") %> " rs.movenext loop rscount=rs.recordCount rs.close if rscount<>0 then %> <%end if%>
选 择 编号 商品名称 价格 数量 小计 删 除
> <%=rs("tproduct_bh")%> target=_blank> <%select case rs("kind") case 0 response.write rs("tproduct") case 1 response.write "(赠品)"& rs("tproduct") case 2 response.write "(礼品)"& rs("tproduct") case 3 response.write "(特价)"& rs("tproduct") case 4 response.write "(积分兑换)"& rs("tproduct") end select %> <% iprice=rs("tprice2") %> <% = iprice%>元 " type="text" class="Input" onKeyPress= "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))" value="<%=rs("productnum")%>" size="3"onpaste = "return regInput(this,/^[0-9]*$/, window.clipboardData.getData('Text'))"ondrop= "return regInput(this,/^[0-9]*$/,event.dataTransfer.getData('Text'))"> ';this.form.submit()"> <%=iprice*productnum%>元 <%sum1=iprice*productnum+sum1%> <% response.Write "" response.Write "
    费用总计:<%=sum1%> 元 <%' 获得积分:=sums1 %>
<%if rscount<>0 then %>    <%end if%> <%set rs=nothing%>