<%@ Page Language="C#" MasterPageFile="Member.master"  AutoEventWireup="true" Inherits="Ruiao.WebSite.Public.Member.Login" Codebehind="Login.aspx.cs" %>
<asp:Content ID="MyHead" ContentPlaceHolderID="cphHead" runat="Server">
<script type="text/javascript">
function Page_Load()
{
    //设置Cookie保存期限
    var _ddlCookieDays = document.getElementById('ddlCookieDays');
    if(_ddlCookieDays != null)
    {
        for (var i = 0; i < _ddlCookieDays.options.length; i++)
        {
            if(_ddlCookieDays.options[i].value == "<%=CookieDays %>")
            {
                _ddlCookieDays.selectedIndex = i;
            }
        }
    }
}
</script>
</asp:Content>
<asp:Content ID="MainContent" ContentPlaceHolderID="cphMain" Runat="Server">
<div id="ContentContainer">
    <form id="MemberLogin_MainForm" class="MainForm" runat="server">
    <input id="htbAction" name="Action" type="hidden" value="Login" />
    <input id="htbRedirect" name="Redirect" type="hidden" value="<%=RedirectUrl %>" />
    <table id="MemberLogin_MainTable" class="MainTable">
        <tr id="MemberLogin_TitleTR" class="TR, Title">
            <td id="MemberLogin_TitleTD" colspan="2"><%=MyTitle %></td>
        </tr>        
        <tr>
            <td style="width:25%"><div class="TD_Title">登录名</div></td>
            <td style="width:75%"><input id="LoginPage_tbLoginName" type="text" name="LoginName" class="Input_01" value="<%=LoginName %>" onkeydown="if(event.keyCode == 13) {Login('<%=AppUrl %>/Member/For11/', '<%=System.Configuration.ConfigurationManager.AppSettings["11URL"] %>/For20/', document.getElementById('LoginPage_tbLoginName').value, document.getElementById('LoginPage_tbPassword').value, document.getElementById('LoginPage_tbCheckCode').value, '<%=RedirectUrl%>'); return false;}" /></td>
        </tr>
        <tr>
            <td><div class="TD_Title">密码</div></td>
            <td><input id="LoginPage_tbPassword" type="password" name="Password" class="Input_01" value="<%=Password %>" onkeydown="if(event.keyCode == 13) {Login('<%=AppUrl %>/Member/For11/', '<%=System.Configuration.ConfigurationManager.AppSettings["11URL"] %>/For20/', document.getElementById('LoginPage_tbLoginName').value, document.getElementById('LoginPage_tbPassword').value, document.getElementById('LoginPage_tbCheckCode').value, '<%=RedirectUrl%>'); return false;}" /></td>
        </tr>
        <%if (Ruiao.Common.AppSetting.UseCookie){ %>
        <tr>
            <td><div class="TD_Title">Cookie有效期</div></td>
            <td>
                <select id="ddlCookieDays" name="CookieDays">
                    <option selected="selected" value="-1">不保留</option>
                    <option value="30">一个月</option>
                    <option value="180">半 年</option>
                    <option value="365">一 年</option>
                    <option value="3650">十 年</option>
                </select>
            </td>
        </tr>
        <%} %>
        <%if (CheckCodeByMemberLogin)
          {%>
        <tr>
            <td><div class="TD_Title">验证码</div><div class="TD_Notes">请输入右侧图片中的内容，不区分大小写</div></td>
            <td>
            <input id="LoginPage_tbValidateCode" type="text" name="ValidateCode" class="Input_01" value="<%=ValidateCode %>" onkeydown="if(event.keyCode == 13) {}" />
            <script type="text/javascript">document.write('<img id="LoginPage_imgValidatCode" class="ValidatCodeImage" alt="" src="<%=AppUrl %>/GetValidateCode<%=ExtensionName %>?Ismg=1&OnlyShow=true&Height=21&4JyAxC/aVfnZkuWcprMw=',Math.random(),'" />')</script>
            <span class="ValidatCodeText" onclick="ValidatCode_ReLoad('LoginPage_imgValidatCode', false)" style="cursor:hand;" >看不清楚，换一个！</span>
            </td>
        </tr>
        <%} %>
        <tr>
            <td style=" text-align:center; border-top:none;" colspan="2">
            <button id="MemberLogin_Sumbit" class="SubmitButton" type="submit" />登录</button>
            <button id="MemberLogin_Register" class="SubmitButton" onclick="location='Register<%=ExtensionName %>'">注册</button>
            <button id="MemberLogin_Logout" class="SubmitButton" onclick="location='Logout<%=ExtensionName %>'">注销</button>
            <button id="MemberLogin_GetPassword" class="SubmitButton" onclick="location='GetPassword<%=ExtensionName %>'">忘记密码</button>
            </td>
        </tr>
    </table>
    </form>
</div>
<script type="text/javascript">Page_Load();</script>
</asp:Content>