220 lines
6.9 KiB
Smarty
220 lines
6.9 KiB
Smarty
<style>
|
|
.ddf-page {
|
|
background: linear-gradient(135deg, #f7fbff 0%, #eef5ff 100%);
|
|
border-radius: 14px;
|
|
padding: 22px;
|
|
}
|
|
.ddf-hero {
|
|
position: relative;
|
|
overflow: hidden;
|
|
border-radius: 16px;
|
|
padding: 28px 32px;
|
|
color: #fff;
|
|
background: linear-gradient(135deg, #1d4ed8 0%, #0f766e 100%);
|
|
box-shadow: 0 14px 34px rgba(20, 82, 160, .18);
|
|
margin-bottom: 22px;
|
|
}
|
|
.ddf-hero:after {
|
|
content: "";
|
|
position: absolute;
|
|
width: 220px;
|
|
height: 220px;
|
|
right: -70px;
|
|
top: -70px;
|
|
border-radius: 50%;
|
|
background: rgba(255, 255, 255, .14);
|
|
}
|
|
.ddf-hero h3 {
|
|
margin: 0 0 10px;
|
|
font-size: 24px;
|
|
font-weight: 700;
|
|
letter-spacing: .5px;
|
|
}
|
|
.ddf-hero p {
|
|
margin: 0;
|
|
max-width: 760px;
|
|
line-height: 1.8;
|
|
color: rgba(255, 255, 255, .9);
|
|
}
|
|
.ddf-form-card,
|
|
.ddf-result-card {
|
|
border: 1px solid #e6eef8;
|
|
border-radius: 16px;
|
|
background: #fff;
|
|
box-shadow: 0 10px 28px rgba(15, 52, 96, .08);
|
|
}
|
|
.ddf-form-card {
|
|
padding: 26px 28px;
|
|
}
|
|
.ddf-field label {
|
|
color: #26384d;
|
|
font-weight: 600;
|
|
margin-bottom: 8px;
|
|
}
|
|
.ddf-field .form-control {
|
|
height: 42px;
|
|
border-color: #d9e4f2;
|
|
border-radius: 10px;
|
|
box-shadow: none;
|
|
}
|
|
.ddf-field .form-control:focus {
|
|
border-color: #2563eb;
|
|
box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
|
|
}
|
|
.ddf-submit {
|
|
min-width: 150px;
|
|
height: 42px;
|
|
border: 0;
|
|
border-radius: 10px;
|
|
background: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
|
|
box-shadow: 0 10px 20px rgba(37, 99, 235, .2);
|
|
font-weight: 600;
|
|
}
|
|
.ddf-result-card {
|
|
margin-top: 22px;
|
|
padding: 18px;
|
|
}
|
|
.ddf-summary {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 12px;
|
|
margin-bottom: 16px;
|
|
}
|
|
.ddf-summary-item {
|
|
min-width: 150px;
|
|
border-radius: 12px;
|
|
padding: 14px 16px;
|
|
background: #f5f8fc;
|
|
}
|
|
.ddf-summary-item strong {
|
|
display: block;
|
|
font-size: 20px;
|
|
color: #12304f;
|
|
}
|
|
.ddf-summary-item span {
|
|
color: #6b7a90;
|
|
}
|
|
.ddf-table {
|
|
margin-bottom: 0;
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
}
|
|
.ddf-table thead th {
|
|
border-bottom: 0;
|
|
background: #f1f6fd;
|
|
color: #34506c;
|
|
font-weight: 700;
|
|
white-space: nowrap;
|
|
}
|
|
.ddf-table tbody td {
|
|
vertical-align: middle;
|
|
color: #34495e;
|
|
}
|
|
.ddf-badge {
|
|
display: inline-block;
|
|
border-radius: 999px;
|
|
padding: 4px 10px;
|
|
background: #e8f5ee;
|
|
color: #17834f;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
}
|
|
</style>
|
|
|
|
<section class="admin-main">
|
|
<div class="container-fluid">
|
|
<div class="page-container">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="card-title row align-items-center mb-3">
|
|
<div style="padding:0 15px;font-size:20px;font-weight:700;">{$Title}</div>
|
|
<div class="col-lg-8 col-md-12 col-sm-12">
|
|
{foreach $PluginsAdminMenu as $v}
|
|
{if $v['custom']}
|
|
<span class="ml-2"><a class="h5" href="{$v.url}" target="_blank">{$v.name}</a></span>
|
|
{else/}
|
|
<span class="ml-2"><a class="h5" href="{$v.url}">{$v.name}</a></span>
|
|
{/if}
|
|
{/foreach}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="ddf-page">
|
|
<div class="ddf-hero">
|
|
<h3>代理推送地址批量修复</h3>
|
|
<p>用于你站点名下代理用户的地址变更后,可通过本插件直接批量更换推送代理新地址。</p>
|
|
</div>
|
|
|
|
<form method="post" action="{:shd_addon_url('DownstreamDomainFix://AdminIndex/index')}" onsubmit="return confirm('确认批量修改该客户名下服务器的下游推送域名?');">
|
|
<div class="ddf-form-card">
|
|
<div class="row align-items-end">
|
|
<div class="col-lg-4 col-md-5 col-12">
|
|
<div class="form-group ddf-field mb-lg-0">
|
|
<label class="require">客户ID</label>
|
|
<input type="number" class="form-control" name="uid" value="{$uid}" placeholder="例如:810" required>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-6 col-md-7 col-12">
|
|
<div class="form-group ddf-field mb-lg-0">
|
|
<label class="require">指定推送域名</label>
|
|
<input type="text" class="form-control" name="domain" value="{$domain}" placeholder="例如:https://www.ysyplat.cn" required>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-2 col-12 mt-3 mt-lg-0">
|
|
<button type="submit" class="btn btn-primary ddf-submit">开始修复</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
{if $result}
|
|
<div class="ddf-result-card">
|
|
<div class="alert {if $result.status == 200}alert-success{else/}alert-danger{/if}">
|
|
{$result.msg};匹配 {$result.total} 台,更新 {$result.updated} 台,跳过 {$result.skipped} 台。
|
|
</div>
|
|
|
|
<div class="ddf-summary">
|
|
<div class="ddf-summary-item"><strong>{$result.total}</strong><span>匹配服务器</span></div>
|
|
<div class="ddf-summary-item"><strong>{$result.updated}</strong><span>成功更新</span></div>
|
|
<div class="ddf-summary-item"><strong>{$result.skipped}</strong><span>跳过数量</span></div>
|
|
</div>
|
|
|
|
{if $result.list}
|
|
<div class="table-body table-responsive">
|
|
<table class="table table-bordered table-hover ddf-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Host ID</th>
|
|
<th>主机名</th>
|
|
<th>主IP</th>
|
|
<th>状态</th>
|
|
<th>原推送域名</th>
|
|
<th>新推送域名</th>
|
|
<th>处理结果</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{foreach $result.list as $row}
|
|
<tr>
|
|
<td>{$row.id}</td>
|
|
<td>{$row.domain}</td>
|
|
<td>{$row.dedicatedip}</td>
|
|
<td>{$row.domainstatus}</td>
|
|
<td>{$row.old_domain}</td>
|
|
<td>{$row.new_domain}</td>
|
|
<td><span class="ddf-badge">{$row.status}</span></td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|