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

ASP
看人家用使用InstallShield制作ASP安装程序(5)
看人家用使用InstallShield制作ASP安装程序(4)
看人家用使用InstallShield制作ASP安装程序(3)
看人家用使用InstallShield制作ASP安装程序(2)
看人家用使用InstallShield制作ASP安装程序(1)
取得浏览者的离开时间
base64编码、解码函数
动态显示图片的函数(显示广告条)
发送带附件的HTML格式邮件例程可以带附件
一种在父窗口中得知window.open()出的子窗口关闭事件的方法
一个老个写的无组件上传
避免asp的SQL的执行效率低
树型结构在ASP中的简单解决
无需数据库循环的无级分类代码
检查字符串strSource是否为big或big5码
有关重复记录的删除(SQL SERVER)
WINDOWS2000服务器账号登陆身份验证
使用VC++6.0制作ASP服务器控件简介
利用sql的存储过程实现dos命令的asp程序
WSH 直接将查询数据结果生成 EXCEL 表

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


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

  <!--put2bag.asp-->

<%@ Language=VBScript %>
<%
    'id_type=request("id_type")

    on error resume next
    Response.Buffer = true
    Response.Expires = 0
    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_temp
            'p_id               ----商品id号
            'p_name          ----商品名称
            'p_price           ----原价单价
            'p_manu          ----商品制造商
            'p_type            ----商品式样
            'p_size            ----商品尺寸
            'p_color           ----商品颜色
            'p_num            ----商品数量
            'p_temp           ----临时存放p_num
            

    if session("login")="" then
        response.write"<script langue=""javascript"">" & chr(13)
        response.write"alert(""请先登录"");" & chr(13)
        response.write"history.go(-1);" & chr(13)
        response.write"</script>" & chr(13)
    else
                '初始化购物车内变量
        p_id=trim(request("id"))
        P_manu=trim(request("manu"))
        p_type=trim(request("type"))
        p_name=replace(trim(request("name1"))," ","")
        p_price=trim(request("price"))
        p_size=trim(request("size"))
        p_color=trim(request("color"))
        p_num=trim(request("num"))

        if ((not IsNumeric(p_num)) or (p_num<="0") or (instr(1,p_num,".")<>0)) then