您好,欢迎来到点滴吧! 手机版
点滴吧www.diandiba.com
记录点点滴滴,尽在点滴吧
  • 文章
  • 文章
  • 特效
  • 素材
  • 景点
您现在的位置:首页 > 动易 > 文章正文
SiteWeaver中用asp读取购物车中的商品数量
更新时间:2015/1/4 18:36:22   点击:2215次
<!--#include file="../Start.asp"-->
<!--#include file="../Include/PowerEasy.MD5.asp"-->
<!--#include file="../API/API_Config.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
body{margin:0px; padding:0px; font-size:12px; color:#666666; line-height:25px;}
a{text-decoration: none;} /* 链接无下划线,有为underline */ 
a:link {color: #666666;} /* 未访问的链接 */
a:visited {color: #666666;} /* 已访问的链接 */
a:hover{color:#990000;} /* 鼠标在链接上 */ 
a:active {color: #666666;} /* 点击激活链接 */
</style>
</head>
<body>
<%
dim ShoppingCartRs,ShoppingCartSql,IfLogin
set ShoppingCartRs=server.CreateObject("adodb.recordset")
ShoppingCartSql="select * from PE_ShoppingCarts where UserName='"&Request.Cookies(Site_Sn)("UserName")&"'"
ShoppingCartRs.open ShoppingCartSql,conn,3,1
IfLogin=Request.Cookies(Site_Sn)("UserName")

if IfLogin="" then
%>
<a href="/Shop/ShoppingCart.asp" target="_parent">购物车中有0件商品</a>
<%
elseif ShoppingCartRs.eof then
%>
<a href="/Shop/ShoppingCart.asp" target="_parent">购物车中有0件商品</a>
<%else%>
<a href="/Shop/ShoppingCart.asp" target="_parent">购物车中有<%=ShoppingCartRs.recordcount%>件商品</a>
<%end if%>
</body>
</html>


相关文章
导航分类
热门文章
关于我们| 联系我们| 免责声明| 网站地图|
CopyRight 2012-2015 www.diandiba.com - 点滴吧 All Rights Reserved
滇ICP备09005765号-2