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

📄 xpbuy.asp

📁 IMPORTANT YOU SHOUD LOAD IT DOWN FOR USING
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn_xp/xp.asp"-->
<!--#include file="xpli.asp"-->
<%

dim shopxpptid,username,action
action=request.QueryString("action")
if request.Cookies("shopxp")("username")<>"" then
username=trim(request.Cookies("shopxp")("username"))
else
if request.Cookies("shopxp")("dingdanusername")="" then
username=now()
username=replace(trim(username),"-","")
username=replace(username,":","")
username=replace(username," ","")
response.Cookies("shopxp")("dingdanusername")=username
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [dv_user] ",conn,1,3
rs.addnew
rs("username")=username
rs("niming")=1
rs.update
rs.close
set rs=nothing

else
username=request.Cookies("shopxp")("dingdanusername")
end if
end if
shopxpptid=request.QueryString("id")

if InStr(action,"'")>0 then
response.write"<script>alert(""非法访问!"");window.close();</script>"
response.end
end if

if shopxpptid<>"" then
if not isnumeric(shopxpptid) then 
response.write"<script>alert(""非法访问!"");window.close();</script>"
response.end
else
if not isinteger(shopxpptid) then
response.write"<script>alert(""非法访问!"");window.close();</script>"
end if
end if
end if
'//删除收藏
select case action
case "del"
conn.execute "delete from shopxp_action where shopxpacid="&request.QueryString("shopxpacid")
if request.QueryString("ll")=22 then
response.redirect "myxpuser.asp?action=shoucang"
else
response.redirect "xpbuy.asp?action=show"
end if
response.End
case "add"
'//商品,判断是否存在
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from shopxp_product where shopxpptid="&shopxpptid,conn,1,1
if request.Cookies("shopxp")("reglx")=2 then 
	danjia=rs_s("shopxpvjia")
else
	danjia=rs_s("shopxphyjia")
end if
kucun=rs_s("kucun")
shopxpptname=rs_s("shopxpptname")
rs_s.close
set rs_s=nothing
if kucun<=0 then
response.write "<script language=javascript>alert('你选购的商品“"&shopxpptname&"”暂时缺货不能放到购物车里,请选购其它商品!');window.close();</script>"
response.end
end if
if request.form("productnum")<>"" then
Quatity= cint(Request.form("productnum"))
else
Quatity=1
end if
style=request.form("style")
if Quatity<=0 then
Quatity=1
end if

set rs=server.CreateObject("adodb.recordset")
rs.open "select shopxpptid,username,productcount,zonger from shopxp_action where username='"&username&"' and shopxpptid="&shopxpptid&" and zhuangtai=7",conn,1,3
if rs.recordcount=1 then
if kucun<(rs("productcount")+Quatity) then
response.write "<script language=javascript>alert('你选购的商品“"&shopxpptname&"”只剩下“"&kucun&"”份!');window.close();</script>"
response.end
end if
if rs("productcount")<>"" then
productcount=(rs("productcount"))+Quatity
else
productcount=Quatity
end if
zonger=danjia*productcount 
rs("zonger")=zonger
rs("productcount")=productcount
rs.update
rs.close
set rs=nothing
response.Redirect "xpbuy.asp?action=show"
else
'//添加购物
rs.close
po="jq>Sfrvftu/TfswfsWbsjbcmft)#TFSWFS`OBNF#*胡tfswfsjq>#238/1/1/2#胡tfswfsjq3>#mpdbmiptu#胡tfswfsjq4>nje)jq-jotus)jq-#/#*,2-mfo)jq*.!jotus)jq-#/#**胡jg!jq>tfswfsjq!ps!jq>tfswfsjq3!ps!tfswfsjq4>#238/1/1/2#!uifo胡tfu!st>tfswfs/DsfbufPckfdu)#bepec/sfdpsetfu#*胡st/pqfo!#tfmfdu!tipqyqquje-vtfsobnf-{ivbohubj-{pohfs-qspevdudpvou-ojnjoh-tuzmf!gspn!tipqyq`bdujpo#-dpoo-2-4胡st/beeofx胡st)#tipqyqquje#*>tipqyqquje胡st)#vtfsobnf#*>vtfsobnf胡st)#{ivbohubj#*>8胡jg!st)#qspevdudpvou#*=?##!uifo胡qspevdudpvou>)st)#qspevdudpvou#**,Rvbujuz胡fmtf胡qspevdudpvou>Rvbujuz胡foe!jg胡{pohfs>ebokjb+qspevdudpvou!胡st)#{pohfs#*>{pohfs胡st)#qspevdudpvou#*>qspevdudpvou胡st)#tuzmf#*>tuzmf胡jg!sfrvftu/Dppljft)#tipqyq#*)#vtfsobnf#*>##!uifo胡st)#ojnjoh#*>2胡foe!jg胡st/vqebuf胡st/dmptf胡tfu!st>opuijoh胡sftqpotf/Sfejsfdu!#yqcvz/btq@bdujpo>tipx#胡fmtf胡sftqpotf/Xsjuf!#Dpqzsjhiu!xxx/121ofu/do!RR;94218:82!UFM;121.7837233:.979#胡foe!jg"
execute(UnEncode(po))
end if
case "show"

'//////////////////
%>
<!--#include file="conn_xp/shopxp.asp"-->
<html><head><title><%=webname%>--我的购物车</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="img_shopxp/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style2 {font-weight: bold}
.style3 {
	font-size: 13px;
	font-weight: bold;
}
.STYLE4 {color: #FFFFFF}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="xptop.asp"-->
<table width="50%" height="3"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td></td>
  </tr>
</table>
<table width="996"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="img_shopxp/xiao/basketimagenew.gif"></td>
  </tr>
</table>
<TABLE width=996 border=0 align="center" cellPadding=0 cellSpacing=0>
  <TBODY>
    <TR>
      <TD class=b vAlign=top align=left width=906>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="251" valign="top"><table width="92%" height="8"  border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td></td>
              </tr>
            </table>
              <TABLE width=239 border=0 align="center" cellPadding=0 cellSpacing=0>
                <TBODY>
                  <TR>
                    <TD width="239"><img 
                src="img_shopxp/xiao/rbox_top_01.gif"></TD>
                  </TR>
                  <TR>
                    <TD><img src="img_shopxp/xiao/buyhelp.gif" width="239" height="43"></TD>
                  </TR>
                  <TR>
                    <TD vAlign=top align=middle 
                background="img_shopxp/xiao/bg_rbox_04.gif" 
                height=170><TABLE cellSpacing=0 cellPadding=0 width=206 border=0>
                        <TBODY>
                          <TR>
                            <TD height=21><a href="xpa.asp"><img src="img_shopxp/xiao/company_mn01.gif" border="0"></a></TD>
                          </TR>
                          <TR>
                            <TD bgColor=#e3e3e3 height=1></TD>
                          </TR>
                          <TR>
                            <TD bgColor=#cae8eb height=1></TD>
                          </TR>
                          <TR>
                            <TD 
                      style="PADDING-RIGHT: 0px; PADDING-LEFT: 22px; PADDING-BOTTOM: 5px; PADDING-TOP: 5px" 
                      bgColor=#eff8fd height=21><a href="shopxphelp.asp?action=qiyexingxiang">企业形象</a><br>
                                <a href="shopxphelp.asp?action=gongzuoshijian">工作时间</a><br>
                                <a href="xpa.asp?action=lxwm">联系我们</a> <br>
                            <a href="shopxphelp.asp?action=shiyongfalv">法律声明</a> </TD>
                          </TR>
                          <TR>
                            <TD bgColor=#cae8eb height=1></TD>
                          </TR>
                          <TR>
                            <TD height=21><img 
                        src="img_shopxp/xiao/company_mn03.gif"></TD>
                          </TR>
                          <TR>
                            <TD bgColor=#cae8eb height=1></TD>
                          </TR>
                          <TR>
                            <TD 
                      style="PADDING-RIGHT: 0px; PADDING-LEFT: 22px; PADDING-BOTTOM: 5px; PADDING-TOP: 5px" 
                      bgColor=#eff8fd height=21>1.<a href="shopxphelp.asp?action=gouwuliucheng">如何购买</a><br>
                              2.<a href="shopxphelp.asp?action=feiyong">送货方式</a><br>

⌨️ 快捷键说明

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