<%@ page language="java" import="java.util.*,com.letousky.lottery.delegate.WinsFlat,com.letousky.lottery.util.TimeUtil" pageEncoding="UTF-8"%>
<%
	String[] uAry=(String[])session.getAttribute("userAry");
	String user="";
	if(uAry!=null){user=uAry[2];}
	else{user="-";}
	String userName=request.getParameter("userName");
	String muliptile=request.getParameter("muliptiles");
	String Copis=request.getParameter("Copis");
	String copisPrice=request.getParameter("copisPrice");
	String bdCopies=request.getParameter("bdCopies");
	String progress=request.getParameter("progress");
	String tzway=request.getParameter("tzway");
	String moneyFw=request.getParameter("moneyFw");
	String csm=request.getParameter("csm");
	String starTime=new TimeUtil().string2timeHS(request.getParameter("starTime"));
	String endTime=new TimeUtil().string2timeHS(request.getParameter("endTime"));
	String id=request.getParameter("id");
	String Trading=request.getParameter("Trading");
	String gameid=request.getParameter("gameCode");
	String sycopies=request.getParameter("sycopies");
	String rgCopis=request.getParameter("rgCopis");
	String isopen=request.getParameter("isopen");
	double countMoney=Integer.parseInt(Copis) * Double.parseDouble(copisPrice);
	String[] parmas1=new String[]{id};
	List list=new WinsFlat().chipped_details(parmas1);
	Object[] obj=list.toArray();
	String[] str=null;
	String[][] spf=new String[list.size()][];
	
	
%>
<!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/css/list_Details.css" rel="stylesheet" type="text/css" />
	<script id='betting' language='JavaScript' charset='utf-8'></script>
  </head>
  
  <body>
  	<div id='homeTop'>
      <%@include file='../../letoula/top.jsp' %>
    </div>
    <div id='homeMain'>
    	<div class='tailsMain'>
    		<div class='tailsTitleTop'></div>
    		<div class='tailsTitleCenter'>
    			<div class='jczqLogo'></div>
    			<div class='d_content'>
    				<p class='d_et'>
    					<span style='display:block;float:left'>竞彩足球<font class='d_w_f'>胜平负</font>过关复式合买</span>
    					<span style='display:block;float:right'><a href="<%=request.getContextPath()%>/letoula/jczq/project_list.jsp?gameid=501">返回合买列表>></a></span>
    				</p>
    				<p class='title_xx'>
    					此方案发起时间:<font class='f_time'><%=starTime%></font>
    					认购截至时间:<font class='j_time'><%=endTime%></font>
    					方案编号:<font class='b_h'><%=id%></font>
    				</p>
    			</div>
    		</div><!--tailsTitleCenter -->
    		
    		<div class='f_xx'>
    			<div class='BasicTitle'><span>方案基本信息</span></div>
    			<table width='100%' cellspacing='0' cellpadding='0' id='buy_table'>
    				<tr>
    					<td class='td_head'>发起人信息</td>
    					<td class='td_content'>
    						<a href="#" class='fa_name'><%=userName%></a>
    					</td>
    				</tr>
    				<tr>
    					<td class='td_head'>方案信息</td>
    					<td class='td_content'>
    						<div class='tdww'>
    							<table width='100%' id='eng' cellspacing='0' cellpadding='0'>
    								<thead>
    									<tr>
    										<th width='16%'>总金额</th>
    										<th width='8%'>倍数</th>
    										<th width='12%'>份数</th>
    										<th width='10%'>每份</th>
    										<th width='13%'>发起人提成</th>
    										<th width='25%'>保底金额</th>
    										<th width='21%'>购买进度</th>
    									</tr>
    								</thead>
    								<tbody>
    									<tr>
    										<td><font color="red">￥<%=countMoney%></font>元</td>
    										<td><%=muliptile%>倍</td>
    										<td><%=Copis%>份</td>
    										<td>￥<%=copisPrice%>元</td>
    										<td><%=csm%>%</td>
    										<td><%=bdCopies%></td>
    										<td><font color="red"><%=progress%>%</font></td>
    									</tr>
    								</tbody>
    							</table>
    						</div>
    						<div class='details_D'>
    							<p>过关方式:<font color="red"><%=tzway.replaceAll("/",",")%></font>所选场次<%=list.size()%>场</p>
    							<!--<p>奖金范围:<font color="red"><%=moneyFw%></font></p>-->
    						</div>
    						
    						<div class='tdww'>
    							<table width='100%' id='eng' cellspacing='0' cellpadding='0'>
    								<thead>
    									<tr>
    										<th width='8%'>赛事编号</th>
    										<th>主队 VS 客队</th>
    										<th width='7%'>让球数</th>
    										<th width='8%'>全场比分</th>
    										<th>赛果</th>
    										<th>参考奖金</th>
    										<th width='15%'>您的选择</th>
    										
    									</tr>
    								</thead>
    								<tbody>
    									<%
    									if("0".equals(isopen)){
    										for(int i=0;i<obj.length;i++){
    											
    											str=(String[])obj[i];
    										
    											spf[i]=str[7].split("/");
    											String sf="";
    											for(int s=0;s<spf[i].length;s++){
    												
    												sf+=spf[i][s]+",";
    												
    											} 
    											
    											out.print("<tr><td>"+str[0]+"</td><td>"+str[1]+" VS "+str[2]+"</td><td>"+str[3]+"</td><td>"+str[4]+"</td><td>"+str[5]+"</td><td>"+str[6]+"</td><td>"+sf+"</td></tr>");
    										}
    										
    										}else if("1".equals(isopen)){
    											
    											out.print("<tr><td colspan='8'><strong><font color='red'>该方案不公开</font></strong></td></tr>");
    											
    										}
    									%>
    								</tbody>
    							 </table>
    						</div>
    					</td>
    				</tr>
    				<tr>
    					<td class='td_head'>我要认购</td>
    					<td class='td_content'>
    						<%
    							if(!"0".equals(sycopies)){
    						%>
    						<div class='buy_btn' onclick='Chipped_in_submit(this,"<%=Trading%>")'></div>
    						<p>还可以认购<font color="red" class='sy_c'><%=sycopies%></font>份，我要认购<input type='text' onkeyup='mltOnkeyUp(this)' size='3' id='rg_c' class='t_input' value='1' /> 份     总金额<font class='countMoney' color='red'>￥<%=copisPrice%></font>元</p>
    						<p><input type='checkbox' id='yes_xy'  checked='checked' />我已阅读并同意《<a href="#">用户合买代购协议</a>》</p>
    						<%}else{%>
    							该方案已满员，不能购买
    						<%}%>
    					</td>
    				</tr>
    			</table>
    			
    			<div class='BasicTitle' style='border-top:#e0e2e1 1px solid;border-bottom:#e0e2e1 1px solid;'><span>方案分享信息</span></div>
    			
    			<table id='user_table' cellspacing='0' cellspacing='0' width='100%'>
    				<tr>
    					<td class='td_head'>合买用户</td>
    					<td>
    						<p class='hmuser'>该方案对彩票中国所有网友开放。</p>
    						<div class='yh_tab'>
    							<ul class='d_h'>
    								<li class='x_z'>总参与人数<font class='h_p'>25</font>人</li>
    								<li>您的认购记录</li>
    							</ul>
    						</div>
    						<div class='show_list_d'>
    						<table cellspacing='0' width='100%' cellpadding='0' class='list_table'>
    							<thead>
    								<tr>
    									<th width='135px' height='30'>用户名</th>
    									<th width='160px'>认购份数(<font color='red' class='rg_c'><%=rgCopis%>份</font>)</th>
    									<th width='228px'>认购金额(<font color='red' class='rg_p'>￥<%=countMoney%>元</font>)</th>
    									<th width='183px'>购买时间</th>
    									<th width='43px'>操作</th>
    								</tr>
    							</thead>
    							<tbody class='countList'></tbody>
    						</table>
    						<table cellspacing='0' width='100%' cellpadding='0' class='list_table' style='display:none;'>
    							<tbody class='myList'>
    								
    							</tbody>
    						</table>
    						
    						<div class='page'>
    							<span class='f_an_page'>
    								
    							</span>
    						</div>
    			
    						</div>
    					</td>
    				</tr>
    			</table>
    		</div><!--fxx -->
    		
    	</div>
    	
    	    <!--提示层-->
<div class="tips_m" style="width:500px; " id="blk2">
    <div class="tips_b">
         <div class="tips_box">
         	<div class="tips_title">
                 <h2>温馨提示</h2>
             </div>
             <div class='alert_c'>
             	<div class='state error'>
             		<span class='eroorMsg'>您好，请选择过关方式！</span>
             	</div>
             </div>
             <div class='tips_sbt'>
             	<input type='button' class='btn_Dora_b' id='yclass_alert_ok' onclick=over_t('blk2','h') value='确   定' />
             </div>
         </div>
    </div>
</div>   

    </div>
    <div id='mainFooter' style='clear:both;'>
      	<%@include file='../../letoula/bottom.jsp' %>
    </div>
     <div id='bd'>aa</div>
  </body>
  </html>
  	<script type='text/javascript'>
		var AG={
			copisPrice:'<%=copisPrice%>',
			gameCode:'<%=gameid%>',
			Trading:'<%=Trading%>',
			User:'<%=user%>',
			count_pis:'<%=Copis%>',
			Lcd_user:'<%=userName%>',
			url     :'<%=request.getContextPath()%>'
		}
	</script>
  <script type='text/javascript' src='<%=request.getContextPath()%>/letoula/js/details.js'></script>