{template "header.html"}

<div class="row table-search-tool">
    <form action="{SELF}" method="get">
        {dr_form_search_hidden()}
        <div class="col-md-12 col-sm-12">
            <label>
                <select name="field" class="form-control">
                    {loop $field $t}
                    {if dr_is_admin_search_field($t)}
                    <option value="{$t.fieldname}" {if $param.field==$t.fieldname}selected{/if}>{dr_lang($t.name)}</option>
                    {/if}
                    {/loop}
                </select>
            </label>
            <label><i class="fa fa-caret-right"></i></label>
            <label><input type="text" class="form-control" placeholder="" value="{$param['keyword']}" name="keyword" /></label>
        </div>


        <div class="col-md-12 col-sm-12">
            <label><button type="submit" class="btn green btn-sm onloading" name="submit" > <i class="fa fa-search"></i> {dr_lang('搜索')}</button></label>
        </div>
    </form>
</div>

<form class="form-horizontal" role="form" id="myform">
    {dr_form_hidden()}
    <div class="table-scrollable">
        <table class="table table-striped table-bordered table-hover table-checkable dataTable">
            <thead>
            <tr class="heading">
                {if $ci->_is_admin_auth('del')}
                <th class="myselect">
                    <label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
                        <input type="checkbox" class="group-checkable" data-set=".checkboxes" />
                        <span></span>
                    </label>
                </th>
                {/if}
                <th style="text-align:center" width="70" class="{dr_sorting('id')}" name="id">{dr_lang('头像')}</th>
                <th style="text-align:center" width="70" class="{dr_sorting('oauth')}" name="oauth">{dr_lang('平台')}</th>
                <th width="280"  class="{dr_sorting('nickname')}" name="nickname">{dr_lang('昵称')}</th>
                <th width="170" class="{dr_sorting('expire_at')}" name="expire_at">{dr_lang('绑定时间')}</th>
                <th width="200" style="text-align:center" class="{dr_sorting('uid')}" name="uid">{dr_lang('绑定账号')}</th>
                <th>{dr_lang('操作')}</th>
            </tr>
            </thead>
            <tbody>
            {loop $list $t}
            <tr class="odd gradeX" id="dr_row_{$t.id}">
                {if $ci->_is_admin_auth('del') || $ci->_is_admin_auth('edit')}
                <td class="myselect">
                    <label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
                        <input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" />
                        <span></span>
                    </label>
                </td>
                {/if}
                <td style="text-align:center"> <img width="45" class="img-circle" src="{$t.avatar}"> </td>
                <td style="text-align:center"> <img src="{THEME_PATH}assets/oauth/{$t.oauth}.png"> </td>
                <td>{dr_html2emoji($t.nickname)}</td>
                <td>{dr_date($t.expire_at, '', 'red')}</td>
                <td style="text-align:center">{if !$t.uid}<span class="label label-sm label-danger"> {dr_lang('未绑定')} </span>{else}{Function_list::uid($t.uid)}{/if}</td>
                <td>
                {if $t.uid}
                    <label><a href="{dr_url('member/alogin_index', ['id'=>$t.uid])}" target="_blank" class="btn btn-xs yellow"> <i class="fa fa-send"></i> {dr_lang('登录')}</a></label>{/if}
            </tr>
            {/loop}
            </tbody>
        </table>
    </div>

    <div class="row fc-list-footer table-checkable ">
        <div class="col-md-5 fc-list-select">
                {if $ci->_is_admin_auth('del') || $ci->_is_admin_auth('edit')}
                <label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
                    <input type="checkbox" class="group-checkable" data-set=".checkboxes" />
                    <span></span>
                </label>
                {/if}
                <label><button type="button" onclick="dr_ajax_option('{dr_url($uriprefix.'/del')}', '{dr_lang('你确定要删除吗？')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> {dr_lang('删除')}</button></label>

        </div>
        <div class="col-md-7 fc-list-page">
            {$mypages}
        </div>
    </div>
</form>


{template "footer.html"}