userinfo.asp

来自「创建和运行动态、交互的Web服务器应用程序」· ASP 代码 · 共 52 行

ASP
52
字号
<% 
   response.write "<table width=155 border=0 align=center cellpadding=0 cellspacing=0>"
   response.write "<tr><td>"
   response.write "<table width='155' border='0' cellspacing='0' cellpadding='0' bgcolor='#ff9900'>"
   response.write "<td width='6'><img src='imgside/ss_050910_lll_01.gif' width='6' height='18' alt=''></td>"
   response.write "<td align=center><font color='#0000ff' size=2>您的购物车</font></td>"
   response.write "<td width='6'><img src='imgside/ss_050910_lll_02.gif' width='6' height='18' alt=''></td>"
   response.write "</tr></table>"

   response.write "<tr><td width='100%' height=41 background=imgside/bg_cartinfo.gif>"
   response.write "<div align=center>"
if request.cookies("bookshop")("username")="" then

   response.write "您还有<font color=red><b>0</b></font>种图书在购物车<br>共计¥:<font color=red><b>0</b></font>元"
   response.write "<br><a href=# onClick=""javascript:window.open('show_cart.asp','','width=730,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"">查看我的购物车>></a>"    
   response.write "<br><a href=myuser.asp?action=shoucang>收藏夹中有<font color=red><b>0</b></font>本图书>></a>"
                                
else
   bk     = Session("mycart") 
   bkindex= session("cartindex")
   total0=0
   for i=0 to bkindex-1
       purchase = bk(i,2)
       huiyuanjia  = bk(i,4)
       total1=purchase*huiyuanjia
       total0=total0+total1

       '//针对收藏和删除,调整记录有效数量 
       if bk(i,2)=0 then bkindex=bkindex-1
       
   next
   if total0<>0 then total0=formatnumber(total0,2)
  
   response.write "您有<font color=red><b>"&bkindex&"</b></font>种图书在购物车<br>共计¥:<font color=red><b>"&total0&"</b></font>元"
   response.write "<br><a href=# onClick=""javascript:window.open('show_cart.asp','','width=730,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"">查看我的购物车>></a>"    

               set scs=server.CreateObject("adodb.recordset") 
                   scs.Open "select * from shop_action where username='"&request.Cookies("bookshop")("username")&"' and zhuangtai=6 ",conn,1,1 
             
                if scs.recordcount=0 then
                   response.write "<br><a href=myuser.asp?action=shoucang>收藏夹中有<font color=red><b>0</b></font>本图书>></a>"
                else
                   response.write "<br><a href=myuser.asp?action=shoucang>收藏夹中有<font color=red><b>"&scs.recordcount&"</b></font>本图书>></a>" 
                end if
                    scs.Close
                set scs=nothing
end if

response.write "<table width=153 border=0 cellspacing=1 cellpadding=1 bgcolor=#F9F9EC><tr><br><td height=20><div align=center><img src=images/guangbo.gif width=16 height=16><font color=813610><b>&nbsp;今日特惠促销</b></font></div></td></tr>"
response.write "<TR><TD align=center height=16><font color=#cc0000>购书就送<梅子技术月刊>三期链接 </font></TD></TR><TR><TD align=center height=16><font color=#cc0000>购书满200元送06年精美<br>台历一本</font></TD></TR></table>"
response.write "</div></td></tr><tr><td height=3><img src=imgside/pic_cartinfobottom.gif width=155 height=3></td></tr></table>"
%>

⌨️ 快捷键说明

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