fuc/storage/framework/smarty/compile/865cacddef7cdec72a1ba67c432cc18147eb42e4_0.file_feature.tpl.php
2025-03-13 17:13:42 +08:00

296 lines
18 KiB
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/* Smarty version 5.3.1, created on 2024-12-11 20:21:36
from 'file:admin/setting/feature.tpl' */
/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.3.1',
'unifunc' => 'content_675983d0f36034_94696612',
'has_nocache_code' => false,
'file_dependency' =>
array (
'865cacddef7cdec72a1ba67c432cc18147eb42e4' =>
array (
0 => 'admin/setting/feature.tpl',
1 => 1712762115,
2 => 'file',
),
),
'includes' =>
array (
'file:admin/header.tpl' => 1,
'file:admin/footer.tpl' => 1,
),
))) {
function content_675983d0f36034_94696612 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/www/wwwroot/xiaofu.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="#display" class="nav-link active" data-bs-toggle="tab">功能显示</a>
</li>
<li class="nav-item">
<a href="#log" class="nav-link" data-bs-toggle="tab">用户日志</a>
</li>
<li class="nav-item">
<a href="#checkin" 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="display">
<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="display_detect_log" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['display_detect_log'];?>
">
<option value="0"
<?php if (!$_smarty_tpl->getValue('settings')['display_detect_log']) {?>selected<?php }?>>关闭
</option>
<option value="1" <?php if ($_smarty_tpl->getValue('settings')['display_detect_log']) {?>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="display_docs" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['display_docs'];?>
">
<option value="0" <?php if (!$_smarty_tpl->getValue('settings')['display_docs']) {?>selected<?php }?>>
关闭
</option>
<option value="1" <?php if ($_smarty_tpl->getValue('settings')['display_docs']) {?>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="display_docs_only_for_paid_user" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['display_docs_only_for_paid_user'];?>
">
<option value="0"
<?php if (!$_smarty_tpl->getValue('settings')['display_docs_only_for_paid_user']) {?>selected<?php }?>>
关闭
</option>
<option value="1"
<?php if ($_smarty_tpl->getValue('settings')['display_docs_only_for_paid_user']) {?>selected<?php }?>>
开启
</option>
</select>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="log">
<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="traffic_log" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['traffic_log'];?>
">
<option value="0" <?php if (!$_smarty_tpl->getValue('settings')['traffic_log']) {?>selected<?php }?>>
关闭
</option>
<option value="1" <?php if ($_smarty_tpl->getValue('settings')['traffic_log']) {?>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="traffic_log_retention_days" type="text" class="form-control"
value="<?php echo $_smarty_tpl->getValue('settings')['traffic_log_retention_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="subscribe_log" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['subscribe_log'];?>
">
<option value="0" <?php if (!$_smarty_tpl->getValue('settings')['subscribe_log']) {?>selected<?php }?>>
关闭
</option>
<option value="1" <?php if ($_smarty_tpl->getValue('settings')['subscribe_log']) {?>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="subscribe_log_retention_days" type="text"
class="form-control"
value="<?php echo $_smarty_tpl->getValue('settings')['subscribe_log_retention_days'];?>
">
</div>
</div>
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">通知用户新IP订阅</label>
<div class="col">
<select id="notify_new_subscribe" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['notify_new_subscribe'];?>
">
<option value="0"
<?php if (!$_smarty_tpl->getValue('settings')['notify_new_subscribe']) {?>selected<?php }?>>关闭
</option>
<option value="1"
<?php if ($_smarty_tpl->getValue('settings')['notify_new_subscribe']) {?>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="login_log" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['login_log'];?>
">
<option value="0" <?php if (!$_smarty_tpl->getValue('settings')['login_log']) {?>selected<?php }?>>关闭
</option>
<option value="1" <?php if ($_smarty_tpl->getValue('settings')['login_log']) {?>selected<?php }?>>开启
</option>
</select>
</div>
</div>
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">通知用户新IP登录</label>
<div class="col">
<select id="notify_new_login" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['notify_new_login'];?>
">
<option value="0" <?php if (!$_smarty_tpl->getValue('settings')['notify_new_login']) {?>selected<?php }?>>
关闭
</option>
<option value="1" <?php if ($_smarty_tpl->getValue('settings')['notify_new_login']) {?>selected<?php }?>>
开启
</option>
</select>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="checkin">
<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_checkin" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['enable_checkin'];?>
">
<option value="0" <?php if (!$_smarty_tpl->getValue('settings')['enable_checkin']) {?>selected<?php }?>>
关闭
</option>
<option value="1" <?php if ($_smarty_tpl->getValue('settings')['enable_checkin']) {?>selected<?php }?>>开启
</option>
</select>
</div>
</div>
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">签到最少流量MB</label>
<div class="col">
<input id="checkin_min" type="text" class="form-control"
value="<?php echo $_smarty_tpl->getValue('settings')['checkin_min'];?>
">
</div>
</div>
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">签到最多流量MB</label>
<div class="col">
<input id="checkin_max" type="text"
class="form-control"
value="<?php echo $_smarty_tpl->getValue('settings')['checkin_max'];?>
">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo '<script'; ?>
>
$("#save-setting").click(function () {
$.ajax({
url: '/admin/setting/feature',
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);
}
}