From bd0bce8a683e2aa0e7ec6694b8e5dec2f0ed190a Mon Sep 17 00:00:00 2001 From: aimerforreimu Date: Wed, 4 Apr 2018 17:42:06 +0800 Subject: [PATCH] finish illegal Scan --- .idea/dictionaries/aimer.xml | 3 + .idea/workspace.xml | 475 +++++++++--------- .../controller/AdminController.class.php | 72 +++ .../admin/controller/ApiController.class.php | 4 +- .../IllegalScanController.class.php | 56 +++ .../admin/controller/ScanController.class.php | 6 +- .../admin/model/RegisterUserModel.class.php | 2 +- application/admin/model/ScanModel.class.php | 20 + .../admin/view/{home => admin}/setting.html | 85 ++-- application/admin/view/home/home.html | 2 +- application/admin/view/illegal/illegal.html | 67 +++ .../admin/view/illegal/illegal_detail.html | 120 +++++ application/admin/view/layout.html | 28 +- .../admin/view/user/register_user.html | 2 +- application/admin/view/user/user_detail.html | 4 +- .../home/controller/UserController.class.php | 31 +- .../home/view/user/active_success.html | 17 +- application/home/view/user/login.html | 39 +- application/home/view/user/rest_password.html | 124 +++++ framework/tools/EmailTemples.class.php | 93 +++- 20 files changed, 894 insertions(+), 356 deletions(-) create mode 100644 .idea/dictionaries/aimer.xml create mode 100644 application/admin/controller/AdminController.class.php create mode 100644 application/admin/controller/IllegalScanController.class.php rename application/admin/view/{home => admin}/setting.html (66%) create mode 100644 application/admin/view/illegal/illegal.html create mode 100644 application/admin/view/illegal/illegal_detail.html create mode 100644 application/home/view/user/rest_password.html diff --git a/.idea/dictionaries/aimer.xml b/.idea/dictionaries/aimer.xml new file mode 100644 index 0000000..aeae368 --- /dev/null +++ b/.idea/dictionaries/aimer.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 0a7021c..da33377 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,61 +2,26 @@ - - - - - + + + + + + - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - {STATIC_PATH} - $dd - insert return var Member/Login @@ -95,18 +104,21 @@ form 安全设置 mdb.css - update Unknow off left dash - /static profile - default img src background img src= 认证用户 + default + EP + doLogout + update + /static + \{.+?\} {STATIC_PATH} @@ -120,13 +132,6 @@ @@ -203,60 +215,56 @@ - - + + - - + + - - - + + + - - - - + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +
+
+
<{$admin['name']}>
-
@@ -46,15 +48,15 @@

用户设置

-
user_id
+
<{$admin['reg_time']|date_format:'%Y-%m-%d + %H:%M:%S'}> +
-
@@ -72,55 +74,30 @@

用户设置

-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
- +
+
+ +
-
-
-
-
- +
+ +
-
-
-
-
- +
+ +
-
-
-
-
-
- -
+ +
+
-
+ +
diff --git a/application/admin/view/home/home.html b/application/admin/view/home/home.html index 4e7e847..da5332d 100644 --- a/application/admin/view/home/home.html +++ b/application/admin/view/home/home.html @@ -57,7 +57,7 @@

成功识别

-
+

非法识别

diff --git a/application/admin/view/illegal/illegal.html b/application/admin/view/illegal/illegal.html new file mode 100644 index 0000000..4c708ca --- /dev/null +++ b/application/admin/view/illegal/illegal.html @@ -0,0 +1,67 @@ +<{extends file="layout.html"}> +<{block name="content"}> + +
+ +
+
+
+

非法扫描

+
+
+
+
+
+
+

非法扫描总数

+
+
+ +
+
+ <{$illegal_num}>人 +
+
+
+
+
+
注意!
+
+ 此处所有的扫描都是没有认证的用户进行扫描的,请尽快检查您的人脸识别是设备,和您的财产,以免造成损失
您可以点击扫描时间来查看进行人脸识别的人的面部信息
+
+
+
+ + + + + + + + + + <{foreach $illegal_scans as $scan}> + + + + + + <{/foreach}> + +
扫描编号扫描时间是否通过
<{$scan['scan_id']}> <{$scan['scan_time']|date_format:'%Y-%m-%d %H:%M:%S'}>未通过 +
+ + +
+
+<{/block}> \ No newline at end of file diff --git a/application/admin/view/illegal/illegal_detail.html b/application/admin/view/illegal/illegal_detail.html new file mode 100644 index 0000000..71cb9e6 --- /dev/null +++ b/application/admin/view/illegal/illegal_detail.html @@ -0,0 +1,120 @@ + + + + + + 非法识别 + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + +
抓拍图片(点击查看大图)识别日期识别结果操作
+ + <{$detail['scan_time']|date_format:'%Y-%m-%d %H:%M:%S'}> 删除
+ +
+ +
+
+
+
+
+
+ + + + + diff --git a/application/admin/view/layout.html b/application/admin/view/layout.html index a9bcb65..0bc61b0 100644 --- a/application/admin/view/layout.html +++ b/application/admin/view/layout.html @@ -56,28 +56,26 @@ aria-haspopup="true" aria-expanded="false"> <{$smarty.session.user}>
@@ -89,10 +87,10 @@     注册用户 - +     非法扫描 - +     设置
diff --git a/application/admin/view/user/register_user.html b/application/admin/view/user/register_user.html index 76f2cd9..2d33638 100644 --- a/application/admin/view/user/register_user.html +++ b/application/admin/view/user/register_user.html @@ -50,7 +50,7 @@

认证用户

<{$user['user_id']}> <{$user['user_name']}> - <{$user['scan_num']|default:'1'}> + <{$user['scan_num']|default:'1'}> <{/foreach}> diff --git a/application/admin/view/user/user_detail.html b/application/admin/view/user/user_detail.html index 0ce9af7..7da4341 100644 --- a/application/admin/view/user/user_detail.html +++ b/application/admin/view/user/user_detail.html @@ -48,7 +48,7 @@ @@ -124,7 +124,7 @@

<{$user[0]['user_name']}>

识别图片 识别日期 识别结果 - 浏览次数 + 操作 diff --git a/application/home/controller/UserController.class.php b/application/home/controller/UserController.class.php index 72ef4a1..5104641 100644 --- a/application/home/controller/UserController.class.php +++ b/application/home/controller/UserController.class.php @@ -39,6 +39,12 @@ public function loginAction() } } + + public function resetPassWordAction() + { + $this->smarty->display('user/rest_password.html'); + } + public function doRegisterAction() { if ($this->isLogin()) { @@ -115,6 +121,26 @@ public function doLoginAction() } + public function doForgetPassWord() + { + $model = Factory::M('User'); + //Check user exist or not + $where['email'] = $_POST['email']; + $regex = new Regex(); + $checkEmail = $regex->checkEmail($_POST['email']); + if (!$checkEmail) { + $this->showActionInfo('邮箱格式不正确'); + } + $user = $model->find(null, $where); + if ($user) { + //Send Email + $email = new EmailTemples(); + + } else { + $this->showActionInfo('用户名不存在'); + } + } + public function doLogout() { $this->isLogin(); @@ -128,6 +154,7 @@ public function doLogout() $this->showActionInfo('退出成功', '希望下次再来哟~', '/', '返回首页', '2000'); } + public function makeCaptchaAction() { $captcha = new Captcha(); @@ -161,8 +188,8 @@ private function checkUEP() $regexTest = new Regex(); //Use Regex Tool to check $checkUser = $regexTest->checkUser(null, null, $_POST['user_name']); - $checkEmail = $regexTest->checkPassWord($_POST['password']); - $checkPassword = $regexTest->checkEmail($_POST['email']); + $checkPassword = $regexTest->checkPassWord($_POST['password']); + $checkEmail = $regexTest->checkEmail($_POST['email']); if ($checkUser && $checkEmail && $checkPassword) { return true; } else { diff --git a/application/home/view/user/active_success.html b/application/home/view/user/active_success.html index 214993d..983770c 100644 --- a/application/home/view/user/active_success.html +++ b/application/home/view/user/active_success.html @@ -46,23 +46,8 @@
- +
- +
- +
- +
- +
@@ -213,11 +199,11 @@
-
+
- +
@@ -225,13 +211,16 @@ -
验证码地址
+
- +
+ +
- + diff --git a/application/home/view/user/rest_password.html b/application/home/view/user/rest_password.html new file mode 100644 index 0000000..6e3dcd6 --- /dev/null +++ b/application/home/view/user/rest_password.html @@ -0,0 +1,124 @@ + + + + + + {block name="title"}{/block} + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+
+
+
+
+
+
+
+ + +
+
+
+ +
+
+
+
+ + +
+
+ + +
+ + + +
+ + +
+
+
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/framework/tools/EmailTemples.class.php b/framework/tools/EmailTemples.class.php index 4d305a8..2d87993 100644 --- a/framework/tools/EmailTemples.class.php +++ b/framework/tools/EmailTemples.class.php @@ -97,7 +97,7 @@ public function activeEmail($getter, $user)
- 亲爱的 $user : + 亲爱的 {$user}
感谢您注册{$this->site},请点击下方按钮完成账户激活。 @@ -119,8 +119,97 @@ public function activeEmail($getter, $user) } //TODO:Add it - public function resetLink($getter) + public function resetLink($user,$code,$getter) { + $title = '密码重置-' . $GLOBALS['config']['web_name']; + $content = $this->emailTemple = << + +重设密码 + + + + + + + + + + +
+
+ + +
+ 重设{$this->site}密码 +
+ + + + +
+ 亲爱的 {$user} : +
+ 请点击下方按钮完成密码重设。如果非你本人操作,请忽略此邮件。 +
+ 重设密码 +
+ 感谢您选择{$this->site}。 +
+
+HTML; + $this->email::send($title, $content, $getter); + } } \ No newline at end of file