<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.letousky.lottery.delegate.WinMoneyManage"%>
<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.letousky.lottery.delegate.SelectIssueCurManage"%>
<%@page import="com.letousky.lottery.util.TimeUtil"%>
<%@page import="com.letousky.lottery.util.StandardFormat"%>
<link href="<%=request.getContextPath() %>/Letousky/numberLetou/ssq/css/winNumber.css" rel="stylesheet" type="text/css" />
<link href="<%=request.getContextPath() %>/Letousky/numberLetou/ssq/css/awardItem.css" rel="stylesheet" type="text/css" />
<%
	String[] nr=new WinMoneyManage().getWinMoneyItems(new String[]{request.getParameter("lot")},"C0046");
	String[] n1=null;
	if(nr==null){
		nr=new String[50];nr[2]="--";nr[15]="            ";nr[16]="            ";nr[49]=" ";
		n1=new String[]{};
	}else{
		n1=(nr[17].split("//")[0]).split("/");
	}
	//out.println("nr[49]="+nr[49]);
	//out.println("nr[47]="+nr[47]);
	if(nr!=null){
		nr[49]=new java.math.BigDecimal(new Double(nr[49]).doubleValue()).toString();
		if(nr[49].indexOf(".")!=-1){
			nr[49]=nr[49].substring(0,nr[49].indexOf("."));
		}
	}

	
	SelectIssueCurManage sc = new SelectIssueCurManage();
	String[] issueAry=sc.getCurIssue(new String[]{request.getParameter("lot")},"C0018");
	if(issueAry!=null){
		issueAry[0]=issueAry[0].trim();
		issueAry[3]=TimeUtil.string2time(issueAry[3]);
		issueAry[4]=StandardFormat.lotStateMap.get(("0".equals(issueAry[4].trim()))?"0":"-21");
	}else{
		issueAry = new String[5];
		issueAry[0]=request.getParameter("lot").trim();//玩法代码
		issueAry[1]="--";//期号
		issueAry[3]="--年--月--日 --:--";//截止时间
		issueAry[4]=StandardFormat.lotStateMap.get("-21");//销售状态
	}
%>
<div class="winNumber">
<div class="winNumber1">
	<img style="margin: 8px;" src="<%=request.getContextPath() %>/Letousky/jsp/img/<%=request.getParameter("lot")%>_logo.gif">
</div>
<div class="winNumber2">
	<div style="float: left;height: 45px;width:110px; ">
		<div class="winNumber21">最新开奖号码</div>
		<div class="winNumber22"">第 <font color="#FF0000"><%=nr[2]%></font> 期</div>
	</div>
	<div class="getArea">
		<ul>
		<%for(int m=0;m<n1.length;m++){
			out.print("<li class='balltored'>"+n1[m]+"</li>");
		}
		if(nr!=null){
			if(nr[17].split("//").length>1){
				n1=nr[17].split("//")[1].split("/");
				for(int n=0;n<n1.length;n++){
					out.print("<li class='balltoblue'>"+n1[n]+"</li>");
				}
			}
		}%>
		</ul>
	</div>
	<div style="margin-top:5px; clear: both;float:left;width: 100%;">
		<img height="60" style="float: right;margin-right: 10px;" src="<%=request.getContextPath() %>/Letousky/numberLetou/img/kaijiang.gif"/>
		<div>开奖日期：<font color="#FF0000"><%=(nr[15].substring(0, 4)+"-"+nr[15].substring(4, 6)+"-"+nr[15].substring(6, 8)) %></font><font color="#FFFFFF">aadff</font>兑奖截止日期：<font color="#FF0000"><%=(nr[16].substring(0, 4)+"-"+nr[16].substring(4, 6)+"-"+nr[16].substring(6, 8)) %></font></div>
		<div style="margin:5px 0px;">奖池资金累计金额： <font color="#FF0000"><%=nr[49] %></font> 元，滚入下期一等奖 </div>
		<div><font color="#FF0000"><a target="_blank" href="<%=request.getContextPath()%>/Letousky/openAward/openDetail.jsp?lot=<%=request.getParameter("lot").trim()%>"><font color="#ff0000">查看更多开奖信息>></font></a></font></div>
	</div>
</div>
<div class="winNumber3">
	<div class="awardItem">
    <ul style="background:bisque">
       <li>奖项</li>
       <li>中奖注数</li>
       <li>每注金额</li>
    </ul>
    <%
    	String[] sn=null;
    	if("201".equals(request.getParameter("lot"))){
    		sn=new String[]{"一等奖","二等奖","三等奖","四等奖","五等奖","六等奖","快乐假日","快乐星期天"};
    	}else if("202".equals(request.getParameter("lot"))){
    		sn=new String[]{"直选","组选3","组选6"};
    	}else if("205".equals(request.getParameter("lot"))){
    		sn=new String[]{"一等奖","二等奖","三等奖","四等奖","五等奖","六等奖","七等奖"};
    	}else if("204".equals(request.getParameter("lot"))){
    		sn=new String[]{"一等奖","二等奖","三等奖","四等奖","五等奖","六等奖","七等奖","八等奖"};
    	}else if("110".equals(request.getParameter("lot"))){
    		sn=new String[]{"一等奖(基本)","一等奖(追加)","二等奖(基本)","二等奖(追加)","三等奖(基本)","三等奖(追加)","四等奖","五等奖","六等奖","七等奖","八等奖","12选2"};
    	}else if("108".equals(request.getParameter("lot"))){
    		sn=new String[]{"特等奖","一等奖","二等奖","三等奖","四等奖","五等奖"};
    	}else if("105".equals(request.getParameter("lot"))){
    		sn=new String[]{"直选","组选3","组选6"};
    	}else if("109".equals(request.getParameter("lot"))){
    		sn=new String[]{"一等奖"};
    	}else if("111".equals(request.getParameter("lot"))){
    		sn=new String[]{"一等奖","二等奖","三等奖"};
    	}else if("104".equals(request.getParameter("lot"))){
    		sn=new String[]{"一等奖","二等奖","三等奖","四等奖","五等奖","六等奖"};
    	}
    %>
    <% for(int i=19,j=0;i<19+sn.length*2;i++,j++){
	    	String ee = nr[i];
	    	//out.println("ee==="+ee);
			if(ee.indexOf(".")!=-1){
				ee = ee.substring(0,ee.indexOf("."));
			}
			
			String rr = nr[++i];
			//out.println("rr==="+rr);
			rr=new java.math.BigDecimal(new Double(rr).doubleValue()).toString();
    		if(rr.indexOf(".")!=-1){
    			rr=rr.substring(0,rr.indexOf("."));
    		}
			
    	%>
    <ul style="background: <%=((j%2==0)?"#FFFFFF":"#F1F1F1") %>">
        <li><%=sn[j] %></li>
        <li><font color="red"><%=ee %></font>注</li>
        <li><font color="red"><%=rr %></font>元</li>
    </ul>
    <%} %>
	</div><!-- awardItem -->
</div><!-- winNumber3 -->
</div><!--winNumber-->