<%@ page language="C#" autoeventwireup="true" inherits="mall_cart, ZKCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register TagName="topbar" TagPrefix="UC" Src="~/mall/topbar.ascx" %>
<%@ Register TagName="head" TagPrefix="UC" Src="~/mall/head.ascx" %>
<%@ Register TagName="foot" TagPrefix="UC" Src="~/mall/foot.ascx" %>
<!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="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title>我的购物车_<%=ZK.config("title","mall") %></title>
    <meta name="keywords" content=" <%=ZK.config("keywords","mall") %>" />
    <meta name="description" content=" <%=ZK.config("description","mall") %>" />
    <script type="text/javascript" src="/s/skin/base.js"></script>
    <link type="text/css" rel="stylesheet" href="/mall/skin/style.css" />
    <script type="text/javascript" src="/mall/skin/public.js"></script>
    <style type="text/css"> .cart_list{}.cart_list th{height:30px;line-height:30px;text-align:center;background:#ffe7e7 url(/mall/skin/dian2.gif) repeat-x 0 bottom;color:#333;font-size:14px;font-weight:normal;}.cart_list td{background:url(/mall/skin/dian2.gif) repeat-x 0 bottom;height:24px;line-height:24px;text-align:center;color:#333;font-size:14px;padding:5px 0;}.cart_list td a{color:#34669f;}.cart_list td a:hover{color:#f60;}.cart_list td span{color:#f30;}.self_but1{background:url(/mall/skin/view_cart_added_go.gif) no-repeat 0 0;width:98px;height:25px;border-width:0;font-weight:bold;color:#fff;cursor:pointer;line-height:25px;}.mall_add_order{width:700px;margin-left:auto;margin-right:auto;border:solid 1px #ddd;padding:1px;}.mall_add_order .s14{color:#f30;padding-bottom:10px;padding-top:10px;padding-left:10px;}.mall_add_order td{font-size:14px;padding-bottom:8px;background:url(/mall/skin/dian2.gif) repeat-x 0 bottom;color:#333;}.mall_add_order .s12{color:#666;}.mall_add_order td td{padding-top:0;padding-bottom:0;background-image:none;}.self_inp1{border:solid 1px #ccc;height:14px;line-height:14px;padding-top:6px;padding-bottom:6px;width:240px;padding-left:4px;font-size:14px;color:#666;font-family:simsun;margin-left:3px;}.cart_price_inp{width:40px;height:15px;padding-top:3px;*height:18px;*padding-top:0;line-height:18px;font-family:simsun;color:#666;background:url(/mall/skin/mall_inp1.gif) no-repeat 0 0;border:solid 1px #bcbcbc;padding-left:3px;padding-right:2px;margin-left:10px;}.cart_price_but{width:46px;height:20px;*line-height:22px;background:url(/mall/skin/mall_but1.gif) no-repeat 0 0;border-width:0;color:#333;cursor:pointer;margin-right:5px;}</style>
    <script type="text/javascript">
        function cart_update_buynum(id)
        {
            var s_num =document.getElementById("mall_cart_id"+id).value;
            var regNum =/[^\d]/;
            if(regNum.test(s_num)){alert("请输入正确的数量！");return false;}
            if(s_num<1)s_num="1";
            window.location="cart.aspx?act=modnum&id="+id+"&value="+s_num;
        }
    </script>
</head>
<body>
    <%--<noscript><style type="text/css">body,.wrap{background-color:#fff;background-image:none;}.box,.topbar{display:none;}</style><div class="noscript">您的浏览器不支持Javascript，请升级你的浏览器或者打开Javascript支持！</div></noscript>--%>
    <a name="pagetop" id="pagetop"></a>
    <div class="wrap">
        <UC:topbar ID="topbar1" runat="server" />
        <UC:head ID="head1" runat="server" />
        <div class="box">
            <div class="c1 mt10">
                <div class="b3">
                    <div class="fl"></div>
                    <div class="con">我的购物车</div>
                    <div class="fr"></div>
                    <div class="clear"></div>
                </div>
                <div class="v1" style="border-color: #e05d5d">
                    <form id="form1" runat="server" autocomplete="off">
                    <asp:Panel ID="Panel_Nodata" runat="server" Visible="false">
                        <div style="padding: 50px;">
                            <div class="tip_nodata" id="tip_nodata" style="background-position: 10px 11px; padding-left: 35px;font-size: 14px;">
                            <a href="#" onclick="history.back()" title="点击返回上页！">购物车内还没有商品！</a></div>
                            <script type="text/javascript">                        
                                var self_UrlR=document.referrer.toLowerCase();self_UrlR=self_UrlR.substring(self_UrlR.indexOf("/mall/"));
                                if(self_UrlR=="/mall/cart.aspx")document.getElementById("tip_nodata").innerHTML="<a href=\"#\" onclick=\"window.location=\'/mall/\';\" title=\"点击返回上页！\">购物车内还没有商品！</a>";
                            </script>
                        </div>
                    </asp:Panel>
                    <asp:Panel ID="Panel0" runat="server">
                        <div class="cart_list">
                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
                                    <th width="100">商品图片</th>
                                    <th>商品名称</th>
                                    <th width="120">商品单价</th>
                                    <th width="120" colspan="2">购买数量</th>  
                                    <th width="120">小计</th>
                                    <th width="90">删除商品</th>
                                </tr>
                                <asp:Literal ID="Literal1" runat="server"></asp:Literal>
                            </table>
                        </div>
                    </asp:Panel>
                    <asp:Panel ID="Panel1" runat="server">
                        <div class="ar" style="padding-top: 10px; padding-right: 15px">
                            <table border="0" cellpadding="0" cellspacing="0" align="right">
                                <tr>
                                    <td style="height: 30px; font-size: 14px; color: #333">购物车合计：</td>
                                    <td style="height: 24px"><strong style="font-size: 20px; color: #f60">￥<%=FUN.FormatPrice(ZK.GetMallCartTotalPrice().ToString())%></strong></td>
                                </tr>
                            </table>
                        </div><div class="clear"></div>
                        <div class="ar" style="padding-top: 8px; padding-right: 15px; padding-bottom: 15px">
                            <asp:Button ID="Button1" runat="server" Text="清空购物车" CssClass="self_but1" onmouseover="hover(this,0.8)" onmouseout="hover(this,1)" OnClick="Button1_Click" OnClientClick="return confirm('确定清空购物车吗？')" />
                            <input type="button" class="self_but1" value="继续购物" onclick="window.location='/mall/'" style="margin-left: 10px" onmouseover="hover(this,0.8)" onmouseout="hover(this,1)" />
                            <asp:Button ID="Button2" runat="server" Text="立即购买" CssClass="self_but1" Style="margin-left: 10px" onmouseover="hover(this,0.8)" onmouseout="hover(this,1)" OnClick="Button2_Click" />
                        </div>
                    </asp:Panel>
                    <asp:Panel ID="Panel2" runat="server" Style="padding: 15px 0;" Visible="false">
                        <div class="mall_add_order">
                            <div class="str s14">填写收货信息：</div>
                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
                                    <td class="ar">交易方式：
                                        <script type="text/javascript">
                                            function self_select_buytype(str1,N)
                                            {
                                                for(var i=1;i<4;i++){document.getElementById("self_img"+i).src="/mall/skin/ico_radio.gif";}
                                                document.getElementById("self_img"+N).src="/mall/skin/ico_radio_check.gif";
                                                document.getElementById("buytype").value=str1;                                                
                                                if(N==1){
                                                    document.getElementById("self_text1").innerHTML="收货人姓名：";
                                                    document.getElementById("self_tr1").className="";document.getElementById("self_tr2").className="";
                                                }
                                                else {
                                                   document.getElementById("self_text1").innerHTML="联系人：";
                                                   document.getElementById("self_tr1").className="none";document.getElementById("self_tr2").className="none";
                                                }
                                            }                                            
                                            function self_check1()
                                            {
                                                if(document.getElementById("contact").value==""){alert("联系人(收货人)不能为空！");return false;}
                                                if(document.getElementById("buytype").value=="快递送货上门"){if(document.getElementById("address").value==""){alert("收货地址不能为空！");return false;}}
                                                if(document.getElementById("phone").value==""){alert("联系电话(手机)不能为空！");return false;}
                                            }
                                        </script>
                                    </td>
                                    <td colspan="2">
                                        <table border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td>
                                                    <div><img alt="" id="self_img1" src="/mall/skin/ico_radio_check.gif" onclick="self_select_buytype('快递送货上门',1)" /></div>
                                                </td>
                                                <td>
                                                    <span style="padding-left:4px;cursor:pointer" onclick="self_select_buytype('快递送货上门',1)">快递送货上门</span>
                                                </td>
                                                <td>
                                                    <div style="padding-left: 12px"><img alt="" id="self_img2" src="/mall/skin/ico_radio.gif" onclick="self_select_buytype('自提(免快递费用)',2)" /></div>
                                                </td>
                                                <td>
                                                    <span style="padding-left:4px;cursor:pointer" onclick="self_select_buytype('自提(免快递费用)',2)">自提(免快递费用)</span>
                                                </td>
                                                <td>
                                                    <div style="padding-left: 12px"><img alt="" id="self_img3" src="/mall/skin/ico_radio.gif" onclick="self_select_buytype('线下自主交易',3)" /></div>
                                                </td>
                                                <td>
                                                    <span style="padding-left:4px;cursor:pointer" onclick="self_select_buytype('线下自主交易',3)">线下自主交易</span>
                                                    <asp:HiddenField ID="buytype" runat="server" Value="快递送货上门" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="ar" width="100" style="padding-top: 8px"><span id="self_text1">收货人姓名：</span></td>
                                    <td width="260" style="padding-top: 8px"><asp:TextBox ID="contact" runat="server" CssClass="self_inp1" MaxLength="20"></asp:TextBox></td>
                                    <td style="padding-top: 8px"><div class="s12">请正确填写姓名，最少不能低于2个字，最多不能超过15个字</div></td>
                                </tr>
                                <tr id="self_tr1">
                                    <td class="ar" style="padding-top: 8px">收货地址：</td>
                                    <td style="padding-top: 8px"><asp:TextBox ID="address" runat="server" CssClass="self_inp1" MaxLength="100"></asp:TextBox></td>
                                    <td style="padding-top: 8px"><div class="s12">请输入详细的收货地址。</div></td>
                                </tr>
                                <tr id="self_tr2">
                                    <td class="ar" style="padding-top: 8px">邮政编码：</td>
                                    <td style="padding-top: 8px"><asp:TextBox ID="postcode" runat="server" CssClass="self_inp1" MaxLength="6" onKeyUp="this.value=this.value.replace(/\D/g,'')" onblur="this.value=this.value.replace(/\D/g,'')"></asp:TextBox></td>
                                    <td style="padding-top: 8px"><div class="s12">请输入6位邮政编码。</div></td>
                                </tr>
                                <tr>
                                    <td class="ar" style="padding-top: 8px">手机号码：</td>
                                    <td style="padding-top: 8px"><asp:TextBox ID="phone" runat="server" CssClass="self_inp1" MaxLength="30"></asp:TextBox></td>
                                    <td style="padding-top: 8px"><div class="s12">请输入正确的联系电话。</div></td>
                                </tr>
                                <tr>
                                    <td class="ar" style="padding-top: 8px">补充说明：</td>
                                    <td colspan="2" style="padding-top: 8px"><asp:TextBox ID="note" runat="server" CssClass="self_inp1" TextMode="MultiLine" Width="500" Height="120" style="overflow-y:auto"></asp:TextBox></td>
                                </tr>
                                <tr>
                                    <td style="background-image: none">&nbsp;</td>
                                    <td colspan="2" style="background-image: none">
                                        <div style="padding-top: 10px; padding-right: 15px">
                                            <table border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td style="height: 30px; font-size: 14px; color: #333">购物车合计：</td>
                                                    <td style="height: 24px"><strong style="font-size: 20px; color: #f60">￥<%=FUN.FormatPrice(ZK.GetMallCartTotalPrice().ToString())%></strong></td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div style="padding-bottom: 8px; padding-top: 10px;width:480px"><asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="/mall/skin/buy_btn.gif" onmouseover="hover(this,0.8)" onmouseout="hover(this,1)" onclick="ImageButton1_Click" OnClientClick="return self_check1()" /><asp:Literal ID="Literal2" runat="server"></asp:Literal></div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </asp:Panel>
                    </form>
                </div>
            </div>
        </div>
        <UC:foot ID="foot1" runat="server" />
    </div>
</body>
</html>
