你的提交信息
This commit is contained in:
parent
639b5c7a82
commit
24fcbc1f5c
@ -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';
|
||||
|
||||
23
src/Middleware/NodeApi_back.php
Executable file
23
src/Middleware/NodeApi_back.php
Executable file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Middleware;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Slim\Http\Response;
|
||||
use Slim\Http\ServerRequest;
|
||||
|
||||
final class NodeApi
|
||||
{
|
||||
/**
|
||||
* MID /user/api
|
||||
*
|
||||
* @param ServerRequest $request
|
||||
* @param Response $response
|
||||
* @param callable $next
|
||||
*/
|
||||
public function __invoke($request, $response, $next): ResponseInterface
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -32,38 +32,6 @@ final class NodeToken implements MiddlewareInterface
|
||||
|
||||
$antiXss = new AntiXSS();
|
||||
|
||||
if ($_ENV['enable_rate_limit'] &&
|
||||
(! (new RateLimit())->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);
|
||||
}
|
||||
|
||||
@ -0,0 +1,153 @@
|
||||
<?php
|
||||
/* Smarty version 5.3.1, created on 2025-03-18 18:31:50
|
||||
from 'file:admin/announcement/create.tpl' */
|
||||
|
||||
/* @var \Smarty\Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->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);
|
||||
?>
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
src="//cdnjs.cloudflare.com/ajax/libs/tinymce/7.0.0/tinymce.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<div class="page-wrapper">
|
||||
<div class="container-xl">
|
||||
<div class="page-header d-print-none text-white">
|
||||
<div class="row align-items-center">
|
||||
<div class="col">
|
||||
<h2 class="page-title">
|
||||
<span class="home-title">创建公告</span>
|
||||
</h2>
|
||||
<div class="page-pretitle my-3">
|
||||
<span class="home-subtitle">创建站点公告</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto ms-auto d-print-none">
|
||||
<div class="btn-list">
|
||||
<button id="create-ann" href="#" class="btn btn-primary">
|
||||
<i class="icon ti ti-device-floppy"></i>
|
||||
保存
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-body">
|
||||
<div class="container-xl">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<form method="post">
|
||||
<textarea id="tinymce"></textarea>
|
||||
</form>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label col-3 col-form-label">公告通知的用户等级,0为不分级</label>
|
||||
<div class="col">
|
||||
<input id="email_notify_class" type="text" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<div class="divide-y">
|
||||
<div>
|
||||
<label class="row">
|
||||
<span class="col">发送邮件通知</span>
|
||||
<span class="col-auto">
|
||||
<label class="form-check form-check-single form-switch">
|
||||
<input id="email_notify" class="form-check-input" type="checkbox"
|
||||
checked="">
|
||||
</label>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
let options = {
|
||||
selector: '#tinymce',
|
||||
menubar: false,
|
||||
statusbar: false,
|
||||
plugins:
|
||||
'advlist autolink lists link image charmap preview anchor searchreplace visualblocks ' +
|
||||
'code insertdatetime media table',
|
||||
toolbar: 'undo redo | bold italic backcolor link | styles | fontsize | lineheight | alignleft aligncenter ' +
|
||||
'alignright alignjustify | bullist numlist outdent indent | removeformat',
|
||||
content_style: 'body { font-size: 14px; }',
|
||||
<?php if ($_smarty_tpl->getValue('user')->is_dark_mode) {?>
|
||||
skin: 'oxide-dark',
|
||||
content_css: 'dark',
|
||||
<?php }?>
|
||||
}
|
||||
tinyMCE.init(options);
|
||||
})
|
||||
|
||||
$("#create-ann").click(function () {
|
||||
$.ajax({
|
||||
url: '/admin/announcement',
|
||||
type: 'POST',
|
||||
dataType: "json",
|
||||
data: {
|
||||
<?php
|
||||
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('update_field'), 'key');
|
||||
$foreach0DoElse = true;
|
||||
foreach ($_from ?? [] as $_smarty_tpl->getVariable('key')->value) {
|
||||
$foreach0DoElse = false;
|
||||
?>
|
||||
<?php echo $_smarty_tpl->getValue('key');?>
|
||||
: $('#<?php echo $_smarty_tpl->getValue('key');?>
|
||||
').val(),
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
|
||||
email_notify: $("#email_notify").is(":checked"),
|
||||
content: tinyMCE.activeEditor.getContent(),
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.ret === 1) {
|
||||
$('#success-message').text(data.msg);
|
||||
$('#success-dialog').modal('show');
|
||||
window.setTimeout("location.href=top.document.referrer", <?php echo $_smarty_tpl->getValue('config')['jump_delay'];?>
|
||||
);
|
||||
} else {
|
||||
$('#fail-message').text(data.msg);
|
||||
$('#fail-dialog').modal('show');
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
<?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<?php $_smarty_tpl->renderSubTemplate('file:admin/footer.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
|
||||
}
|
||||
}
|
||||
@ -1,18 +1,18 @@
|
||||
<?php
|
||||
/* Smarty version 5.3.1, created on 2025-03-11 22:01:37
|
||||
/* Smarty version 5.3.1, created on 2025-03-15 12:26:13
|
||||
from 'file:admin/node/create.tpl' */
|
||||
|
||||
/* @var \Smarty\Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
|
||||
'version' => '5.3.1',
|
||||
'unifunc' => 'content_67d04241e14fd3_53744222',
|
||||
'unifunc' => 'content_67d50165f165f5_00455396',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'8a4a96cc30f8d77573b273c82931dc0f8a0b3009' =>
|
||||
array (
|
||||
0 => 'admin/node/create.tpl',
|
||||
1 => 1741700609,
|
||||
1 => 1741954578,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
@ -22,7 +22,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
|
||||
'file:admin/footer.tpl' => 1,
|
||||
),
|
||||
))) {
|
||||
function content_67d04241e14fd3_53744222 (\Smarty\Template $_smarty_tpl) {
|
||||
function content_67d50165f165f5_00455396 (\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);
|
||||
?>
|
||||
@ -185,11 +185,29 @@ $_smarty_tpl->renderSubTemplate('file:admin/header.tpl', $_smarty_tpl->cache_id,
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">排序组</label>
|
||||
<label class="form-label col-3 col-form-label required">排序组</label>
|
||||
<div class="col">
|
||||
<input id="order_group" type="text" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label required">转发 code</label>
|
||||
<div class="col">
|
||||
<input id="zhuanfa_code" type="text" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label required">duck code</label>
|
||||
<div class="col">
|
||||
<input id="duck_code" type="text" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">备注</label>
|
||||
<div class="col">
|
||||
<input id="memo" type="text" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="hr-text">
|
||||
<span>流量设置</span>
|
||||
</div>
|
||||
|
||||
@ -0,0 +1,194 @@
|
||||
<?php
|
||||
/* Smarty version 5.3.1, created on 2025-03-20 17:03:29
|
||||
from 'file:admin/setting/support.tpl' */
|
||||
|
||||
/* @var \Smarty\Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
|
||||
'version' => '5.3.1',
|
||||
'unifunc' => 'content_67dbd9e163d388_71231086',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'8c329fed6515224854997c0da9f2a265e77c84ab' =>
|
||||
array (
|
||||
0 => 'admin/setting/support.tpl',
|
||||
1 => 1740366544,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:admin/header.tpl' => 1,
|
||||
'file:admin/footer.tpl' => 1,
|
||||
),
|
||||
))) {
|
||||
function content_67dbd9e163d388_71231086 (\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);
|
||||
?>
|
||||
|
||||
<div class="page-wrapper">
|
||||
<div class="container-xl">
|
||||
<div class="page-header d-print-none text-white">
|
||||
<div class="row align-items-center">
|
||||
<div class="col">
|
||||
<h2 class="page-title">
|
||||
<span class="home-title">客服设置</span>
|
||||
</h2>
|
||||
<div class="page-pretitle my-3">
|
||||
<span class="home-subtitle">设置站点的客服系统</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto ms-auto d-print-none">
|
||||
<div class="btn-list">
|
||||
<a id="save-setting" href="#" class="btn btn-primary">
|
||||
<i class="icon ti ti-device-floppy"></i>
|
||||
保存
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-body">
|
||||
<div class="container-xl">
|
||||
<div class="row row-deck row-cards">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<ul class="nav nav-tabs card-header-tabs" data-bs-toggle="tabs">
|
||||
<li class="nav-item">
|
||||
<a href="#support" class="nav-link active" data-bs-toggle="tab">网页客服</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#ticket" class="nav-link" data-bs-toggle="tab">工单</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active show" id="support">
|
||||
<div class="card-body">
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">客服系统提供商</label>
|
||||
<div class="col">
|
||||
<select id="live_chat" class="col form-select"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['live_chat'];?>
|
||||
">
|
||||
<option value="none"
|
||||
<?php if ($_smarty_tpl->getValue('settings')['live_chat'] === "none") {?>selected<?php }?>>无
|
||||
</option>
|
||||
<option value="crisp"
|
||||
<?php if ($_smarty_tpl->getValue('settings')['live_chat'] === "crisp") {?>selected<?php }?>>Crisp
|
||||
</option>
|
||||
<option value="livechat"
|
||||
<?php if ($_smarty_tpl->getValue('settings')['live_chat'] === "livechat") {?>selected<?php }?>>
|
||||
LiveChat
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">Crisp ID</label>
|
||||
<div class="col">
|
||||
<input id="crisp_id" type="text" class="form-control"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['crisp_id'];?>
|
||||
">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">LiveChat License</label>
|
||||
<div class="col">
|
||||
<input id="livechat_license" type="text" class="form-control"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['livechat_license'];?>
|
||||
">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="ticket">
|
||||
<div class="card-body">
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">启用工单系统</label>
|
||||
<div class="col">
|
||||
<select id="enable_ticket" class="col form-select"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['enable_ticket'];?>
|
||||
">
|
||||
<option value="0" <?php if (!$_smarty_tpl->getValue('settings')['enable_ticket']) {?>selected<?php }?>>
|
||||
关闭
|
||||
</option>
|
||||
<option value="1" <?php if ($_smarty_tpl->getValue('settings')['enable_ticket']) {?>selected<?php }?>>
|
||||
开启
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">启用工单邮件提醒</label>
|
||||
<div class="col">
|
||||
<select id="mail_ticket" class="col form-select"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['mail_ticket'];?>
|
||||
">
|
||||
<option value="0" <?php if (!$_smarty_tpl->getValue('settings')['mail_ticket']) {?>selected<?php }?>>
|
||||
关闭
|
||||
</option>
|
||||
<option value="1" <?php if ($_smarty_tpl->getValue('settings')['mail_ticket']) {?>selected<?php }?>>开启
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">用戶工单配額(每月)</label>
|
||||
<div class="col">
|
||||
<input id="ticket_limit" type="text" class="form-control"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['ticket_limit'];?>
|
||||
">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
$("#save-setting").click(function () {
|
||||
$.ajax({
|
||||
url: '/admin/setting/support',
|
||||
type: 'POST',
|
||||
dataType: "json",
|
||||
data: {
|
||||
<?php
|
||||
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('update_field'), 'key');
|
||||
$foreach0DoElse = true;
|
||||
foreach ($_from ?? [] as $_smarty_tpl->getVariable('key')->value) {
|
||||
$foreach0DoElse = false;
|
||||
?>
|
||||
<?php echo $_smarty_tpl->getValue('key');?>
|
||||
: $('#<?php echo $_smarty_tpl->getValue('key');?>
|
||||
').val(),
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->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');
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
<?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<?php $_smarty_tpl->renderSubTemplate('file:admin/footer.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
|
||||
}
|
||||
}
|
||||
@ -1,18 +1,18 @@
|
||||
<?php
|
||||
/* Smarty version 5.3.1, created on 2025-03-11 22:02:21
|
||||
/* Smarty version 5.3.1, created on 2025-03-14 20:37:06
|
||||
from 'file:admin/node/edit.tpl' */
|
||||
|
||||
/* @var \Smarty\Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->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,
|
||||
<label class="form-label col-3 col-form-label">排序组</label>
|
||||
<div class="col">
|
||||
<input id="order_group" type="text" class="form-control" value="<?php echo $_smarty_tpl->getValue('node')->order_group;?>
|
||||
">
|
||||
</div>
|
||||
</div>
|
||||
<div class="zhuanfa-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">转发 code</label>
|
||||
<div class="col">
|
||||
<input id="zhuanfa_code" type="text" class="form-control" value="<?php echo $_smarty_tpl->getValue('node')->zhuanfa_code;?>
|
||||
">
|
||||
</div>
|
||||
</div>
|
||||
<div class="duck-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">duck code</label>
|
||||
<div class="col">
|
||||
<input id="duck_code" type="text" class="form-control" value="<?php echo $_smarty_tpl->getValue('node')->duck_code;?>
|
||||
">
|
||||
</div>
|
||||
</div>
|
||||
<div class="duck-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">备注</label>
|
||||
<div class="col">
|
||||
<input id="memo" type="text" class="form-control" value="<?php echo $_smarty_tpl->getValue('node')->memo;?>
|
||||
">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -0,0 +1,109 @@
|
||||
<?php
|
||||
/* Smarty version 5.3.1, created on 2025-03-16 15:18:34
|
||||
from 'file:admin/log/online.tpl' */
|
||||
|
||||
/* @var \Smarty\Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->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);
|
||||
?>
|
||||
|
||||
<div class="page-wrapper">
|
||||
<div class="container-xl">
|
||||
<div class="page-header d-print-none text-white">
|
||||
<div class="row align-items-center">
|
||||
<div class="col">
|
||||
<h2 class="page-title">
|
||||
<span class="home-title">在线IP</span>
|
||||
</h2>
|
||||
<div class="page-pretitle my-3">
|
||||
<span class="home-subtitle">查看现在在线的用户IP</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-body">
|
||||
<div class="container-xl">
|
||||
<div class="row row-deck row-cards">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="table-responsive">
|
||||
<table id="data-table" class="table card-table table-vcenter text-nowrap datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
$_from = $_smarty_tpl->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;
|
||||
?>
|
||||
<th><?php echo $_smarty_tpl->getValue('value');?>
|
||||
</th>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $_smarty_tpl->renderSubTemplate('file:datatable.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
|
||||
?>
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
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();
|
||||
<?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<?php $_smarty_tpl->renderSubTemplate('file:admin/footer.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,292 @@
|
||||
<?php
|
||||
/* Smarty version 5.3.1, created on 2025-03-16 15:19:14
|
||||
from 'file:admin/setting/cron.tpl' */
|
||||
|
||||
/* @var \Smarty\Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->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);
|
||||
?>
|
||||
|
||||
<div class="page-wrapper">
|
||||
<div class="container-xl">
|
||||
<div class="page-header d-print-none text-white">
|
||||
<div class="row align-items-center">
|
||||
<div class="col">
|
||||
<h2 class="page-title">
|
||||
<span class="home-title">定时任务设置</span>
|
||||
</h2>
|
||||
<div class="page-pretitle my-3">
|
||||
<span class="home-subtitle">设置站点的定时任务</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto ms-auto d-print-none">
|
||||
<div class="btn-list">
|
||||
<a id="save-setting" href="#" class="btn btn-primary">
|
||||
<i class="icon ti ti-device-floppy"></i>
|
||||
保存
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-body">
|
||||
<div class="container-xl">
|
||||
<div class="row row-deck row-cards">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<ul class="nav nav-tabs card-header-tabs" data-bs-toggle="tabs">
|
||||
<li class="nav-item">
|
||||
<a href="#daily_job" class="nav-link active" data-bs-toggle="tab">每日任务</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#finance_mail" class="nav-link" data-bs-toggle="tab">财务报告</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#detect" class="nav-link" data-bs-toggle="tab">审计任务</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#inactive" class="nav-link" data-bs-toggle="tab">闲置账号检测</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active show" id="daily_job">
|
||||
<div class="card-body">
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">每日任务执行时间(小时)</label>
|
||||
<div class="col">
|
||||
<input id="daily_job_hour" type="text" class="form-control"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['daily_job_hour'];?>
|
||||
">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">每日任务执行时间(分钟)</label>
|
||||
<div class="col">
|
||||
<input id="daily_job_minute" type="text" class="form-control"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['daily_job_minute'];?>
|
||||
">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane show" id="finance_mail">
|
||||
<div class="card-body">
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">是否启用每日财务报告</label>
|
||||
<div class="col">
|
||||
<select id="enable_daily_finance_mail" class="col form-select"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['enable_daily_finance_mail'];?>
|
||||
">
|
||||
<option value="0"
|
||||
<?php if (!$_smarty_tpl->getValue('settings')['enable_daily_finance_mail']) {?>selected<?php }?>>
|
||||
关闭
|
||||
</option>
|
||||
<option value="1"
|
||||
<?php if ($_smarty_tpl->getValue('settings')['enable_daily_finance_mail']) {?>selected<?php }?>>开启
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">是否启用每周财务报告</label>
|
||||
<div class="col">
|
||||
<select id="enable_weekly_finance_mail" class="col form-select"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['enable_weekly_finance_mail'];?>
|
||||
">
|
||||
<option value="0"
|
||||
<?php if (!$_smarty_tpl->getValue('settings')['enable_weekly_finance_mail']) {?>selected<?php }?>>
|
||||
关闭
|
||||
</option>
|
||||
<option value="1"
|
||||
<?php if ($_smarty_tpl->getValue('settings')['enable_weekly_finance_mail']) {?>selected<?php }?>>开启
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">是否启用每月财务报告</label>
|
||||
<div class="col">
|
||||
<select id="enable_monthly_finance_mail" class="col form-select"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['enable_monthly_finance_mail'];?>
|
||||
">
|
||||
<option value="0"
|
||||
<?php if (!$_smarty_tpl->getValue('settings')['enable_monthly_finance_mail']) {?>selected<?php }?>>
|
||||
关闭
|
||||
</option>
|
||||
<option value="1"
|
||||
<?php if ($_smarty_tpl->getValue('settings')['enable_monthly_finance_mail']) {?>selected<?php }?>>
|
||||
开启
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane show" id="detect">
|
||||
<div class="card-body">
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">是否启用节点被墙检测</label>
|
||||
<div class="col">
|
||||
<select id="enable_detect_gfw" class="col form-select"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['enable_detect_gfw'];?>
|
||||
">
|
||||
<option value="0"
|
||||
<?php if (!$_smarty_tpl->getValue('settings')['enable_detect_gfw']) {?>selected<?php }?>>关闭
|
||||
</option>
|
||||
<option value="1" <?php if ($_smarty_tpl->getValue('settings')['enable_detect_gfw']) {?>selected<?php }?>>
|
||||
开启
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">是否启用审计封禁</label>
|
||||
<div class="col">
|
||||
<select id="enable_detect_ban" class="col form-select"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['enable_detect_ban'];?>
|
||||
">
|
||||
<option value="0"
|
||||
<?php if (!$_smarty_tpl->getValue('settings')['enable_detect_ban']) {?>selected<?php }?>>关闭
|
||||
</option>
|
||||
<option value="1" <?php if ($_smarty_tpl->getValue('settings')['enable_detect_ban']) {?>selected<?php }?>>
|
||||
开启
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane show" id="inactive">
|
||||
<div class="card-body">
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">是否启用闲置账号检测</label>
|
||||
<div class="col">
|
||||
<select id="enable_detect_inactive_user" class="col form-select"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['enable_detect_inactive_user'];?>
|
||||
">
|
||||
<option value="0"
|
||||
<?php if (!$_smarty_tpl->getValue('settings')['enable_detect_inactive_user']) {?>selected<?php }?>>
|
||||
关闭
|
||||
</option>
|
||||
<option value="1"
|
||||
<?php if ($_smarty_tpl->getValue('settings')['enable_detect_inactive_user']) {?>selected<?php }?>>
|
||||
开启
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">未签到时长(天)</label>
|
||||
<div class="col">
|
||||
<input id="detect_inactive_user_checkin_days" type="text"
|
||||
class="form-control"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['detect_inactive_user_checkin_days'];?>
|
||||
">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">未登录时长(天)</label>
|
||||
<div class="col">
|
||||
<input id="detect_inactive_user_login_days" type="text"
|
||||
class="form-control"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['detect_inactive_user_login_days'];?>
|
||||
">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">未使用时长(天)</label>
|
||||
<div class="col">
|
||||
<input id="detect_inactive_user_use_days" type="text"
|
||||
class="form-control"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['detect_inactive_user_use_days'];?>
|
||||
">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">是否启用移除闲置账号订阅链接与邀请码</label>
|
||||
<div class="col">
|
||||
<select id="remove_inactive_user_link_and_invite" class="col form-select"
|
||||
value="<?php echo $_smarty_tpl->getValue('settings')['remove_inactive_user_link_and_invite'];?>
|
||||
">
|
||||
<option value="0"
|
||||
<?php if (!$_smarty_tpl->getValue('settings')['remove_inactive_user_link_and_invite']) {?>selected<?php }?>>
|
||||
关闭
|
||||
</option>
|
||||
<option value="1"
|
||||
<?php if ($_smarty_tpl->getValue('settings')['remove_inactive_user_link_and_invite']) {?>selected<?php }?>>
|
||||
开启
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
$("#save-setting").click(function () {
|
||||
$.ajax({
|
||||
url: '/admin/setting/cron',
|
||||
type: 'POST',
|
||||
dataType: "json",
|
||||
data: {
|
||||
<?php
|
||||
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('update_field'), 'key');
|
||||
$foreach0DoElse = true;
|
||||
foreach ($_from ?? [] as $_smarty_tpl->getVariable('key')->value) {
|
||||
$foreach0DoElse = false;
|
||||
?>
|
||||
<?php echo $_smarty_tpl->getValue('key');?>
|
||||
: $('#<?php echo $_smarty_tpl->getValue('key');?>
|
||||
').val(),
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->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');
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
<?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<?php $_smarty_tpl->renderSubTemplate('file:admin/footer.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user