fuc/storage/framework/smarty/compile/4bdfb30c66d9112dd7640fd453130132666e4131_0.file_sub.tpl.php
2025-03-13 17:13:42 +08:00

181 lines
9.5 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 2025-02-04 13:46:38
from 'file:admin/setting/sub.tpl' */
/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.3.1',
'unifunc' => 'content_67a1a9be8861b3_99298333',
'has_nocache_code' => false,
'file_dependency' =>
array (
'4bdfb30c66d9112dd7640fd453130132666e4131' =>
array (
0 => 'admin/setting/sub.tpl',
1 => 1712762115,
2 => 'file',
),
),
'includes' =>
array (
'file:admin/header.tpl' => 1,
'file:admin/footer.tpl' => 1,
),
))) {
function content_67a1a9be8861b3_99298333 (\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="#sub" class="nav-link active" data-bs-toggle="tab">订阅设置</a>
</li>
</ul>
</div>
<div class="card-body">
<div class="tab-content">
<div class="tab-pane active show" id="sub">
<div class="card-body">
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">启用 Shadowsocks
订阅仅影响前端显示与ss/sip002/sip008订阅</label>
<div class="col">
<select id="enable_ss_sub" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['enable_ss_sub'];?>
">
<option value="0" <?php if (!$_smarty_tpl->getValue('settings')['enable_ss_sub']) {?>selected<?php }?>>
关闭
</option>
<option value="1" <?php if ($_smarty_tpl->getValue('settings')['enable_ss_sub']) {?>selected<?php }?>>
开启
</option>
</select>
</div>
</div>
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">启用 V2Ray
订阅仅影响前端显示与v2ray订阅</label>
<div class="col">
<select id="enable_v2_sub" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['enable_v2_sub'];?>
">
<option value="0" <?php if (!$_smarty_tpl->getValue('settings')['enable_v2_sub']) {?>selected<?php }?>>
关闭
</option>
<option value="1" <?php if ($_smarty_tpl->getValue('settings')['enable_v2_sub']) {?>selected<?php }?>>
开启
</option>
</select>
</div>
</div>
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">启用 Trojan
订阅仅影响前端显示与trojan订阅</label>
<div class="col">
<select id="enable_trojan_sub" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['enable_trojan_sub'];?>
">
<option value="0"
<?php if (!$_smarty_tpl->getValue('settings')['enable_trojan_sub']) {?>selected<?php }?>>关闭
</option>
<option value="1" <?php if ($_smarty_tpl->getValue('settings')['enable_trojan_sub']) {?>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_forced_replacement" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['enable_forced_replacement'];?>
">
<option value="0"
<?php if (!$_smarty_tpl->getValue('settings')['enable_forced_replacement']) {?>selected<?php }?>>
关闭
</option>
<option value="1"
<?php if ($_smarty_tpl->getValue('settings')['enable_forced_replacement']) {?>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/sub',
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);
}
}