<?php
!defined('IN_ONEZ') && exit('Access Denied');
define('CUR_URL',onez('chat.group.plugin.credit')->href('/pages/charge.wait.php'));
include_once(dirname(__FILE__).'/init.php');

$G['title']='手动充值审核';
$action=onez()->gp('action');
$xxx="";



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

$record=$G['this']->data()->open('charge.user')->page("key2<>'wait'$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>充值金额</th>
            <th>会员账号</th>
            <th>充值截图</th>
            <th>备注说明</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><?=$rs['key1']?></td>
            <td>
              <img src="<?=onez('chat.group.common')->avatar($rs['userid'])?>" width="16" height="16" />
              <?=$u['nickname']?>
            </td>
            <td>
              <a href="<?=$rs['pic']?>" target="_blank">
                <img src="<?=onez('m.plugin')->thumb($rs['pic'])?>" />
              </a>
            </td>
            <td><?=$rs['summary']?></td>
            <td><?
            if($rs['key2']=='ok'){
              echo '<span style="color:green">充值成功</span>';
            }elseif($rs['key2']=='fail'){
              echo '<span style="color:red">充值失败</span><br />理由:'.$rs['because'];
            }else{
              echo '<span style="color:orange">等待审核</span>';
            }
            ?></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();
?>