userOnlineIPList.blade.php 4.4 KB

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