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

📄 gouwu.asp

📁 购物系统(本版为正式商业版
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--
┌─9911.com.cn────────────┐
│  动感购物 WWW.9911.com.cn 版权所有  │
│  动感购物2005Vb  联系:web@snsn.net │
└───────────9911.com.cn──┘
-->
<!--#include file="conn.asp"-->
<!--#include file="fuction.asp" -->
<%
dim shopid,username,action
action=nosql(request.QueryString("action"))
if trim(session("username"))="" then 
username=nosql(session("tmp_usersessionid"))
else
username=nosql(trim(session("username")))
end if
shopid=nosql(request.QueryString("id"))
'//删除收藏
select case action
case "del"
if Not isChkInteger(request.QueryString("actionid")) then
	%>
	<script language=javascript>
		alert("参数错误!");
		window.close();
	</script>
	<%
	response.end
end if

conn.execute "delete from shop_action where actionid="&nosql(request.QueryString("actionid"))
if request.QueryString("ll")=22 then
response.redirect "myuser.asp?action=shoucang"
else
response.redirect "gouwu.asp?action=show"
end if
response.End
case "add"
'//商品,判断是否存在
if not isChkInteger(shopid) then
%>
<script language=javascript>
		alert("参数错误!");
		window.close();
	</script>
	<%
response.end
end if
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from shop_snsn where shopid="&shopid,conn,1,1
if trim(session("username"))="" then
  danjia=rs_s("shichangjia")
else
if session("reglx")=1 then 
	danjia=rs_s("huiyuanjia")
elseif session("reglx")=2 then 
	danjia=rs_s("vipjia")
elseif session("reglx")=3 then 
	danjia=rs_s("pifajia")
else
	danjia=rs_s("shichangjia")
end if
end if
kucun=rs_s("kucun")
shopname=rs_s("shopname")
rs_s.close
set rs_s=nothing
if kucun<=0 then
response.write "<script language=javascript>alert('你选购的商品“"&shopname&"”暂时缺货不能放到购物车里,请选购其它商品!');window.history.go(-1);</script>"
response.end
end if
  set rs=server.CreateObject("adodb.recordset")
  rs.open "select shopid,username,shopcount,zonger from shop_action where username='"&checkFFSQLStr(username)&"' and shopid="&shopid&" and zhuangtai=7",conn,1,3
      if rs.recordcount=1 then
         if kucun<(rs("shopcount")+1) then
         response.write "<script    language=javascript>alert('你选购的商品“"&shopname&"”暂时缺货不能放到购物车里,请选购其它商品!');window.history.go(-1);</script>"
         response.end
         end if
        rs("zonger")=(rs("shopcount")+1)*danjia
        rs("shopcount")=rs("shopcount")+1
        rs.update
        rs.close
        set rs=nothing
        response.Redirect "gouwu.asp?action=show"
       else
       '//添加购物
         rs.close
         set rs=server.CreateObject("adodb.recordset")
         rs.open "select shopid,username,zhuangtai,zonger,shopcount,actiondate from shop_action",conn,1,3
         rs.addnew
         rs("shopid")=shopid
         rs("actiondate")=now()
         rs("username")=username
         rs("zhuangtai")=7
         rs("shopcount")=1
         rs("zonger")=danjia
         rs.update
         rs.close
         set rs=nothing
         response.Redirect "gouwu.asp?action=show"
        end if
case "show"
'//////////////////
%>
<!--#include file="webconfig.asp"-->
<!--#include file="fuction.asp"-->
<html>
<head>
<title><%=webname%>--我的购物车</title>
<link rel="SHORTCUT ICON" href="/shortcut.ico">
<meta name="generator" content="snsn-shop">
<meta name=keywords content="<%=webgjz%>">
<meta name="description" content="<%=webmx%>">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<meta http-equiv="MSThemeCompatible" content="Yes">
<link href="/css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
.style1 {	color: #FF6600;
	font-weight: bold;
}
-->
</style>
<!--#include file="webtop.asp"--><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onMouseOver="window.status='【<%=webname%>】<%=weburl%> 如果您喜欢本站,别忘了把本站介绍给您的好友哦!:)';return true"> <table width="800" border="0" align="center" cellpadding="0" cellspacing="0"> 
<table width="940" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
  <tr>
    <td width="17"><img src="/img/index_1.gif" width="15" height="16"></td>
    <td valign="bottom">您现在的位置是:<a href="<%=weburl%>"><%=webname%></a> ->
 购物车</td>
    <td valign="bottom"> 
       
    </td>
  </tr>
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
</table>
<table width="945" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td align="left" valign="top">
            <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class="sm_debrown">
              <tr>
                <td colspan="3" height="4" bgcolor="ffffff"></td>
              </tr>
              <tr>
                <td width="7" height="24"><img src="/img/skin<%=cssid%>/bott_nav_lf.gif" width="7" height="24"></td>
                <td width="926" valign="middle" background="img/skin<%=cssid%>/bott_nav_bj.gif" bgcolor="EEE7CC" class="sm_debrown"><span class="table-shangxia"><span class="b14"><b>以下是您所选购的物品清单</b></span></span></td>
                <td width="7"><img src="/img/skin<%=cssid%>/bott_nav_rg.gif" width="7" height="24"></td>
              </tr>
            </table>
            <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="8"></td>
              </tr>
            </table>
            <%
set rs=server.CreateObject("adodb.recordset")
rs.open "select shop_action.actionid,shop_action.shopid,shop_action.shopcount,shop_action.zonger,shop_snsn.shopname,shop_snsn.shichangjia,shop_snsn.huiyuanjia,shop_snsn.vipjia,shop_snsn.pifajia,shop_snsn.cjname from shop_snsn inner join  shop_action on shop_snsn.shopid=shop_action.shopid where shop_action.username='"&username&"' and shop_action.zhuangtai=7",conn,1,1 
if session("username")="" then
			if gouwu<>"1" then
   if session("username")="" then
   response.Write "<script language='javascript'>alert('您好,您还没有登录请登录后购买!');window.location.href='login.asp';</script>"
   response.End
   end if
   end if%>           
            <table width="800"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="73D1E9">
              <form name="userlogin" method="post" action="checkuserlogin.asp?action=1"><tr>
                <td height="25" bgcolor="#E6F7FB">&nbsp;<span class="pad">老用户:用户名:
                    <input name="username" type="text" class="wenbenkuang" id="username" size="22" maxlength="16">
密码: 
<input name="userpassword" type="password" class="wenbenkuang" id="userpassword" size="22" maxlength="16">
<input name="Submit42" type="submit" class="go-wenbenkuang" value="提交信息" onClick="return checkuserinfo();">
<input name="Submit2242" type="reset" class="go-wenbenkuang" value="重置">
<%
set rsl=server.CreateObject("adodb.recordset")
rsl.open "select shop_action.actionid,shop_action.shopid,shop_action.shopcount,shop_action.zonger,shop_snsn.shopname,shop_snsn.shichangjia,shop_snsn.huiyuanjia,shop_snsn.vipjia,shop_snsn.cjname from shop_snsn inner join  shop_action on shop_snsn.shopid=shop_action.shopid where shop_action.username='"&username&"' and shop_action.zhuangtai=7",conn,1,1 
%>
<%do while not rsl.eof%>
<input name=shopid type=hidden checked value=<%=rsl("shopid")%> >
<%rsl.movenext
loop
%>
</span></td>
              </tr></form>
             <form name="userlogin" method="post" action="checkuserlogin.asp?action=3"> <tr>
                <td height="25" bgcolor="#E6F7FB"><span class="pad">&nbsp;新用户:用户名:

⌨️ 快捷键说明

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