From 5f9bc7ec1299714e2adf5bf33665bbe9bd57c184 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Thu, 5 Nov 2015 20:22:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=82=AE=E7=AE=B1=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=20=20=E5=A2=9E=E5=8A=A0=E9=AA=8C=E8=AF=81=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=20=20=E4=BD=BF=E7=94=A8=E9=BB=98=E8=AE=A4=E7=9A=84?= =?UTF-8?q?=E4=BC=81=E4=B8=9A=E9=82=AE=E7=AE=B1...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Amysql/Config.php | 8 +- Controller/mail_status.php | 6 +- Model/mail_model.php | 2 +- View/mail/mailstatus.php | 243 ++++++++++++++++++++----------------- View/message.php | 2 +- 5 files changed, 144 insertions(+), 117 deletions(-) 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");