userOnlineIPList.blade.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. @extends('admin.layouts')
  2. @section('css')
  3. <link href="/assets/global/vendor/bootstrap-table/bootstrap-table.min.css" type="text/css" rel="stylesheet">
  4. @endsection
  5. @section('content')
  6. <div class="page-content container-fluid">
  7. <div class="panel">
  8. <div class="panel-heading">
  9. <h3 class="panel-title">用户在线IP列表
  10. <small>最近10分钟</small>
  11. </h3>
  12. </div>
  13. <div class="panel-body">
  14. <div class="form-row">
  15. <div class="form-group col-lg-1 col-sm-4">
  16. <input type="number" class="form-control" id="id" name="id" value="{{Request::get('id')}}" placeholder="ID"/>
  17. </div>
  18. <div class="form-group col-lg-3 col-sm-8">
  19. <input type="text" class="form-control" name="email" id="email" value="{{Request::get('email')}}" placeholder="用户名"/>
  20. </div>
  21. <div class="form-group col-lg-2 col-sm-6">
  22. <input type="text" class="form-control" name="wechat" id="wechat" value="{{Request::get('wechat')}}" placeholder="微信"/>
  23. </div>
  24. <div class="form-group col-lg-2 col-sm-6">
  25. <input type="number" class="form-control" name="qq" id="qq" value="{{Request::get('qq')}}" placeholder="QQ"/>
  26. </div>
  27. <div class="form-group col-lg-1 col-sm-6">
  28. <input type="number" class="form-control" name="port" id="port" value="{{Request::get('port')}}" placeholder="端口"/>
  29. </div>
  30. <div class="form-group col-lg-2 col-sm-6 btn-group">
  31. <button class="btn btn-primary" onclick="Search()">搜 索</button>
  32. <a href="/admin/userOnlineIPList" class="btn btn-danger">重 置</a>
  33. </div>
  34. </div>
  35. <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
  36. <thead class="thead-default">
  37. <tr>
  38. <th> #</th>
  39. <th> 用户名</th>
  40. <th> 端口</th>
  41. <th> 状态</th>
  42. <th> 代理</th>
  43. <th> 连接IP</th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. @foreach ($userList as $user)
  48. <tr>
  49. <td> {{$user->id}} </td>
  50. <td> {{$user->email}} </td>
  51. <td> {{$user->port}} </td>
  52. <td>
  53. @if ($user->status > 0)
  54. <span class="badge badge-lg badge-success">正常</span>
  55. @elseif ($user->status < 0)
  56. <span class="badge badge-lg badge-danger">禁用</span>
  57. @else
  58. <span class="badge badge-lg badge-default">未激活</span>
  59. @endif
  60. </td>
  61. <td>
  62. @if ($user->enable)
  63. <span class="badge badge-lg badge-success">启用</span>
  64. @else
  65. <span class="badge badge-lg badge-danger">禁用</span>
  66. @endif
  67. </td>
  68. <td>
  69. @if(!$user->onlineIPList->isEmpty())
  70. <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
  71. <thead>
  72. <tr>
  73. <th> 时间</th>
  74. <th> 节点</th>
  75. <th> 类型</th>
  76. <th> IP</th>
  77. </tr>
  78. </thead>
  79. <tbody>
  80. @foreach($user->onlineIPList as $vo)
  81. <tr>
  82. <td>{{$vo->created_at}}</td>
  83. <td>{{$vo->node ? $vo->node->name : '【节点已删除】'}}</td>
  84. <td>{{$vo->type}}</td>
  85. <td>
  86. <a href="https://www.ipip.net/ip/{{$vo->ip}}.html" target="_blank">{{$vo->ip}}</a>
  87. </td>
  88. </tr>
  89. @endforeach
  90. </tbody>
  91. </table>
  92. @endif
  93. </td>
  94. </tr>
  95. @endforeach
  96. </tbody>
  97. </table>
  98. </div>
  99. <div class="panel-footer">
  100. <div class="row">
  101. <div class="col-sm-4">
  102. 共 <code>{{$userList->total()}}</code> 个账号
  103. </div>
  104. <div class="col-sm-8">
  105. <nav class="Page navigation float-right">
  106. {{$userList->links()}}
  107. </nav>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. @endsection
  114. @section('script')
  115. <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js" type="text/javascript"></script>
  116. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js" type="text/javascript"></script>
  117. <script type="text/javascript">
  118. //回车检测
  119. $(document).on("keypress", "input", function (e) {
  120. if (e.which === 13) {
  121. Search();
  122. return false;
  123. }
  124. });
  125. // 搜索
  126. function Search() {
  127. window.location.href = '/admin/userOnlineIPList' + '?id' + $("#id").val() + '&email=' + $("#email").val() + '&wechat=' + $("#wechat").val() + '&qq=' + $("#qq").val() + '&port=' + $("#port").val();
  128. }
  129. </script>
  130. @endsection