mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +08:00
137 lines
6.3 KiB
Smarty
137 lines
6.3 KiB
Smarty
@extends('admin.master')
|
|
|
|
@section('title', '用户管理')
|
|
|
|
@section('content')
|
|
|
|
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper">
|
|
<!-- Content Header (Page header) -->
|
|
<section class="content-header">
|
|
<h1>
|
|
@if (isset($_GET['q']))
|
|
搜索结果:{{ $_GET['q'] }}
|
|
@else
|
|
用户管理
|
|
@endif
|
|
<small>User Management</small>
|
|
<form method="get" action="" class="user-search-form">
|
|
<input type="text" name="q" class="form-control user-search-input" placeholder="输入,回车搜索。" value="{{ $q }}">
|
|
<select name="filter" class="form-control pull-right user-search-input">
|
|
<option value='email' {{ $filter == 'email' ? 'selected="selected"' : '' }}>搜索邮箱</option>
|
|
<option value='nickname' {{ $filter == 'nickname' ? 'selected="selected"' : '' }}>搜索昵称</option>
|
|
</select>
|
|
</form>
|
|
|
|
</h1>
|
|
</section>
|
|
|
|
<!-- Main content -->
|
|
<section class="content">
|
|
<div class="box">
|
|
<div class="box-body table-responsive no-padding">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>UID</th>
|
|
<th>邮箱</th>
|
|
<th>昵称</th>
|
|
<th>积分</th>
|
|
<th>状态</th>
|
|
<th>注册时间</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
@forelse($users as $user)
|
|
<tr id="{{ $user->uid }}">
|
|
<td>{{ $user->uid }}</td>
|
|
<td id="email">{{ $user->email }}</td>
|
|
<td id="nickname">{{ $user->nickname }}</td>
|
|
<td><input type="text" class="form-control score" value="{{ $user->score }}" title="输入修改后的积分,回车提交" data-placement="top"></td>
|
|
<td id="permission">{{ $user->permission == "-1" ? "封禁" : "正常" }}</td>
|
|
<td>{{ $user->register_at }}</td>
|
|
|
|
<td>
|
|
<div class="btn-group">
|
|
<button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
更多操作 <span class="caret"></span>
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="javascript:changeUserEmail('{{ $user->uid }}');">修改邮箱</a></li>
|
|
<li><a href="javascript:changeUserNickName('{{ $user->uid }}');">修改昵称</a></li>
|
|
<li><a href="javascript:changeUserPwd('{{ $user->uid }}');">更改密码</a></li>
|
|
<li class="divider"></li>
|
|
<li><a href="../admin/players?filter=uid&q={{ $user->uid }}">查看该用户拥有的角色</a></li>
|
|
<li class="divider"></li>
|
|
|
|
@if ($user->permission == "1")
|
|
<li><a href="javascript:;">无法封禁管理员</a></li>
|
|
@elseif ($user->permission == "0")
|
|
<li><a href="javascript:changePermission('{{ $user->uid }}');">封禁</a></li>
|
|
@else
|
|
<li><a href="javascript:changePermission('{{ $user->uid }}');">解封</a></li>
|
|
@endif
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
@if ($user->permission == "1")
|
|
<a class="btn btn-danger btn-sm" disabled="disabled" data-toggle="tooltip" data-placement="bottom" title="管理员账号不能被这样删除的啦">删除用户</a>
|
|
@else
|
|
<a class="btn btn-danger btn-sm" href="javascript:deleteUserAccount('{{ $user->uid }}');">删除用户</a>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td>0</td>
|
|
<td>无结果</td>
|
|
<td>(´・ω・`)</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="box-footer">
|
|
<!-- Pagination -->
|
|
<ul class="pagination pagination-sm no-margin pull-right">
|
|
<?php $base_url = ($filter != "" && $q != "") ? "?filter=$filter&q=$q&" : "?"; ?>
|
|
<li><a href="?page=1">«</a></li>
|
|
|
|
@if ($page != 1)
|
|
<li><a href="{{ $base_url }}page={{ $page-1 }}">{{ $page - 1 }}</a></li>
|
|
@endif
|
|
|
|
<li><a href="{{ $base_url }}page={{ $page }}" class="active">{{ $page }}</a></li>
|
|
|
|
@if ($total_pages > $page)
|
|
<li><a href="{{ $base_url }}page={{ $page+1 }}">{{ $page+1 }}</a></li>
|
|
@endif
|
|
|
|
<li><a href="{{ $base_url }}page={{ $total_pages }}">»</a></li>
|
|
</ul>
|
|
|
|
<select id="page-select" class="pull-right">
|
|
@for ($i = 1; $i <= $total_pages; $i++)
|
|
|
|
@if ($i == $page)
|
|
<option value='{{ $i }}' selected="selected">{{ $i }}</option>
|
|
@else
|
|
<option value='{{ $i }}'>{{ $i }}</option>
|
|
@endif
|
|
|
|
@endfor
|
|
</select>
|
|
|
|
<p class="pull-right">第 {{ $page }} 页,共 {{ $total_pages }} 页</p>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</section><!-- /.content -->
|
|
</div><!-- /.content-wrapper -->
|
|
|
|
@endsection
|