
6 changed files with 274 additions and 1 deletions
@ -0,0 +1,172 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
|
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title>知识库</title> |
|||
<link rel="stylesheet" href="{$smarty.const.CSS_URL}/css/common.css?v={$smarty.const.CSS_JS_VERSION}"> |
|||
<link rel="stylesheet" href="{$smarty.const.CSS_URL}/css/index.css?v={$smarty.const.CSS_JS_VERSION}"> |
|||
<script src="{$smarty.const.CSS_URL}/js/jquery-3.6.0.min.js"></script> |
|||
</head> |
|||
{literal} |
|||
<style> |
|||
table { |
|||
width: 100%; |
|||
border-collapse: collapse; |
|||
background-color: #fff; |
|||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); |
|||
margin-bottom: 50px; |
|||
} |
|||
caption { |
|||
font-size: 18px; |
|||
font-weight: bold; |
|||
padding: 10px; |
|||
color: #333; |
|||
} |
|||
th, td { |
|||
padding: 12px; |
|||
text-align: left; |
|||
border-bottom: 1px solid #ddd; |
|||
} |
|||
th { |
|||
background-color: #4CAF50; |
|||
color: white; |
|||
} |
|||
tr:hover { |
|||
background-color: #f1f1f1; |
|||
} |
|||
/* 响应式表格 */ |
|||
@media (max-width: 600px) { |
|||
table { |
|||
width: 100%; |
|||
} |
|||
th, td { |
|||
display: block; |
|||
text-align: right; |
|||
padding: 10px; |
|||
} |
|||
th { |
|||
text-align: left; |
|||
background-color: #3b8c40; |
|||
} |
|||
} |
|||
</style> |
|||
{/literal} |
|||
<body> |
|||
<div class="home-page"> |
|||
<div class="header-wrap"> |
|||
<img class="home-logo" src="{$smarty.const.CSS_URL}/images/home-logo.png" alt=""> |
|||
<div class="header-right flex"> |
|||
<img src="{$smarty.const.CSS_URL}/images/home-more.png" alt=""> |
|||
<div class="dropdown"> |
|||
<button class="dropdown-toggle"> |
|||
{$nickname} |
|||
<img class="icon" src="{$smarty.const.CSS_URL}/images/drop-icon.svg" alt=""> |
|||
</button> |
|||
<div class="dropdown-panel"> |
|||
<a href="/loginout">退出</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="home-main-content"> |
|||
<table> |
|||
<caption>审核员列表</caption> |
|||
<tr> |
|||
<td>ID</td> |
|||
<td>昵称</td> |
|||
<td>真实姓名</td> |
|||
<td>操作</td> |
|||
</tr> |
|||
{foreach from=$user_list key=key item=item} |
|||
<tr> |
|||
<td>{$item.id}</td> |
|||
<td>{$item.nickname}</td> |
|||
<td>{$item.real_name}</td> |
|||
<td> |
|||
{if $item.is_super_admin == 0} |
|||
<button data-id="{$item.id}" class="change-status button {if $item.status==0}button-primary{else}button-danger{/if}">{if $item.status==0}启用{else}禁用{/if}</button> |
|||
{/if} |
|||
</td> |
|||
</tr> |
|||
{/foreach} |
|||
</table> |
|||
|
|||
{if $login_list} |
|||
<table> |
|||
<caption>申请列表</caption> |
|||
<tr> |
|||
<td>ID</td> |
|||
<td>昵称</td> |
|||
<td>登陆时间</td> |
|||
<td>操作</td> |
|||
</tr> |
|||
{foreach from=$login_list key=key item=item} |
|||
<tr> |
|||
<td>{$item.id}</td> |
|||
<td>{$item.nickname}</td> |
|||
<td>{$item.addtime}</td> |
|||
<td> |
|||
<button data-id="{$item.id}" class="button button-primary passBtn">审核通过</button> |
|||
</td> |
|||
</tr> |
|||
{/foreach} |
|||
</table> |
|||
{/if} |
|||
</div> |
|||
<div class="leftSideFooterNew"> |
|||
<p>Copyright ©2012-2025 .</p> |
|||
<p><span>All Rights Reserved</span> 底部随便写的</p> |
|||
</div> |
|||
</div> |
|||
</body> |
|||
{literal} |
|||
<script> |
|||
$('.change-status').click(function (){ |
|||
var id = $(this).data('id'); |
|||
var status = $(this).hasClass('button-danger') ? 0 : 1; |
|||
var that = $(this); |
|||
$.ajax({ |
|||
type: "post", |
|||
dataType: 'json', |
|||
url: '/index/ajax_change_user_status', |
|||
data: { |
|||
id, |
|||
status |
|||
}, |
|||
success: function (res) { |
|||
alert(res.info) |
|||
if(res.status){ |
|||
if(status==1){ |
|||
that.html('禁用').removeClass('button-primary').addClass('button-danger'); |
|||
}else{ |
|||
that.html('启用').addClass('button-primary').removeClass('button-danger'); |
|||
} |
|||
} |
|||
} |
|||
}) |
|||
}) |
|||
|
|||
$('.passBtn').click(function (){ |
|||
var id = $(this).data('id'); |
|||
$.ajax({ |
|||
type: "post", |
|||
dataType: 'json', |
|||
url: '/index/ajax_pass_user', |
|||
data: { |
|||
id, |
|||
status |
|||
}, |
|||
success: function (res) { |
|||
alert(res.info) |
|||
if(res.status){ |
|||
window.location.reload(); |
|||
} |
|||
} |
|||
}) |
|||
}) |
|||
</script> |
|||
{/literal} |
|||
|
|||
</html> |
Loading…
Reference in new issue