<extend name="Public/base" />

<block name="body">
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script src="__STATIC__/layer/extend/layer.ext.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>

    <div class="main-title cf">
        <h2>编辑 [审核信息]</h2>
    </div>
    <!-- 标签页导航 -->
<div class="tab-wrap">
    <ul class="tab-nav nav">
        <li data-tab="tab1" class="current"><a href="javascript:void(0);">基础</a></li>
    </ul>
    <div class="tab-content zc_for">
    <!-- 表单 -->
    <form id="form" action="{:U('edit')}" method="post" class="form-horizontal">
        <!-- 基础文档模型 -->
        <div id="tab1" class="tab-pane in tab1 tab-look">
            <table  border="0" cellspacing="0" cellpadding="0">
                <tbody>
                  <tr>
                 <td class="l">所属渠道:</td>
                    <td class="r">
                        <input type="text" class="txt" value="{:get_promote_name($data['promote_id'])}" disabled="disabled">
                    </td>
                    <td class="l">游戏名称:</td>
                    <td class="r">
                        <input type="text" class="txt" value="{:get_game_name($data['game_id'])}" disabled="disabled">
                    </td>
                  </tr>
                </tbody>
            </table>
        </div>

        <div class="form-item cf">
            <input type="hidden" name='id' value="{$data['id']}"></input>
            <button class="btn submit-btn ajax-post hidden" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <a class="btn btn-return" href="javascript:history.back(-1);">返 回</a>
        </div>
    </form>
    </div>
</div>
</block>

<block name="script">
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Apply/lists')}');
Think.setValue("game_type", {$data.game_type|default = 0});
Think.setValue("category", {$data.category|default = 0});

$('#submit').click(function(){
    $('#form').submit();
});

$(function(){
    showTab();
    $(".rarara").on("click",function(){
        //prompt层
        layer.prompt({
          title: '请输入0-100的整数,并确认',
          formType: 0 //prompt风格,支持0-2
        }, function(pass){
            var r = /^([\d]{1,2}$|[100])$/;  //0-100的正整数
            if(isNaN(pass)||!r.test(pass)){
                layer.alert("分成比例输入不正确");
            }else{
                layer.close(layer.prompt());
                $(".rara").html("<span class='rara'>"+pass+".00% </span> "); 
                $(".rara1").html("<input type='hidden' class='rara1' name='ratio' value='"+pass+"'>");
            }
                
        });
    });

    $(".momomo").on("click",function(){
        //prompt层
        layer.prompt({
          title: '请输入整数,并确认',
          formType: 0 //prompt风格,支持0-2
        }, function(passs){
            var rr = /^[0-9]*$/;  //0-100的正整数
            if(isNaN(passs)||!rr.test(passs)){
                layer.alert("注册单价输入不正确");
            }else{
                layer.close(layer.prompt());
                $(".momo").html("<span class='momo'>"+passs+" </span> "); 
                $(".momo1").html("<input type='hidden' class='momo1' name='money' value='"+passs+"'>");
            }
                
        });
    });
});


</script>
</block>