<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <meta charset="utf-8" />
    <title>用户注册 - <?=TFYT('name')?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta content="<?=TFYT('keywords')?>" name="keywords">
    <meta content="<?=TFYT('describe')?>" name="description">
    <!-- BEGIN CORE CSS FRAMEWORK -->
    <link href="https://style.xmyrs.cn/assets/plugins/pace/pace-theme-flash.css" rel="stylesheet" type="text/css" media="screen"/>
    <link href="https://style.xmyrs.cn/assets/plugins/boostrapv3/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <link href="https://style.xmyrs.cn/assets/plugins/boostrapv3/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css"/>
    <link href="https://style.xmyrs.cn/assets/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css"/>
    <link href="https://style.xmyrs.cn/assets/css/animate.min.css" rel="stylesheet" type="text/css"/>
    <!-- END CORE CSS FRAMEWORK -->
    <!-- BEGIN CSS TEMPLATE -->
    <link href="https://style.xmyrs.cn/assets/css/style.css" rel="stylesheet" type="text/css"/>
    <link href="https://style.xmyrs.cn/assets/css/responsive.css" rel="stylesheet" type="text/css"/>
    <link href="https://style.xmyrs.cn/assets/css/magic_space.css" rel="stylesheet" type="text/css"/>
    <link href="https://style.xmyrs.cn/assets/css/custom-icon-set.css" rel="stylesheet" type="text/css"/>
    <!-- END CSS TEMPLATE -->
    <script src="https://style.xmyrs.cn/snowflake.js" type="text/javascript"></script>
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="error-body no-top lazy" style="background-image: url('//desk-fd.zol-img.com.cn/t_s1920x1080c5/g5/M00/08/07/ChMkJ14OogmIQV6oAB1ft78-gnIAAwG4gAJMJgAHV_P675.jpg')">
<div class="container">
    <div class="row login-container animated fadeInUp">
        <div class="col-md-7 col-md-offset-2 tiles white no-padding">
            <div class="p-t-30 p-l-40 p-b-20 xs-p-t-10 xs-p-l-10 xs-p-b-10">
                <h2 class="normal">注册 - <?=TFYT('name')?></h2>
                <p>目前,已经实现了更快捷的注册方式.</p>
                <p>所有项必填，资料一经填写无法修改（除密码外）</p>
                <p id="msg"></p>
            </div>
            <div class="tiles grey p-t-20 p-b-20 text-black">
                <div id="register" class="animated fadeIn">
                    <div class="row form-row m-l-20 m-r-20 xs-m-l-10 xs-m-r-10">
                        <div class="col-md-6 col-sm-6">
                            <input type="text" name="name" class="form-control" placeholder="昵称">
                        </div>
                        <div class="col-md-6 col-sm-6">
                            <input type="text" name="username" class="form-control" placeholder="用户名">
                        </div>
                    </div>
                    <div class="row form-row m-l-20 m-r-20 xs-m-l-10 xs-m-r-10">
                        <div class="col-md-12">
                            <input type="text" name="email"  class="form-control" placeholder="联系邮箱">
                        </div>
                    </div>
                    <div class="row form-row m-l-20 m-r-20 xs-m-l-10 xs-m-r-10">
                        <div class="col-md-6 col-sm-6">
                            <input type="password" name="password" class="form-control" placeholder="设置密码">
                        </div>
                        <div class="col-md-6 col-sm-6">
                            <input type="password" name="password2" class="form-control" placeholder="重复密码">
                        </div>
                    </div>
                    <div class="row form-row m-l-20 m-r-20 xs-m-l-10 xs-m-r-10">
                        <div class="col-md-6 col-sm-6">
                            <input type="text" name="qq" class="form-control" placeholder="联系QQ">
                        </div>
                        <div class="col-md-6 col-sm-6">
                            <input type="text" name="code" class="form-control" placeholder="4位验证码">
                        </div>
                    </div>
                    <div class="row form-row m-l-20 m-r-20 xs-m-l-10 xs-m-r-10">
                        <div class="col-md-6 col-sm-6">
                            <a href="?Mould=Login">已经注册成功?点击登录</a>
                        </div>
                        <div class="col-md-3 col-sm-6">
                            <img src="/vcode.php" class="form-control" alt="captcha" title="单击图片更换验证码" onclick="this.src=this.src" style="border: 2px solid #e3e3e3;border-radius:4px;padding:0 0;">
                        </div>
                        <div class="col-md-3 col-sm-6">
                            <button class="btn btn-block btn-primary" type="button" name="submit">马上注册</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- END CONTAINER -->
<!-- BEGIN CORE JS FRAMEWORK-->
<script src="https://style.xmyrs.cn/assets/plugins/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="https://style.xmyrs.cn/assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="https://style.xmyrs.cn/assets/plugins/pace/pace.min.js" type="text/javascript"></script>
<script src="https://style.xmyrs.cn/assets/plugins/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script>
<script src="https://style.xmyrs.cn/assets/plugins/jquery-lazyload/jquery.lazyload.min.js" type="text/javascript"></script>
<script src="https://style.xmyrs.cn/assets/js/login_v2.js" type="text/javascript"></script>
<!-- BEGIN CORE TEMPLATE JS -->
<script type="text/javascript">
    $('[name="submit"]').on("click", function() {
        $('[name="submit"]').attr('disabled','disabled');
        $('[name="submit"]').text('正在处理...');
        $.ajax({
            type: "POST",
            url: '/Application/Users.php?Mould=Register',
            data: {'action':'register','name':$('[name="name"]').val(),'username':$('[name="username"]').val(),'email':$('[name="email"]').val(),'password':$('[name="password"]').val(),'password2':$('[name="password2"]').val(),'qq':$('[name="qq"]').val(),'code':$('[name="code"]').val()},
            dataType: 'json',
            success: function (data) {
                if(data.state=='ok'){
                    $('#msg').html('<font color="green">'+data.msg+',2秒后自动转跳...</font>');
                    setTimeout(function(){
                        window.location='/Application/Users.php?Mould=Login';
                    }, 1500);
                }else{
                    $('#msg').html('<font color="red">'+data.msg+'</font>');
                    $('[name="submit"]').text('马上注册');
                    $('[name="submit"]').removeAttr("disabled");
                }
            },
            error:function (data) {
                console.log(data.responseText);
                $('#msg').html('<font color="red">服务器内部错误，请联系管理员修复！</font>');
            }
        });
    });
</script>
<!-- END CORE TEMPLATE JS -->
</body>
</html>