<?php $__env->startSection('header'); ?>
    <style>
        #header {
            background:#8d1c22;
        }

        .form-inline {
            margin:10px;
        }
        .table {
            font-size:12px;
        }
    </style>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="row-fluid">
    <div class="span9">
    </div>
    <div>
        <h4 class="nametag">使用者管理系統</h4>
        <hr>

        
        <table class='table table-bordered'>
            <tr>
                <td>使用者名稱</td>
                <?php for($i = 1; $i <= 12; $i++): ?>
                    <td>紅利 <?php echo $i; ?> 月</td>
                <?php endfor; ?>
                <td>已使用紅利</td>
                <td>已使用折現</td>
                <td>可折現紅利</td>
            </tr>
            <?php for($i = 0; $i < count($records);$i++): ?> 
                <tr>
                    <td>
                    <?php echo $users[$i]['account']; ?> 
                    </td>
                    <?php for($j = 1; $j <= 12; $j++): ?>
                        <td>
                        <?php echo $records[$i]['month_'.$j]; ?> 
                        </td>
                    <?php endfor; ?>
                    <td>
                        <a href=<?php echo URL::to('admin/records/bonus-detail/'. $users[$i]['id']. '/紅利使用'); ?>>
                        <?php echo $records[$i]['bonus_used']; ?> 
                        </a>
                    </td>
                    <td>
                        <a href=<?php echo URL::to('admin/records/bonus-detail/'. $users[$i]['id']. '/兌現'); ?>>
                        <?php echo $records[$i]['money_used']; ?> 
                        </a>
                    </td>
                    <td><?php echo $records[$i]['bonus_money']; ?> </td>
                </tr>
            <?php endfor; ?>
        </table>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('Myadmin::layout.basic', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>