diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index 1b51e7fd5..5ee3ae3ff 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -603,6 +603,12 @@ function encryptStr($str) { return substr_replace($str, $stars_str, 3, $length-6); } +/** + * 身份证加密 + * + * @param $str + * @return mixed + */ function encryptIdCard($str) { $length = strlen($str); $stars_str = ""; @@ -610,4 +616,19 @@ function encryptIdCard($str) { $stars_str = "****"; } return substr_replace($str, $stars_str, $length-4, 4); +} + +/** + * 真实名字加密 + * + * @param $str + * @return mixed + */ +function encryptRealName($str) { + $length = strlen($str); + $stars_str = ""; + if($length>=4){ + $stars_str = "****"; + } + return substr_replace($str, "**", 3, $length); } \ No newline at end of file diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 3ad96d425..8cca0add6 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -348,6 +348,7 @@ class PromoteController extends ThinkController $this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/lists/type/1','status'=>1])->find()); $companys = M('promote_company', 'tab_')->where(['status' => 1])->select(); + $this->assign("is_admin",is_administrator()); $this->assign('companys', $companys); $this->display(); } diff --git a/Application/Admin/View/Promote/edit.html b/Application/Admin/View/Promote/edit.html index 3c78cf76d..0ec8cd257 100644 --- a/Application/Admin/View/Promote/edit.html +++ b/Application/Admin/View/Promote/edit.html @@ -84,13 +84,21 @@