userOnlineIP.blade.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. @extends('admin.table_layouts')
  2. @section('content')
  3. <div class="page-content container-fluid">
  4. <div class="panel">
  5. <div class="panel-heading">
  6. <h3 class="panel-title">
  7. {!! trans('admin.logs.user_ip.title') !!}
  8. </h3>
  9. </div>
  10. <div class="panel-body">
  11. <form class="form-row">
  12. <div class="form-group col-lg-1 col-sm-4">
  13. <input class="form-control" name="id" type="number" value="{{ Request::query('id') }}" placeholder="{{ trans('model.user.id') }}" />
  14. </div>
  15. <div class="form-group col-lg-3 col-sm-8">
  16. <input class="form-control" name="username" type="text" value="{{ Request::query('username') }}"
  17. placeholder="{{ trans('common.account') }}" />
  18. </div>
  19. <div class="form-group col-lg-2 col-sm-6">
  20. <input class="form-control" name="wechat" type="text" value="{{ Request::query('wechat') }}"
  21. placeholder="{{ trans('model.user.wechat') }}" />
  22. </div>
  23. <div class="form-group col-lg-2 col-sm-6">
  24. <input class="form-control" name="qq" type="number" value="{{ Request::query('qq') }}" placeholder="{{ trans('model.user.qq') }}" />
  25. </div>
  26. <div class="form-group col-lg-1 col-sm-6">
  27. <input class="form-control" name="port" type="number" value="{{ Request::query('port') }}"
  28. placeholder="{{ trans('model.user.port') }}" />
  29. </div>
  30. <div class="form-group col-lg-2 col-sm-6 btn-group">
  31. <button class="btn btn-primary" type="submit">{{ trans('common.search') }}</button>
  32. <button class="btn btn-danger" type="button" onclick="resetSearchForm()">{{ trans('common.reset') }}</button>
  33. </div>
  34. </form>
  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> {{ trans('common.account') }}</th>
  40. <th> {{ trans('model.user.port') }}</th>
  41. <th> {{ trans('model.user.account_status') }}</th>
  42. <th> {{ trans('model.user.proxy_status') }}</th>
  43. <th> {{ trans('admin.logs.user_ip.connect') }}</th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. @foreach ($userList as $user)
  48. <tr>
  49. <td> {{ $user->id }} </td>
  50. <td> {{ $user->username }} </td>
  51. <td> {{ $user->port }} </td>
  52. <td>
  53. @if ($user->status > 0)
  54. <span class="badge badge-lg badge-success">{{ trans('common.status.normal') }}</span>
  55. @elseif ($user->status < 0)
  56. <span class="badge badge-lg badge-danger">{{ trans('common.status.banned') }}</span>
  57. @else
  58. <span class="badge badge-lg badge-default">{{ trans('common.status.inactive') }}</span>
  59. @endif
  60. </td>
  61. <td>
  62. @if ($user->enable)
  63. <span class="badge badge-lg badge-success">{{ trans('common.status.enabled') }}</span>
  64. @else
  65. <span class="badge badge-lg badge-danger">{{ trans('common.status.banned') }}</span>
  66. @endif
  67. </td>
  68. <td>
  69. @if ($user->onlineIPList->isNotEmpty())
  70. <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
  71. <thead>
  72. <tr>
  73. <th> {{ trans('model.node.attribute') }}</th>
  74. <th> {{ trans('model.ip.network_type') }}</th>
  75. <th> IP</th>
  76. <th> {{ ucfirst(trans('validation.attributes.time')) }}</th>
  77. </tr>
  78. </thead>
  79. <tbody>
  80. @foreach ($user->onlineIPList as $log)
  81. <tr>
  82. <td>{{ $log->node->name ?? '【' . trans('common.deleted_item', ['attribute' => trans('model.node.attribute')]) . '】' }}
  83. </td>
  84. <td>{{ $log->type }}</td>
  85. <td>
  86. <a href="https://db-ip.com/{{ $log->ip }}" target="_blank">{{ $log->ip }}</a>
  87. </td>
  88. <td>{{ date('Y-m-d H:i:s', $log->created_at) }}</td>
  89. </tr>
  90. @endforeach
  91. </tbody>
  92. </table>
  93. @endif
  94. </td>
  95. </tr>
  96. @endforeach
  97. </tbody>
  98. </table>
  99. </div>
  100. <div class="panel-footer">
  101. <div class="row">
  102. <div class="col-sm-4">
  103. {!! trans('admin.logs.counts', ['num' => $userList->total()]) !!}
  104. </div>
  105. <div class="col-sm-8">
  106. <nav class="Page navigation float-right">
  107. {{ $userList->links() }}
  108. </nav>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. @endsection