@extends('base.base')
@section('base')
    <!-- 内容区域 -->
    <div class="main-panel">
        <div class="content-wrapper">
            <div class="page-header">
                <h3 class="page-title">
                     <span class="page-title-icon bg-gradient-primary text-white mr-2">
                        <i class="mdi mdi-settings"></i>
                    </span>
                    {{ __('auto.当前在线玩家明细') }}
                </h3>
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="#">{{ __('auto.实时数据') }}</a></li>
                        <li class="breadcrumb-item active" aria-current="page">{{ __('auto.当前在线玩家明细') }}</li>
                    </ol>
                </nav>
            </div>
            <div class="row">
                <div class="col-lg-12 grid-margin stretch-card">
                    <div class="card">
                        <div class="card-body">
                            <h4 class="card-title">{{ __('auto.当前在线玩家明细') }}</h4>
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th width="5%">{{ __('auto.编号') }}</th>
                                    <th width="10%">{{ __('auto.游戏编号') }}</th>
                                    <th width="10%">{{ __('auto.昵称') }}</th>
                                    <th width="10%">{{ __('auto.携带金币') }}</th>
                                    <th width="10%">{{ __('auto.银行金币') }}</th>
                                    <th width="10%">{{ __('auto.登录时间') }}</th>
                                    <th width="10%">{{ __('auto.进入房间游戏') }}</th>
                                    <th width="10%">{{ __('auto.游戏名') }}</th>
                                    <th width="5%">{{ __('auto.操作') }}</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($list as $k=>$v)
                                    <tr>
                                        <td>{{ $v->UserID }}</td>
                                        <td>{{ $v->GameID }}</td>
                                        <td>{{ $v->NickName }}</td>
                                        <td>{{ $v->Score }}</td>
                                        <td>{{ $v->BankScore}}</td>
                                        <td>{{ $v->LastLogonDate }}</td>
                                        <td>{{ $v->CollectDate }}</td>
                                        <td>{{ $v->ServerName }}</td>
                                        <td><a href="/admin/user/list?user_id={{$v->UserID}}" class="btn btn-sm btn-gradient-info btn-icon-text">{{ __('auto.查看') }}</a></td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                            <div class="box-footer clearfix">
                                {{ __('auto.总共') }} <b>{{ $list->total() }}</b> {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
                                {!! $list->links() !!}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        $(function(){
            cutStr(50);
        });
        function update(id){
            myConfirm("{{ __('auto.处理操作不可逆,是否继续') }}?",function(){
                myRequest("/admin/accusation/edit/"+id,"post",{},function(res){
                    layer.msg(res.msg)
                    setTimeout(function(){
                        window.location.reload();
                    },1500)
                });
            });
        }
        function del(id){
            myConfirm("{{ __('auto.删除操作不可逆,是否继续') }}?",function(){
                myRequest("/admin/accusation/del/"+id,"post",{},function(res){
                    layer.msg(res.msg)
                    setTimeout(function(){
                        window.location.reload();
                    },1500)
                });
            });
        }
        
    </script>
@endsection
