<?php
use \common\libs\MyLib;
?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script>
<script type="text/javascript" language="javascript" src="/js/func.js"></script>
<script type="text/javascript" language="javascript">
    $(function(){
        $("#back-btn").click(function(){
            window.location.href = "/finance/pay-list?year=<?=$year?>&month=<?=$month?>";
        });
    });
</script>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
    <form id="searchForm">
        <tr>
            <td class="td_bg" align="right">
                <?=$year?>年<?=$month?>月
                <input type="button" class="act_btn" id="back-btn" name="back-btn" value="返回">
            </td>
        </tr>
    </form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
    <tr>
        <td width="50" align="center" class="bg_tr">序号</td>
        <td width="80%" align="center" class="bg_tr">名称</td>
        <td width="100" align="center" class="bg_tr">时间</td>
        <td width="100" align="center" class="bg_tr">价格</td>
    </tr>
    <?php
    $total_price = 0;
    $total = 0;
    foreach($gift_list as $index => $item) {
        $start_index = $index;
        $total++;
        $total_price += $item['price'];
        ?>
        <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
            <td align="center" class="td_bg"nowrap ><?=$start_index+1?></td>
            <td class="td_bg" nowrap><?=$item['name']?></td>
            <td class="td_bg" nowrap><?=$item['print_date']?></td>
            <td class="td_bg" nowrap><?=$item['price']?></td>
        </tr>
        <?php
    }
    ?>
    <tr>
        <td width="50" align="center" class="bg_tr"></td>
        <td width="80%" align="center" class="bg_tr"></td>
        <td width="100" align="center" class="bg_tr"><?=$total?></td>
        <td width="100" align="center" class="bg_tr"><?=$total_price?></td>
    </tr>
</table>
