<%@ page language="java" import="java.util.*,com.letousky.lottery.action.AuxiliaryData,com.letousky.exception.LotteryException" pageEncoding="UTF-8"%>
<%
	String[] params=new String[3];
	params[0]=request.getParameter("starTime");
	params[1]=request.getParameter("pages"); //当前页数
	params[2]=request.getParameter("every"); //当前页显示的条数
	try{
	List list=new AuxiliaryData().resultsTheBakLottery(params);
	String[] str=null;
	String d=",";
	Object[] obj=list.toArray();
	List items=(List)obj[0];
	String[] record=(String[])obj[1];
	Object[] item=items.toArray();
	
	out.print("{\"result\":\"0000\",\"record\":\""+record[0]+"\",\"items\":[");
	for(int i=0;i<item.length;i++){
		
		str=(String[])item[i];
		
		if(i==(item.length-1)){ d=""; }
		
		out.print("{\"id\":\""+str[0]+"\",\"leagueName\":\""+str[1]+"\",\"leagueNumber\":\""+str[2]+"\",\"hometeam\":\""+str[3]+"\",\"visitingteam\":\""+str[4]+"\",\"giveBall\":\""+str[5]+"\",\"gameType\":\""+str[6]+"\",\"stopTime\":\""+str[7]+"\",\"singleStopTime\":\""+str[8]+"\",\"complexStopTime\":\""+str[9]+"\",\"sfresults\":\""+str[18]+"\",\"rfsfresults\":\""+str[11]+"\",\"sfcresults\":\""+str[20]+"\",\"dxresults\":\""+str[21]+"\",\"sfaward\":\""+str[14]+"\",\"rfsfaward\":\""+str[15]+"\",\"sfcaward\":\""+str[16]+"\",\"dxaward\":\""+str[17]+"\",\"sfguoguanresult\":\""+str[18]+"\",\"rfsfguanresult\":\""+str[19]+"\",\"sfcguanresult\":\""+str[20]+"\",\"dxguanresult\":\""+str[21]+"\",\"osfdscore\":\""+str[22]+"\",\"dxfdctotalscore\":\""+str[23]+"\",\"proccessStatus\":\""+str[24]+"\",\"info\":\""+str[25]+"\",\"againstType\":\""+str[26]+"\",\"color\":\""+str[28]+"\",\"bifen\":\""+str[27]+"\"}"+d+"");
		
	}
	out.print("]}");
	}catch(LotteryException e){
		
		out.print("{\"result\":\""+e.getMessage()+"\"}");
	}
%>