fuc/storage/framework/smarty/compile/2d69e25cdc639d6287ebc843a285271a7dd28f59_0.file_reg.tpl.php
2025-03-13 17:13:42 +08:00

271 lines
16 KiB
PHP
Executable File
Raw Permalink 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:03
from 'file:admin/setting/reg.tpl' */
/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.3.1',
'unifunc' => 'content_675983af67e8e6_25480567',
'has_nocache_code' => false,
'file_dependency' =>
array (
'2d69e25cdc639d6287ebc843a285271a7dd28f59' =>
array (
0 => 'admin/setting/reg.tpl',
1 => 1712762115,
2 => 'file',
),
),
'includes' =>
array (
'file:admin/header.tpl' => 1,
'file:admin/footer.tpl' => 1,
),
))) {
function content_675983af67e8e6_25480567 (\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="#reg" class="nav-link active" data-bs-toggle="tab">注册设置</a>
</li>
<li class="nav-item">
<a href="#default_value" class="nav-link" data-bs-toggle="tab">默认值</a>
</li>
<li class="nav-item">
<a href="#limit" 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="reg">
<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="reg_mode" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['reg_mode'];?>
">
<option value="close"
<?php if ($_smarty_tpl->getValue('settings')['reg_mode'] === 'close') {?>selected<?php }?>>关闭注册
</option>
<option value="open"
<?php if ($_smarty_tpl->getValue('settings')['reg_mode'] === 'open') {?>selected<?php }?>>公开注册
</option>
<option value="invite"
<?php if ($_smarty_tpl->getValue('settings')['reg_mode'] === 'invite') {?>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="reg_email_verify" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['reg_email_verify'];?>
">
<option value="0" <?php if (!$_smarty_tpl->getValue('settings')['reg_email_verify']) {?>selected<?php }?>>
关闭
</option>
<option value="1" <?php if ($_smarty_tpl->getValue('settings')['reg_email_verify']) {?>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="reg_daily_report" class="col form-select"
value="<?php echo $_smarty_tpl->getValue('settings')['reg_daily_report'];?>
">
<option value="0"
<?php if (!$_smarty_tpl->getValue('settings')['reg_daily_report']) {?>selected<?php }?>>关闭
</option>
<option value="1"
<?php if ($_smarty_tpl->getValue('settings')['reg_daily_report']) {?>selected<?php }?>>开启
</option>
</select>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="default_value">
<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="random_group" type="text" class="form-control"
value="<?php echo $_smarty_tpl->getValue('settings')['random_group'];?>
">
</div>
</div>
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">用户端口池最小值,设为 0
时用户不会被分配端口</label>
<div class="col">
<input id="min_port" type="text" class="form-control"
value="<?php echo $_smarty_tpl->getValue('settings')['min_port'];?>
">
</div>
</div>
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">用户端口池最大值,设为 0
时用户不会被分配端口</label>
<div class="col">
<input id="max_port" type="text" class="form-control"
value="<?php echo $_smarty_tpl->getValue('settings')['max_port'];?>
">
</div>
</div>
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">注册时赠送的流量GB</label>
<div class="col">
<input id="reg_traffic" type="text" class="form-control"
value="<?php echo $_smarty_tpl->getValue('settings')['reg_traffic'];?>
">
</div>
</div>
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">免费用戶的流量重置日,设为 0
时不重置</label>
<div class="col">
<input id="free_user_reset_day" type="text" class="form-control"
value="<?php echo $_smarty_tpl->getValue('settings')['free_user_reset_day'];?>
">
</div>
</div>
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">需要重置的免费流量,设为 0
时不重置</label>
<div class="col">
<input id="free_user_reset_bandwidth" type="text" class="form-control"
value="<?php echo $_smarty_tpl->getValue('settings')['free_user_reset_bandwidth'];?>
">
</div>
</div>
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">注册等级</label>
<div class="col">
<input id="reg_class" type="text" class="form-control"
value="<?php echo $_smarty_tpl->getValue('settings')['reg_class'];?>
">
</div>
</div>
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">注册等级过期时间(天)</label>
<div class="col">
<input id="reg_class_time" type="text" class="form-control"
value="<?php echo $_smarty_tpl->getValue('settings')['reg_class_time'];?>
">
</div>
</div>
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">默认加密</label>
<div class="col">
<input id="reg_method" type="text" class="form-control"
value="<?php echo $_smarty_tpl->getValue('settings')['reg_method'];?>
">
</div>
</div>
</div>
</div>
<div class="tab-pane" id="limit">
<div class="card-body">
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">连接 IP 限制</label>
<div class="col">
<input id="reg_ip_limit" type="text" class="form-control"
value="<?php echo $_smarty_tpl->getValue('settings')['reg_ip_limit'];?>
">
</div>
</div>
<div class="form-group mb-3 row">
<label class="form-label col-3 col-form-label">使用速率限制</label>
<div class="col">
<input id="reg_speed_limit" type="text" class="form-control"
value="<?php echo $_smarty_tpl->getValue('settings')['reg_speed_limit'];?>
">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo '<script'; ?>
>
$("#save-setting").click(function () {
$.ajax({
url: '/admin/setting/reg',
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);
}
}