<%@ page language="C#" autoeventwireup="true" inherits="users.user_ModifyPassword, LebiMall" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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="css/main.css" rel="stylesheet" type="text/css" />
    <link href="../images/css/css3.css" rel="stylesheet" type="text/css" />
    <link href="../images/css/css2.css" rel="stylesheet" type="text/css" />
    <link href="../images/css/css.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" src="../images/js/shopjs.js"></script>
    <script>
        function changeStyle(obj_){
            if(obj_.style.background == "white" || obj_.style.background == "")
                obj_.style.background = "ccff88";
            else
                obj_.style.background = "white";
        }
        
        var flag = false;
        
        function validate(){
            var pwd1 = document.getElementById("txtNewPwd");
            var pwd2 = document.getElementById("txtConfirmPwd");
            document.getElementById("imgValidate").style.visibility = "visible";
            if(pwd1.value == pwd2.value){
                flag = true;
                document.getElementById("imgValidate").src = "../images/accept.gif";
            }else{
                flag = false;
                document.getElementById("imgValidate").src = "../images/cross.gif";
            }
        }
        
        function validate1(obj){
            var pwd = obj.value;
            var regular = /[\u4E00-\u9FA5]/g;
            document.getElementById("imgPassword").style.visibility = "visible";
            if(regular.test(pwd)){
                document.getElementById("imgPassword").src = "../images/cross.gif";
                flag = false;
                return false;
            }
            regular = /^\w{1,20}$/;
            if(regular.test(pwd)){
                flag = true;
                document.getElementById("imgPassword").src = "../images/accept.gif";
            }else{
                document.getElementById("imgPassword").src = "../images/cross.gif";
                flag = false;
            }
        }
        function search2(){
            var texts2=document.getElementById("ser2").value;
            var select_v2=document.getElementById("Select2").value;
            window.location="../list.aspx?tid="+select_v2+"&titlec="+escape(texts2);
        }
    </script>
</head>
<body>
    <form id="Form1" runat="server">
        <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>

                <div id="right">
                    <div class="contenter">
                        <div class="nav-tabs">
                            <ul class="tabs">
                                <li><a href="Default.aspx">基本信息</a> </li>
                            </ul>
                            <ul class="tabs">
                                <li><a href="UserEdit.aspx">编辑信息</a> </li>
                            </ul>
                            <ul class="tabs">
                                <li><a href="ModfiyHead.aspx">修改头像</a> </li>
                            </ul>
                            <ul class="tabs">
                                <li class="selected"><a href="ModifyPassword.aspx">修改密码</a> </li>
                            </ul>
                        </div>
                        <div>
                            <table cellpadding="0" cellspacing="0" style="margin: 2px;">
                            <tr>
                                <td colspan="2">
                                    <span class="title_r" id="msg_sub"></span>
                                    <script type="text/javascript">
                                        var i = 2;
                                        var f="<%=returnValue %>";
                                        if(f=="true"){
                                            document.getElementById("msg_sub").innerHTML="操作成功！";
                                            document.getElementById("msg_sub").style.visibility="visible";
                                            setInterval("fun()", 1000);
                                        }
                                        if(f=="false"){
                                            document.getElementById("msg_sub").innerHTML="操作失败！";
                                            document.getElementById("msg_sub").style.visibility="visible";
                                        }
                                        function fun() {
                                            if (i == 1) {
                                                window.location.href="Default.aspx";
                                            }
                                            i--;
                                        }
                                    </script>
                               </td>
                            </tr>
                        <tr>
                            <td class="dis_td">
                                您的旧密码：
                            </td>
                            <td class="dis_td2">
                                <input id="txtOldPwd" type="password" class="input" runat="server" onblur="document.getElementById('errorMessage').style.display='none';changeStyle(this);"
                                    onfocus="changeStyle(this);" />
                                <span class="errorMessage" id="errorMessage" style="visibility: <%=this.imgFlag %>">
                                    <img id="imgOldPwd" src="../images/cross.gif" style="visibility: <%=this.imgFlag %>" />
                                    密码输入有误</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="dis_td">
                                输入新密码：
                            </td>
                            <td class="dis_td2">
                                <input id="txtNewPwd" type="password" class="input" runat="server" onblur="validate();validate1(this);changeStyle(this);"
                                    onfocus="changeStyle(this);" /><img id="imgPassword" style="visibility: hidden" />
                            </td>
                        </tr>
                        <tr>
                            <td class="dis_td">
                                新密码确认：
                            </td>
                            <td class="dis_td2">
                                <input id="txtConfirmPwd" type="password" class="input" runat="server" onblur="validate();changeStyle(this);"
                                    onfocus="changeStyle(this);" /><img id="imgValidate" style="visibility: hidden" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="padding-left: 16px; height: 60px;">
                                <input class="dis_btn" type="submit" ID="btnOk" onClick="return flag;" runat="server"
                                    value="确 认 编 辑" onmouseover="this.className='dis_btnf';" onmouseout="this.className='dis_btn';"
                                    onserverclick="btnOk_Click" />
                                &nbsp;
                                <input class="dis_btn2" type="reset" value="重 填" onmouseover="this.className='dis_btn2f';"
                                    onmouseout="this.className='dis_btn2';" />
                            </td>
                        </tr>
                    </table>
                        </div>
                    </div>
                </div>
                <div class="both">
                </div>
                <div class="both">
                </div>
                 <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="Select2" 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>
    </form>
</body>
</html>
