<?php defined('InShopNC') or exit('Access Invalid!');?>

<div class="page">
    <!-- 页面导航 -->
    <div class="fixed-bar">
        <div class="item-title">
            <h3>红包管理</h3>
            <ul class="tab-base">
                <?php   foreach($output['menu'] as $menu) {  if($menu['menu_key'] == $output['menu_key']) { ?>
                    <li><a href="JavaScript:void(0);" class="current"><span><?php echo $menu['menu_name'];?></span></a></li>
                <?php }  else { ?>
                    <li><a href="<?php echo $menu['menu_url'];?>" ><span><?php echo $menu['menu_name'];?></span></a></li>
                <?php  } }  ?>
            </ul>
            </ul>
        </div>
    </div>

    <div class="fixed-empty"></div>
    <table class="table tb-type2" id="prompt">
        <tbody>
        <tr class="space odd">
            <th class="nobg" colspan="12">
                <div class="title">
                    <h5><?php echo $lang['nc_prompts'];?></h5>
                    <span class="arrow"></span>
                </div>
            </th>
        </tr>
        <tr>
            <td><ul>
                    <li>点击编辑链接修改红包类型数据</li>
                </ul></td>
        </tr>
        </tbody>
    </table>

    <table class="table tb-type2">
        <thead>
        <tr class="thead">
            <th class="w96">红包名称</th>
            <th class="w96">发放类型</th>
            <th class="w96">开始发放时间</th>
            <th class="w96">结束发放时间</th>
            <th class="w96">开始使用时间</th>
            <th class="w96">结束使用时间</th>
            <th class="w48">操作</th>
        </tr>
        </thead>
        <tbody id="treet1">
        <?php if(!empty($output['bonus_list']) && is_array($output['bonus_list'])){ ?>
        <?php foreach($output['bonus_list'] as $k => $v){ ?>
        <tr class="hover edit row">
            <td><?php echo $v['type_name'];?></td>
            <td><?php
                if(intval($v['send_type']) === 1){
                    echo '发放给特定用户';
                }
                ?></td>
            <td><?php echo date('Y-m-d', $v['send_start_date']);?></td>
            <td><?php echo date('Y-m-d',$v['send_end_date']);?></td>
            <td><?php echo date('Y-m-d',$v['use_start_date']);?></td>
            <td><?php echo date('Y-m-d',$v['use_end_date']);?></td>
            <td><a href="index.php?act=bonus&op=bonus_type_edit&id=<?php echo $v['type_id'];?>">编辑</a></td>
        </tr>
        <?php }  ?>
        <?php }  ?>
        </tbody>
    </table>
</div>
