<%@ Page Title="" Language="C#" MasterPageFile="~/Master/UserPageMaster.master" CodeBehind="Login.aspx.cs" Inherits="WAP2P.Web.PC.User.Login" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <div class="m-container g-zindexmin g-ohide mt20 mb20">
    <div class="g-left wgm8 g-ohide mt20">
        <%= WAP2P.Sys.AdPosition.GetAdPositionCode("ad_Login") %>
    </div>
    <div class="g-right wg4 mt20 mb20 g-ohide">
    <div class="m-login">
        <div class="ui-loginmeun">
            <div class="loginmeun-titlebox">
                <a href="Register<% =PageBase.PageExt %>">注册新账号>></a>
                账户登录
            </div>
            <div class="loginmeun-formbox pa10">
                <form method="post" action="<% =Request.RawUrl.UrlEncodeParam() %>" class="js-auto js-vsum" data-onsuccess="location.href=decodeURIComponent('<% =(!string.IsNullOrWhiteSpace(Request.QueryString["ref"]) && Request.QueryString["ref"].StartsWith("/") ? Request.QueryString["ref"] : "/User/").UrlEncode() %>');" data-onerror="loginError()">
                    <div class="loginmeun-input">
                        <i class="iconfont">&#xe60c;</i>
                        <input type="text" class="text" name="name" placeholder="用户名/手机/邮箱" data-vtype="must" data-vmsg="请输入登陆名。" tabindex="1" />
                    </div>
                    <div class="loginmeun-input">
                        <i class="iconfont">&#xe60e;</i>
                        <input type="password" name="password" class="text" data-vtype="must" placeholder="输入您的登录密码" data-vmsg="请输入登陆密码。" tabindex="2" />
                    </div>
                    <div class="codeinput ml15" id="js-codeinput" style="<% =needValidCode ? string.Empty: "display:none;" %>">
                        <a href="javascript:void(0)" onclick="$('img',this).attr('src', 'ValidCode<% =PageExt %>?v=' + (new Date()).getTime())">
                            <img src="ValidCode<% =PageExt %>?v=<% =DateTime.Now.Ticks %>" width="85" height="31" />
                            <span>看不清？<br />换一张</span>
                        </a>
                        <input type="text" class="text w95" name="vcode" maxlength="6" placeholder="请输入验证码"  tabindex="3" data-vmsg="请输入验证码。" <% =needValidCode ? "data-vtype=\"must\"" : string.Empty %> />
                    </div>
                    <div class="loginmeun-help">
                        <a href="Forget<% =PageExt %>">忘记了密码？</a>
                        <div class="ui-vcheckbox">
                            <label><input type="checkbox" name="reminder" value="7" />记住密码</label>
                        </div>
                    </div>
                    <div class="ma w300">
                        <input type="submit" class="btn-bbord c-normal iconfont fs16 w300" value="&#xe616; 登 录"  tabindex="4" data-success-text="登录成功" />
                        <em class="m-sumtip js-vsum"></em>
                    </div>
                    <div class="loginmeun-oauth">    
                        <ruson:Space runat="server" ID="qqOpen" Visible="false"><a href="/User/OAuth/Index<% =PageBase.PageExt %>?action=qqlogin"><i class="iconfont fs16">&#xe614;</i> QQ登录</a></ruson:Space>
                        <ruson:Space runat="server" ID="sinaOpen" Visible="false"><a href="/User/OAuth/Index<% =PageBase.PageExt %>?action=sinalogin"><i class="iconfont fs16">&#xe615;</i> 微博登录</a></ruson:Space>
                    </div>
                </form>
            </div>
        </div>
        <div class="login-msg pa10">
            <a class="login-msgright" href="/Help/ServiceList<% =PageBase.PageExt %>"><i class="iconfont fs16">&#xe620;</i> 联系客服</a>
            <span class="login-msgleft">
                <%= WAP2P.Sys.AdPosition.GetAdPositionCode("ad_LoginText") %>
            </span>
        </div>
    </div>
    </div>
    </div>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
    <script>
        function loginError() {
            var dom = $('#js-codeinput');

            $.get('ValidCode<% =PageExt %>?action=isneed&v=' + (new Date()).getTime(), function (res) {
                if (res == 'yes') {
                    dom.show();
                    dom.find('a').trigger('click');
                    dom.find('input').attr('data-vtype', 'must');
                } else {
                    dom.find('input').removeAttr('data-vtype');
                }
            });            
        };
    </script>
</asp:Content>
