<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PasswordUpdate.aspx.cs" Inherits="PasswordUpdate" %>

<%@ Register Src="../WebControl/MemberCenter_Top.ascx" TagName="ucMemberCenter_Top" TagPrefix="uc1" %>
<%@ Register Src="../WebControl/MemberCenter_Foot.ascx" TagName="ucMemberCenter_Foot" TagPrefix="uc2" %>
<%@ Register Src="../WebControl/MemberCenter_Left.ascx" TagName="ucMemberCenter_Left" TagPrefix="uc3" %>

<!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="Content-Type" content="text/html; charset=utf-8" />
<title>修改密码</title>
<meta name="keywords" content="网上鞋店，手机数码，护肤品，..." />
<meta name="description" content="BtoC购物网站为您提供最实惠的商品..." />

<link href="../css/templatemo_style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="../css/ddsmoothmenu.css" />

</head>

<body>

<form runat="server" id="form2">
<center>

<div id="templatemo_body_wrapper">
<div id="templatemo_wrapper">
	<uc1:ucMemberCenter_Top runat="server" ID="ucMemberCenter_Top" />
    
    <div id="templatemo_main">
    	<uc3:ucMemberCenter_Left runat="server" ID="ucMemberCenter_Left" />
    	
        <div id="content" class="float_r">
        	<h5 style="text-align:left">会员中心 -》密码修改</h5>
            <div class="content_half float_l checkout">
				会员名:  
				  <asp:Label ID="txtMemberName" runat="server" Text="" style="width:300px;"></asp:Label>              
                <br />
                <br />
                原密码:
				<asp:TextBox ID="txtOldPassword" runat="server" Text="" TextMode="Password" style="width:300px;"></asp:TextBox><font color="red">*</font>
				<asp:RequiredFieldValidator ID="rfvOldPassword" runat="server" 
                        ControlToValidate="txtOldPassword" ValidationGroup="1" ErrorMessage="请输入原密码！">
                        </asp:RequiredFieldValidator>
                <br />
                <br />
                新密码:
				<asp:TextBox ID="txtPassword" runat="server" Text="" TextMode="Password" style="width:300px;"></asp:TextBox><font color="red">* </font>
                    <asp:RegularExpressionValidator ID="revPassword" runat="server" ErrorMessage="新密码长度不少于6位，密码由数字和英文字母组成！"
                        ControlToValidate="txtPassword" ValidationExpression="^[0-9A-Za-z]{6,}$" ValidationGroup="1"
                        Display="Dynamic"></asp:RegularExpressionValidator>
                    <asp:RequiredFieldValidator ID="rfvPassword" runat="server" ErrorMessage="密码必须填写！" Display="Dynamic"
                        ControlToValidate="txtPassword" ValidationGroup="1"></asp:RequiredFieldValidator>
                        <asp:RequiredFieldValidator ID="rfvNewPassword" runat="server" ErrorMessage="新密码与原始密码相同，请重新输入！" Display="Dynamic"
                        ControlToValidate="txtPassword" ValidationGroup="1"></asp:RequiredFieldValidator>
                <br />
                <br />
                确认新密码:
				<asp:TextBox ID="txtRePassword" runat="server" Text="" TextMode="Password" style="width:300px;"></asp:TextBox><font color="red">* </font>
                    <asp:RequiredFieldValidator ID="rfvPass" runat="server" ControlToValidate="txtRePassword"
                        ErrorMessage="确认密码必须填写！" ValidationGroup="1" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="comPassword" runat="server" ControlToCompare="txtPassword"
                        ControlToValidate="txtRePassword" ErrorMessage="两次输入的密码不一致！" ValidationGroup="1"
                        Display="Dynamic"></asp:CompareValidator>
                <br />
                <br />
                  
                  
                <asp:ImageButton ID="btntijiao" runat="server" ImageUrl="../images/btn_Tijiao.jpg" Height="25px" Width="75px" OnClick="tijiao_Click" style="vertical-align:middle"/>
                <a href="MemberInfo.aspx"><img src="../images/btn_Cancel.jpg" alt="" height="25px" width="75px" style="vertical-align:middle"/></a>
            </div>
        </div>

        <div class="cleaner"></div>
    </div> <!-- END of templatemo_main -->
    
    <uc2:ucMemberCenter_Foot runat="server" ID="ucMemberCenter_Foot" />
</div> <!-- END of templatemo_wrapper -->
</div> <!-- END of templatemo_body_wrapper -->

</center>

</form>
</body>
</html>

<script type="text/javascript">
   

    function formcheck() {
        var bo = true;
        if ($.trim($("#txtOldPassword").val()) == "") {
            $("#txtOldPassword").focus();
            $("#rfvOldPassword").show();
            bo = false;
        }
        if ($.trim($("#txtPassword").val()) == "") {
            $("#rfvPassword").show();
            $("#txtPassword").focus();
            bo = false;
        }
        if ($.trim($("#txtPassword").val()) == $.trim($("#txtOldPassword").val()) && $.trim($("#txtPassword").val()) != "") {
            $("#txtPassword").val("");
            $("#txtPassword").focus();
            $("#rfvNewPassword").show();
            bo = false;
        }
        if ($.trim($("#txtPassword").val()) != $.trim($("#txtRePassword").val())) {
            $("#comPassword").show();
            bo = false;
        }
        if($.trim($("#txtPassword").val())!="" && $.trim($("#txtPassword").val()).length<6) {
            $("#revPassword").show();
            bo = false;
        }
        return bo;
    }

</script>