293 lines
18 KiB
PHP
293 lines
18 KiB
PHP
<?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);
|
|
}
|
|
}
|