mirror of
https://e.coding.net/circlecloud/McAccount.git
synced 2025-09-06 07:37:40 +00:00
@ -30,11 +30,7 @@ class authme extends AmysqlModel {
|
|||||||
if ($this->_insert ( 'mail', $data ) == 0) {
|
if ($this->_insert ( 'mail', $data ) == 0) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if ($this->_insert ( 'iconomy', $ic ) == 0) {
|
return false;
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
<!DOCTYPE html>
|
<?php
|
||||||
|
if (!empty( $_SESSION ['username'] ))
|
||||||
|
header ( 'Location:' . Url ( 'index', 'index' ) );
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
<html class="login-bg">
|
<html class="login-bg">
|
||||||
<head>
|
<head>
|
||||||
<title><?=$title?></title>
|
<title><?=$title?></title>
|
||||||
|
@ -73,7 +73,7 @@ if (empty ( $_SESSION ['username'] ))
|
|||||||
<tr class="first">
|
<tr class="first">
|
||||||
<td>邮箱地址</td>
|
<td>邮箱地址</td>
|
||||||
<td class="description"><input style="width: 250px;"
|
<td class="description"><input style="width: 250px;"
|
||||||
class="span8 inline-input" id="mail" type="text" /></td>
|
class="span8 inline-input" id="mail" type="text" disabled="disabled"/></td>
|
||||||
<td><button style="width: 90px;" id="submit" type="button"
|
<td><button style="width: 90px;" id="submit" type="button"
|
||||||
class="btn-glow primary btn-next">发送验证码</button></td>
|
class="btn-glow primary btn-next">发送验证码</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<a href="<?=Url('index','index')?>"> <img src="View/public/img/logo.png" class="logo" />
|
<a href="<?=Url('index','index')?>"> <img
|
||||||
|
src="View/public/img/logo.png" class="logo" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-fluid login-wrapper col-xs-12 col-md-12 col-lg-12">
|
<div class="row-fluid login-wrapper col-xs-12 col-md-12 col-lg-12">
|
||||||
@ -107,25 +108,24 @@ $("#register").click(function(){
|
|||||||
$.ajax({ url:"<?=Url('user_public','user_check')?>", type:"GET", data:{user:username.val()}, dataType:"json",
|
$.ajax({ url:"<?=Url('user_public','user_check')?>", type:"GET", data:{user:username.val()}, dataType:"json",
|
||||||
success:function(rdata){
|
success:function(rdata){
|
||||||
switch(rdata.status){
|
switch(rdata.status){
|
||||||
case "success":
|
case "success":
|
||||||
$.ajax({url:"<?=Url('user_public','mail_check')?>", type:"GET", data:{mail:email.val()}, dataType:"json",
|
$.ajax({url:"<?=Url('user_public','mail_check')?>",
|
||||||
success:function(s){
|
type:"GET",
|
||||||
switch(s.status){
|
data:{mail:email.val()},
|
||||||
|
dataType:"json",
|
||||||
|
success:function(s){
|
||||||
|
switch(s.status){
|
||||||
case "success":
|
case "success":
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"POST", data:{user:username.val(), mail:email.val(),pass:pass.val()}, dataType:"json", url:"<?=Url('user_public','register')?>",
|
type:"POST",
|
||||||
|
data:{user:username.val(), mail:email.val(),pass:pass.val()},
|
||||||
|
dataType:"json",
|
||||||
|
url:"<?=Url('user_public','register')?>",
|
||||||
success:function(C){
|
success:function(C){
|
||||||
switch(C.status){
|
alert(C.info);
|
||||||
case "success":
|
location.href = "<?=Url('index','index')?>";
|
||||||
alert(C.info);
|
}
|
||||||
location.href = "<?=Url('index','index')?>";
|
})
|
||||||
break;
|
|
||||||
case "error":
|
|
||||||
alert(A.info);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
break;
|
break;
|
||||||
case "error":
|
case "error":
|
||||||
alert(s.info);
|
alert(s.info);
|
||||||
@ -133,15 +133,17 @@ $("#register").click(function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
case "error":
|
case "error":
|
||||||
alert(rdata.info);
|
alert(rdata.info);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error:function(){
|
error:function(){
|
||||||
alert("注册失败 请检查网络是否通畅!");
|
alert("注册失败 请检查网络是否通畅!");
|
||||||
}})
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
Reference in New Issue
Block a user