<link rel="stylesheet" href="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/css/bootstrap-datepicker.standalone.min.css">
<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>
<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>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    <form class="form-horizontal" role="form" method="post" action="advertiser/actionedit">
                                        <input type="hidden" name="id" value="<?php echo $info['id'];?>">
                                        <div class="modal-body">
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">渠道商:</label>
                                                <div class="col-sm-6">
                                                    <?php foreach($adList as $list){?>
                                                    <label class="radio-inline">
                                                        <input type="radio" name="ad_id" <?php if($info['ad_id'] == $list['id']) echo ' checked ';?> value="<?php echo $list['id'];?>"> <?php echo $list['ad_name'];?>
                                                    </label>
                                                    <?php }?>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">安装量:</label>
                                                <div class="col-sm-6">
                                                    <input type="text" name="ad_num" class="form-control" placeholder="安装量" value="<?php echo $info['ad_num'];?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">花费:</label>
                                                <div class="col-sm-6">
                                                    <input type="text" name="ad_money" class="form-control" placeholder="花费" value="<?php echo $info['ad_money'];?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">收入:</label>
                                                <div class="col-sm-6">
                                                    <input type="text" name="ad_income" class="form-control" placeholder="收入" value="<?php echo $info['ad_income'];?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">平台:</label>
                                                <div class="col-sm-6">
                                                    <?php foreach($adPlatform as $pk => $pv){?>
                                                        <label class="radio-inline">
                                                            <input type="radio" name="ad_platform" <?php if($info['ad_platform'] == $pk) echo ' checked ';?> value="<?php echo $pk;?>"> <?php echo $pv;?>
                                                        </label>
                                                    <?php }?>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">安装留存:</label>
                                                <div class="col-sm-6">
                                                    <input type="text" name="ad_install_lc" class="form-control" placeholder="安装留存" value="<?php echo $info['ad_install_lc'];?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">自然新增留存:</label>
                                                <div class="col-sm-6">
                                                    <input type="text" name="ad_zr_lc" class="form-control" placeholder="自然新增留存" value="<?php echo $info['ad_zr_lc'];?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">录入时间:</label>
                                                <div class="col-sm-6">
                                                    <input type="text" name="ad_time" class="form-control datetimepicker" placeholder="录入时间" value="<?php echo date('Y-m-d',$info['ad_time']);?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-sm-3">
                                                    <button type="button" class="btn btn-info goback">返回</button>
                                                    <button type="button" class="btn btn-primary J_ajaxSubmitBtn">提交</button>
                                                </div>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
    </div>

</div>
<script type="text/javascript">
    //选择日期
    $('.datetimepicker').datepicker({
        language:'zh-CN',
        format:'yyyy-mm-dd',
        zIndexOffset:906  //控制z-index
    });

    $('.goback').click(function(){
       history.go(-1);
    });
</script>