<%@ Page Language="C#" MasterPageFile="Admin.Master" AutoEventWireup="true" CodeBehind="Adminpass.aspx.cs" Inherits="Mvcb2b.admin.Adminpass" Title="信息修改" ValidateRequest="false" %>
<%@ MasterType VirtualPath="Admin.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript" src="<%=Fun.Webdirectory %>Comja/md5.js"></script> 
<script  type="text/javascript">
    function check_Pass(source, args) {
        args.IsValid = true;

        //密码强度正则，最少6位，包括至少1个大写字母，1个小写字母，1个数字，1个特殊字符
       var pPattern = /^.*(?=.{6,12})(?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*? ]).*$/;
        //输出 true
       // console.log("=="+pPattern.test("iFat3#"));

       // var ispass = pPattern.test(args.Value);
       var ispass = true;
         if (ispass == false)
           args.IsValid = false;

        if (args.Value.length <6) {
            // alert("你输入的密码太短了，至少要 5 个字符...");	      
            args.IsValid = false;
        }
        if (args.Value.length > 12) {
            //  alert("你输入的密码太长，最长不可超过 15 个字符...");
            args.IsValid = false;
        }
    }
    function check_PassI(source, args) {
        args.IsValid = true;
        if (args.Value != document.getElementById("<%=adminpass_txt.ClientID %>").value) {
            // alert("「确认密码」与「密码」必须要完全相同..");
           args.IsValid = false;
        }
    }
</script>

<script type="text/javascript">
    $(function () {
        $("#ctl00_ContentPlaceHolder1_Add").click(function (e) {
            var pass = $('#ctl00_ContentPlaceHolder1_adminpass_txt').val();
            pass = hex_md5(pass);
            $('#ctl00_ContentPlaceHolder1_adminpass_txt').val(pass);
            var pass2 = $('#ctl00_ContentPlaceHolder1_adminpassI_txt').val();
            pass2 = hex_md5(pass2);
            $('#ctl00_ContentPlaceHolder1_adminpassI_txt').val(pass2);
        });
    });
</script>
<div class="path">当前位置： 关于我们 >>  密码修改</div>
<h3><asp:Literal  ID="Literal1" runat="server"></asp:Literal></h3>

<table width="92%" border="0" class="editor" align="center" style="background-color:#f5f5f5;" cellpadding="3" cellspacing="1">     
<tr><td align="right">用户ID：</td><td><asp:TextBox ID="adminuser_txt" runat="server" Text="" Width="120px" ReadOnly="true"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="用户名不能为空" Display="None" ControlToValidate="adminuser_txt"></asp:RequiredFieldValidator></td></tr>
<tr><td align="right">密 码：</td><td><asp:TextBox ID="adminpass_txt" runat="server" TextMode="Password" Text="" Width="120px"></asp:TextBox><asp:requiredfieldvalidator id="RequiredFieldValidator4" runat="server" ControlToValidate="adminpass_txt" Display="None"
								ErrorMessage="密码不能为空！">密码不能为空！</asp:requiredfieldvalidator><asp:customvalidator id="CustomValidator2" runat="server" ControlToValidate="adminpass_txt" Display="None"
								ErrorMessage="密码格式不正确！6-12位的大小写英文字母+特殊符号+数字,如：User#123" ClientValidationFunction="check_Pass">密码格式不正确！</asp:customvalidator></td></tr>
<tr><td align="right">确 认：</td><td><asp:TextBox ID="adminpassI_txt" runat="server" TextMode="Password"  Text="" Width="120px"></asp:TextBox>
<asp:requiredfieldvalidator id="RequiredFieldValidator5" runat="server" ControlToValidate="adminpassI_txt" Display="None"	ErrorMessage="确认密码不能为空！">确认密码不能为空！</asp:requiredfieldvalidator>
<asp:customvalidator id="Customvalidator4" runat="server" ControlToValidate="adminpassI_txt" Display="None"	ErrorMessage="确认密码必须和密码相同！" ClientValidationFunction="check_PassI">确认密码必须和密码相同！</asp:customvalidator></td></tr>

<tr><td colspan="2" align="center"><asp:HiddenField ID="id_txt" runat="server" />
    <asp:Button ID="Add" runat="server" Text="修改" Width="58px"  onclick="Edit_Click" /> &nbsp;     
    <input type="button" value="返回" name="go" style="width:58px;" onclick="javascript:history.go(-1);"  />
    <asp:validationsummary id="ValidationSummary1"  runat="server" ShowMessageBox="True" ShowSummary="False" ></asp:validationsummary>
    </td></tr>
</table>
</asp:Content>
