日期:2011-02-18  浏览次数:20917 次

<!--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
            p_num=1