当前位置: 首页 > 图文教程 > 网络编程 > ASP > 购物车范例(购物车页面 )

ASP
用ASP编写网络传呼机
用ASP+CSS实现随机背景
ASP下载系统防盗链方法
用ASP编写下载网页中所有资源的程序
Request.ServerVariables应用
解决Asp程序的Server.CreateObject错误
ASP实现TCP端口扫描的方法
源码实例:ASP实现远程保存图片
用ASP+DLL实现WEB方式修改服务器时间
ASP使用MySQL数据库全攻略
ASP+SQL Server构建网页防火墙
教程/ASP 十天学会ASP之第二天
教程/ASP 十天学会ASP之第四天
教程/ASP 十天学会ASP之第五天
教程/ASP 十天学会ASP之第六天
教程/ASP 十天学会ASP之第七天
教程/ASP 十天学会ASP之第八天
教程/ASP 十天学会ASP之第九天
教程/ASP 十天学会ASP之第十天
关于学习ASP和编程的28个观点

ASP 中的 购物车范例(购物车页面 )


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 30 ::
收藏到网摘: n/a

  <!--checkbag.asp-->

<!--shoppingcart page-->

<%  
    response.expires = 0
    response.expiresabsolute = Now() - 1
    response.addHeader "pragma","no-cache"
    response.addHeader "cache-control","private"
    Response.CacheControl = "no-cache"
%>

<!--#include file= "conn.asp"-->
<!--#include file= "char.inc"-->

<%
    'id_type=request("id_type")
    obj=request("obj")       '用做检测是否是正常购买后的进入购物车取obj参数
    rid=session("id")         '取出会员id
    dim x,i
    dim obj_bag,bag_item,cart
           'obj_bag          ----购物车
           'bag_item        ----商品的信息数据集合
           'cart                ----一件商品的信息数据集合
    dim p_id,p_name,p_price,p_manu,p_type,p_size,p_color,p_num,p_total,sum
            'p_id               ----商品id号
            'p_name         ----商品名称
            'p_price          ----价格
            'p_manu         ----制造商
        'p_type           ----商品式样
            'p_size           ----尺寸
        'p_color          ----颜色
            'p_num           ----数量
            'p_total           ----小计
            'sum              ----合计金额

    dim id1

    if obj="1" then                                     obj为1说明由菜单栏点击进入的
        if not isobject(Session("Bag")) then            如果Session("Bag")不是对象,说明购物车为空
            response.write "<script language=""javascript"">"
            response.write"alert(""购物车为空!"");" & chr(13)
          &nbs