<%@ Page Language="C#" AutoEventWireup="true" Inherits="PowerEasy.Module.General.WebSite.User.UserLogin" CodeBehind="Login.aspx.cs" %>

<!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></title>
</head>
<body id="userlogin_body">
    <form id="Login" runat="server" defaultfocus="TxtUserName" defaultbutton="BtnLogin"  autocomplete="off">
        <div id="siteFactoryLogin">
            <div id="user_login">
                <dl>
                    <dd id="user_main">
                        <ul>
                            <li class="user_main_name">
                                <label>
                                    <asp:Localize ID="Localize2" Text="<%$ Res: User_Login_Localize2 , 用户名 %>" runat="server" />：</label>
                                <asp:TextBox ID="TxtUserName" CssClass="username" MaxLength="20" runat="server" TabIndex="1" autocomplete="off"></asp:TextBox>
                            </li>
                            <li class="user_password">
                                <label>
                                    <asp:Localize ID="Localize3" Text="<%$ Res: User_Login_Localize3 ,密  码 %>" runat="server" />：</label>
                                <%-- 取消Type=Password，利用JS在页面加载完毕后修改 --%>
                                <asp:TextBox ID="TxtUserPass" runat="server" CssClass="userpass" TextMode="Password" TabIndex="2" autocomplete="new-password"></asp:TextBox>
                                <a href="GetPassword.aspx" title="忘记密码？请点击" target="_blank" tabindex="6">忘记密码？</a> </li>
                            <asp:PlaceHolder ID="PhValCode" runat="server" Visible="false">
                                <li class="user_pic">
                                    <label>
                                        <asp:Localize ID="Localize4" Text="<%$ Res: User_Login_Localize4 ,验证码%>" runat="server" />：
                                    </label>
                                    <asp:TextBox ID="TxtValidate" CssClass="validate" MaxLength="6" runat="server" onfocus="this.select();" TabIndex="3"></asp:TextBox>
                                    <pe:ValidateCode ID="VcodeLogOn" runat="server" RefreshLinkToolTip="<%$ Res: User_Login_VcodeLogOn ,看不清楚，换一个%>" align="absmiddle" />
                                </li>
                            </asp:PlaceHolder>
                            <li class="user_time">
                                <label>Cookie：</label>
                                <asp:DropDownList ID="DropExpiration" runat="server" TabIndex="4">
                                    <asp:ListItem Value="None" Text="<%$ Res: User_Login_ListItem ,不保存 %>"></asp:ListItem>
                                    <asp:ListItem Value="Day" Text="<%$ Res: User_Login_ListItem2,保存一天 %>"></asp:ListItem>
                                    <asp:ListItem Value="Month" Text="<%$ Res: User_Login_ListItem3,保存一月 %>"></asp:ListItem>
                                    <asp:ListItem Value="Year" Text="<%$ Res: User_Login_ListItem4,保存一年 %>"></asp:ListItem>
                                </asp:DropDownList>
                            </li>
                            <li class="login">
                                <asp:ImageButton CssClass="btn_login" Style="display: none" ID="BtnLogin" ImageUrl="" OnClick="IbtnEnter_Click" runat="server" TabIndex="5" OnClientClick="return BeginClick();" /></li>
                        </ul>
                    </dd>
                </dl>
            </div>
            <div class="user_login_info">
                <asp:Localize ID="Localize5" Text="<%$ Res: User_Login_Localize5,如果您尚未在本站注册为会员，请先点此 %>" runat="server" /><a href="Register.aspx?ReturnUrl=<%=GetReturnUrl() %>"><asp:Localize ID="Localize6" Text="<%$ Res: User_Login_Localize6,注册 %>" runat="server" /></a>。
            </div>
            <pe:RequiredFieldValidator ID="ValrUserName" runat="server" ErrorMessage="<%$ Res: User_Login_ValrUserName,请输入用户名！ %>" ControlToValidate="TxtUserName" Display="None" SetFocusOnError="True"></pe:RequiredFieldValidator>
            <pe:RequiredFieldValidator ID="ValrPassword" runat="server" ErrorMessage="<%$ Res: User_Login_ValrPassword,请输入密码！ %>" ControlToValidate="TxtUserPass" Display="None" SetFocusOnError="True"></pe:RequiredFieldValidator>
            <pe:RequiredFieldValidator ID="ValrValidateCode" runat="server" ErrorMessage="<%$ Res: User_Login_ValrValidateCode,请输入验证码！ %>" ControlToValidate="TxtValidate" Display="None" SetFocusOnError="True"></pe:RequiredFieldValidator>
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" />
        </div>
        <script type="text/javascript" src="../JS/Encrypt/BigInt.js"></script>
        <script type="text/javascript" src="../JS/Encrypt/Encrypt.js"></script>
        <script type="text/javascript" src="../JS/Encrypt/Barrett.js"></script>
        <script type="text/javascript" src="../JS/Encrypt/Common.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                $('#<%=BtnLogin.ClientID%>').attr('src', '<%=SkinPath%>user/images/login_button.jpg').bind({
                    mouseover: function () {
                        $(this).attr('src', '<%=SkinPath%>user/images/login_button_over.jpg');
                    },
                    mouseout: function () {
                        $(this).attr('src', '<%=SkinPath%>user/images/login_button.jpg');
                    }
                }).show();
            })
            var BeginClick = function () {
                if (Page_ClientValidate()) {
                    GetRsaEncrypt(1);
                    $("#TxtUserPass").val(rsaEncrypt($("#TxtUserPass").val()));
                    return true;
                } else {
                    return false;
                }
            }
        </script>

    </form>
</body>
</html>
