<div class="content_wrapper">

    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <header><i class="fa fa-fw fa-file"></i>更新编辑</header>
                    <?php
                        //处理比赛场名字
                        !empty($name) && $matchName = unserialize($name);
                    ?>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    <form class="form-horizontal J_ajaxForm" role="form" method="post" action="match/actionEdit">
                                        <div class="modal-body">
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">MatchLevel:</label>
                                                <div class="col-sm-9">
                                                    <input readonly="readonly" type="text" class="form-control" placeholder="MatchLevel" name="matchlevel" value="<?php echo $matchlevel?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">比赛场名称:</label>
                                                <div class="col-sm-9">
                                                    <input type="text" class="form-control" placeholder="比赛场名称" name="matchname" value="<?php echo $matchName['matchname'] ?? ''?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">比赛场中文名称:</label>
                                                <div class="col-sm-9">
                                                    <input type="text" class="form-control" placeholder="比赛场中文名称" name="matchname_zh" value="<?php echo $matchName['matchname_zh'] ?? ''?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">比赛场繁体中文名称:</label>
                                                <div class="col-sm-9">
                                                    <input type="text" class="form-control" placeholder="比赛场繁体中文名称" name="matchname_tw" value="<?php echo $matchName['matchname_tw'] ?? ''?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">比赛场英文名称:</label>
                                                <div class="col-sm-9">
                                                    <input type="text" class="form-control" placeholder="比赛场英文名称" name="matchname_en" value="<?php echo $matchName['matchname_en'] ?? ''?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">参数人数:</label>
                                                <div class="col-sm-9">
                                                    <input type="text" class="form-control" placeholder="参数人数" name="MaxUserCount" value="<?php echo $MaxUserCount?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">奖励:</label>
                                                <div class="col-sm-9">
                                                    <?php 
                                                        $rewardList = json_decode($matchreward, 1);
                                                        $rewardList = array_values($rewardList);
                                                    ?>
                                                    第一名:<input class="form-control" type="input" name="level[]" value="<?php echo $rewardList[0]['money'] ?? 0?>">
                                                    第二名:<input class="form-control" type="input" name="level[]" value="<?php echo $rewardList[1]['money'] ?? 0?>">
                                                    第三名:<input class="form-control" type="input" name="level[]" value="<?php echo $rewardList[2]['money'] ?? 0?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">服务费:</label>
                                                <div class="col-sm-9">
                                                    <input type="text" class="form-control" placeholder="服务费" name="service_fee" value="<?php echo $service_fee?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">参数费:</label>
                                                <div class="col-sm-9">
                                                    <input type="text" class="form-control" placeholder="参数费" name="TicketMoney" value="<?php echo $TicketMoney;?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">初始筹码:</label>
                                                <div class="col-sm-9">
                                                    <input type="text" class="form-control" placeholder="初始筹码" name="init_money" value="<?php echo $init_money?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">涨盲时间:</label>
                                                <div class="col-sm-9">
                                                    <input type="text" class="form-control" placeholder="涨盲时间" name="zhangmang_jiange" value="<?php echo $zhangmang_jiange?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">初始盲注:</label>
                                                <div class="col-sm-9">
                                                    <textarea  class="form-control" name="smallblinds" rows="3"><?php echo $smallblinds?></textarea>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">是否开启:</label>
                                                <div class="col-sm-9">
                                                    <label class="radio-inline">
                                                      <input type="radio" name="match_disable" <?php if($match_disable == 0) { echo 'checked="checked"';}?> value="0"> 是
                                                    </label>
                                                    <label class="radio-inline">
                                                      <input type="radio" name="match_disable" value="1" <?php if($match_disable == 1) { echo 'checked="checked"';}?>> 否
                                                    </label>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" class="btn btn-default goback" data-dismiss="modal">返回</button>
                                            <button type="button" class="btn btn-primary J_ajaxSubmitBtn">更新</button>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
    </div>

</div>
<script type="text/javascript">
    $('.goback').click(function(){
       history.go(-1);
    });

    
</script>