diff --git a/Amysql/Config.php b/Amysql/Config.php index ceae2e4..5996622 100644 --- a/Amysql/Config.php +++ b/Amysql/Config.php @@ -22,10 +22,10 @@ $Config ['DBname'] = 'minecraft'; // 数据库名称 $Config ['CharSet'] = "UTF-8"; // 邮箱信息配置********************************************** -$Config ['smtp'] = "smtp.163.com"; +$Config ['smtp'] = "smtp.citycraft.cn"; $Config ['port'] = "25"; -$Config ['user'] = "jtb1@163.com"; -$Config ['sender'] = "jtb1@163.com"; -$Config ['pass'] = "jtb2hww"; +$Config ['user'] = "authme@citycraft.cn"; +$Config ['sender'] = "authme@citycraft.cn"; +$Config ['pass'] = "Email2Check"; $Config ['debug'] = false; \ No newline at end of file diff --git a/Controller/mail_status.php b/Controller/mail_status.php index a6bfb8e..29a48da 100644 --- a/Controller/mail_status.php +++ b/Controller/mail_status.php @@ -33,7 +33,11 @@ class mail_status extends AmysqlController { * 显示邮箱验证状态 */ function stat() { - JsonSuccess ( $this->_model ( 'mail_model' )->status ( @$_SESSION ['username'] ) ); + if ($this->_model ( 'mail_model' )->status ( @$_SESSION ['username'] )) { + JsonSuccess ( '邮箱已验证!' ); + } else { + JsonError ( "邮箱未验证!" ); + } } } ?> \ No newline at end of file diff --git a/Model/mail_model.php b/Model/mail_model.php index 6149a70..65f4209 100644 --- a/Model/mail_model.php +++ b/Model/mail_model.php @@ -14,7 +14,7 @@ class mail_model extends AmysqlModel { return $this->_update ( 'mail', $data, "WHERE user='" . $user . "'" ) != 0; } public function status($user) { - $sql = "SELECT * FROM `mail` WHERE `user` = '" . $user . "'"; + $sql = "SELECT * FROM `mail` WHERE `user` = '" . $user . "' and `statu` = 1"; return $this->_all ( $sql ); } } diff --git a/View/mail/mailstatus.php b/View/mail/mailstatus.php index a1d681c..f2d0df2 100644 --- a/View/mail/mailstatus.php +++ b/View/mail/mailstatus.php @@ -1,121 +1,124 @@ - - - -<?=$title?> - - - - - - - - - - - - - - - - - - - - - - - +?> + + + +<?=$title?> + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - - + + - - - - -
-
-
- -
-
-
-
-
- -
- - - - - - - - - - - - - - - -
邮箱地址
邮箱验证码 - -
-
-
-
-
-
-
- -
-
-
- - - - - - - - - - - - + + + + +
+
+
+ +
+
+
+
+
+ +
+ + + + + + + + + + + + + + + +
邮箱地址
邮箱验证码 + +
+
+
+
+
+
+
+ +
+
+
+ + + + + + + + + + + + - + + \ No newline at end of file diff --git a/View/message.php b/View/message.php index de658fd..7e65889 100644 --- a/View/message.php +++ b/View/message.php @@ -119,7 +119,7 @@ if (empty ( $_SESSION ['username'] )) data:data, url:"", success:function(data){ - if(data.status == "success") + if(data.status != "success") { $("#status").html("邮箱验证状态:尚未验证 ' onclick='display()'>点击进行验证"); $("#status").css("color", "red");