mirror of
https://e.coding.net/circlecloud/McAccount.git
synced 2024-11-17 00:58:57 +00:00
update...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
7f19057e1a
commit
af6a38d957
@ -65,9 +65,8 @@ if (empty ( $_SESSION ['username'] ))
|
||||
</a></li>
|
||||
</ul>
|
||||
<ul class="nav pull-right">
|
||||
<li class="dropdown"><a href="#"
|
||||
class="dropdown-toggle hidden-phone" data-toggle="dropdown">
|
||||
已登陆玩家:<?=$_SESSION['username']?>
|
||||
<li class="dropdown"><a href="#" class="dropdown-toggle hidden-phone" data-toggle="dropdown">
|
||||
已登陆玩家:<?=$_SESSION['username']?>
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
|
@ -33,7 +33,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<a href="index.html"> <img src="View/public/img/logo.png" class="logo" />
|
||||
<a href="<?=Url('index','index')?>"> <img src="View/public/img/logo.png" class="logo" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="row-fluid login-wrapper col-xs-12 col-md-12 col-lg-12">
|
||||
@ -66,41 +66,41 @@
|
||||
<script src="View/public/js/theme.js"></script>
|
||||
<script type="text/javascript">
|
||||
$("#register").click(function(){
|
||||
var Regex = /^(?:\w+\.?)*\w+@(?:\w+\.)*\w+$/;
|
||||
var Regex1 = /^[a-zA-Z0-9_?]*$/;
|
||||
var RegexEmail = /^(?:\w+\.?)*\w+@(?:\w+\.)*\w+$/;
|
||||
var RegexUserName = /^[a-zA-Z0-9_?]*$/;
|
||||
var username = $("#username");
|
||||
var pass = $("#password");
|
||||
var email = $("#email");
|
||||
if(username.val()==""){
|
||||
alert("用户名不能为空!");
|
||||
alert("用户名不能为空!");
|
||||
return false;
|
||||
}
|
||||
if(username.val().length < 3){
|
||||
alert("帐号长度不得低于3位");
|
||||
alert("帐号长度不得低于3位!");
|
||||
return;
|
||||
}
|
||||
if(username.val().length > 10){
|
||||
alert("帐号长度不得超过10位");
|
||||
alert("帐号长度不得超过10位!");
|
||||
return false;
|
||||
}
|
||||
if(pass.val()==""){
|
||||
alert("密码不能为空!");
|
||||
alert("密码不能为空!");
|
||||
return false;
|
||||
}
|
||||
if(pass.val().length < 6){
|
||||
alert("密码强度不能低于6位!");
|
||||
alert("密码强度不能低于6位!");
|
||||
return false;
|
||||
}
|
||||
if(email.val()==""){
|
||||
alert("邮箱不能为空!");
|
||||
alert("邮箱不能为空!");
|
||||
return false;
|
||||
}
|
||||
if(!Regex1.test(username.val())){
|
||||
alert("帐号必须以小写字母+数字+下划线组成");
|
||||
if(!RegexUserName.test(username.val())){
|
||||
alert("帐号必须以小写字母+数字+下划线组成!");
|
||||
return;
|
||||
}
|
||||
if(!Regex.test(email.val())){
|
||||
alert("邮箱格式不对");
|
||||
if(!RegexEmail.test(email.val())){
|
||||
alert("邮箱格式不正确!");
|
||||
$('#email').val("");
|
||||
return false;
|
||||
}
|
||||
@ -110,17 +110,15 @@ $("#register").click(function(){
|
||||
case "success":
|
||||
$.ajax({url:"<?=Url('user_public','mail_check')?>", type:"GET", data:{mail:email.val()}, dataType:"json",
|
||||
success:function(s){
|
||||
alert("checkmail");
|
||||
switch(s.status){
|
||||
case "success":
|
||||
$.ajax({
|
||||
type:"POST", data:{user:username.val(), mail:email.val(),pass:pass.val()}, dataType:"json", url:"<?=Url('user_public','register')?>",
|
||||
success:function(C){
|
||||
alert("reg");
|
||||
switch(C.status){
|
||||
case "success":
|
||||
alert(C.info);
|
||||
location.href = "<?=Url('index','index')?>";
|
||||
location.href = "<?=Url('index','login')?>";
|
||||
break;
|
||||
case "error":
|
||||
alert(A.info);
|
||||
@ -142,7 +140,7 @@ $("#register").click(function(){
|
||||
}
|
||||
},
|
||||
error:function(){
|
||||
alert("checkusererror");
|
||||
alert("注册失败 请检查网络是否通畅!");
|
||||
}})
|
||||
})
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user