<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vip配置</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="<?php echo base_url();?>public/js/bootstrap/bootstrap.min.css" >
    <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">
    <!-- Select2 -->
    <link rel="stylesheet" href="<?php echo base_url();?>public/js/vendor/select2/select2.min.css">

    <style type="text/css">
        .thumbnail {
            margin:10px;
        }

        .lang-name {
            margin-left:42px;
        }

        .upimg {
            cursor: pointer;
        }

    </style>
</head>
<body>
<div id="msg-tip">

</div>
<div class="content_wrapper">
    <div class="container-fluid">
        <aside>
            <form class="form-horizontal" role="form" method="post" enctype="multipart/form-data"  id="form" action="#" style="margin-top: 20px">
                <header><i class="fa fa-fw fa-file"></i>vip配置</header>
                <section>
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-sm-12">
                                <button type="button" class="btn btn-success" id="submitBtn">提交</button>
                            </div>
                        </div>
                    </div>
                    <div class="container-fluid">
                        <?php foreach ($vipConfig as $key => $vl) { ?>
                            <div class="row" style="border: 1px solid #CCC;margin:10px 5px;padding: 5px 0;">
                                <div class="form-group" >
                                    <label class="col-sm-1 control-label">vip等级</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control" readonly name="vip[<?php echo $vl['lv'];?>][lv]" value="<?php echo $vl['lv'];?>">
                                    </div>
                                    <label class="col-sm-1 control-label">vip积分</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control" readonly name="vip[<?php echo $vl['lv'];?>][integration]" value="<?php echo $vl['integration'];?>">
                                    </div>
                                    <!--
                                    <label class="col-sm-1 control-label">签到奖励</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control"  name="vip[<?php echo $vl['lv'];?>][signInBet]" value="<?php echo $vl['signInBet'];?>">
                                    </div>
                                    -->
                                    <label style="display: none" class="col-sm-1 control-label">任务奖励倍率</label>
                                    <div style="display: none" class="col-sm-1">
                                        <input type="text" class="form-control"  name="vip[<?php echo $vl['lv'];?>][taskRewardBet]" value="<?php echo $vl['taskRewardBet'];?>">
                                    </div>
                                    <label class="col-sm-1 control-label">体力恢复增量</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control"  name="vip[<?php echo $vl['lv'];?>][spinsRestore]" value="<?php echo $vl['spinsRestore'];?>">
                                    </div>
                                    <label class="col-sm-1 control-label">头像框</label>
                                    <div class="col-sm-1">
                                        <select class="form-control" name="vip[<?php echo $vl['lv'];?>][avatarBox]">
                                            <option value="1" <?php if($vl['avatarBox'] == 1) echo 'selected'; ?>>初级头像框</option>
                                            <option value="2" <?php if($vl['avatarBox'] == 2) echo 'selected'; ?>>中级头像框</option>
                                            <option value="3" <?php if($vl['avatarBox'] == 3) echo 'selected'; ?>>高级头像框</option>
                                            <option value="4" <?php if($vl['avatarBox'] == 4) echo 'selected'; ?>>至尊头像框</option>
                                            <option value="5" <?php if($vl['avatarBox'] == 5) echo 'selected'; ?>>XX头像框</option>
                                        </select>
                                    </div>
                                    <label class="col-sm-1 control-label">盾牌槽增量</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control"  name="vip[<?php echo $vl['lv'];?>][shieldGroove]" value="<?php echo $vl['shieldGroove'];?>">
                                    </div>
                                </div>
                                <div class="form-group" >
                                    <!--
                                    <label class="col-sm-1 control-label">转盘奖励</label>
                                    <div class="col-sm-1">
                                        <select class="form-control" name="vip[<?php echo $vl['lv'];?>][turnTable][id]" id="bcolor">
                                            <option value="601" <?php if($vl['turnTable']['id'] == 601) echo 'selected'; ?>>普通转盘</option>
                                        </select>
                                    </div>
                                    <label class="col-sm-1 control-label">转盘奖励数量</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control"  name="vip[<?php echo $vl['lv'];?>][turnTable][num]" value="<?php echo $vl['turnTable']['num'];?>">
                                    </div>
                                    <label class="col-sm-1 control-label">每天送VIP积分</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control"  name="vip[<?php echo $vl['lv'];?>][dayVipPoint]" value="<?php echo $vl['dayVipPoint'];?>">
                                    </div>
                                    <label class="col-sm-1 control-label">每<?php echo $type;?>盾牌奖励</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control"  name="vip[<?php echo $vl['lv'];?>][weekRewardShield]" value="<?php echo $vl['weekRewardShield'];?>">
                                    </div>
                                    -->
                                </div>
                                <div class="form-group">
                                    <!--
                                    <label class="col-sm-1 control-label">每<?php echo $type;?>体力奖励</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control"  name="vip[<?php echo $vl['lv'];?>][weekRewardSpins]" value="<?php echo $vl['weekRewardSpins'];?>">
                                    </div>
                                    <label class="col-sm-1 control-label">每<?php echo $type;?>祝福数量</label>
                                    <div class="col-sm-1">
                                        <input type="hidden" class="form-control"  name="vip[<?php echo $vl['lv'];?>][weekRewardBless][propsId]" value="6">
                                        <input type="text" class="form-control"  name="vip[<?php echo $vl['lv'];?>][weekRewardBless][num]" value="<?php echo $vl['weekRewardBless']['num'];?>">
                                    </div>
                                    <label class="col-sm-1 control-label">每<?php echo $type;?>抽奖券数量</label>
                                    <div class="col-sm-1">
                                        <input type="hidden" class="form-control" name="vip[<?php echo $vl['lv'];?>][weekRewardLuckydraw][propsId]" value="7">
                                        <input type="text" class="form-control"  name="vip[<?php echo $vl['lv'];?>][weekRewardLuckydraw][num]" value="<?php echo $vl['weekRewardLuckydraw']['num'];?>">
                                    </div>
                                    <label class="col-sm-1 control-label">每<?php echo $type;?>宝箱奖励</label>
                                    <div class="col-sm-1">
                                        <select class="form-control" name="vip[<?php echo $vl['lv'];?>][weekRewardChest][propsId]">
                                            <option value="0" <?php if($vl['weekRewardChest']['propsId'] == 0){ echo 'selected';}?> >无</option>
                                            <option value="1" <?php if($vl['weekRewardChest']['propsId'] == 1){ echo 'selected';}?> >木质宝箱</option>
                                            <option value="2" <?php if($vl['weekRewardChest']['propsId'] == 2){ echo 'selected';}?> >白银宝箱</option>
                                            <option value="3" <?php if($vl['weekRewardChest']['propsId'] == 3){ echo 'selected';}?> >黄金宝箱</option>
                                            <option value="4" <?php if($vl['weekRewardChest']['propsId'] == 4){ echo 'selected';}?> >魔幻宝箱</option>
                                        </select>
                                    </div>
                                    <label class="col-sm-1 control-label">每<?php echo $type;?>宝箱数量</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control"  name="vip[<?php echo $vl['lv'];?>][weekRewardChest][num]" value="<?php echo $vl['weekRewardChest']['num'];?>">
                                    </div>
                                    -->
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">商店体力增量</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control"  name="vip[<?php echo $vl['lv'];?>][shopAppend]" value="<?php echo $vl['shopAppend'];?>">
                                    </div>
                                    <label class="col-sm-1 control-label">打成功金币增加%</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control"  name="vip[<?php echo $vl['lv'];?>][attackCoinsPro]" value="<?php echo $vl['attackCoinsPro'];?>">
                                    </div>
                                    <label class="col-sm-1 control-label">偷钱金币增加%</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control"  name="vip[<?php echo $vl['lv'];?>][stealCoinsPro]" value="<?php echo $vl['stealCoinsPro'];?>">
                                    </div>
                                    <!--
                                    <label class="col-sm-1 control-label">炮台样式进化</label>
                                    <div class="col-sm-1">
                                        <select class="form-control" name="vip[<?php echo $vl['lv'];?>][attackCss]">
                                            <option value="0" <?php if($vl['attackCss'] == 0){ echo 'selected';}?> >无</option>
                                            <option value="1" <?php if($vl['attackCss'] == 1){ echo 'selected';}?> >炮台<1></option>
                                            <option value="2" <?php if($vl['attackCss'] == 2){ echo 'selected';}?> >炮台<2></option>
                                            <option value="3" <?php if($vl['attackCss'] == 3){ echo 'selected';}?> >炮台<3></option>
                                            <option value="4" <?php if($vl['attackCss'] == 4){ echo 'selected';}?> >炮台<4></option>
                                        </select>
                                    </div>
                                    <label class="col-sm-1 control-label">矿工时间增加秒</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control" name="vip[<?php echo $vl['lv'];?>][miningGame]" value="<?php echo $vl['miningGame'];?>">
                                    </div>
                                    -->
                                    <label class="col-sm-1 control-label">嘲讽图</label>
                                    <div class="col-sm-1">
                                        <select class="form-control" name="vip[<?php echo $vl['lv'];?>][mock]">
                                            <option value="0" <?php if($vl['mock'] == 0){ echo 'selected';}?> >无</option>
                                            <option value="1" <?php if($vl['mock'] == 1){ echo 'selected';}?> >嘲讽图<1></option>
                                            <option value="2" <?php if($vl['mock'] == 2){ echo 'selected';}?> >嘲讽图<2></option>
                                            <option value="3" <?php if($vl['mock'] == 3){ echo 'selected';}?> >嘲讽图<3></option>
                                            <option value="4" <?php if($vl['mock'] == 4){ echo 'selected';}?> >嘲讽图<4></option>
                                            <option value="5" <?php if($vl['mock'] == 5){ echo 'selected';}?> >嘲讽图<5></option>
                                        </select>
                                    </div>
                                    <!--
                                    <label class="col-sm-1 control-label">一键建造</label>
                                    <div class="col-sm-1">
                                        <select class="form-control" name="vip[<?php echo $vl['lv'];?>][oneClick]">
                                            <option value="0" <?php if($vl['oneClick'] == 0){ echo 'selected';}?> >关</option>
                                            <option value="1" <?php if($vl['oneClick'] == 1){ echo 'selected';}?> >开</option>
                                        </select>
                                    </div>
                                    -->
                                </div>
<!--                                <div class="form-group">-->
<!--                                    <label class="col-sm-1 control-label">RICHKING样式</label>-->
<!--                                    <div class="col-sm-1">-->
<!--                                        <select class="form-control" name="vip[--><?php //echo $vl['lv'];?><!--][richkingStyle]">-->
<!--                                            <option value="0" --><?php //if($vl['richkingStyle'] == 0){ echo 'selected';}?><!-- >关</option>-->
<!--                                            <option value="1" --><?php //if($vl['richkingStyle'] == 1){ echo 'selected';}?><!-- >开</option>-->
<!--                                        </select>-->
<!--                                    </div>-->
<!--                                </div>-->
                            </div>
                        <?php } ?>
                    </div>
                </section>
            </form>
        </aside>
    </div>
</div>
</body>

<script>
    $(function () {
        $('#submitBtn').click(function () {
            var data = new FormData(document.getElementById("form"));
            $.ajax({
                url: rootPath + 'Config/actionVipConfig',
                type: 'POST',
                data: data,
                dataType: 'json',
                contentType: false, //必须
                processData: false, //必须
                success: function (data) {
                    alert(data.msg);
                    window.location.reload();
                },
                error: function (msg) {
                    alert(data.msg);
                }
            });
        });
    });
</script>
</html>
