<div class="mobi_top div_c">
<table cellpadding="10" style="margin-left: auto;margin-right: auto; background: white" class="table">
    <tr>
        <td width="80">注册手机</td>
        <td><input type="text" value="" name="mobi" onblur="checkMobil(this.value,'mobi','warnning')" id="mobi" placeholder="手机号码" class="this_btn">
        </td>
    </tr>
    <tr>

        <td>用户名</td>
        <td><input type="text" value="" name="fullname" id="fullname" placeholder="姓名"  class="this_btn">
        </td>
    </tr>
    <tr>

        <td>密码</td>
        <td><input type="password" value="" name="password_o" id="password_o" placeholder="密码"  class="this_btn">
        </td>
    </tr>
    <tr>
        <td>
            <div id="nologin" class="warnning"></div>
            <div id="fullnamewarnning" class="warnning"></div>
            <div id="warnning" class="warnning"></div>

        </td>
    </tr>
</table>
<center>
<?php if(!check_mobi()==true){
    ?>
    <button onclick="login()" class="this_btn2">注册</button>
    <?php
}?>
<br/><br/>
<a href="index.php?c=account&action=login&href=<?php echo urlencode($href)?>" >登录</a> | 
<a href="?c=account&action=findPwd">找回密码 </a></center>
<script language="javascript">
    function login() {
        username = $("#mobi").val();
        fullname = $("#fullname").val();
        password_o = $("#password_o").val();
        if (username == '') {
            alert("手机号码不能为空");
            return false;
        }

        if (fullname == '') {
           alert("姓名不能为空");
            return false;
        }

        if (password_o == '') {
            alert("密码不能为空");
            return false;
        }

        $("#login_btn").html("注册中..");

        URL = "index.php?c=ajax&action=reg_check&mobi=" + username + "&fullname=" + fullname + "&password_o="+password_o;

        //alert(URL);
        $.get(URL, function (result) {
            if (result == '0') {
                //通过
                alert("注册成功");
                location.href = "<?php echo $href?>";
            }
            else {
                //不通过
                //$("#nologin").show();
                alert("该手机号码已经被注册，请重新选择手机号码");
            }
        });
    }
</script>
</div>
<style>
    .this_btn2{
        width: 100%;
        padding:10px;
        font-size: 15pt;
        background: #c9c9e9; 
        width: 200px; 
        border-radius: 3px;
    }
        .this_btn{
        width: 100%;
        padding:10px;
        font-size: 15pt;
        width: 200px; 
        border-radius: 3px;
    }
</style>