<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/data.css" rel="stylesheet">
<link href="__CSS__/20180207/game.css" rel="stylesheet" >
<style>
     .zclip embed{margin-top: -14px;}
    .trunk-list{position: relative;min-height: 56vh;}
	.pagenation{text-align: center;line-height: 5vh;bottom:1%;}
</style>

</block>

<block name="body">
    <div class="page-list normal_list apply-my_game-list">
      <div class="trunk-title">
      	<div class="location">
			<div class="location-container">当前位置:<span>游戏管理></span><span>我的游戏</span></div>
		</div>
      	<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">游戏列表</span>
      </div>
      <div class="trunk-content article">
          <div class="trunk-search clearfix">
            <div class="tab" style="float:none;">
              <a href="{:U('Apply/index')}" class="">申请游戏</a>
              <a href="#" class="current">我的游戏</a>
							<lt name="Think.const.PRO_GRADE" value="3">
              <a href="{:U('child_game')}" class="">子渠道游戏</a>
							</lt>
            </div>
			<div class="zwm_examinediv">
				<a class="btn_calc examine_a" href="{:U('my_game')}">审核通过</a>
				<a class="btn_calc" href="javascript:;">审核中</a>
			</div>
            <form class="margt_20 zwm_from" action="{:U('my_game_ch')}" method="post" enctype="multipart/form-data">
              <div class="form-group normal_space fr">
                <input type="submit" class="submit zwm_submit" value="搜索">
              </div> 
             
              <div class="form-group normal_space fr">
                  <select id="game_id" name="game_id" class="reselect select_gallery" style="min-width:200px;width: 175px;">
                      <option value="">请选择游戏</option>
                      <volist name=":get_promote_serach_game()" id="vo">
                          <option value="{$vo.id}" title="{$vo.relation_game_name}" <if condition="I('game_id') eq $vo['id']">selected</if> >{$vo.relation_game_name}</option>
                      </volist>
                  </select>
              </div>
            </form>
          </div>
          <div class="trunk-list zwm_trunklist">
		  
		  <div class="mygame_bgtable">
              <table class="table normal_table zwm_tab">
                  <tr class="odd <if condition='get_parent_id(PID) eq 0'>pid</if> zwm_tr">
						<th class="">icon</th>
						<th class="">游戏名称</th>
						<th>平台</th>
						<th>版本号</th>
						<th>包的大小</th>
						<th>更新时间</th>
						<eq name="Think.const.PRO_GRADE" value="1">
						<th>注册单价</th>
						<th>分成比例</th>
						</eq>
						<th>投放平台</th>
						

                  </tr>
                  <empty name="list_data">
                  <if condition="get_parent_id(PID) eq 0">
                  <tr>
						<td colspan="8" style="text-align: center;height: 45vh;">
						  <img src="__IMG__/20180207/icon_wushujv2.png"/>
						  <p style="line-height: 40px;color: #A5A5A5;">暂无数据</p>
						</td>
				  </tr>
                  <else />
                  <tr>
					  <td colspan="8" style="text-align: center;height: 45vh;">
						  <img src="__IMG__/20180207/icon_wushujv2.png"/>
						  <p style="line-height: 40px;color: #A5A5A5;">暂无数据</p>
					  </td>
				  </tr>
                  </if>
                  <else />
                  <volist name="list_data" id="vo">
                  <tr>
					  <td class="<if condition='get_parent_id(PID) eq 0'>td2<else />td12</if>"> 
						    <a href="javascript:;" class="bg_st">
								<span class="img_table">
								  <div class="img_cell">
									<div class="cell_con">手游</div>
								  </div>
									<span class="placeholder-graphic placeholder-graphic_icon">
								  <img src="__ROOT__{$vo.icon|get_cover='path'}" class="onlyicon_img" style="<if condition="$vo.icon eq '0'">display: none;</if>">
									</span>
								</span>
							</a>  
					  </td>
					  <td>{$vo['relation_game_name']}</td>
					  <td>
						<if condition="$vo.sdk_version eq 1 and $vo.applyid gt 0 and $vo.applystatus lt 1">	<p class="p_icon"><img src="/Public/Home/images/20180207/andriod.png" height="20" width="20"></p> </if>
						<if condition="$vo.sdk_version eq 2 and $vo.applyid gt 0 and $vo.applystatus lt 1">	<p class="p_icon"><img src="/Public/Home/images/20180207/IOS.png" height="20" width="20"></p> </if>
						<if condition="$vo.tsdk_version eq 1 and $vo.tapplyid gt 0 and $vo.tapplystatus lt 1">	<p class="p_icon"><img src="/Public/Home/images/20180207/andriod.png" height="20" width="20"></p> </if>
						<if condition="$vo.tsdk_version eq 2 and $vo.tapplyid gt 0 and $vo.tapplystatus lt 1">	<p class="p_icon"><img src="/Public/Home/images/20180207/IOS.png" height="20" width="20"></p> </if>
					  </td>
					  <td><if condition="get_version($vo['id']) eq ''">无<else/>{:get_version($vo['id'])}</if></td>
						<td>
							<if condition="$vo.applyid gt 0 and $vo.applystatus lt 1">
							<p>{$vo.game_size}</p>
							</if>
							
							<if condition="$vo.tapplyid gt 0 and $vo.tapplystatus lt 1">
							 <if condition="$vo.tid neq ''">
							 <p>{:get_game_source_info($vo['tid'])['file_size']}</p></if>
							</if>
						</td>
					   <td>{:get_source_time($vo['id'])==''?'无':date('Y-m-d',get_source_time($vo['id']))}</td>

<eq name="Think.const.PRO_GRADE" value="1">						 
					   <td>
						 <if condition="$vo.applyid gt 0 and $vo.applystatus lt 1">
							<p>
							<notempty  name='vo.applymoney'>{$vo.applymoney|default=0}<else />{$vo['money']|default=0}</notempty>
							</p>
						</if>
						<if condition="$vo.tapplyid gt 0 and $vo.tapplystatus lt 1">
							<p>
							<if condition='$vo["tid"] neq "" '>
							  <if condition="get_apply_id($vo['promote_id'],$vo['tid'],1) neq ''" >{:get_apply_id($vo['promote_id'],$vo['tid'],1)}<else/>{$vo['tmoney']|default=0}</if>
							</if></p>
						</if>
						</td>
            <td>
						<if condition="$vo.applyid gt 0 and $vo.applystatus lt 1">
            <p><notempty  name='vo.applyratio'>{$vo.applyratio|default=0}<else />{$vo.ratio|default=0}</notempty>%</p>
						</if>
						<if condition="$vo.tapplyid gt 0 and $vo.tapplystatus lt 1">
							<p><if condition='$vo["tid"] neq "" '>
							<if condition="get_apply_id($vo['promote_id'],$vo['tid'],2) neq ''" >{:get_apply_id($vo['promote_id'],$vo['tid'],2)}<else/>{$vo['tratio']|default=0}</if>%
							</if></p>
						</if>
            </td>
</eq>

						<td>
							<if condition="$vo.applyid gt 0 and $vo.applystatus lt 1">
							<p>{:get_launch_platform_name($vo['platform_id'],'--')}</p>
							</if>
							<if condition="$vo.tapplyid gt 0 and $vo.tapplystatus lt 1">
							<p>{:get_launch_platform_name($vo['tplatform_id'],'--')}</p>
							</if>
						</td>
					 
					  
                  </tr>
                  </volist>
                  </empty>
              </table>
			  </div>

           
              <div class="pagenation clearfix">
								<a class="sch-btn" href="{:U('Export/expUser',array(
									'id'=>5,
									'user_account'=>I('user_account'),
									'game_id'=>I('game_id'),
									'time-start'=>I('time_start'),
									'time-end'=>I('time_end'),
									'game_name'=>I('game_name'),
									'sdk_version'=>I('POST.sdk_version'),
									'type'=>I('POST.type'),'xlsname'=>'游戏管理_游戏列表_我的游戏_审核中'
									))}" >导出</a>
								{$_page}
							</div>
          </div>
		    <div class="page-explain promote-mychlid-explain pos_relat">
			  <div class="trunk-content article border_normal">
				<table class="desccontent">
				  <tbody>
					<tr><td class="title" style="width: 100px;display: inline-block;">二级渠道说明:</td><td class="det">推广员默认为一级渠道,一级渠道可通过推广员后台新增二级渠道;二级渠道由一级渠道管理开启权限,并由一级渠道给二级渠道结算,结算可到财务管理操作。</td></tr>           
				  </tbody>
				</table>
			  </div>
			</div>
      </div>
    </div>
</block>
<block name='script'>
<script src="__STATIC__/zeroclipboard/jquery.zclip.min.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
highlight_subnav("{:U('Apply/index')}");
setValue('type',{$Think.request.type|default='""'});
setValue('sdk_version',{$Think.request.sdk_version|default='""'});
$(function(){


  
  
  
  $(".select_gallery").select2();
  $('.download').click(function(){
    var href= $(this).attr('href');
    var text= $(this).text();
    if(text =='下载'){
      if( href =='#'|| href =='javascript:;' ){
          layer.msg("暂无下载内容",{icon:2});
          return false;
      }
    }
  });

    $('a.copy').zclip({
          path: '__STATIC__/zeroclipboard/ZeroClipboard.swf',
          
          copy: function(){
              return $(this).attr('data-url');
          },
          beforeCopy:function(){
            $(this).addClass("proc");
          },
          afterCopy:function(){
            $(this).removeClass("copy");
            if( $(this).attr('data-url')=="" || $(this).attr('data-url')== null ){
              layer.msg("暂无下载内容",{icon:2});
             }else{
              layer.msg("复制成功",{icon:1,time:1000});
            }
          }
    });
})
</script>
</block>