<%@ Page Title="" Language="C#" MasterPageFile="~/Master/UserPageMaster.master" CodeBehind="OAuthBind.aspx.cs" Inherits="WAP2P.Web.PC.User.OAuthBind" %>

<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 m-globalbox">
    <div class="m-wholebox m-oauth js-tabs" data-tabs-selector=".oauth-right a">
        <div class="m-title">
            <span class="g-block"><i class="iconfont fs30">&#xe60c;</i>  快速注册新账号</span>
            <span class="g-hide"><i class="iconfont fs30">&#xe624;</i>  绑定平台登录</span>
        </div>          
        <div class="oauth-left g-left" id="js-form-reg">
            <div class="form-normal oauth-form">
                <form class="js-auto js-vsum" method="post" action="<% =Request.RawUrl.UrlEncodeParam() %>" data-onsuccess="location.href='/User/'">
                    <div class="mt30">您正在绑定<% =supplier.GetDescription() %>：<strong class="fcblue-2"><% =thirdName %></strong></div>
                    <ruson:Space runat="server" ID="hidUserTypeId1" Visible="false">
                        <div class="ui-radio mt10">
                            <span class="g-block">会员类型</span>
                            <ruson:MultipleInput runat="server" ID="userTypeId1" Type="Radio" data-vtype="group" data-vmin="1" data-vmsg="请选择会员类型。"></ruson:MultipleInput>
                        </div>
                    </ruson:Space>
                    <div class="input-big">
                        <label class="topfont">用户名</label>
                        <input type="text" name="name" class="text w332" placeholder="以字母开头，支持字母,数字,下划线" maxlength="12" data-vtype="custom|length" data-vreg="^[a-zA-Z][a-zA-Z0-9_]+$" data-vmin="6" data-vmax="12" data-vmsg="必须以字母开头，支持字母,数字。|用户名必须在6-12位长度之间。" />
                    </div>
                    <div class="input-big">
                        <label class="topfont">密码</label>
                        <input type="password" class="text w332" name="password" placeholder="请输入密码" id="password1" maxlength="50" data-vtype="must|length" data-vmin="6" data-vmax="50" data-vmsg="请输入密码。|密码长度过短。" />
                    </div>
                    <div class="input-big">
                        <label class="topfont">确认密码</label>
                        <input type="password" class="text w332" placeholder="请再次确认密码" data-vtype="must|same" data-vref="password1" data-vmsg="请输入确认密码。|两次密码输入不一致。" />
                    </div>
                    <div class="input-big">
                        <label class="topfont">推荐人</label>
                        <input type="text" class="text w218" placeholder="请输入您收的推荐号" name="recommendBy" value="<% =recommendBy.HtmlEncode() %>" <% =string.IsNullOrEmpty(recommendBy) ? string.Empty : " readonly=\"readonly\"" %> />
                    </div>
                    <div class="input-big">
                        <div class="ui-vcheckbox">
                            <label><input type="checkbox" name="protocol1" checked="checked" value="1" data-vtype="group" data-vmin="1" data-vmsg="您需要同意用户协议。" />同意《<a target="_blank" href="/Help/Protocol<% =PageExt %>"><% =SiteName %>用户协议</a>》</label>
                        </div>
                    </div>
                    <input type="hidden" name="bindType" value="reg" />
                    <div class="btn-submits mt30">
                        <input type="submit" class="btn-bbord fs16 c-normal w366" value="绑定<% =supplier.GetDescription() %>号码注册" data-success-text="注册成功" />
                        <div class="w366"><em class="m-sumtip js-vsum"></em></div>
                    </div>
                </form>
            </div>
        </div>

        <div class="oauth-left g-left g-hide" id="js-form-bind">
            <div class="form-normal oauth-form">
                <form class="js-auto js-vsum" method="post" action="<% =Request.RawUrl.UrlEncodeParam() %>" data-onerror="loginError()" data-onsuccess="location.href='/User/'">

                    <div class="mt30">您正在绑定<% =supplier.GetDescription() %>：<strong class="fcblue-2"><% =thirdName %></strong></div>
                    <div class="input-big mt10">
                        <label class="topfont">用户名</label>
                        <input type="text" class="text w332" name="name" placeholder="用户名/手机/邮箱" data-vtype="must" data-vmsg="请输入登陆名。" />
                    </div>
                    <div class="input-big">
                        <label class="topfont">密码</label>
                        <input type="password" class="text w332" name="password" data-vtype="must" placeholder="登陆密码" data-vmsg="请输入登陆密码。" />
                    </div>
                    <div class="input-big codeinput" 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" name="vcode" maxlength="6" placeholder="请输入验证码" data-vmsg="请输入验证码。" <% =needValidCode ? "data-vtype=\"must\"" : string.Empty %> />
                    </div>
                    <input type="hidden" name="bindType" value="login" />
                    <div class="btn-submits mt30">
                        <input type="submit" class="btn-bbord fs16 c-normal w366" value="绑定<% =supplier.GetDescription() %>号码登录" data-success-text="绑定成功" />
                        <div class="w366"><em class="m-sumtip js-vsum"></em></div>
                    </div>
                </form>
            </div>
        </div> 
        <div class="oauth-right g-right">
            <span class="ml40">已经有了账号？
                <a href="#js-form-bind" class="c-normal btn-nobordbig g-block w200 g-fcenter ml40 mt10">快速绑定登录账号</a>
            </span>
            <span class="ml40">还没有账号？
                <a href="#js-form-reg" class="c-normal btn-nobordbig g-block w200 g-fcenter ml40 mt10">快速注册新账号</a>
            </span>
        </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>
