You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
157 lines
4.4 KiB
157 lines
4.4 KiB
<!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">
|
|
{include file="include/header.html"}
|
|
|
|
<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>
|
|
|
|
{include file="include/footer.html"}
|
|
</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>
|