<%@ page language="C#" autoeventwireup="true" inherits="EditAddress, LebiMall" %>

<!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 id="Head1" runat="server">
     <title><%=model_t.Title%>-收货地址</title>
    <meta name="description" content=<%=model_t.Description %> />
    <meta name="keywords" content=<%=model_t.Keywords %> />
    <meta name="generator" content="LBMall 3.0.0" />
    <link href="images/css/css.css" rel="stylesheet" type="text/css" />
    <link href="images/css/css3.css" rel="stylesheet" type="text/css" />
    <link href="images/css/cart.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="images/js/shopjs.js"></script>

    <script type="text/javascript" src="images/js/valorder.js"></script>

    <script type="text/javascript" src="images/js/editaddress.js"></script>

    <link href="images/css/shopcss.css" rel="stylesheet" type="text/css" />
    <!--[if lte IE 6]><style type="text/css" media="screen">/* <![CDATA[ */ @import url(images/css/ie6.css); /* ]]> */</style><![endif]-->
    <!--[if gte IE 7]><STYLE type=text/css media=screen>@import url(images/css/ie7.css);</STYLE><![endif]-->
    <script type="text/javascript">
        function del(id){
          if (confirm("确认要删除？")) {
            window.location.href="DelAddress.aspx?id="+id;}
        }
        function search2(){
            var texts2=document.getElementById("ser2").value;
            var select_v2=document.getElementById("Select3").value;
            window.location="list.aspx?tid="+select_v2+"&titlec="+escape(texts2);
        }
    </script>
</head>
<body>

    <div id="top-menu02">
        <div id="top-menu">
            <div class="right">
                <script type="text/javascript">indexhead();</script>
            </div>
        </div>
    </div>
    <div id="top">
        <div id="logo">
            <a href="http://<%=Request.Url.Host %><%=model_t.WebPath %>/">
                <img src="Upload/WebAdminImages/<%=model_t.Logoimg %>" border="0" /></a></div>
    </div>
    <div id="sp-menu">
        <ul>
            <li><a href="http://<%=Request.Url.Host %><%=model_t.WebPath %>/">首页</a></li>
            <%for (int i = 0; i < ds_tab.Tables[0].Rows.Count; i++){ %>
            <li><%if (model_t.Tab == "1")
                  { %>
                <a href="<%= ds_tab.Tables[0].Rows[i]["tdirname"]%>/" target="_blank"><%= ds_tab.Tables[0].Rows[i]["tname"]%></a>
                <%}else{%>
                <a href="TopTab.aspx?type=<%= ds_tab.Tables[0].Rows[i]["tdirname"]%>" target="_blank"><%= ds_tab.Tables[0].Rows[i]["tname"]%></a>
                <%} %></li>
            <%} %>
            <li><a href="http://<%=Request.Url.Host %><%=model_t.WebPath %>/News/" target="_blank">资讯</a></li>
        </ul>
        <p>
            <span><a href="ShopCoupon.aspx">优惠券</a></span></p>
    </div>

    <div id="contenter2">
        <div id="contenter">

            <script type="text/javascript">
           shopLeft();
            </script>

            <form id="form1" runat="server">
                <div id="right">
                    <div class="page-title">
                        <h2 class="shop clearfix">
                            收货地址
                        </h2>
                    </div>
                    <div class="contenter">
                        <div class="edit_address">
                            <table cellspacing="0" cellpadding="0" class="tablec">
                                <tr>
                                    <td align="right" class="tdn">
                                        <span id="title_c">新增</span>收货地址
                                    </td>
                                    <td class="tdra">
                                        电话号码、手机号选填一项,其余均为必填项
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top" align="right" class="tdn3">
                                        地址：
                                    </td>
                                    <td valign="top" class="tdra">
                                        <div style="float: left">
                                            <textarea id="txt_address" class="texta2" runat="server"></textarea></div>
                                        <div>
                                            &nbsp;<span style="color: Red;">*</span><em>填写如：河北省 秦皇岛市 海港区 ××街道××号</em>
                                        </div>
                                        <div style="clear: both;">
                                        </div>
                                        <div class="v_div" style="display: none;" id="msg_address">
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top" align="right" class="tdn2">
                                        邮政编码：
                                    </td>
                                    <td class="tdra">
                                        <input id="txt_postalcode" type="text" class="youz" runat="server" />&nbsp;<span
                                            style="color: Red">*</span>
                                        <div class="v_div" style="display: none;" id="msg_pcode">
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top" align="right" class="tdn2">
                                        收货人姓名：
                                    </td>
                                    <td class="tdra">
                                        <input id="txt_name" type="text" class="xingm" runat="server" />&nbsp;<span style="color: Red">*</span>
                                        <div class="v_div" style="display: none;" id="msg_name">
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top" align="right" class="tdn2">
                                        电话：
                                    </td>
                                    <td class="tdra">
                                        <input id="txt_qu" type="text" class="dianh1" runat="server" />-<input id="txt_code"
                                            type="text" runat="server" class="dianh2" />-<input id="txt_fen" type="text" class="dianh3"
                                                runat="server" />&nbsp;<em>格式：区号 - 电话号码 - 分机号</em>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top" align="right" class="tdn2">
                                        手机：
                                    </td>
                                    <td class="tdra">
                                        <input id="txt_phone" type="text" class="shouj" runat="server" />
                                        <div class="v_div" style="display: none;" id="msg_phone">
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td class="tdra2">
                                        <asp:Button ID="Button1" CssClass="btnbc" runat="server" Text="保存" OnClick="Button1_Click"
                                            OnClientClick="return val()" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="det_address">
                            <div class="det_title">
                                已保存的有效地址</div>
                            <table class="dt_table" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td class="d_td1" align="center">
                                        收货人
                                    </td>
                                    <td class="d_td2" align="center">
                                        收货地址
                                    </td>
                                    <td class="d_td3" align="center">
                                        邮编
                                    </td>
                                    <td class="d_td4" align="center">
                                        电话/手机
                                    </td>
                                    <td class="d_td5" align="center">
                                        操作
                                    </td>
                                </tr>
                                <%for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                              { %>
                                <tr>
                                    <td align="center" class="d_tdc">
                                        <%=ds.Tables[0].Rows[i]["Sname"] %>
                                    </td>
                                    <td align="center" class="d_tdc">
                                        <%=ds.Tables[0].Rows[i]["Saddress"]%>
                                    </td>
                                    <td align="center" class="d_tdc">
                                        <%=ds.Tables[0].Rows[i]["Spostalcode"]%>
                                    </td>
                                    <td align="center" class="d_tdc">
                                        <div>
                                            <%=ds.Tables[0].Rows[i]["Sphone"]%>
                                        </div>
                                        <div>
                                            <%=ds.Tables[0].Rows[i]["Sphone_c"]%>
                                        </div>
                                    </td>
                                    <td align="center" class="d_tdc">
                                        <a href="#" onclick="setAdd('<%=ds.Tables[0].Rows[i]["id"] %>')">修改</a>|<a href="#"
                                            onclick="del('<%=ds.Tables[0].Rows[i]["id"] %>')">删除</a>
                                        <input type="hidden" id="name_<%=ds.Tables[0].Rows[i]["id"] %>" value='<%=ds.Tables[0].Rows[i]["Sname"] %>' />
                                        <input type="hidden" id="ar_<%=ds.Tables[0].Rows[i]["id"] %>" value='<%=ds.Tables[0].Rows[i]["Saddress"] %>' />
                                        <input type="hidden" id="scode_<%=ds.Tables[0].Rows[i]["id"] %>" value='<%=ds.Tables[0].Rows[i]["Spostalcode"] %>' />
                                        <input type="hidden" id="phone_<%=ds.Tables[0].Rows[i]["id"] %>" value='<%=ds.Tables[0].Rows[i]["Sphone"] %>' />
                                        <input type="hidden" id="phone2_<%=ds.Tables[0].Rows[i]["id"] %>" value='<%=ds.Tables[0].Rows[i]["Sphone_c"] %>' />
                                    </td>
                                </tr>
                                <%} %>
                            </table>
                            <input type="hidden" id="hidden_id" runat="server" />
                            <div class="d40">
                                最多保存10个有效地址</div>
                        </div>
                    </div>
                </div>
            </form>
            <div id="footer">
                <div id="copyright">
                    <div class="search">
                        <div class="search-left">
                            <div class="search-left-title">
                                搜索：</div>
                            <div class="search-left-form">
                                <input type="text" runat="server" id="ser2" size="30" /></div>
                            <div class="search-left-list">
                                <select id="Select3" runat="server">
                                </select>
                            </div>
                            <div class="search-left-button">
                                <img src="images/search-buttom.gif" width="60" height="20" onclick="search2()" /></div>
                        </div>
                        <div class="search-right">
                            <div runat=server id="div_s2"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="copyright" runat="server" id="copr"></div>
        </div>
    </div>
</body>
</html>
