123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- @extends('admin.layouts')
- @section('css')
- <link href="/assets/global/vendor/bootstrap-table/bootstrap-table.min.css" type="text/css" rel="stylesheet">
- @endsection
- @section('content')
- <div class="page-content container-fluid">
- <div class="panel">
- <div class="panel-heading">
- <h3 class="panel-title">用户在线IP列表
- <small>最近10分钟</small>
- </h3>
- </div>
- <div class="panel-body">
- <div class="form-row">
- <div class="form-group col-lg-1 col-sm-4">
- <input type="number" class="form-control" id="id" name="id" value="{{Request::get('id')}}" placeholder="ID"/>
- </div>
- <div class="form-group col-lg-3 col-sm-8">
- <input type="text" class="form-control" name="username" id="username" value="{{Request::get('username')}}" placeholder="用户名"/>
- </div>
- <div class="form-group col-lg-2 col-sm-6">
- <input type="text" class="form-control" name="wechat" id="wechat" value="{{Request::get('wechat')}}" placeholder="微信"/>
- </div>
- <div class="form-group col-lg-2 col-sm-6">
- <input type="number" class="form-control" name="qq" id="qq" value="{{Request::get('qq')}}" placeholder="QQ"/>
- </div>
- <div class="form-group col-lg-1 col-sm-6">
- <input type="number" class="form-control" name="port" id="port" value="{{Request::get('port')}}" placeholder="端口"/>
- </div>
- <div class="form-group col-lg-2 col-sm-6 btn-group">
- <button class="btn btn-primary" onclick="Search()">搜索</button>
- <a href="/admin/userOnlineIPList" class="btn btn-danger">重置</a>
- </div>
- </div>
- <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
- <thead class="thead-default">
- <tr>
- <th> #</th>
- <th> 用户名</th>
- <th> 端口</th>
- <th> 状态</th>
- <th> 代理</th>
- <th> 连接IP</th>
- </tr>
- </thead>
- <tbody>
- @if ($userList->isEmpty())
- <tr>
- <td colspan="6">暂无数据</td>
- </tr>
- @else
- @foreach ($userList as $user)
- <tr>
- <td> {{$user->id}} </td>
- <td> {{$user->username}} </td>
- <td> {{$user->port}} </td>
- <td>
- @if ($user->status > 0)
- <span class="badge badge-lg badge-success">正常</span>
- @elseif ($user->status < 0)
- <span class="badge badge-lg badge-danger">禁用</span>
- @else
- <span class="badge badge-lg badge-default">未激活</span>
- @endif
- </td>
- <td>
- @if ($user->enable)
- <span class="badge badge-lg badge-success">启用</span>
- @else
- <span class="badge badge-lg badge-danger">禁用</span>
- @endif
- </td>
- <td>
- @if(!$user->onlineIPList->isEmpty())
- <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
- <thead>
- <tr>
- <th> 时间</th>
- <th> 节点</th>
- <th> 类型</th>
- <th> IP</th>
- </tr>
- </thead>
- <tbody>
- @foreach($user->onlineIPList as $vo)
- <tr>
- <td>{{$vo->created_at}}</td>
- <td>{{$vo->node ? $vo->node->name : '【节点已删除】'}}</td>
- <td>{{$vo->type}}</td>
- <td>
- <a href="https://www.ipip.net/ip/{{$vo->ip}}.html" target="_blank">{{$vo->ip}}</a>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- @endif
- </td>
- </tr>
- @endforeach
- @endif
- </tbody>
- </table>
- </div>
- <div class="panel-footer">
- <div class="row">
- <div class="col-sm-4">
- 共 <code>{{$userList->total()}}</code> 个账号
- </div>
- <div class="col-sm-8">
- <nav class="Page navigation float-right">
- {{$userList->links()}}
- </nav>
- </div>
- </div>
- </div>
- </div>
- </div>
- @endsection
- @section('script')
- <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js" type="text/javascript"></script>
- <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js" type="text/javascript"></script>
- <script type="text/javascript">
- //回车检测
- $(document).on("keypress", "input", function (e) {
- if (e.which === 13) {
- Search();
- return false;
- }
- });
- // 搜索
- function Search() {
- window.location.href = '/admin/userOnlineIPList' + '?id' + $("#id").val() + '&username=' + $("#username").val() + '&wechat=' + $("#wechat").val() + '&qq=' + $("#qq").val() + '&port=' + $("#port").val();
- }
- </script>
- @endsection
|