<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String nikeName=request.getParameter("nikeName");
	String r=request.getParameter("r");
	
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>彩票中国--我的账户--会员中心</title>
    
	<meta http-equiv="pragma" content="no-cache"/>

	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
	<meta http-equiv="description" content="This is my page"/>
	<link href="<%=request.getContextPath()%>/letoula/useraccount/css/touzhu.css" rel="stylesheet" type="text/css" />
  </head>
  
  <body>
  	<div class='buy_record'>
  		他可被定制的彩种
  	</div>

  	  <table width='100%' cellspacing='0' cellpadding='0' class='b_r_table'>
  	  	<colgroup>
  			<col width="164"/><col width="183"/><col width="218" /><col />
  		</colgroup>
  		<thead>
  			<tr>
  				<th>彩种</th><th>已定制人数</th><th>跟单总金额</th><th>操作</th>
  			</tr>
  		</thead>
  		<tbody class='singleuser'>
  		</tbody>
  	</table><div class='loding'><img src='../../images/loding.gif' /></div>
  	<div class='rec_added'>
  		<p>
  		说明：
  		<font color='gray'>1.申请了超级发起人的彩种玩法，发起人在该彩种玩法下只能发起1个方案。因此定制了胜负彩单式、复式合买，6场半全场单式、复式
      合买， 4场进球彩单式、复式合买，任九单式、复式、胆拖合买的每期方案个数都只为1个。</font><a href="#" class='blue'>什么是定制跟单?>></a><br/>
  		</p>
  	</div>
  	
  </body>
  </html>
<script type='text/javascript' src='<%=request.getContextPath()%>/letoula/js/plugin/library.js'></script>
  <script type='text/javascript'>
  		var lotName={'501':'竞彩胜平负','502':'竞彩总进球','503':'竞彩比分','504':'竞彩半全场','505':'篮彩胜负','506':'篮彩让分胜负','507':'篮彩胜分差','508':'篮彩大小分','301':'单场胜平负','302':'单场上下单双','303':'单场总进球','304':'单场比分','305':'单场半全场'};
  		var nikeName='<%=r%>';
  	
  		var u = '<%=nikeName %>';
  		$('.loding').show();
  		$.getJSON('../../data/tary_single_user.jsp?r='+Math.random(),{'userNikeName':nikeName},function(JSON){
  				var tr='';
  				
  				if(JSON.items.length == 0) tr = '<tr><td colspan="10">没有找到相关的记录！</td></tr>';
  				$('.singleuser').empty();
  				if(JSON.result == '0000'){
  					
  					$(JSON.items).each(function(i,v){
  						
  						tr += '<tr><td><strong>'+lotName[v.lotName]+'</strong></td><td><font color="red">'+v.zdr+'</font>人</td><td><font color="red">'+v.price+'</font>元</td><td><a href="javascript:void(0)" class="star" onclick="show_tr(this)">定制跟单</a></td></tr><tr style="display:none"><td class="custom-td" colspan="4" align="left">每次认购金额：<input type="text" id="canyuMoney'+i+'" /><input type="button" class="d_blue"  onclick=CostumDate_add("'+v.lotName+'","'+nikeName+'","'+u+'",'+i+') value="提交"/></td></tr>';
  							
  					})
  					$(tr).appendTo('.singleuser');
  				}else{
  					
  					alert(JSON.result);
  				}
  			$('.loding').hide();
  		});
  		
  		function show_tr(_this){
  			
  			if(_this.className=='star') $(_this).removeClass('star').addClass('end').parents('tr').next('tr').show();
  			else $(_this).removeClass('end').addClass('star').parents('tr').next('tr').hide();
  			
  		}
  		
 function CostumDate_add(gameCode,starNikeName,canyuNikeName,s){
	
	var canyuMoney = $('#canyuMoney'+s+'').val();
	$.getJSON('../../data/tary_save_yq.jsp?r='+Math.random(),{'gameCode':gameCode,'starNikeName':starNikeName,'canyuNikeName':canyuNikeName,'canyuMoney':canyuMoney},function(requestText){
		
		if(requestText.result == '0000') {
			window.location.reload();
		}else{
			alert(requestText.result);
		}
	});
}
  		
  </script>