Browse Source

chore: use strict type & fix modal reload

M1Screw 2 years ago
parent
commit
99069ae12a
70 changed files with 264 additions and 290 deletions
  1. 1 1
      resources/views/tabler/admin/announcement/create.tpl
  2. 1 1
      resources/views/tabler/admin/announcement/edit.tpl
  3. 1 1
      resources/views/tabler/admin/announcement/index.tpl
  4. 6 6
      resources/views/tabler/admin/coupon.tpl
  5. 5 5
      resources/views/tabler/admin/detect.tpl
  6. 5 5
      resources/views/tabler/admin/giftcard.tpl
  7. 1 5
      resources/views/tabler/admin/invoice/view.tpl
  8. 8 8
      resources/views/tabler/admin/log/invite.tpl
  9. 1 1
      resources/views/tabler/admin/node/create.tpl
  10. 3 3
      resources/views/tabler/admin/node/edit.tpl
  11. 2 2
      resources/views/tabler/admin/node/index.tpl
  12. 2 2
      resources/views/tabler/admin/order/index.tpl
  13. 1 5
      resources/views/tabler/admin/order/view.tpl
  14. 1 1
      resources/views/tabler/admin/product/create.tpl
  15. 1 1
      resources/views/tabler/admin/product/edit.tpl
  16. 2 2
      resources/views/tabler/admin/product/index.tpl
  17. 7 7
      resources/views/tabler/admin/setting/billing.tpl
  18. 11 11
      resources/views/tabler/admin/setting/captcha.tpl
  19. 15 15
      resources/views/tabler/admin/setting/email.tpl
  20. 7 7
      resources/views/tabler/admin/setting/feature.tpl
  21. 37 37
      resources/views/tabler/admin/setting/im.tpl
  22. 8 8
      resources/views/tabler/admin/setting/ref.tpl
  23. 12 12
      resources/views/tabler/admin/setting/reg.tpl
  24. 11 11
      resources/views/tabler/admin/setting/sub.tpl
  25. 10 10
      resources/views/tabler/admin/setting/support.tpl
  26. 5 1
      resources/views/tabler/admin/tabler_footer.tpl
  27. 2 2
      resources/views/tabler/admin/ticket/index.tpl
  28. 0 4
      resources/views/tabler/admin/ticket/view.tpl
  29. 5 5
      resources/views/tabler/admin/user/edit.tpl
  30. 5 5
      resources/views/tabler/admin/user/index.tpl
  31. 1 1
      resources/views/tabler/auth/login.tpl
  32. 8 8
      resources/views/tabler/auth/register.tpl
  33. 4 4
      resources/views/tabler/live_chat.tpl
  34. 1 5
      resources/views/tabler/password/reset.tpl
  35. 1 5
      resources/views/tabler/password/token.tpl
  36. 1 1
      resources/views/tabler/user/banned.tpl
  37. 2 2
      resources/views/tabler/user/detect/index.tpl
  38. 21 21
      resources/views/tabler/user/edit.tpl
  39. 2 2
      resources/views/tabler/user/index.tpl
  40. 1 1
      resources/views/tabler/user/invite.tpl
  41. 2 2
      resources/views/tabler/user/media.tpl
  42. 2 2
      resources/views/tabler/user/order/create.tpl
  43. 5 1
      resources/views/tabler/user/tabler_footer.tpl
  44. 3 3
      resources/views/tabler/user/tabler_header.tpl
  45. 1 5
      resources/views/tabler/user/ticket/index.tpl
  46. 1 5
      resources/views/tabler/user/ticket/view.tpl
  47. 1 1
      src/Command/DetectBan.php
  48. 1 1
      src/Command/DetectGFW.php
  49. 1 1
      src/Command/Update.php
  50. 1 1
      src/Controllers/LinkController.php
  51. 2 2
      src/Controllers/PasswordController.php
  52. 1 1
      src/Controllers/SubController.php
  53. 1 1
      src/Controllers/WebAPI/UserController.php
  54. 1 1
      src/Middleware/ErrorHandler.php
  55. 1 1
      src/Middleware/NodeToken.php
  56. 4 4
      src/Models/User.php
  57. 1 1
      src/Services/Auth/Cookie.php
  58. 2 2
      src/Services/Cloudflare.php
  59. 1 7
      src/Services/Gateway/Epay/EpayTool.php
  60. 1 1
      src/Services/Mail/Smtp.php
  61. 2 2
      src/Utils/Telegram.php
  62. 3 3
      src/Utils/Telegram/Callback.php
  63. 1 1
      src/Utils/Telegram/Commands/CheckinCommand.php
  64. 1 1
      src/Utils/Telegram/Commands/HelpCommand.php
  65. 1 1
      src/Utils/Telegram/Commands/InfoCommand.php
  66. 1 1
      src/Utils/Telegram/Commands/MyCommand.php
  67. 1 1
      src/Utils/Telegram/Commands/PingCommand.php
  68. 1 1
      src/Utils/Telegram/Commands/SetuserCommand.php
  69. 1 1
      src/Utils/Telegram/Commands/UnbindCommand.php
  70. 1 1
      src/Utils/Telegram/TelegramTools.php

+ 1 - 1
resources/views/tabler/admin/announcement/create.tpl

@@ -101,7 +101,7 @@
                 content: tinyMCE.activeEditor.getContent(),
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                     window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});

+ 1 - 1
resources/views/tabler/admin/announcement/edit.tpl

@@ -76,7 +76,7 @@
                 content: tinyMCE.activeEditor.getContent(),
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                     window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});

+ 1 - 1
resources/views/tabler/admin/announcement/index.tpl

@@ -108,7 +108,7 @@
                     type: 'DELETE',
                     dataType: "json",
                     success: function(data) {
-                        if (data.ret == 1) {
+                        if (data.ret === 1) {
                             $('#success-message').text(data.msg);
                             $('#success-dialog').modal('show');
                             reloadTableAjax();

+ 6 - 6
resources/views/tabler/admin/coupon.tpl

@@ -65,7 +65,7 @@
                 </div>
                 <div class="modal-body">
                     {foreach $details['create_dialog'] as $detail}
-                        {if $detail['type'] == 'input'}
+                        {if $detail['type'] === 'input'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$detail['info']}</label>
                                 <div class="col">
@@ -74,14 +74,14 @@
                                 </div>
                             </div>
                         {/if}
-                        {if $detail['type'] == 'textarea'}
+                        {if $detail['type'] === 'textarea'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$detail['info']}</label>
                                 <textarea id="{$detail['id']}" class="col form-control" rows="{$detail['rows']}"
                                     placeholder="{$detail['placeholder']}"></textarea>
                             </div>
                         {/if}
-                        {if $detail['type'] == 'select'}
+                        {if $detail['type'] === 'select'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$detail['info']}</label>
                                 <div class="col">
@@ -185,7 +185,7 @@
                     expire_time: $('#expire_time').val(),
                 },
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                         reloadTableAjax();
@@ -206,7 +206,7 @@
                     type: 'DELETE',
                     dataType: "json",
                     success: function(data) {
-                        if (data.ret == 1) {
+                        if (data.ret === 1) {
                             $('#success-message').text(data.msg);
                             $('#success-dialog').modal('show');
                             reloadTableAjax();
@@ -228,7 +228,7 @@
                     type: 'POST',
                     dataType: "json",
                     success: function(data) {
-                        if (data.ret == 1) {
+                        if (data.ret === 1) {
                             $('#success-message').text(data.msg);
                             $('#success-dialog').modal('show');
                             reloadTableAjax();

+ 5 - 5
resources/views/tabler/admin/detect.tpl

@@ -55,7 +55,7 @@
                 </div>
                 <div class="modal-body">
                     {foreach $details['add_dialog'] as $from}
-                        {if $from['type'] == 'input'}
+                        {if $from['type'] === 'input'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$from['info']}</label>
                                 <div class="col">
@@ -64,14 +64,14 @@
                                 </div>
                             </div>
                         {/if}
-                        {if $from['type'] == 'textarea'}
+                        {if $from['type'] === 'textarea'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$from['info']}</label>
                                 <textarea id="{$from['id']}" class="col form-control" rows="{$from['rows']}"
                                     placeholder="{$from['placeholder']}"></textarea>
                             </div>
                         {/if}
-                        {if $from['type'] == 'select'}
+                        {if $from['type'] === 'select'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$from['info']}</label>
                                 <div class="col">
@@ -154,7 +154,7 @@
                     {/foreach}
                 },
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                         reloadTableAjax();
@@ -175,7 +175,7 @@
                     type: 'DELETE',
                     dataType: "json",
                     success: function(data) {
-                        if (data.ret == 1) {
+                        if (data.ret === 1) {
                             $('#success-message').text(data.msg);
                             $('#success-dialog').modal('show');
                             reloadTableAjax();

+ 5 - 5
resources/views/tabler/admin/giftcard.tpl

@@ -61,7 +61,7 @@
                 </div>
                 <div class="modal-body">
                     {foreach $details['create_dialog'] as $detail}
-                        {if $detail['type'] == 'input'}
+                        {if $detail['type'] === 'input'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$detail['info']}</label>
                                 <div class="col">
@@ -70,14 +70,14 @@
                                 </div>
                             </div>
                         {/if}
-                        {if $detail['type'] == 'textarea'}
+                        {if $detail['type'] === 'textarea'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$detail['info']}</label>
                                 <textarea id="{$detail['id']}" class="col form-control" rows="{$detail['rows']}"
                                     placeholder="{$detail['placeholder']}"></textarea>
                             </div>
                         {/if}
-                        {if $detail['type'] == 'select'}
+                        {if $detail['type'] === 'select'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$detail['info']}</label>
                                 <div class="col">
@@ -165,7 +165,7 @@
                     {/foreach}
                 },
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                         reloadTableAjax();
@@ -186,7 +186,7 @@
                     type: 'DELETE',
                     dataType: "json",
                     success: function(data) {
-                        if (data.ret == 1) {
+                        if (data.ret === 1) {
                             $('#success-message').text(data.msg);
                             $('#success-dialog').modal('show');
                             reloadTableAjax();

+ 1 - 5
resources/views/tabler/admin/invoice/view.tpl

@@ -132,7 +132,7 @@
                 type: 'POST',
                 dataType: "json",
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                     } else {
@@ -142,10 +142,6 @@
                 }
             })
         });
-
-        $("#success-confirm").click(function() {
-            location.reload();
-        });
     </script>
 
 {include file='admin/tabler_footer.tpl'}

+ 8 - 8
resources/views/tabler/admin/log/invite.tpl

@@ -60,7 +60,7 @@
                 </div>
                 <div class="modal-body">
                     {foreach $details['update_dialog'] as $from}
-                        {if $from['type'] == 'input'}
+                        {if $from['type'] === 'input'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$from['info']}</label>
                                 <div class="col">
@@ -69,14 +69,14 @@
                                 </div>
                             </div>
                         {/if}
-                        {if $from['type'] == 'textarea'}
+                        {if $from['type'] === 'textarea'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$from['info']}</label>
                                 <textarea id="{$from['id']}" class="col form-control" rows="{$from['rows']}"
                                     placeholder="{$from['placeholder']}"></textarea>
                             </div>
                         {/if}
-                        {if $from['type'] == 'select'}
+                        {if $from['type'] === 'select'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$from['info']}</label>
                                 <div class="col">
@@ -107,7 +107,7 @@
                 </div>
                 <div class="modal-body">
                     {foreach $details['add_dialog'] as $from}
-                        {if $from['type'] == 'input'}
+                        {if $from['type'] === 'input'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$from['info']}</label>
                                 <div class="col">
@@ -116,14 +116,14 @@
                                 </div>
                             </div>
                         {/if}
-                        {if $from['type'] == 'textarea'}
+                        {if $from['type'] === 'textarea'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$from['info']}</label>
                                 <textarea id="{$from['id']}" class="col form-control" rows="{$from['rows']}"
                                     placeholder="{$from['placeholder']}"></textarea>
                             </div>
                         {/if}
-                        {if $from['type'] == 'select'}
+                        {if $from['type'] === 'select'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$from['info']}</label>
                                 <div class="col">
@@ -203,7 +203,7 @@
                     {/foreach}
                 },
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                         reloadTableAjax();
@@ -226,7 +226,7 @@
                     {/foreach}
                 },
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                         reloadTableAjax();

+ 1 - 1
resources/views/tabler/admin/node/create.tpl

@@ -171,7 +171,7 @@
                 custom_config: JSON.stringify(editor.get()),
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                     window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});

+ 3 - 3
resources/views/tabler/admin/node/edit.tpl

@@ -85,7 +85,7 @@
                                             <span class="col-auto">
                                                 <label class="form-check form-check-single form-switch">
                                                     <input id="type" class="form-check-input" type="checkbox"
-                                                        {if $node->type == 1}checked="" {/if}>
+                                                        {if $node->type === 1}checked="" {/if}>
                                                 </label>
                                             </span>
                                         </label>
@@ -198,7 +198,7 @@
             type: 'POST',
             dataType: "json",
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                 } else {
@@ -222,7 +222,7 @@
                 custom_config: JSON.stringify(editor.get()),
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                     window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});

+ 2 - 2
resources/views/tabler/admin/node/index.tpl

@@ -110,7 +110,7 @@
                     type: 'DELETE',
                     dataType: "json",
                     success: function(data) {
-                        if (data.ret == 1) {
+                        if (data.ret === 1) {
                             $('#success-message').text(data.msg);
                             $('#success-dialog').modal('show');
                             reloadTableAjax();
@@ -132,7 +132,7 @@
                     type: 'POST',
                     dataType: "json",
                     success: function(data) {
-                        if (data.ret == 1) {
+                        if (data.ret === 1) {
                             $('#success-message').text(data.msg);
                             $('#success-dialog').modal('show');
                             reloadTableAjax();

+ 2 - 2
resources/views/tabler/admin/order/index.tpl

@@ -100,7 +100,7 @@
                     type: 'DELETE',
                     dataType: "json",
                     success: function(data) {
-                        if (data.ret == 1) {
+                        if (data.ret === 1) {
                             $('#success-message').text(data.msg);
                             $('#success-dialog').modal('show');
                             reloadTableAjax();
@@ -122,7 +122,7 @@
                     type: 'POST',
                     dataType: "json",
                     success: function(data) {
-                        if (data.ret == 1) {
+                        if (data.ret === 1) {
                             $('#success-message').text(data.msg);
                             $('#success-dialog').modal('show');
                             reloadTableAjax();

+ 1 - 5
resources/views/tabler/admin/order/view.tpl

@@ -214,7 +214,7 @@
                 type: 'POST',
                 dataType: "json",
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                     } else {
@@ -224,10 +224,6 @@
                 }
             })
         });
-
-        $("#success-confirm").click(function() {
-            location.reload();
-        });
     </script>
 
 {include file='admin/tabler_footer.tpl'}

+ 1 - 1
resources/views/tabler/admin/product/create.tpl

@@ -170,7 +170,7 @@
                 new_user_required: $("#new_user_required").is(":checked"),
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                     window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});

+ 1 - 1
resources/views/tabler/admin/product/edit.tpl

@@ -179,7 +179,7 @@
                 new_user_required: $("#new_user_required").is(":checked"),
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                     window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});

+ 2 - 2
resources/views/tabler/admin/product/index.tpl

@@ -108,7 +108,7 @@
                     type: 'DELETE',
                     dataType: "json",
                     success: function(data) {
-                        if (data.ret == 1) {
+                        if (data.ret === 1) {
                             $('#success-message').text(data.msg);
                             $('#success-dialog').modal('show');
                             reloadTableAjax();
@@ -130,7 +130,7 @@
                     type: 'POST',
                     dataType: "json",
                     success: function(data) {
-                        if (data.ret == 1) {
+                        if (data.ret === 1) {
                             $('#success-message').text(data.msg);
                             $('#success-dialog').modal('show');
                             reloadTableAjax();

+ 7 - 7
resources/views/tabler/admin/setting/billing.tpl

@@ -103,7 +103,7 @@
                                     <div class="col">
                                         <select id="stripe_card" class="col form-select" value="{$settings['stripe_card']}">
                                             <option value="0">停用</option>
-                                            <option value="1" {if $settings['stripe_card'] === true}selected{/if}>启用</option>
+                                            <option value="1" {if $settings['stripe_card']}selected{/if}>启用</option>
                                         </select>
                                     </div>
                                 </div>
@@ -112,7 +112,7 @@
                                     <div class="col">
                                         <select id="stripe_alipay" class="col form-select" value="{$settings['stripe_alipay']}">
                                             <option value="0">停用</option>
-                                            <option value="1" {if $settings['stripe_alipay'] === true}selected{/if}>启用</option>
+                                            <option value="1" {if $settings['stripe_alipay']}selected{/if}>启用</option>
                                         </select>
                                     </div>
                                 </div>
@@ -121,7 +121,7 @@
                                     <div class="col">
                                         <select id="stripe_wechat" class="col form-select" value="{$settings['stripe_wechat']}">
                                             <option value="0">停用</option>
-                                            <option value="1" {if $settings['stripe_wechat'] === true}selected{/if}>启用</option>
+                                            <option value="1" {if $settings['stripe_wechat']}selected{/if}>启用</option>
                                         </select>
                                     </div>
                                 </div>
@@ -188,7 +188,7 @@
                                     <div class="col">
                                         <select id="epay_alipay" class="col form-select" value="{$settings['epay_alipay']}">
                                             <option value="0">停用</option>
-                                            <option value="1" {if $settings['epay_alipay'] === true}selected{/if}>启用</option>
+                                            <option value="1" {if $settings['epay_alipay']}selected{/if}>启用</option>
                                         </select>
                                     </div>
                                 </div>
@@ -197,7 +197,7 @@
                                     <div class="col">
                                         <select id="epay_wechat" class="col form-select" value="{$settings['epay_wechat']}">
                                             <option value="0">停用</option>
-                                            <option value="1" {if $settings['epay_wechat'] === true}selected{/if}>启用</option>
+                                            <option value="1" {if $settings['epay_wechat']}selected{/if}>启用</option>
                                         </select>
                                     </div>
                                 </div>
@@ -206,7 +206,7 @@
                                     <div class="col">
                                         <select id="epay_qq" class="col form-select" value="{$settings['epay_qq']}">
                                             <option value="0">停用</option>
-                                            <option value="1" {if $settings['epay_qq'] === true}selected{/if}>启用</option>
+                                            <option value="1" {if $settings['epay_qq']}selected{/if}>启用</option>
                                         </select>
                                     </div>
                                 </div>
@@ -215,7 +215,7 @@
                                     <div class="col">
                                         <select id="epay_usdt" class="col form-select" value="{$settings['epay_usdt']}">
                                             <option value="0">停用</option>
-                                            <option value="1" {if $settings['epay_usdt'] === true}selected{/if}>启用</option>
+                                            <option value="1" {if $settings['epay_usdt']}selected{/if}>启用</option>
                                         </select>
                                     </div>
                                 </div>

+ 11 - 11
resources/views/tabler/admin/setting/captcha.tpl

@@ -49,8 +49,8 @@
                                     <label class="form-label col-3 col-form-label">验证码提供商</label>
                                     <div class="col">
                                         <select id="captcha_provider" class="col form-select" value="{$settings['captcha_provider']}">
-                                            <option value="turnstile" {if $settings['captcha_provider'] == "turnstile"}selected{/if}>Turnstile</option>
-                                            <option value="geetest" {if $settings['captcha_provider'] == "geetest"}selected{/if}>Geetest</option>
+                                            <option value="turnstile" {if $settings['captcha_provider'] === "turnstile"}selected{/if}>Turnstile</option>
+                                            <option value="geetest" {if $settings['captcha_provider'] === "geetest"}selected{/if}>Geetest</option>
                                         </select>
                                     </div>
                                 </div>
@@ -58,8 +58,8 @@
                                     <label class="form-label col-3 col-form-label">注册验证码</label>
                                     <div class="col">
                                         <select id="enable_reg_captcha" class="col form-select" value="{$settings['enable_reg_captcha']}">
-                                            <option value="0" {if $settings['enable_reg_captcha'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['enable_reg_captcha'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['enable_reg_captcha'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['enable_reg_captcha'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -67,8 +67,8 @@
                                     <label class="form-label col-3 col-form-label">登录验证码</label>
                                     <div class="col">
                                         <select id="enable_login_captcha" class="col form-select" value="{$settings['enable_login_captcha']}">
-                                            <option value="0" {if $settings['enable_login_captcha'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['enable_login_captcha'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['enable_login_captcha'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['enable_login_captcha'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -76,8 +76,8 @@
                                     <label class="form-label col-3 col-form-label">签到验证码</label>
                                     <div class="col">
                                         <select id="enable_checkin_captcha" class="col form-select" value="{$settings['enable_checkin_captcha']}">
-                                            <option value="0" {if $settings['enable_checkin_captcha'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['enable_checkin_captcha'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['enable_checkin_captcha'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['enable_checkin_captcha'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -85,8 +85,8 @@
                                     <label class="form-label col-3 col-form-label">重置密码验证码</label>
                                     <div class="col">
                                         <select id="enable_reset_password_captcha" class="col form-select" value="{$settings['enable_reset_password_captcha']}">
-                                            <option value="0" {if $settings['enable_reset_password_captcha'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['enable_reset_password_captcha'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['enable_reset_password_captcha'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['enable_reset_password_captcha'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -143,7 +143,7 @@
                 {/foreach}
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                 } else {

+ 15 - 15
resources/views/tabler/admin/setting/email.tpl

@@ -58,12 +58,12 @@
                                     <label class="form-label col-3 col-form-label">邮件服务提供商</label>
                                     <div class="col">
                                         <select id="mail_driver" class="col form-select" value="{$settings['mail_driver']}">
-                                            <option value="none" {if $settings['mail_driver'] == "none"}selected{/if}>none</option>
-                                            <option value="smtp" {if $settings['mail_driver'] == "smtp"}selected{/if}>smtp</option>
-                                            <option value="sendgrid" {if $settings['mail_driver'] == "sendgrid"}selected{/if}>sendgrid</option>
-                                            <option value="mailgun" {if $settings['mail_driver'] == "mailgun"}selected{/if}>mailgun</option>
-                                            <option value="postal" {if $settings['mail_driver'] == "postal"}selected{/if}>postal</option>
-                                            <option value="ses" {if $settings['mail_driver'] == "ses"}selected{/if}>ses</option>
+                                            <option value="none" {if $settings['mail_driver'] === "none"}selected{/if}>none</option>
+                                            <option value="smtp" {if $settings['mail_driver'] === "smtp"}selected{/if}>smtp</option>
+                                            <option value="sendgrid" {if $settings['mail_driver'] === "sendgrid"}selected{/if}>sendgrid</option>
+                                            <option value="mailgun" {if $settings['mail_driver'] === "mailgun"}selected{/if}>mailgun</option>
+                                            <option value="postal" {if $settings['mail_driver'] === "postal"}selected{/if}>postal</option>
+                                            <option value="ses" {if $settings['mail_driver'] === "ses"}selected{/if}>ses</option>
                                         </select>
                                     </div>
                                 </div>
@@ -102,11 +102,11 @@
                                     <label class="form-label col-3 col-form-label">SMTP 端口</label>
                                     <div class="col">
                                         <select id="smtp_port" class="col form-select" value="{$settings['smtp_port']}">
-                                            <option value="465" {if $settings['smtp_port'] == "465"}selected{/if}>465</option>
-                                            <option value="587" {if $settings['smtp_port'] == "587"}selected{/if}>587</option>
-                                            <option value="443" {if $settings['smtp_port'] == "443"}selected{/if}>2525</option>
-                                            <option value="80" {if $settings['smtp_port'] == "80"}selected{/if}>2525</option>
-                                            <option value="25" {if $settings['smtp_port'] == "25"}selected{/if}>25</option>
+                                            <option value="465" {if $settings['smtp_port'] === "465"}selected{/if}>465</option>
+                                            <option value="587" {if $settings['smtp_port'] === "587"}selected{/if}>587</option>
+                                            <option value="443" {if $settings['smtp_port'] === "443"}selected{/if}>2525</option>
+                                            <option value="80" {if $settings['smtp_port'] === "80"}selected{/if}>2525</option>
+                                            <option value="25" {if $settings['smtp_port'] === "25"}selected{/if}>25</option>
                                         </select>
                                     </div>
                                 </div>
@@ -126,8 +126,8 @@
                                     <label class="form-label col-3 col-form-label">是否使用 TLS/SSL</label>
                                     <div class="col">
                                     <select id="smtp_ssl" class="col form-select" value="{$settings['smtp_ssl']}">
-                                        <option value="1" {if $settings['smtp_ssl'] == true}selected{/if}>开启</option>
-                                        <option value="0" {if $settings['smtp_ssl'] == false}selected{/if}>关闭</option>
+                                        <option value="1" {if $settings['smtp_ssl'] === true}selected{/if}>开启</option>
+                                        <option value="0" {if $settings['smtp_ssl'] === false}selected{/if}>关闭</option>
                                     </select>
                                     </div>
                                 </div>
@@ -264,7 +264,7 @@
                 {/foreach}
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                 } else {
@@ -284,7 +284,7 @@
                 recipient: $('#recipient').val(),
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                 } else {

+ 7 - 7
resources/views/tabler/admin/setting/feature.tpl

@@ -43,8 +43,8 @@
                                     <label class="form-label col-3 col-form-label">显示节点流媒体解锁情况</label>
                                     <div class="col">
                                         <select id="display_media" class="col form-select" value="{$settings['display_media']}">
-                                            <option value="0" {if $settings['display_media'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['display_media'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['display_media'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['display_media'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -52,8 +52,8 @@
                                     <label class="form-label col-3 col-form-label">显示用户订阅记录</label>
                                     <div class="col">
                                         <select id="display_subscribe_log" class="col form-select" value="{$settings['display_subscribe_log']}">
-                                            <option value="0" {if $settings['display_subscribe_log'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['display_subscribe_log'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['display_subscribe_log'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['display_subscribe_log'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -61,8 +61,8 @@
                                     <label class="form-label col-3 col-form-label">显示用户审计记录</label>
                                     <div class="col">
                                         <select id="display_detect_log" class="col form-select" value="{$settings['display_detect_log']}">
-                                            <option value="0" {if $settings['display_detect_log'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['display_detect_log'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['display_detect_log'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['display_detect_log'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -87,7 +87,7 @@
                 {/foreach}
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                 } else {

+ 37 - 37
resources/views/tabler/admin/setting/im.tpl

@@ -46,8 +46,8 @@
                                     <label class="form-label col-3 col-form-label">添加节点通知</label>
                                     <div class="col">
                                         <select id="telegram_add_node" class="col form-select" value="{$settings['telegram_add_node']}">
-                                            <option value="0" {if $settings['telegram_add_node'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['telegram_add_node'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['telegram_add_node'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['telegram_add_node'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -61,8 +61,8 @@
                                     <label class="form-label col-3 col-form-label">修改节点通知</label>
                                     <div class="col">
                                         <select id="telegram_update_node" class="col form-select" value="{$settings['telegram_update_node']}">
-                                            <option value="0" {if $settings['telegram_update_node'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['telegram_update_node'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['telegram_update_node'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['telegram_update_node'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -76,8 +76,8 @@
                                     <label class="form-label col-3 col-form-label">删除节点通知</label>
                                     <div class="col">
                                         <select id="telegram_delete_node" class="col form-select" value="{$settings['telegram_delete_node']}">
-                                            <option value="0" {if $settings['telegram_delete_node'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['telegram_delete_node'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['telegram_delete_node'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['telegram_delete_node'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -91,8 +91,8 @@
                                     <label class="form-label col-3 col-form-label">节点被墙通知</label>
                                     <div class="col">
                                         <select id="telegram_node_gfwed" class="col form-select" value="{$settings['telegram_node_gfwed']}">
-                                            <option value="0" {if $settings['telegram_node_gfwed'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['telegram_node_gfwed'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['telegram_node_gfwed'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['telegram_node_gfwed'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -106,8 +106,8 @@
                                     <label class="form-label col-3 col-form-label">节点被墙恢复通知</label>
                                     <div class="col">
                                         <select id="telegram_node_ungfwed" class="col form-select" value="{$settings['telegram_node_ungfwed']}">
-                                            <option value="0" {if $settings['telegram_node_ungfwed'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['telegram_node_ungfwed'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['telegram_node_ungfwed'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['telegram_node_ungfwed'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -121,8 +121,8 @@
                                     <label class="form-label col-3 col-form-label">节点离线通知</label>
                                     <div class="col">
                                         <select id="telegram_node_offline" class="col form-select" value="{$settings['telegram_node_offline']}">
-                                            <option value="0" {if $settings['telegram_node_offline'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['telegram_node_offline'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['telegram_node_offline'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['telegram_node_offline'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -136,8 +136,8 @@
                                     <label class="form-label col-3 col-form-label">节点上线通知</label>
                                     <div class="col">
                                         <select id="telegram_node_online" class="col form-select" value="{$settings['telegram_node_online']}">
-                                            <option value="0" {if $settings['telegram_node_online'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['telegram_node_online'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['telegram_node_online'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['telegram_node_online'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -151,8 +151,8 @@
                                     <label class="form-label col-3 col-form-label">每日任务通知</label>
                                     <div class="col">
                                         <select id="telegram_daily_job" class="col form-select" value="{$settings['telegram_daily_job']}">
-                                            <option value="0" {if $settings['telegram_daily_job'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['telegram_daily_job'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['telegram_daily_job'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['telegram_daily_job'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -166,8 +166,8 @@
                                     <label class="form-label col-3 col-form-label">系统运行状况通知</label>
                                     <div class="col">
                                         <select id="telegram_diary" class="col form-select" value="{$settings['telegram_diary']}">
-                                            <option value="0" {if $settings['telegram_diary'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['telegram_diary'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['telegram_diary'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['telegram_diary'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -185,8 +185,8 @@
                                     <label class="form-label col-3 col-form-label">解绑 Telegram 账户后自动踢出群组</label>
                                     <div class="col">
                                         <select id="telegram_unbind_kick_member" class="col form-select" value="{$settings['telegram_unbind_kick_member']}">
-                                            <option value="0" {if $settings['telegram_unbind_kick_member'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['telegram_unbind_kick_member'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['telegram_unbind_kick_member'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['telegram_unbind_kick_member'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -194,8 +194,8 @@
                                     <label class="form-label col-3 col-form-label">仅允许已绑定 Telegram 账户的用户加入群组</label>
                                     <div class="col">
                                         <select id="telegram_group_bound_user" class="col form-select" value="{$settings['telegram_group_bound_user']}">
-                                            <option value="0" {if $settings['telegram_group_bound_user'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['telegram_group_bound_user'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['telegram_group_bound_user'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['telegram_group_bound_user'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -203,8 +203,8 @@
                                     <label class="form-label col-3 col-form-label">启用 Telegram 机器人显示用户群组链接</label>
                                     <div class="col">
                                         <select id="telegram_show_group_link" class="col form-select" value="{$settings['telegram_show_group_link']}">
-                                            <option value="0" {if $settings['telegram_show_group_link'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['telegram_show_group_link'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['telegram_show_group_link'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['telegram_show_group_link'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -218,8 +218,8 @@
                                     <label class="form-label col-3 col-form-label">Telegram 机器人发送欢迎消息</label>
                                     <div class="col">
                                         <select id="enable_welcome_message" class="col form-select" value="{$settings['enable_welcome_message']}">
-                                            <option value="0" {if $settings['enable_welcome_message'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['enable_welcome_message'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['enable_welcome_message'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['enable_welcome_message'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -227,8 +227,8 @@
                                     <label class="form-label col-3 col-form-label">Telegram 机器人在群组中不回应</label>
                                     <div class="col">
                                         <select id="telegram_group_quiet" class="col form-select" value="{$settings['telegram_group_quiet']}">
-                                            <option value="0" {if $settings['telegram_group_quiet'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['telegram_group_quiet'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['telegram_group_quiet'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['telegram_group_quiet'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -236,8 +236,8 @@
                                     <label class="form-label col-3 col-form-label">允许 Bot 加入下方配置之外的群组</label>
                                     <div class="col">
                                         <select id="allow_to_join_new_groups" class="col form-select" value="{$settings['allow_to_join_new_groups']}">
-                                            <option value="0" {if $settings['allow_to_join_new_groups'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['allow_to_join_new_groups'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['allow_to_join_new_groups'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['allow_to_join_new_groups'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -257,8 +257,8 @@
                                     <label class="form-label col-3 col-form-label">非管理员操作管理员功能是否回复</label>
                                     <div class="col">
                                         <select id="enable_not_admin_reply" class="col form-select" value="{$settings['enable_not_admin_reply']}">
-                                            <option value="0" {if $settings['enable_not_admin_reply'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['enable_not_admin_reply'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['enable_not_admin_reply'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['enable_not_admin_reply'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -284,8 +284,8 @@
                                     <label class="form-label col-3 col-form-label">允许任意未知的命令触发 /help 的回复</label>
                                     <div class="col">
                                         <select id="help_any_command" class="col form-select" value="{$settings['help_any_command']}">
-                                            <option value="0" {if $settings['help_any_command'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['help_any_command'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['help_any_command'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['help_any_command'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -293,8 +293,8 @@
                                     <label class="form-label col-3 col-form-label">开启在群组搜寻用户信息时显示用户完整邮箱,关闭则会对邮箱中间内容打码</label>
                                     <div class="col">
                                         <select id="enable_user_email_group_show" class="col form-select" value="{$settings['enable_user_email_group_show']}">
-                                            <option value="0" {if $settings['enable_user_email_group_show'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['enable_user_email_group_show'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['enable_user_email_group_show'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['enable_user_email_group_show'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -337,7 +337,7 @@
                 {/foreach}
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                 } else {

+ 8 - 8
resources/views/tabler/admin/setting/ref.tpl

@@ -62,11 +62,11 @@
                                     <label class="form-label col-3 col-form-label">邀请模式</label>
                                     <div class="col">
                                         <select id="invitation_mode" class="col form-select" value="{$settings['invitation_mode']}">
-                                            <option value="registration_only" {if $settings['invitation_mode'] == 'registration_only'}selected{/if}>
+                                            <option value="registration_only" {if $settings['invitation_mode'] === 'registration_only'}selected{/if}>
                                             不返利</option>
-                                            <option value="after_recharge" {if $settings['invitation_mode'] == 'after_recharge'}selected{/if}>
+                                            <option value="after_recharge" {if $settings['invitation_mode'] === 'after_recharge'}selected{/if}>
                                             被邀请用户充值时返利</option>
-                                            <option value="after_purchase" {if $settings['invitation_mode'] == 'after_purchase'}selected{/if}>
+                                            <option value="after_purchase" {if $settings['invitation_mode'] === 'after_purchase'}selected{/if}>
                                             被邀请用户购买时返利</option>
                                         </select>
                                     </div>
@@ -75,13 +75,13 @@
                                     <label class="form-label col-3 col-form-label">邀请模式</label>
                                     <div class="col">
                                         <select id="invite_rebate_mode" class="col form-select" value="{$settings['invite_rebate_mode']}">
-                                            <option value="continued" {if $settings['invite_rebate_mode'] == 'continued'}selected{/if}>
+                                            <option value="continued" {if $settings['invite_rebate_mode'] === 'continued'}selected{/if}>
                                             持续返利</option>
-                                            <option value="limit_frequency" {if $settings['invite_rebate_mode'] == 'limit_frequency'}selected{/if}>
+                                            <option value="limit_frequency" {if $settings['invite_rebate_mode'] === 'limit_frequency'}selected{/if}>
                                             限制邀请人能从被邀请人身上获得的返利次数</option>
-                                            <option value="limit_amount" {if $settings['invite_rebate_mode'] == 'limit_amount'}selected{/if}>
+                                            <option value="limit_amount" {if $settings['invite_rebate_mode'] === 'limit_amount'}selected{/if}>
                                             限制邀请人能从被邀请人身上获得的返利金额</option>
-                                            <option value="limit_time_range" {if $settings['invite_rebate_mode'] == 'limit_time_range'}selected{/if}>
+                                            <option value="limit_time_range" {if $settings['invite_rebate_mode'] === 'limit_time_range'}selected{/if}>
                                             限制邀请人能从被邀请人身上获得返利的时间范围</option>
                                         </select>
                                     </div>
@@ -131,7 +131,7 @@
                 {/foreach}
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                 } else {

+ 12 - 12
resources/views/tabler/admin/setting/reg.tpl

@@ -49,9 +49,9 @@
                                     <label class="form-label col-3 col-form-label">注册模式</label>
                                     <div class="col">
                                         <select id="reg_mode" class="col form-select" value="{$settings['reg_mode']}">
-                                            <option value="close" {if $settings['reg_mode'] == 'close'}selected{/if}>关闭注册</option>
-                                            <option value="open" {if $settings['reg_mode'] == 'open'}selected{/if}>公开注册</option>
-                                            <option value="invite" {if $settings['reg_mode'] == 'invite'}selected{/if}>仅限用户邀请注册</option>
+                                            <option value="close" {if $settings['reg_mode'] === 'close'}selected{/if}>关闭注册</option>
+                                            <option value="open" {if $settings['reg_mode'] === 'open'}selected{/if}>公开注册</option>
+                                            <option value="invite" {if $settings['reg_mode'] === 'invite'}selected{/if}>仅限用户邀请注册</option>
                                         </select>
                                     </div>
                                 </div>
@@ -59,8 +59,8 @@
                                     <label class="form-label col-3 col-form-label">邮箱验证</label>
                                     <div class="col">
                                         <select id="reg_email_verify" class="col form-select" value="{$settings['reg_email_verify']}">
-                                            <option value="0" {if $settings['reg_email_verify'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['reg_email_verify'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['reg_email_verify'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['reg_email_verify'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -86,8 +86,8 @@
                                     <label class="form-label col-3 col-form-label">默认接收每日用量邮件推送</label>
                                     <div class="col">
                                         <select id="sign_up_for_daily_report" class="col form-select" value="{$settings['sign_up_for_daily_report']}">
-                                            <option value="0" {if $settings['sign_up_for_daily_report'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['sign_up_for_daily_report'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['sign_up_for_daily_report'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['sign_up_for_daily_report'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -95,8 +95,8 @@
                                     <label class="form-label col-3 col-form-label">是否要求用户输入IM联系方式</label>
                                     <div class="col">
                                         <select id="enable_reg_im" class="col form-select" value="{$settings['enable_reg_im']}">
-                                            <option value="0" {if $settings['enable_reg_im'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['enable_reg_im'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['enable_reg_im'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['enable_reg_im'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -104,8 +104,8 @@
                                     <label class="form-label col-3 col-form-label">默认使用新商店系统</label>
                                     <div class="col">
                                         <select id="enable_reg_new_shop" class="col form-select" value="{$settings['enable_reg_new_shop']}">
-                                            <option value="0" {if $settings['enable_reg_new_shop'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['enable_reg_new_shop'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['enable_reg_new_shop'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['enable_reg_new_shop'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -228,7 +228,7 @@
                 {/foreach}
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                 } else {

+ 11 - 11
resources/views/tabler/admin/setting/sub.tpl

@@ -43,8 +43,8 @@
                                     <label class="form-label col-3 col-form-label">启用传统订阅系统</label>
                                     <div class="col">
                                         <select id="enable_traditional_sub" class="col form-select" value="{$settings['enable_traditional_sub']}">
-                                            <option value="0" {if $settings['enable_traditional_sub'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['enable_traditional_sub'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['enable_traditional_sub'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['enable_traditional_sub'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -52,8 +52,8 @@
                                     <label class="form-label col-3 col-form-label">启用 Shadowsocks 订阅(仅影响前端显示与传统/sip002/sip008订阅)</label>
                                     <div class="col">
                                         <select id="enable_ss_sub" class="col form-select" value="{$settings['enable_ss_sub']}">
-                                            <option value="0" {if $settings['enable_ss_sub'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['enable_ss_sub'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['enable_ss_sub'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['enable_ss_sub'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -61,8 +61,8 @@
                                     <label class="form-label col-3 col-form-label">启用 V2Ray 订阅(仅影响前端显示与传统订阅)</label>
                                     <div class="col">
                                         <select id="enable_v2_sub" class="col form-select" value="{$settings['enable_v2_sub']}">
-                                            <option value="0" {if $settings['enable_v2_sub'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['enable_v2_sub'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['enable_v2_sub'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['enable_v2_sub'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -70,8 +70,8 @@
                                     <label class="form-label col-3 col-form-label">启用 Trojan 订阅(仅影响前端显示与传统订阅)</label>
                                     <div class="col">
                                         <select id="enable_trojan_sub" class="col form-select" value="{$settings['enable_trojan_sub']}">
-                                            <option value="0" {if $settings['enable_trojan_sub'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['enable_trojan_sub'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['enable_trojan_sub'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['enable_trojan_sub'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -79,8 +79,8 @@
                                     <label class="form-label col-3 col-form-label">用户修改账户登录密码时,是否强制更换订阅地址</label>
                                     <div class="col">
                                         <select id="enable_forced_replacement" class="col form-select" value="{$settings['enable_forced_replacement']}">
-                                            <option value="0" {if $settings['enable_forced_replacement'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['enable_forced_replacement'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['enable_forced_replacement'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['enable_forced_replacement'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -106,7 +106,7 @@
                 {/foreach}
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                 } else {

+ 10 - 10
resources/views/tabler/admin/setting/support.tpl

@@ -46,11 +46,11 @@
                                     <label class="form-label col-3 col-form-label">客服系统提供商</label>
                                     <div class="col">
                                         <select id="live_chat" class="col form-select" value="{$settings['live_chat']}">
-                                            <option value="none" {if $settings['live_chat'] == "none"}selected{/if}>无</option>
-                                            <option value="tawk" {if $settings['live_chat'] == "tawk"}selected{/if}>Tawk</option>
-                                            <option value="crisp" {if $settings['live_chat'] == "crisp"}selected{/if}>Crisp</option>
-                                            <option value="livechat" {if $settings['live_chat'] == "livechat"}selected{/if}>LiveChat</option>
-                                            <option value="mylivechat" {if $settings['live_chat'] == "mylivechat"}selected{/if}>MyLiveChat</option>
+                                            <option value="none" {if $settings['live_chat'] === "none"}selected{/if}>无</option>
+                                            <option value="tawk" {if $settings['live_chat'] === "tawk"}selected{/if}>Tawk</option>
+                                            <option value="crisp" {if $settings['live_chat'] === "crisp"}selected{/if}>Crisp</option>
+                                            <option value="livechat" {if $settings['live_chat'] === "livechat"}selected{/if}>LiveChat</option>
+                                            <option value="mylivechat" {if $settings['live_chat'] === "mylivechat"}selected{/if}>MyLiveChat</option>
                                         </select>
                                     </div>
                                 </div>
@@ -86,8 +86,8 @@
                                     <label class="form-label col-3 col-form-label">启用工单系统</label>
                                     <div class="col">
                                         <select id="enable_ticket" class="col form-select" value="{$settings['enable_ticket']}">
-                                            <option value="0" {if $settings['enable_ticket'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['enable_ticket'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['enable_ticket'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['enable_ticket'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -95,8 +95,8 @@
                                     <label class="form-label col-3 col-form-label">启用工单邮件提醒</label>
                                     <div class="col">
                                         <select id="mail_ticket" class="col form-select" value="{$settings['mail_ticket']}">
-                                            <option value="0" {if $settings['mail_ticket'] == false}selected{/if}>关闭</option>
-                                            <option value="1" {if $settings['mail_ticket'] == true}selected{/if}>开启</option>
+                                            <option value="0" {if $settings['mail_ticket'] === false}selected{/if}>关闭</option>
+                                            <option value="1" {if $settings['mail_ticket'] === true}selected{/if}>开启</option>
                                         </select>
                                     </div>
                                 </div>
@@ -121,7 +121,7 @@
                 {/foreach}
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                 } else {

+ 5 - 1
resources/views/tabler/admin/tabler_footer.tpl

@@ -94,7 +94,7 @@
             url: "/user/switch_theme_mode",
             dataType: "json",
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                     window.setTimeout("location.reload()", {$config['jump_delay']});
@@ -105,6 +105,10 @@
             }
         })
     });
+
+    $("#success-confirm").click(function() {
+        location.reload();
+    });
 </script>
 <script src="//cdn.jsdelivr.net/npm/@tabler/core@latest/dist/js/tabler.min.js"></script>
 </body>

+ 2 - 2
resources/views/tabler/admin/ticket/index.tpl

@@ -100,7 +100,7 @@
                     type: 'PUT',
                     dataType: "json",
                     success: function(data) {
-                        if (data.ret == 1) {
+                        if (data.ret === 1) {
                             $('#success-message').text(data.msg);
                             $('#success-dialog').modal('show');
                             reloadTableAjax();
@@ -122,7 +122,7 @@
                     type: 'DELETE',
                     dataType: "json",
                     success: function(data) {
-                        if (data.ret == 1) {
+                        if (data.ret === 1) {
                             $('#success-message').text(data.msg);
                             $('#success-dialog').modal('show');
                             reloadTableAjax();

+ 0 - 4
resources/views/tabler/admin/ticket/view.tpl

@@ -173,10 +173,6 @@
                 }
             })
         });
-
-        $("#success-confirm").click(function() {
-            location.reload();
-        });
     </script>
 
 {include file='admin/tabler_footer.tpl'}

+ 5 - 5
resources/views/tabler/admin/user/edit.tpl

@@ -110,7 +110,7 @@
                                 <span class="col-auto">
                                     <label class="form-check form-check-single form-switch">
                                         <input id="is_admin" class="form-check-input" type="checkbox"
-                                            {if $edit_user->is_admin == 1}checked="" {/if}>
+                                            {if $edit_user->is_admin === 1}checked="" {/if}>
                                     </label>
                                 </span>
                             </div>
@@ -119,7 +119,7 @@
                                 <span class="col-auto">
                                     <label class="form-check form-check-single form-switch">
                                         <input id="ga_enable" class="form-check-input" type="checkbox"
-                                            {if $edit_user->ga_enable == 1}checked="" {/if}>
+                                            {if $edit_user->ga_enable === 1}checked="" {/if}>
                                     </label>
                                 </span>
                             </div>
@@ -128,7 +128,7 @@
                                 <span class="col-auto">
                                     <label class="form-check form-check-single form-switch">
                                         <input id="use_new_shop" class="form-check-input" type="checkbox"
-                                            {if $edit_user->use_new_shop == 1}checked="" {/if}>
+                                            {if $edit_user->use_new_shop === 1}checked="" {/if}>
                                     </label>
                                 </span>
                             </div>
@@ -137,7 +137,7 @@
                                 <span class="col-auto">
                                     <label class="form-check form-check-single form-switch">
                                         <input id="is_banned" class="form-check-input" type="checkbox"
-                                            {if $edit_user->is_banned == 1} checked=""{/if}>
+                                            {if $edit_user->is_banned === 1} checked=""{/if}>
                                     </label>
                                 </span>
                             </div>
@@ -285,7 +285,7 @@
                 use_new_shop: $("#use_new_shop").is(":checked"),
             },
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                     window.setTimeout("location.href=top.document.referrer", {$config['jump_delay']});

+ 5 - 5
resources/views/tabler/admin/user/index.tpl

@@ -57,7 +57,7 @@
                 </div>
                 <div class="modal-body">
                     {foreach $details['create_dialog'] as $from}
-                        {if $from['type'] == 'input'}
+                        {if $from['type'] === 'input'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$from['info']}</label>
                                 <div class="col">
@@ -66,14 +66,14 @@
                                 </div>
                             </div>
                         {/if}
-                        {if $from['type'] == 'textarea'}
+                        {if $from['type'] === 'textarea'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$from['info']}</label>
                                 <textarea id="{$from['id']}" class="col form-control" rows="{$from['rows']}"
                                     placeholder="{$from['placeholder']}"></textarea>
                             </div>
                         {/if}
-                        {if $from['type'] == 'select'}
+                        {if $from['type'] === 'select'}
                             <div class="form-group mb-3 row">
                                 <label class="form-label col-3 col-form-label">{$from['info']}</label>
                                 <div class="col">
@@ -160,7 +160,7 @@
                     {/foreach}
                 },
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                         reloadTableAjax();
@@ -181,7 +181,7 @@
                     type: 'DELETE',
                     dataType: "json",
                     success: function(data) {
-                        if (data.ret == 1) {
+                        if (data.ret === 1) {
                             $('#success-message').text(data.msg);
                             $('#success-dialog').modal('show');
                             reloadTableAjax();

+ 1 - 1
resources/views/tabler/auth/login.tpl

@@ -84,7 +84,7 @@
                     {/if}
                 },
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                         setTimeout("window.location.href = '/user'", 1200);

+ 8 - 8
resources/views/tabler/auth/register.tpl

@@ -28,7 +28,7 @@
                                 <input id="repasswd" type="password" class="form-control" placeholder="重复登录密码">
                             </div>
                         </div>
-                        {if $public_setting['enable_reg_im'] == true}
+                        {if $public_setting['enable_reg_im'] === true}
                             <div class="mb-3">
                                 <select id="im_type" class="col form-select">
                                     <option value="0">请选择社交软件</option>
@@ -47,11 +47,11 @@
                         {if $public_setting['reg_mode'] != 'close' }
                             <div class="mb-3">
                                 <div class="input-group input-group-flat">
-                                    <input id="code" type="text" class="form-control" placeholder="注册邀请码{if $public_setting['reg_mode'] == 'open'}(可选){else}(必填){/if}" value="{$code}">
+                                    <input id="code" type="text" class="form-control" placeholder="注册邀请码{if $public_setting['reg_mode'] === 'open'}(可选){else}(必填){/if}" value="{$code}">
                                 </div>
                             </div>
                         {/if}
-                        {if $public_setting['reg_email_verify'] == true}
+                        {if $public_setting['reg_email_verify'] === true}
                             <div class="mb-3">
                                 <div class="input-group mb-2">
                                     <input id="emailcode" type="text" class="form-control" placeholder="邮箱验证码">
@@ -100,7 +100,7 @@
     </div>
 
     <script>
-        {if $public_setting['reg_email_verify'] === true}
+        {if $public_setting['reg_email_verify']}
             $("#email-verify").click(function() {
                 $.ajax({
                     type: 'POST',
@@ -110,7 +110,7 @@
                         email: $('#email').val(),
                     },
                     success: function(data) {
-                        if (data.ret == 1) {
+                        if (data.ret === 1) {
                             $('#success-message').text(data.msg);
                             $('#success-dialog').modal('show');
                         } else {
@@ -128,11 +128,11 @@
                 url: '/auth/register',
                 dataType: "json",
                 data: {
-                    {if $public_setting['enable_reg_im'] === true}
+                    {if $public_setting['enable_reg_im']}
                         im_value: $('#im_value').val(),
                         im_type: $('#im_type').val(),
                     {/if}
-                    {if $public_setting['reg_email_verify'] === true}
+                    {if $public_setting['reg_email_verify']}
                         emailcode: $('#emailcode').val(),
                     {/if}
                     tos: $('#tos').prop('checked'), // true / false (string)
@@ -151,7 +151,7 @@
                     {/if}
                 },
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                         window.setTimeout("location.href='/user'", {$config['jump_delay']});

+ 4 - 4
resources/views/tabler/live_chat.tpl

@@ -1,4 +1,4 @@
-{if $public_setting['live_chat'] == 'tawk'}
+{if $public_setting['live_chat'] === 'tawk'}
 <script type="text/javascript">
     var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
     (function(){
@@ -12,7 +12,7 @@
 </script>
 {/if}
 
-{if $public_setting['live_chat'] == 'crisp'}
+{if $public_setting['live_chat'] === 'crisp'}
 <script type="text/javascript"> window.$crisp = [];
     window.CRISP_WEBSITE_ID = "{$public_setting["crisp_id"]}";
     (function () {
@@ -40,7 +40,7 @@
 </script>
 {/if}
 
-{if $public_setting['live_chat'] == 'livechat'}
+{if $public_setting['live_chat'] === 'livechat'}
 <script>
 window.__lc = window.__lc || { };
 window.__lc.license = "{$public_setting['livechat_id']}";
@@ -92,7 +92,7 @@ window.__lc.params = [
 </script>
 {/if}
 
-{if $public_setting['live_chat'] == 'mylivechat'}
+{if $public_setting['live_chat'] === 'mylivechat'}
 <script type="text/javascript">
     (() => {
         var hccid = "{$public_setting['mylivechat_id']}";

+ 1 - 5
resources/views/tabler/password/reset.tpl

@@ -66,7 +66,7 @@
                     {/if}
                 },
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                     } else {
@@ -76,10 +76,6 @@
                 }
             })
         });
-
-        $("#success-confirm").click(function() {
-            location.reload();
-        });
     </script>
 
     {if $public_setting['enable_reset_password_captcha']}

+ 1 - 5
resources/views/tabler/password/token.tpl

@@ -47,7 +47,7 @@
                     repasswd: $('#repasswd').val(),
                 },
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                     } else {
@@ -57,10 +57,6 @@
                 }
             })
         });
-
-        $("#success-confirm").click(function() {
-            window.location.href = '/auth/login';
-        });
     </script>
 
 {include file='tabler_footer.tpl'}

+ 1 - 1
resources/views/tabler/user/banned.tpl

@@ -24,7 +24,7 @@
                             <div class="empty-img">
                                 <i class="ti ti-circle-x icon mb-2 text-danger icon-lg" style="font-size:3.5rem;"></i>
                             </div>
-                            {if $banned_reason == null}
+                            {if $banned_reason === null}
                             <p class="empty-title">账户被系统封禁</p>
                             <p class="empty-subtitle text-muted">你的账户被系统自动封禁了,请联系管理员</p>
                             {else}

+ 2 - 2
resources/views/tabler/user/detect/index.tpl

@@ -48,10 +48,10 @@
                                         <td>{$rule->name}</td>
                                         <td>{$rule->text}</td>
                                         <td>{$rule->regex}</td>
-                                        {if $rule->type == 1}
+                                        {if $rule->type === 1}
                                             <td>数据包明文匹配</td>
                                         {/if}
-                                        {if $rule->type == 2}
+                                        {if $rule->type === 2}
                                             <td>数据包 hex 匹配</td>
                                         {/if}
                                     </tr>

+ 21 - 21
resources/views/tabler/user/edit.tpl

@@ -61,9 +61,9 @@
                                                     <p>当前邮箱:<code>{$user->email}</code></p>
                                                     <div class="mb-3">
                                                         <input id="new-email" type="email" class="form-control"
-                                                            placeholder="新邮箱" {if $config['enable_change_email'] == false}disabled=""{/if}>
+                                                            placeholder="新邮箱" {if $config['enable_change_email'] === false}disabled=""{/if}>
                                                     </div>
-                                                    {if $public_setting['reg_email_verify'] == true && $config['enable_change_email'] == true}
+                                                    {if $public_setting['reg_email_verify'] === true && $config['enable_change_email'] === true}
                                                     <div class="mb-3">
                                                         <input id="email-code" type="text" class="form-control"
                                                             placeholder="验证码">
@@ -72,11 +72,11 @@
                                                 </div>
                                                 <div class="card-footer">
                                                     <div class="d-flex">
-                                                        {if $public_setting['reg_email_verify'] == true && $config['enable_change_email'] == true}
+                                                        {if $public_setting['reg_email_verify'] === true && $config['enable_change_email'] === true}
                                                         <a id="email-verify" class="btn btn-link">获取验证码</a>
                                                         <button id="modify-email"
                                                             class="btn btn-primary ms-auto">修改</button>
-                                                        {elseif $config['enable_change_email'] == true}
+                                                        {elseif $config['enable_change_email'] === true}
                                                         <button id="modify-email"
                                                             class="btn btn-primary ms-auto">修改</button>
                                                         {else}
@@ -93,21 +93,21 @@
                                                     <h3 class="card-title">联系方式</h3>
                                                     <div class="mb-3">
                                                         <select id="imtype" class="form-select">
-                                                            <option value="1" {if $user->im_type == '1'}selected{/if}>
+                                                            <option value="1" {if $user->im_type === '1'}selected{/if}>
                                                                 WeChat</option>
-                                                            <option value="2" {if $user->im_type == '2'}selected{/if}>
+                                                            <option value="2" {if $user->im_type === '2'}selected{/if}>
                                                                 QQ</option>
-                                                            <option value="3" {if $user->im_type == '3'}selected{/if}>
+                                                            <option value="3" {if $user->im_type === '3'}selected{/if}>
                                                                 Facebook</option>
-                                                            <option value="4" {if $user->im_type == '4'}selected{/if}>
+                                                            <option value="4" {if $user->im_type === '4'}selected{/if}>
                                                                 Telegram</option>
-                                                            <option value="5" {if $user->im_type == '5'}selected{/if}>
+                                                            <option value="5" {if $user->im_type === '5'}selected{/if}>
                                                                 Discord</option>
                                                         </select>
                                                     </div>
                                                     <div class="mb-3">
                                                         <input id="imvalue" type="text" class="form-control" 
-                                                            {if $user->im_type == '4'} disabled="" {/if}
+                                                            {if $user->im_type === '4'} disabled="" {/if}
                                                             value="{$user->im_value}" placeholder="社交账户">
                                                     </div>
                                                 </div>
@@ -135,7 +135,7 @@
                                                 </div>
                                             </div>
                                         </div>
-                                        {if $config['enable_telegram'] == true}
+                                        {if $config['enable_telegram'] === true}
                                         <div class="col-sm-12 col-md-6">
                                             {if $user->telegram_id != 0}
                                             <div class="card">
@@ -221,7 +221,7 @@
                                                                 <select id="ga-enable" class="form-select">
                                                                     <option value="0">不使用</option>
                                                                     <option value="1"
-                                                                        {if $user->ga_enable == '1'}selected{/if}>
+                                                                        {if $user->ga_enable === '1'}selected{/if}>
                                                                         使用两步认证登录
                                                                     </option>
                                                                 </select>
@@ -291,7 +291,7 @@
                                                         <select id="user-method" class="form-select">
                                                             {foreach $methods as $method}
                                                             <option value="{$method}"
-                                                                {if $user->method == $method}selected{/if}
+                                                                {if $user->method === $method}selected{/if}
                                                             >{$method}
                                                             </option>
                                                             {/foreach}
@@ -346,13 +346,13 @@
                                                     <div class="mb-3">
                                                         <select id="daily-report" class="form-select">
                                                             <option value="0"
-                                                                {if $user->sendDailyMail == '0'}selected{/if}>不发送
+                                                                {if $user->sendDailyMail === '0'}selected{/if}>不发送
                                                             </option>
                                                             <option value="1"
-                                                                {if $user->sendDailyMail == '1'}selected{/if}>邮件接收
+                                                                {if $user->sendDailyMail === '1'}selected{/if}>邮件接收
                                                             </option>
                                                             <option value="2"
-                                                                {if $user->sendDailyMail == '2'}selected{/if}>Telegram
+                                                                {if $user->sendDailyMail === '2'}selected{/if}>Telegram
                                                                 Bot 接收
                                                             </option>
                                                         </select>
@@ -374,7 +374,7 @@
                                                         <select id="user-theme" class="form-select">
                                                             {foreach $themes as $theme}
                                                                 <option value="{$theme}"
-                                                                    {if $user->theme == $theme}selected{/if}>{$theme}
+                                                                    {if $user->theme === $theme}selected{/if}>{$theme}
                                                                 </option>
                                                             {/foreach}
                                                         </select>
@@ -387,7 +387,7 @@
                                                 </div>
                                             </div>   
                                         </div>
-                                        {if $config['enable_kill'] == true}
+                                        {if $config['enable_kill'] === true}
                                         <div class="col-sm-12 col-md-6">
                                             <div class="card">
                                                 <div class="card-stamp">
@@ -418,7 +418,7 @@
         </div>
     </div>
 
-    {if $config['enable_kill'] == true}
+    {if $config['enable_kill'] === true}
     <div class="modal modal-blur fade" id="destroy-account" tabindex="-1" role="dialog" aria-hidden="true">
         <div class="modal-dialog modal-sm modal-dialog-centered" role="document">
             <div class="modal-content">
@@ -528,7 +528,7 @@
                 url: "/user/email",
                 dataType: "json",
                 data: {
-                    {if $public_setting['reg_email_verify'] == true}
+                    {if $public_setting['reg_email_verify'] === true}
                         emailcode: $('#email-code').val(),
                     {/if}
                     newemail: $('#new-email').val()
@@ -780,7 +780,7 @@
             })
         });
         
-        {if $config['enable_kill'] == true}
+        {if $config['enable_kill'] === true}
         $("#confirm-destroy").click(function() {
             $.ajax({
                 type: "POST",

+ 2 - 2
resources/views/tabler/user/index.tpl

@@ -455,7 +455,7 @@
                         </div>
                     </div>
                 </div>
-                {if $config['enable_checkin'] == true}
+                {if $config['enable_checkin'] === true}
                     <div class="col-lg-6 col-sm-12">
                         <div class="card">
                             <div class="card-stamp">
@@ -536,7 +536,7 @@
                     {/if}
                 },
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         checkin_button.disabled = true;
                         {if $public_setting['enable_checkin_captcha']}
                             {if $public_setting['captcha_provider'] === 'turnstile'}

+ 1 - 1
resources/views/tabler/user/invite.tpl

@@ -110,7 +110,7 @@
                 url: "/user/invite",
                 dataType: "json",
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                     } else {

+ 2 - 2
resources/views/tabler/user/media.tpl

@@ -27,9 +27,9 @@
                                         <th>节点</th>
                                         {foreach $results['0']['unlock_item'] as $key => $value}
                                             {if $key != 'BilibiliChinaMainland'}
-                                                {if $key == 'BilibiliHKMCTW'}
+                                                {if $key === 'BilibiliHKMCTW'}
                                                     <th>Bilibili(港澳台)</th>
-                                                {elseif $key == 'BilibiliTW'}
+                                                {elseif $key === 'BilibiliTW'}
                                                     <th>Bilibili(台湾)</th>
                                                 {else}
                                                     <th>{$key}</th>

+ 2 - 2
resources/views/tabler/user/order/create.tpl

@@ -142,7 +142,7 @@
                     product_id: {$product->id},
                 },
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#coupon-code').text($('#coupon').val());
                         $('#product-buy-discount').text(data.discount);
                         $('#product-buy-total').text(data.buy_price);
@@ -164,7 +164,7 @@
                     product_id: {$product->id},
                 },
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                         setTimeout(function() {

+ 5 - 1
resources/views/tabler/user/tabler_footer.tpl

@@ -77,7 +77,7 @@
             url: "/user/switch_theme_mode",
             dataType: "json",
             success: function(data) {
-                if (data.ret == 1) {
+                if (data.ret === 1) {
                     $('#success-message').text(data.msg);
                     $('#success-dialog').modal('show');
                     window.setTimeout("location.reload()", {$config['jump_delay']});
@@ -88,6 +88,10 @@
             }
         })
     });
+
+    $("#success-confirm").click(function() {
+        location.reload();
+    });
 </script>
 <script src="//cdn.jsdelivr.net/npm/@tabler/core@latest/dist/js/tabler.min.js"></script>
 <script>console.table([['数据库查询', '执行时间'], ['{count($queryLog)} 次', '{$optTime} ms']])</script>

+ 3 - 3
resources/views/tabler/user/tabler_header.tpl

@@ -96,7 +96,7 @@
                                                 <i class="ti ti-edit"></i>&nbsp;
                                                 资料修改
                                             </a>
-                                            {if $public_setting['display_subscribe_log'] === true}
+                                            {if $public_setting['display_subscribe_log']}
                                             <a class="dropdown-item" href="/user/subscribe/log">
                                                 <i class="ti ti-rss"></i></i>&nbsp;
                                                 订阅日志
@@ -125,7 +125,7 @@
                                         <i class="ti ti-server"></i>&nbsp;
                                         节点列表
                                     </a>
-                                    {if $public_setting['display_media'] === true}
+                                    {if $public_setting['display_media']}
                                     <a class="dropdown-item" href="/user/media">
                                         <i class="ti ti-key"></i>&nbsp;
                                         流媒体解锁
@@ -171,7 +171,7 @@
                                         <i class="ti ti-barrier-block"></i>&nbsp;
                                         审计规则
                                     </a>
-                                    {if $public_setting['display_detect_log'] === true}
+                                    {if $public_setting['display_detect_log']}
                                     <a class="dropdown-item" href="/user/detect/log">
                                         <i class="ti ti-notes"></i>&nbsp;
                                         审计日志

+ 1 - 5
resources/views/tabler/user/ticket/index.tpl

@@ -124,7 +124,7 @@
                     type: $('#ticket-type').val(),
                 },
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                     } else {
@@ -134,10 +134,6 @@
                 }
             })
         });
-
-        $("#success-confirm").click(function() {
-            location.reload();
-        });
     </script>
 
 {include file='user/tabler_footer.tpl'}

+ 1 - 5
resources/views/tabler/user/ticket/view.tpl

@@ -135,7 +135,7 @@
                     comment: $('#reply-comment').val()
                 },
                 success: function(data) {
-                    if (data.ret == 1) {
+                    if (data.ret === 1) {
                         $('#success-message').text(data.msg);
                         $('#success-dialog').modal('show');
                     } else {
@@ -145,10 +145,6 @@
                 }
             })
         });
-
-        $("#success-confirm").click(function() {
-            location.reload();
-        });
     </script>
     
 {include file='user/tabler_footer.tpl'}

+ 1 - 1
src/Command/DetectBan.php

@@ -51,7 +51,7 @@ final class DetectBan extends Command
                 $user->all_detect_number += $value;
                 $user->save();
 
-                if ($user->is_banned === 1 || ($user->is_admin && $_ENV['auto_detect_ban_allow_admin'] === true) || in_array($user->id, $_ENV['auto_detect_ban_allow_users'])) {
+                if ($user->is_banned === 1 || ($user->is_admin && $_ENV['auto_detect_ban_allow_admin']) || in_array($user->id, $_ENV['auto_detect_ban_allow_users'])) {
                     // 如果用户已被封禁
                     // 如果用户是管理员
                     // 如果属于钦定用户

+ 1 - 1
src/Command/DetectGFW.php

@@ -62,7 +62,7 @@ final class DetectGFW extends Command
                         //被墙了
                         echo $node->id . ':false' . PHP_EOL;
                         //判断有没有发送过邮件
-                        if ($node->gfw_block === true) {
+                        if ($node->gfw_block) {
                             continue;
                         }
 

+ 1 - 1
src/Command/Update.php

@@ -18,7 +18,7 @@ END;
         // 迁移配置
         global $_ENV;
         $copy_result = copy(BASE_PATH . '/config/.config.php', BASE_PATH . '/config/.config.php.bak');
-        if ($copy_result === true) {
+        if ($copy_result) {
             echo ".config.php 文件备份成功。\n";
         } else {
             echo ".config.php 文件备份失败,迁移终止。\n";

+ 1 - 1
src/Controllers/LinkController.php

@@ -86,7 +86,7 @@ final class LinkController extends BaseController
         }
 
         // 记录订阅日志
-        if ($_ENV['subscribeLog'] === true) {
+        if ($_ENV['subscribeLog']) {
             UserSubscribeLog::addSubscribeLog($user, $sub_type, $request->getHeaderLine('User-Agent'));
         }
 

+ 2 - 2
src/Controllers/PasswordController.php

@@ -34,7 +34,7 @@ final class PasswordController extends BaseController
     {
         $captcha = [];
 
-        if (Setting::obtain('enable_reset_password_captcha') === true) {
+        if (Setting::obtain('enable_reset_password_captcha')) {
             $captcha = Captcha::generate();
         }
 
@@ -47,7 +47,7 @@ final class PasswordController extends BaseController
 
     public function handleReset(ServerRequest $request, Response $response, array $args): ResponseInterface
     {
-        if (Setting::obtain('enable_reset_password_captcha') === true) {
+        if (Setting::obtain('enable_reset_password_captcha')) {
             $ret = Captcha::verify($request->getParams());
             if (! $ret) {
                 return ResponseHelper::error($response, '系统无法接受您的验证结果,请刷新页面后重试');

+ 1 - 1
src/Controllers/SubController.php

@@ -48,7 +48,7 @@ final class SubController extends BaseController
             'sip008' => $sub_info = self::getSIP008($user),
         };
 
-        if ($_ENV['subscribeLog'] === true) {
+        if ($_ENV['subscribeLog']) {
             UserSubscribeLog::addSubscribeLog($user, $subtype, $request->getHeaderLine('User-Agent'));
         }
 

+ 1 - 1
src/Controllers/WebAPI/UserController.php

@@ -95,7 +95,7 @@ final class UserController extends BaseController
         $users = [];
         foreach ($users_raw as $user_raw) {
             if ($user_raw->transfer_enable <= $user_raw->u + $user_raw->d) {
-                if ($_ENV['keep_connect'] === true) {
+                if ($_ENV['keep_connect']) {
                     // 流量耗尽用户限速至 1Mbps
                     $user_raw->node_speedlimit = 1;
                 } else {

+ 1 - 1
src/Middleware/ErrorHandler.php

@@ -42,7 +42,7 @@ final class ErrorHandler implements MiddlewareInterface
                 captureException($e);
             }
 
-            if ($_ENV['debug'] === true) {
+            if ($_ENV['debug']) {
                 $callable_resolver = new CallableResolver(null);
                 $error_handler = new SlimErrorHandler($callable_resolver, $response_factory);
                 $response = $error_handler($request, $e, true, true, false);

+ 1 - 1
src/Middleware/NodeToken.php

@@ -40,7 +40,7 @@ final class NodeToken implements MiddlewareInterface
             ]);
         }
 
-        if ($_ENV['checkNodeIp'] === true) {
+        if ($_ENV['checkNodeIp']) {
             $ip = $request->getServerParam('REMOTE_ADDR');
             if ($ip !== '127.0.0.1' && ! Node::where('node_ip', 'LIKE', "{$ip}%")->exists()) {
                 return AppFactory::determineResponseFactory()->createResponse(401)->withJson([

+ 4 - 4
src/Models/User.php

@@ -459,11 +459,11 @@ final class User extends Model
         $this->telegram_id = 0;
         if ($this->save()) {
             if (
-                $_ENV['enable_telegram'] === true
+                $_ENV['enable_telegram']
                 &&
-                Setting::obtain('telegram_group_bound_user') === true
+                Setting::obtain('telegram_group_bound_user')
                 &&
-                Setting::obtain('telegram_unbind_kick_member') === true
+                Setting::obtain('telegram_unbind_kick_member')
                 &&
                 ! $this->is_admin
             ) {
@@ -491,7 +491,7 @@ final class User extends Model
     public function setPort(int $Port): array
     {
         $PortOccupied = User::pluck('port')->toArray();
-        if (in_array($Port, $PortOccupied) === true) {
+        if (in_array($Port, $PortOccupied)) {
             return [
                 'ok' => false,
                 'msg' => '端口已被占用',

+ 1 - 1
src/Services/Auth/Cookie.php

@@ -46,7 +46,7 @@ final class Cookie extends Base
             return $user;
         }
 
-        if ($_ENV['enable_login_bind_ip'] === true) {
+        if ($_ENV['enable_login_bind_ip']) {
             $nodes = Node::where('node_ip', '=', $_SERVER['REMOTE_ADDR'])->first();
             if (($nodes === null) && $ipHash !== Hash::ipHash($_SERVER['REMOTE_ADDR'], $uid, $expire_in)) {
                 return $user;

+ 2 - 2
src/Services/Cloudflare.php

@@ -15,7 +15,7 @@ final class Cloudflare
     public static function modifyRecord(DNS $dns, $zoneID, $recordID, $name, $content, $proxied = false): int
     {
         $details = ['type' => 'A', 'name' => $name, 'content' => $content, 'proxied' => $proxied];
-        if ($dns->updateRecordDetails($zoneID, $recordID, $details)->success === true) {
+        if ($dns->updateRecordDetails($zoneID, $recordID, $details)->success) {
             return 1;
         }
         return 0;
@@ -23,7 +23,7 @@ final class Cloudflare
 
     public static function addRecord(DNS $dns, $zoneID, $type, $name, $content, $ttl = 120, $proxied = false): int
     {
-        if ($dns->addRecord($zoneID, $type, $name, $content, $ttl, $proxied) === true) {
+        if ($dns->addRecord($zoneID, $type, $name, $content, $ttl, $proxied)) {
             return 1;
         }
         return 0;

+ 1 - 7
src/Services/Gateway/Epay/EpayTool.php

@@ -43,9 +43,7 @@ final class EpayTool
     public static function createLinkstringUrlencode($para): string
     {
         $arg = '';
-//        while (list ($key, $val) = each ($para)) {
-//            $arg.=$key."=".urlencode($val)."&";
-//        }
+
         foreach ($para as $key => $val) {
             $arg .= $key.'='.urlencode($val).'&';
         }
@@ -67,10 +65,6 @@ final class EpayTool
             $para_filter[$key] = $val;
         }
 
-//        while (list ($key, $val) = each ($para)) {
-//            if($key == "sign" || $key == "sign_type" || $val == "")continue;
-//            else  $para_filter[$key] = $para[$key];
-//        }
         return $para_filter;
     }
 

+ 1 - 1
src/Services/Mail/Smtp.php

@@ -30,7 +30,7 @@ final class Smtp extends Base
         $mail->Password = $configs['smtp_password'];          // SMTP password
         $mail->setFrom($configs['smtp_sender'], $configs['smtp_name']);
 
-        if ($configs['smtp_ssl'] === true) {
+        if ($configs['smtp_ssl']) {
             // Enable TLS encryption, `ssl` also accepted
             $mail->SMTPSecure = ($configs['smtp_port'] === '587' ? 'tls' : 'ssl');
         }

+ 2 - 2
src/Utils/Telegram.php

@@ -25,7 +25,7 @@ final class Telegram
             $chat_id = $_ENV['telegram_chatid'];
         }
 
-        if ($_ENV['enable_telegram'] === true) {
+        if ($_ENV['enable_telegram']) {
             // 发送给非群组时使用异步
             $async = ($chat_id !== $_ENV['telegram_chatid']);
 
@@ -57,7 +57,7 @@ final class Telegram
             $chat_id = $_ENV['telegram_chatid'];
         }
 
-        if ($_ENV['enable_telegram'] === true) {
+        if ($_ENV['enable_telegram']) {
             // 发送给非群组时使用异步
             $async = ($chat_id !== $_ENV['telegram_chatid']);
 

+ 3 - 3
src/Utils/Telegram/Callback.php

@@ -82,7 +82,7 @@ final class Callback
         $this->CallbackData = $Callback->getData();
         $this->AllowEditMessage = time() < $Callback->getMessage()->getDate() + 172800;
 
-        if ($this->ChatID < 0 && Setting::obtain('telegram_group_quiet') === true) {
+        if ($this->ChatID < 0 && Setting::obtain('telegram_group_quiet')) {
             // 群组中不回应
             return;
         }
@@ -643,7 +643,7 @@ final class Callback
                 if (isset($CallbackDataExplode[1])) {
                     if (in_array($CallbackDataExplode[1], Config::getSupportParam('method'))) {
                         $temp = $this->User->setMethod($CallbackDataExplode[1]);
-                        if ($temp['ok'] === true) {
+                        if ($temp['ok']) {
                             $text = '您当前的加密方式为:' . $this->User->method . PHP_EOL . PHP_EOL . $temp['msg'];
                         } else {
                             $text = '发生错误,请重新选择。' . PHP_EOL . PHP_EOL . $temp['msg'];
@@ -724,7 +724,7 @@ final class Callback
                 // Telegram 账户解绑
                 $this->AllowEditMessage = false;
                 $text = '发送 **/unbind 账户邮箱** 进行解绑。';
-                if (Setting::obtain('telegram_unbind_kick_member') === true) {
+                if (Setting::obtain('telegram_unbind_kick_member')) {
                     $text .= PHP_EOL . PHP_EOL . '根据管理员的设定,您解绑账户将会被自动移出用户群。';
                 }
                 $sendMessage = [

+ 1 - 1
src/Utils/Telegram/Commands/CheckinCommand.php

@@ -36,7 +36,7 @@ final class CheckinCommand extends Command
         $ChatID = $Message->getChat()->getId();
 
         if ($ChatID < 0) {
-            if (Setting::obtain('telegram_group_quiet') === true) {
+            if (Setting::obtain('telegram_group_quiet')) {
                 // 群组中不回应
                 return null;
             }

+ 1 - 1
src/Utils/Telegram/Commands/HelpCommand.php

@@ -27,7 +27,7 @@ final class HelpCommand extends Command
     {
         $Update = $this->getUpdate();
         $Message = $Update->getMessage();
-        if ($Message->getChat()->getId() < 0 && Setting::obtain('telegram_group_quiet') === true) {
+        if ($Message->getChat()->getId() < 0 && Setting::obtain('telegram_group_quiet')) {
             return;
         }
         if (! preg_match('/^\/help\s?(@' . $_ENV['telegram_bot'] . ')?.*/i', $Message->getText()) && Setting::obtain('help_any_command') === false) {

+ 1 - 1
src/Utils/Telegram/Commands/InfoCommand.php

@@ -50,7 +50,7 @@ final class InfoCommand extends Command
                 $AdminUser = User::where('is_admin', 1)->where('telegram_id', $SendUser['id'])->first();
                 if ($AdminUser === null) {
                     // 非管理员回复消息
-                    if (Setting::obtain('enable_not_admin_reply') === true && Setting::obtain('not_admin_reply_msg') !== '') {
+                    if (Setting::obtain('enable_not_admin_reply') && Setting::obtain('not_admin_reply_msg') !== '') {
                         $this->replyWithMessage(
                             [
                                 'text' => Setting::obtain('not_admin_reply_msg'),

+ 1 - 1
src/Utils/Telegram/Commands/MyCommand.php

@@ -41,7 +41,7 @@ final class MyCommand extends Command
         $ChatID = $Message->getChat()->getId();
 
         if ($ChatID < 0) {
-            if (Setting::obtain('telegram_group_quiet') === true) {
+            if (Setting::obtain('telegram_group_quiet')) {
                 // 群组中不回应
                 return null;
             }

+ 1 - 1
src/Utils/Telegram/Commands/PingCommand.php

@@ -50,7 +50,7 @@ final class PingCommand extends Command
                 ]
             );
         } else {
-            if (Setting::obtain('telegram_group_quiet') === true) {
+            if (Setting::obtain('telegram_group_quiet')) {
                 // 群组中不回应
                 return;
             }

+ 1 - 1
src/Utils/Telegram/Commands/SetuserCommand.php

@@ -49,7 +49,7 @@ final class SetuserCommand extends Command
 
         if (! in_array($SendUser['id'], json_decode(Setting::obtain('telegram_admins')))) {
             $AdminUser = User::where('is_admin', 1)->where('telegram_id', $SendUser['id'])->first();
-            if ($AdminUser === null && Setting::obtain('enable_not_admin_reply') === true && Setting::obtain('not_admin_reply_msg') !== '') {
+            if ($AdminUser === null && Setting::obtain('enable_not_admin_reply') && Setting::obtain('not_admin_reply_msg') !== '') {
                 // 非管理员回复消息
                 $this->replyWithMessage(
                     [

+ 1 - 1
src/Utils/Telegram/Commands/UnbindCommand.php

@@ -92,7 +92,7 @@ final class UnbindCommand extends Command
     public function sendtext(): string
     {
         $text = '以 `/unbind [email protected]` 的形式发送进行解绑.';
-        if (Setting::obtain('telegram_unbind_kick_member') === true) {
+        if (Setting::obtain('telegram_unbind_kick_member')) {
             $text .= PHP_EOL . PHP_EOL . '根据管理员的设定,您解绑账户将会被自动移出用户群.';
         }
         return $text;

+ 1 - 1
src/Utils/Telegram/TelegramTools.php

@@ -321,7 +321,7 @@ final class TelegramTools
      */
     public static function getUserEmail(string $email, int $ChatID): string
     {
-        if (Setting::obtain('enable_user_email_group_show') === true || $ChatID > 0) {
+        if (Setting::obtain('enable_user_email_group_show') || $ChatID > 0) {
             return $email;
         }
         $a = strpos($email, '@');