<?php
  require __DIR__.'/head.html';
  require __DIR__.'/header.html';
  $File_Ming = 'buypay';
  require __DIR__.'/nav.html';
  ?>
<!-- 主体 -->
<main class="app-content">
    <div class="app-title">
        <ul class="app-breadcrumb breadcrumb side">
            <li class="breadcrumb-item"><i class="fa fa-home fa-lg"></i></li>
            <li class="breadcrumb-item">充值记录</li>
        </ul>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="tile">
                <div class="tile-body">
                    <table class="table table-hover table-bordered" id="sampleTable">
                        <thead>
                            <tr>
                                <th>#ID</th>
                                <th>账号</th>
                                <th>订单号</th>
                                <th>余额</th>
                                <th>状态</th>
                                <th>支付方式</th>
                                <th>时间</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php if(!empty($data)):
                            foreach($data as $k=>$v):
                            ;?>
                            <tr>
                                <td><?php echo $k+1;?></td>
                                <td><?php echo $v['pay_id'];?></td>
                                <td><?php echo $v['pay_no'];?></td>
                                <td><?php echo $v['money'];?></td>
                                <td><?php if($v['status']==2){echo "充值成功";}else{echo "充值失败";}?></td>
                                <td><?php echo payType($v['type']);?></td>
                                <td><?php echo $v['up_time'];?></td>
                            </tr>
                            <?php endforeach;
                            endif;?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <?php  require __DIR__.'/fooer.html'; ?>
    <script type="text/javascript">
        //删除
        function delRow(_this) {
            var td = _this.parentNode;
            var tr = td.parentNode;
            //var ka = tr.childNodes[3];
            var tbody = tr.parentNode;
            if (confirm('是否要删除！')) {
                tbody.removeChild(tr);
                document.location = "Jump.php?type=splist&id=" + _this.title;
            }
        }
    </script>
    </body>

    </html>