<%@ page language="C#" autoeventwireup="true" inherits="GZ_system_index_UpdatePassword, GZQuery_deploy" enableEventValidation="false" %>

<!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>修改密码</title>
    
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/GZ/control/easy_ui/jquery.min.js?v=1")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/GZ/control/easy_ui/jquery.easyui.min.js?v=1")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/GZ/control/easy_ui/locale/easyui-lang-zh_CN.js?v=1")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/GZ/control/easy_ui/jquery.load.js?v=1")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/GZ/control/easy_ui/jquery.json.js?v=1")%>"></script>
    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/GZ/control/easy_ui/jquery.easyui.validtor.js?v=1")%>"></script>
    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/GZ/control/easy_ui/themes/bootstrap/easyui.css?v=1")%>" />
    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/GZ/control/easy_ui/themes/icon.css?v=1")%>" />
    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/GZ/control/easy_ui/load.css?v=1")%>" />
    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/GZ/control/css/main.css?v=1")%>" /> 

   <script language="javascript" type="text/javascript">


    function saveEdit(){
		$('#fm').form('submit',{
			url: "UpdatePassword.aspx",
			onSubmit: function(){
				return $(this).form('validate');
			},
			success: function(result){
				var result = $.parseJSON(result);
				if (result.state==1){
                    $("#oldName").val("");
                    $("#oldPassword").val("");
                    $("#txtNewUser").val("");
                    $("#newPassword").val("");
                    $("#newPasswordTow").val("");
                    $.messager.alert("提示","已成功修改密码！");
					     
				} else {
					$.messager.show({
						title: '错误',
						msg: result.msg
					});
				}
			}
		});
	 }
    </script>
</head>
<body>
    <form id="fm" runat="server">
        <div style="padding-right: 10px;  padding-left: 10px; padding-bottom: 10px; width: 815px; padding-top: 10px; height: 203px">
            <div style="font-weight: bold; font-size: 16px; margin-bottom: 10px">
                用户密码修改</div>
            <table>
                <tr>
                    <td style="width: 132px">
                        原帐号：</td>
                    <td style="width: 613px">
                    <input id="oldName" class="easyui-validatebox" maxlength="16" missingmessage="请填写原帐号！"
                        name="oldName" required="true" style="width: 400px" /></td>
                </tr>
                <tr>
                    <td style="height: 20px; width: 132px;">
                        原密码：</td>
                    <td style="width: 613px; height: 20px">
                    <input id="oldPassword" class="easyui-validatebox" maxlength="16" missingmessage="请填写原密码！"
                        name="oldPassword" required="true" type="password"  style="width: 400px" /></td>
                </tr>
                <tr>
                    <td style="width: 132px">
                        新帐号名称：</td>
                    <td style="width: 613px">
                    <input id="txtNewUser" class="easyui-validatebox" maxlength="16" missingmessage="请填写新帐号！"
                        name="newName" required="true" style="width: 400px"  /></td>
                </tr>
                <tr>
                    <td style="width: 132px">
                        新密码：</td>
                    <td style="width: 613px">
                    <input id="newPassword" class="easyui-validatebox" maxlength="16" missingmessage="请填写新密码！"
                        name="newPassword" required="true" style="width: 400px" type="password" validtype="safepass" /></td>
                </tr>
                <tr>
                    <td style="width: 132px">
                        再次输入新密码：</td>
                    <td style="width: 613px">
                    <input id="newPasswordTow" class="easyui-validatebox" maxlength="16" missingmessage="再次输入新密码！"
                        name="newPasswordTow" required="true" style="width: 400px" type="password" validtype="equalTo['#newPassword']" /></td>
                </tr>
            </table>
            <div style="margin: 10px 0px">
                &nbsp;&nbsp;&nbsp;&nbsp;<a class="easyui-linkbutton" href="#" iconcls="icon-edit" onclick="saveEdit()">提交修改</a></div>
        </div>
   </form>
</body>
</html>