<link href="<?php echo base_url();?>public/h5/css/bootstrap.min14ed.css" rel="stylesheet">
<link href="<?php echo base_url();?>public/h5/css/font-awesome.min93e3.css" rel="stylesheet">
<link href="<?php echo base_url();?>public/h5/css/plugins/jqgrid/ui.jqgridffe4.css?0820" rel="stylesheet">
<link href="<?php echo base_url();?>public/h5/css/animate.min.css" rel="stylesheet">
<link href="<?php echo base_url();?>public/h5/css/style.min862f.css" rel="stylesheet">
<link rel="stylesheet" href="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/css/bootstrap-datepicker.standalone.min.css">
<link rel="stylesheet" href="<?php echo base_url();?>public/css/jquery.timepicker.min.css">
<style>
    #alertmod_activity_list {
        top: 900px !important;
        display: none;
    }
    #alertmod_schedule_list {
        top: 900px !important;
        display: none;
    }
    iframe {
        margin: 0;
        padding: 0;
        height: 100%;
        width: 100%;
        overflow: auto;
    }
</style>

<div class="container-fluid" style="background-color: #f3f3f4;height: 100%;">
    <div class="row">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>运营后台/活动奖励配置</h5>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox-title" style="overflow: auto;">
                <div class="ibox-tools" style="float: left!important;">
                    <div class="btn-group" style="width:150%">
                        <form action="#activity/reward" method="post" enctype="multipart/form-data">
                            <label class="col-sm-1 control-label" style="height:34px;text-align: center;line-height: 34px">分类：</label>
                            <div class="col-sm-3">
                                <select class="form-control m-b" name="type" id="select_type">
                                    <option value="all">所有</option>
                                    <?php if(!empty($act_type)) foreach ($act_type as $k => $v) { ?>
                                        <option value="<?php echo $k?>" <?php if($selType&&$k == $selType) echo 'selected';?>><?php echo $v['tips']?></option>
                                    <?php }?>
                                </select>
                            </div>
                            <input type="hidden" name="status" value="1" id="s_status">
                            <button class="btn  s_status <?php if($s_status==1) echo "btn-primary";?>" type="button" value="1">全部</button>
                            <button class="btn  s_status <?php if($s_status==2) echo "btn-primary";?>" type="button" value="2" >已上线</button>
                            <button class="btn  s_status <?php if($s_status==3) echo "btn-primary";?>" type="button" value="3" >排期中</button>
                            <button class="btn  s_status <?php if($s_status==4) echo "btn-primary";?>" type="button" value="4" >已下线</button>
                            <input type="text" class="btn btn-white layer-date" id="times" placeholder=" 时间选择 " value="<?php echo $sn_time2; ?>" name="sn_time2" autocomplete="off" style="width: 35%">
                            <button class="btn btn-success" type="submit">搜索</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div class="tabs-container">
                <ul class="nav nav-tabs">
                    <?php foreach ($list as $index=>$row) { ?>
                        <li class="<?php echo $index == 0 ? "active" : "";?>"><a data-toggle="tab" href="#rewardTab-<?php echo $row['activityId'];?>" aria-expanded="<?php echo $index == 0 ? "true" : "false";?>"><?php echo $row['name'];?>(<?php echo $row['activityId'];?>)</a></li>
                    <?php }?>
                </ul>
                <div class="tab-content">
                    <?php foreach ($list as $index=>$row) { ?>
                        <div id="rewardTab-<?php echo $row['activityId'];?>" class="tab-pane <?php echo $index == 0 ? "active" : "";?>">
                            <div class="panel-body" id="tab-body-<?php echo $row['activityId'];?>">
                                <iframe src="/activity/iframe/<?php echo $row['activityId'];?>" width="100%" style="height: 120rem;" frameborder="0"></iframe>
                            </div>
                        </div>
                    <?php }?>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="<?php echo base_url();?>public/h5/js/jquery.min.js"></script>
<script src="<?php echo base_url();?>public/h5/js/bootstrap.min.js"></script>
<script src="<?php echo base_url();?>public/h5/js/plugins/peity/jquery.peity.min.js"></script>
<script src="<?php echo base_url();?>public/h5/js/plugins/jqgrid/i18n/grid.locale-cnffe4.js?0820"></script>
<script src="<?php echo base_url();?>public/h5/js/plugins/jqgrid/jquery.jqGrid.minffe4.js?0820"></script>
<script src="<?php echo base_url();?>public/h5/js/content.min.js"></script>
<script src="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
<script src="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script src="<?php echo base_url();?>public/js/vendor/timepicker/timepicker.min.js"></script>
<script>
    var status =1;
    laydate.render({
        elem: '#times',
        type: 'datetime',
        range: true,
        format: 'yyyy-MM-dd'
    });
    //选类型
    $('.s_status').click(function(){
        $(this).siblings().removeClass('btn-primary');
        $(this).toggleClass('btn-primary');
        if($(this).hasClass('btn-primary')){
            status = $(this).val();
        }else{
            status = 1;
        }
        $("#s_status").val(status);
    });
</script>