diff --git a/src/Controllers/WebAPI/UserController.php b/src/Controllers/WebAPI/UserController.php
index d3b68f76..64253a92 100755
--- a/src/Controllers/WebAPI/UserController.php
+++ b/src/Controllers/WebAPI/UserController.php
@@ -98,15 +98,15 @@ final class UserController extends BaseController
}
}
- if ($user_raw->node_iplimit !== 0 &&
- $user_raw->node_iplimit <
- (new OnlineLog())
- ->where('user_id', $user_raw->id)
- ->where('last_time', '>', time() - 90)
- ->count()
- ) {
- continue;
- }
+ //if ($user_raw->node_iplimit !== 0 &&
+ // $user_raw->node_iplimit <
+ // (new OnlineLog())
+ // ->where('user_id', $user_raw->id)
+ // ->where('last_time', '>', time() - 90)
+ // ->count()
+ //) {
+ // continue;
+ // }
if ($node->sort === 1) {
$method = json_decode($node->custom_config)->method ?? '2022-blake3-aes-128-gcm';
diff --git a/src/Middleware/NodeApi_back.php b/src/Middleware/NodeApi_back.php
new file mode 100755
index 00000000..12b7bbb1
--- /dev/null
+++ b/src/Middleware/NodeApi_back.php
@@ -0,0 +1,23 @@
+checkRateLimit('webapi_ip', $request->getServerParam('REMOTE_ADDR')) ||
- ! (new RateLimit())->checkRateLimit('webapi_key', $antiXss->xss_clean($key)))
- ) {
- return AppFactory::determineResponseFactory()->createResponse(401)->withJson([
- 'ret' => 0,
- 'msg' => 'Invalid request.',
- ]);
- }
-
- if (! $_ENV['webAPI'] ||
- $key !== $_ENV['muKey'] ||
- 'https://' . $request->getHeaderLine('Host') !== $_ENV['webAPIUrl']
- ) {
- return AppFactory::determineResponseFactory()->createResponse(401)->withJson([
- 'ret' => 0,
- 'msg' => 'Invalid request.',
- ]);
- }
-
- if ($_ENV['checkNodeIp']) {
- $ip = $request->getServerParam('REMOTE_ADDR');
-
- if ($ip !== '127.0.0.1' && $ip !== '::1' && $ip !== '0:0:0:0:0:0:0:1' &&
- ! (new Node())->where('ipv4', $ip)->orWhere('ipv6', $ip)->exists()
- ) {
- return AppFactory::determineResponseFactory()->createResponse(401)->withJson([
- 'ret' => 0,
- 'msg' => 'Invalid request IP.',
- ]);
- }
- }
return $handler->handle($request);
}
diff --git a/storage/framework/smarty/compile/0ac2413c32ab0a76bef982680e07f0a90a1beec1_0.file_create.tpl.php b/storage/framework/smarty/compile/0ac2413c32ab0a76bef982680e07f0a90a1beec1_0.file_create.tpl.php
new file mode 100644
index 00000000..a4da7153
--- /dev/null
+++ b/storage/framework/smarty/compile/0ac2413c32ab0a76bef982680e07f0a90a1beec1_0.file_create.tpl.php
@@ -0,0 +1,153 @@
+getCompiled()->isFresh($_smarty_tpl, array (
+ 'version' => '5.3.1',
+ 'unifunc' => 'content_67d94b96c53de5_22273192',
+ 'has_nocache_code' => false,
+ 'file_dependency' =>
+ array (
+ '0ac2413c32ab0a76bef982680e07f0a90a1beec1' =>
+ array (
+ 0 => 'admin/announcement/create.tpl',
+ 1 => 1740366544,
+ 2 => 'file',
+ ),
+ ),
+ 'includes' =>
+ array (
+ 'file:admin/header.tpl' => 1,
+ 'file:admin/footer.tpl' => 1,
+ ),
+))) {
+function content_67d94b96c53de5_22273192 (\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = '/www/wwwroot/fuuu.cloud/resources/views/tabler/admin/announcement';
+$_smarty_tpl->renderSubTemplate('file:admin/header.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
+?>
+
+
+ src="//cdnjs.cloudflare.com/ajax/libs/tinymce/7.0.0/tinymce.min.js">
+>
+
+
+
+
+
+
+
+
+
+>
+ $("#save-setting").click(function () {
+ $.ajax({
+ url: '/admin/setting/support',
+ type: 'POST',
+ dataType: "json",
+ data: {
+ getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('update_field'), 'key');
+$foreach0DoElse = true;
+foreach ($_from ?? [] as $_smarty_tpl->getVariable('key')->value) {
+$foreach0DoElse = false;
+?>
+ getValue('key');?>
+: $('#getValue('key');?>
+').val(),
+ getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
+ },
+ success: function (data) {
+ if (data.ret === 1) {
+ $('#success-message').text(data.msg);
+ $('#success-dialog').modal('show');
+ } else {
+ $('#fail-message').text(data.msg);
+ $('#fail-dialog').modal('show');
+ }
+ }
+ })
+ });
+
+>
+
+ renderSubTemplate('file:admin/footer.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
+}
+}
diff --git a/storage/framework/smarty/compile/933b7b5b66c1e2891bbdc1dcb6629578648ef5c1_0.file_edit.tpl.php b/storage/framework/smarty/compile/933b7b5b66c1e2891bbdc1dcb6629578648ef5c1_0.file_edit.tpl.php
index 42ef9df5..5a25ade6 100644
--- a/storage/framework/smarty/compile/933b7b5b66c1e2891bbdc1dcb6629578648ef5c1_0.file_edit.tpl.php
+++ b/storage/framework/smarty/compile/933b7b5b66c1e2891bbdc1dcb6629578648ef5c1_0.file_edit.tpl.php
@@ -1,18 +1,18 @@
getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.3.1',
- 'unifunc' => 'content_67d0426d4956f8_69230533',
+ 'unifunc' => 'content_67d422f233a1c2_03544758',
'has_nocache_code' => false,
'file_dependency' =>
array (
'933b7b5b66c1e2891bbdc1dcb6629578648ef5c1' =>
array (
0 => 'admin/node/edit.tpl',
- 1 => 1741700740,
+ 1 => 1741954578,
2 => 'file',
),
),
@@ -22,7 +22,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'file:admin/footer.tpl' => 1,
),
))) {
-function content_67d0426d4956f8_69230533 (\Smarty\Template $_smarty_tpl) {
+function content_67d422f233a1c2_03544758 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/www/wwwroot/fuuu.cloud/resources/views/tabler/admin/node';
$_smarty_tpl->renderSubTemplate('file:admin/header.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
?>
@@ -214,6 +214,27 @@ $_smarty_tpl->renderSubTemplate('file:admin/header.tpl', $_smarty_tpl->cache_id,
+
+
+
+
+
diff --git a/storage/framework/smarty/compile/c924c42ad5005fd4c503ff51b94c20bfe33b4847_0.file_online.tpl.php b/storage/framework/smarty/compile/c924c42ad5005fd4c503ff51b94c20bfe33b4847_0.file_online.tpl.php
new file mode 100644
index 00000000..a924a65a
--- /dev/null
+++ b/storage/framework/smarty/compile/c924c42ad5005fd4c503ff51b94c20bfe33b4847_0.file_online.tpl.php
@@ -0,0 +1,109 @@
+getCompiled()->isFresh($_smarty_tpl, array (
+ 'version' => '5.3.1',
+ 'unifunc' => 'content_67d67b4a8846c7_49301269',
+ 'has_nocache_code' => false,
+ 'file_dependency' =>
+ array (
+ 'c924c42ad5005fd4c503ff51b94c20bfe33b4847' =>
+ array (
+ 0 => 'admin/log/online.tpl',
+ 1 => 1740366544,
+ 2 => 'file',
+ ),
+ ),
+ 'includes' =>
+ array (
+ 'file:admin/header.tpl' => 1,
+ 'file:datatable.tpl' => 1,
+ 'file:admin/footer.tpl' => 1,
+ ),
+))) {
+function content_67d67b4a8846c7_49301269 (\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = '/www/wwwroot/fuuu.cloud/resources/views/tabler/admin/log';
+$_smarty_tpl->renderSubTemplate('file:admin/header.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('details')['field'], 'value', false, 'key');
+$foreach0DoElse = true;
+foreach ($_from ?? [] as $_smarty_tpl->getVariable('key')->value => $_smarty_tpl->getVariable('value')->value) {
+$foreach0DoElse = false;
+?>
+ | getValue('value');?>
+ |
+ getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
+
+
+
+
+
+
+
+
+
+
+ renderSubTemplate('file:datatable.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
+?>
+
+
+>
+ tableConfig.serverSide = true;
+ tableConfig.ajax = {
+ url: '/admin/online/ajax',
+ type: 'POST',
+ dataSrc: 'onlines.data'
+ };
+ tableConfig.order = [
+ [0, 'desc']
+ ];
+ tableConfig.columnDefs = [
+ {
+ orderable: false,
+ targets: [0, 3, 5]
+ },
+ ];
+
+ let table = new DataTable('#data-table', tableConfig);
+
+ function loadTable() {
+ table;
+ }
+
+ loadTable();
+
+>
+
+ renderSubTemplate('file:admin/footer.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
+}
+}
diff --git a/storage/framework/smarty/compile/daf164b5b65e20e7acc23baf5d34525163f7cd1c_0.file_cron.tpl.php b/storage/framework/smarty/compile/daf164b5b65e20e7acc23baf5d34525163f7cd1c_0.file_cron.tpl.php
new file mode 100644
index 00000000..2bfbfeb3
--- /dev/null
+++ b/storage/framework/smarty/compile/daf164b5b65e20e7acc23baf5d34525163f7cd1c_0.file_cron.tpl.php
@@ -0,0 +1,292 @@
+getCompiled()->isFresh($_smarty_tpl, array (
+ 'version' => '5.3.1',
+ 'unifunc' => 'content_67d67b72034c50_31518284',
+ 'has_nocache_code' => false,
+ 'file_dependency' =>
+ array (
+ 'daf164b5b65e20e7acc23baf5d34525163f7cd1c' =>
+ array (
+ 0 => 'admin/setting/cron.tpl',
+ 1 => 1740366544,
+ 2 => 'file',
+ ),
+ ),
+ 'includes' =>
+ array (
+ 'file:admin/header.tpl' => 1,
+ 'file:admin/footer.tpl' => 1,
+ ),
+))) {
+function content_67d67b72034c50_31518284 (\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = '/www/wwwroot/fuuu.cloud/resources/views/tabler/admin/setting';
+$_smarty_tpl->renderSubTemplate('file:admin/header.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
+?>
+
+
+
+
+
+
+
+
+
+>
+ $("#save-setting").click(function () {
+ $.ajax({
+ url: '/admin/setting/cron',
+ type: 'POST',
+ dataType: "json",
+ data: {
+ getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('update_field'), 'key');
+$foreach0DoElse = true;
+foreach ($_from ?? [] as $_smarty_tpl->getVariable('key')->value) {
+$foreach0DoElse = false;
+?>
+ getValue('key');?>
+: $('#getValue('key');?>
+').val(),
+ getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
+ },
+ success: function (data) {
+ if (data.ret === 1) {
+ $('#success-message').text(data.msg);
+ $('#success-dialog').modal('show');
+ } else {
+ $('#fail-message').text(data.msg);
+ $('#fail-dialog').modal('show');
+ }
+ }
+ })
+ });
+
+>
+
+ renderSubTemplate('file:admin/footer.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
+}
+}