<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/ExhibitorMaster.Master"
    Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        $(function () {
            $("#CurrentPosition").html("修改密码");
            $("#menu25").css("visibility", "visible");
        });
        function checkpwd() {
            if ($.trim($("#OldPassword").val()) == "") {
                //                alert("请输入原始密码!");
                MsgTip.show({ msg: "请输入原始密码!", ico: "warning" });
                $("#OldPassword").focus();
                return false;
            }
            if ($.trim($("#NewPassword").val()) == "") {
                //                alert("请输入新密码!");
                MsgTip.show({ msg: "请输入新密码!", ico: "warning" });
                $("#NewPassword").focus();
                return false;
            } else {
                //判断密码长度
                if ($.trim($("#NewPassword").val()).length < 4 || $.trim($("#NewPassword").val()).length > 12) {
                    //                    alert("密码的长度为4-12个字符！");
                    MsgTip.show({ msg: "密码的长度为4-12个字符！", ico: "warning" });
                    $("#NewPassword").focus();
                    return false;
                }
            }
            if ($.trim($("#txtPassword").val()) == "") {
                //                alert("请重复新密码!");
                MsgTip.show({ msg: "请重复新密码!", ico: "warning" });
                $("#txtPassword").focus();
                return false;
            }
            //判断密码是否一致
            if ($("#NewPassword").val() != $("#txtPassword").val()) {
                //                alert("两次输入密码不一致！");
                MsgTip.show({ msg: "两次输入密码不一致！", ico: "warning" });
                $("#txtPassword").focus();
                return false;
            }
            return true;
        }
        function f1_submit() {
            if (checkpwd()) {
                $("#f1").submit();
            }
        }
        function GoTo(str) {
            document.location = "<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Exhibitor/" + str;
        }
    </script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <center>
            <form id="f1" action="" method="post">
            <table width="100%" border="0" style="text-align: left" cellpadding="0" cellspacing="0"
                id="main">
                <%--<tr>
                    <td align="left">
                        <table border='0' cellpadding="0" cellspacing="0" width="100%" align="left">
                            <tr>
                                <td class="tdMenu" onclick="GoTo('PersonInfo')">
                                    基本信息
                                </td>
                                <td class="tdMenuWidth">&nbsp;</td>
                                <td class="tdMenuSelect" onclick="GoTo('PersonChangePassword')">
                                    修改密码
                                </td>
                                <td>&nbsp;</td>
                            </tr>
                            <tr>
                                <td class="tdMenuLine" colspan="4"></td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                </tr>--%>
                <tr>
                    <td align="left" style="padding-top: 6px">
                        <table width="100%" border="0" cellpadding="0" cellspacing="10" bgcolor="#FFFFFF">
                            <tr>
                                <td width="10%" align="right">
                                    <span>原始密码</span>
                                </td>
                                <td align="left">
                                    <input id="OldPassword" maxlength="100" size="23" type="password" class="text" name="OldPassword" />
                                    <font color="#ff6633">※</font>
                                </td>
                            </tr>
                            <tr>
                                <td width="10%" align="right">
                                    <span>设置密码</span>
                                </td>
                                <td align="left">
                                    <input id="NewPassword" maxlength="50" size="23" type="password" name="NewPassword"
                                        class="text" />
                                    <font color="#ff6633">※</font>
                                </td>
                            </tr>
                            <tr>
                                <td width="10%" align="right">
                                    <span>重复密码</span>
                                </td>
                                <td align="left">
                                    <input id="txtPassword" maxlength="50" size="23" type="password" name="txtPassword"
                                        class="text" />
                                    <font color="#ff6633">※</font>
                                </td>
                            </tr>
                            <tr>
                                <td align="left" height="60" colspan="2" style="padding-left: 60px">
                                    <div class="button" onclick="javascript:f1_submit()">
                                        修改</div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" bgcolor="#FFFFFF">
                                    <%=ViewData["Message"] %>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            </form>
        </center>
    </div>
</asp:Content>
