<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UpdateUserPwd.aspx.cs"
    Inherits="RM.Web.RMBase.SysUser.UpdateUserPwd" %>

<!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 runat="server">
    <title><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UpdateUserPwd")%></title>
    <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
    <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/Validator/JValidator.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/artDialog.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/iframeTools.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/jquery.md5.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
    <script type="text/javascript">
        function CheckValid() {
            var _PasPwd = '<%=_PasPwd %>';
            var PasPwd = $("#txtPastUser").val();
            var pwd = $("#txtUser").val();
            var NewPwd = $("#User_NewPwd").val();
            var code = $("#txtCode").val();
            if (PasPwd == "") {
                $("#txtPastUser").focus();
                $("#errorMsg").html('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UpdateUserPwd_mnull")%>');
                return false;
            }
            if (_PasPwd != $.md5(PasPwd).toUpperCase()) {
                $("#txtPastUser").focus();
                $("#errorMsg").html('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UpdateUserPwd_mmcw")%>');
                return false;
            }
            if (pwd == "") {
                $("#txtUser").focus();
                $("#errorMsg").html('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UpdateUserPwd_mmkong")%>');
                return false;
            }
            if (pwd == PasPwd) {
                $("#txtUser").focus();
                $("#errorMsg").html('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UpdateUserPwd_mmxt")%>');
                return false;
            }
            if (NewPwd == "") {
                $("#User_NewPwd").focus();
                $("#errorMsg").html('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UpdateUserPwd_bnk")%>');
                return false;
            }
            if (pwd != NewPwd) {
                $("#User_NewPwd").empty();
                $("#txtUser").empty();
                $("#errorMsg").html('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UpdateUserPwd_mmbyz")%>');
                return false;
            }
            if (code == "") {
                $("#txtCode").focus();
                $("#errorMsg").html('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UpdateUserPwd_yzmk")%>');
                return false;
            }
            return confirm('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UpdateUserPwd_lj")%>');
        }
        //清空
        function resetInput() {
            $("#txtPastUser").focus(); //默认焦点
            $("#txtPastUser").val("");
            $("#txtUser").val("");
            $("#User_NewPwd").val("");
        }
    </script>
    <style type="text/css">
        #errorMsg
        {
            border: 1px solid #A8A8A8;
            width: auto;
            padding-left: 30px;
            padding-right: 20px;
            padding-top: 3px;
            padding-bottom: 2px;
            background: rgb(255, 253, 215) url('/Themes/images/exclamation_octagon_fram.png') no-repeat scroll 5px 2px;
            color: red;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <table border="0" cellpadding="0" cellspacing="0" class="frm">
        <tr>
            <th>
                <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Accout")%>:
            </th>
            <td>
                <input type="text" disabled id="txtUserName" runat="server" class="txt" style="width: 200px;" />
            </td>
        </tr>
        <tr>
            <th>
                <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("OldPwd")%>:
            </th>
            <td>
                <input type="text" id="txtPastUser" runat="server" class="txt" style="width: 200px;" />
            </td>
        </tr>
        <tr>
            <th>
                <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("NewPwd")%>:
            </th>
            <td id="pwdtd">
                <input type="text" id="txtUser" runat="server" class="txt" style="width: 200px;" />
            </td>
        </tr>
        <tr>
            <th>
                <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ConfirmPwd")%>:
            </th>
            <td>
                <input id="User_NewPwd" runat="server" type="text" class="txt" style="width: 200px" />
            </td>
        </tr>
        <tr>
            <th>
                <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Vcode")%>:
            </th>
            <td>
                <input type="text" id="txtCode" runat="server" class="inp3 txt" style="width: 48px;" />
                <img src="/Ajax/Verify_code.ashx" width="70" height="22" id="yanzhengm"  title="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UpdateUserPwd_djyzm")%>"
                    style="margin-top: 0px; vertical-align: top; cursor: pointer;" onclick="ToggleCode(this.id, '/Ajax/Verify_code.ashx');return false;" />
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <span id="errorMsg" runat="server"> <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CurrentUserManager_xgmm")%></span>
            </td>
        </tr>
    </table>
    <div class="frmbottom">
        <asp:LinkButton ID="Save" runat="server" class="l-btn" OnClientClick="return CheckValid();"
            OnClick="Save_Click"><span class="l-btn-left">
            <img src="/Themes/Images/disk.png" alt="" /><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Save")%></span></asp:LinkButton>
        <a class="l-btn" href="javascript:void(0)" onclick="OpenClose();"><span class="l-btn-left">
            <img src="/Themes/Images/cancel.png" alt="" /><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Close")%></span></a>
    </div>
    </form>
<%--    <script type="text/javascript">
    jQuery("#pwdtd").append("<input  type='password' class='txt' datacol='yes'  checkexpession='NotNull' style='width: 200px' onblur='abpwd(this)' />");
    function abpwd(obj) {
        jQuery("#S_User_Pwd").val(obj.value);
        jQuery("#X_User_Pwd").attr("eqvalue", jQuery("#S_User_Pwd").val());
    }
</script>--%>
</body>

</html>
