From 8d5122c7b4062825949cf64f45b4be612a44ba30 Mon Sep 17 00:00:00 2001 From: Pw <200844019@qq.com> Date: Fri, 20 Sep 2019 16:22:01 +0800 Subject: [PATCH 01/23] =?UTF-8?q?*=20=E4=BF=AE=E5=A4=8D=E6=9A=B4=E5=8A=9B?= =?UTF-8?q?=E8=8E=B7=E5=8F=96mu=E5=8F=82=E6=95=B0=E5=BC=95=E5=8F=91?= =?UTF-8?q?=E7=9A=84=E9=94=99=E8=AF=AF=E3=80=82=20*=20=E7=AE=80=E5=8D=95?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B2=A1=E6=9C=89mu=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controllers/Client/ClientApiController.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/Controllers/Client/ClientApiController.php b/app/Controllers/Client/ClientApiController.php index 6a12302a..353c2da3 100644 --- a/app/Controllers/Client/ClientApiController.php +++ b/app/Controllers/Client/ClientApiController.php @@ -56,17 +56,15 @@ class ClientApiController extends BaseController public function GetSubLink($request, $response, $args) { $accessToken = Helper::getParam($request, 'access_token'); + $mu = Helper::getParam($request, 'mu'); $storage = Factory::createTokenStorage(); $token = $storage->get($accessToken); $user = User::find($token->userId); $ssr_sub_token = LinkController::GenerateSSRSubCode($user->id, 0); - $mu = 0; - if ($request->getQueryParams()['mu'] != '') { - $mu = $request->getQueryParams()['mu']; - } $res['ret'] = 1; $res['msg'] = 'ok'; - $res['data'] = Config::get('subUrl') . $ssr_sub_token . '?mu=' . $mu; + $res['data'] = Config::get('subUrl') . $ssr_sub_token; + if ($mu != '') $res['data'] = $res['data'].'?mu=' . $mu; return $this->echoJson($response, $res); } } From 66f8d8bc8f34b2775ae3b320d274b7f597c0ed18 Mon Sep 17 00:00:00 2001 From: NimaQu Date: Sat, 21 Sep 2019 03:03:14 -0400 Subject: [PATCH 02/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d99b2bff..6afc7641 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ SSPanel UIM 支持安装在 LNMP、宝塔面板、Plesk 面板、oneinstack 等 ``` 账号:admin 密码:admin -mukey=NimaQu +mukey ShirakamiFubuki ``` ## 文档 From bc05bb18ffd62b1d4945aa473e63068e8f0af711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9B=B4=E5=A2=99?= <33481440+wewall@users.noreply.github.com> Date: Sun, 22 Sep 2019 19:40:56 +0800 Subject: [PATCH 03/23] fix error(user/index): rm obsolete code --- resources/views/material/user/index.tpl | 33 ------------------------- 1 file changed, 33 deletions(-) diff --git a/resources/views/material/user/index.tpl b/resources/views/material/user/index.tpl index d5172e09..d0baedcb 100644 --- a/resources/views/material/user/index.tpl +++ b/resources/views/material/user/index.tpl @@ -578,37 +578,6 @@ table tr td:first-child { return new Date(str_date_splited[0], str_date_splited[1] - 1, str_date_splited[2], str_date_splited[3], str_date_splited[4], str_date_splited[5]); } - /* - * Author: neoFelhz & CloudHammer - * https://github.com/CloudHammer/CloudHammer/make-sspanel-v3-mod-great-again - * License: MIT license & SATA license - */ - function CountDown() { - var levelExpire = DateParse("{$user->class_expire}"); - var accountExpire = DateParse("{$user->expire_in}"); - var nowDate = new Date(); - var a = nowDate.getTime(); - var b = levelExpire - a; - var c = accountExpire - a; - var levelExpireDays = Math.floor(b / (24 * 3600 * 1000)); - var accountExpireDays = Math.floor(c / (24 * 3600 * 1000)); - if (levelExpireDays < 0 || levelExpireDays > 315360000000) { - document.getElementById('days-level-expire').innerHTML = "无限期"; - for (var i = 0; i < document.getElementsByClassName('label-level-expire').length; i += 1) { - document.getElementsByClassName('label-level-expire')[i].style.display = 'none'; - } - } else { - document.getElementById('days-level-expire').innerHTML = levelExpireDays; - } - if (accountExpireDays < 0 || accountExpireDays > 315360000000) { - document.getElementById('days-account-expire').innerHTML = "无限期"; - for (var i = 0; i < document.getElementsByClassName('label-account-expire').length; i += 1) { - document.getElementsByClassName('label-account-expire')[i].style.display = 'none'; - } - } else { - document.getElementById('days-account-expire').innerHTML = accountExpireDays; - } - } \ No newline at end of file + From 129137b7739898fcf0f4f6b4ebcfad24989db0e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=8C=A2=E7=88=B8=E7=88=B8?= <35130590+galaxychuck@users.noreply.github.com> Date: Wed, 25 Sep 2019 08:32:51 +0800 Subject: [PATCH 12/23] Restore Gravatar function --- app/Models/User.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index 3221cede..0223dfcd 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -37,8 +37,8 @@ class User extends Model public function getGravatarAttribute() { - // $hash = md5(strtolower(trim($this->attributes['email']))); - return '/images/Avatar.jpg';//.$hash; + $hash = md5(strtolower(trim($this->attributes['email']))); + return "https://secure.gravatar.com/avatar/".$hash; } public function isAdmin() From a7503a8207c9a7ec3a7ea9396b4201572992b2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=8C=A2=E7=88=B8=E7=88=B8?= <35130590+galaxychuck@users.noreply.github.com> Date: Wed, 25 Sep 2019 08:37:54 +0800 Subject: [PATCH 13/23] Restore Gravatar function & Add set Avatar --- resources/views/material/user/main.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/views/material/user/main.tpl b/resources/views/material/user/main.tpl index b7093b0b..2738cbbd 100644 --- a/resources/views/material/user/main.tpl +++ b/resources/views/material/user/main.tpl @@ -33,7 +33,7 @@ {if $user->isLogin} {$user->user_name} - account_circle + alt text for John Smith avatar {else} 未登录 From c92a52df64bd1030998d2500840e928a5ba54239 Mon Sep 17 00:00:00 2001 From: Regend Soh <17229500+regendsoh@users.noreply.github.com> Date: Wed, 25 Sep 2019 09:42:10 +0800 Subject: [PATCH 14/23] feat: add function to display disable reason for disabled accounts (#815) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add disableReason Function * Added disable reason based on 审计规则 --- app/Models/User.php | 7 +++++++ resources/views/material/user/disable.tpl | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/Models/User.php b/app/Models/User.php index 0223dfcd..b718af61 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -383,4 +383,11 @@ class User extends Model { return User::where('class',"!=",'0')->count(); } + + public function disableReason() + { + $reason_id = DetectLog::where('user_id','=',$this->attributes['id'])->orderBy('id', 'DESC')->first(); + $reason = DetectRule::where("id","=",$reason_id->list_id)->get(); + return $reason[0]->text; + } } diff --git a/resources/views/material/user/disable.tpl b/resources/views/material/user/disable.tpl index cb1b81b8..6f5d524a 100644 --- a/resources/views/material/user/disable.tpl +++ b/resources/views/material/user/disable.tpl @@ -15,7 +15,10 @@
-

您由于某些原因而被管理员禁用了账户,请联系管理员。

+

您由于以下原因而被管理员禁用了账户,请联系管理员。

+

+ 禁用原因:{$user->disableReason()} +

{if $config["enable_admin_contact"] == 'true'}

管理员联系方式:

{if $config["admin_contact1"]!=null} From 891604199860b6f147226505ca4469784a0bf641 Mon Sep 17 00:00:00 2001 From: Regend Soh <17229500+regendsoh@users.noreply.github.com> Date: Wed, 25 Sep 2019 11:25:31 +0800 Subject: [PATCH 15/23] feat: add copy button for node SSR and SS link (#816) * Add copy button for node SSR and SS link * Remove unnecessary script --- resources/views/material/user/nodeinfo.tpl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/resources/views/material/user/nodeinfo.tpl b/resources/views/material/user/nodeinfo.tpl index 6601a1b3..d2851252 100755 --- a/resources/views/material/user/nodeinfo.tpl +++ b/resources/views/material/user/nodeinfo.tpl @@ -196,6 +196,7 @@

iOS 上用 Safari 打开点我即可直接添加

+

{/if} {else}

您好,您目前的 加密方式,混淆,或者协议设置在 ShadowsocksR 客户端下无法连接。请您选用 Shadowsocks 客户端来连接,或者到 @@ -213,6 +214,7 @@

iOS 上用 Safari 打开点我即可直接添加

+

{/if} {else}

您好,您目前的 加密方式,混淆,或者协议设置在 Shadowsocks 客户端下无法连接。请您选用 ShadowsocksR 客户端来连接,或者到 @@ -319,7 +321,16 @@ +