<?php
!defined('IN_ONEZ') && exit('Access Denied');

include_once(dirname(__FILE__).'/init.php');


$G['title']='交易明细';
$action=onez()->gp('action');

$xxx="";



onez('admin')->header();

$record=$G['this']->data()->open('credit.log')->page("userid='$G[userid]'$xxx order by id desc");
?>
<section class="content-header">
  <h1>
    <?=$G['title']?><small></small>
  </h1>
  <ol class="breadcrumb">
    <li>
      <a href="<?php echo onez()->href('/')?>">
        <i class="fa fa-dashboard">
        </i>
        管理首页
      </a>
    </li>
    <li class="active">
      <?=$G['title']?>
    </li>
  </ol>
</section>
<section class="content">
  <div class="btns" style="padding-bottom: 10px">
    <div class="pull-left">

    </div>
    <div class="pull-right">
    </div>
    <div class="clearfix"></div>
  </div>
  <div class="box box-info">
    <div class="box-header with-border">
      <h3 class="box-title">
        <?=$G['title']?>
      </h3>
      <div class="box-tools pull-right">
      </div>
    </div>
    <div class="box-body  table-responsive no-padding">
      <table class="table table-striped">
        <thead>
          <tr>
            <th><?=onez('chat.group.plugin.credit')->name()?></th>
            <th>内容</th>
            <th>时间</th>
          </tr>
        </thead>
        <tbody class="todo-list">
          <?php foreach($record[0] as $rs){
            $u=$G['this']->data()->open('member')->one("id='$rs[userid]'"); ?>
          <tr>
            <td><?=onez('chat.group.plugin.credit')->format($rs['key2'])?></td>
            <td><?=$rs['key1']?></td>
            <td><?=date('Y-m-d H:i:s',$rs['addtime'])?></td>
          </tr>
          <?php }?>
        </tbody>
      </table>
    </div>
<?if($record[1]){ ?>
    <div class="box-footer clearfix">
      <?=$record[1]?>
    </div>
<? } ?>
  </div>
</section>
<?php
onez('admin')->footer();
?>