<%@ page language="java" import="java.util.*,com.letousky.lottery.action.AuxiliaryData,com.letousky.exception.LotteryException" pageEncoding="UTF-8"%>
<%
	String[] params=new String[1];
	params[0]=request.getParameter("issue"); //期数
	System.out.println(params[0]);
	try{
	List list=new AuxiliaryData().resultsThedcLottery(params);
	String[] str=null;
	String d=",";
	Object[] item=list.toArray();
	out.print("{\"result\":\"0000\",\"items\":[");
	for(int i=0;i<item.length;i++){
	
		str=(String[])item[i];
		
		if(i==(item.length-1)){ d=""; }
		
		out.print("{\"id\":\""+str[0]+"\",\"mathnum\":\""+str[1]+"\",\"matchName\":\""+str[2]+"\",\"matchTime\":\""+str[3]+"\",\"maindu\":\""+str[4]+"\",\"guestdu\":\""+str[5]+"\",\"rangqiushu\":\""+str[6]+"\",\"shangbifen\":\""+str[7]+"\",\"quanbifen\":\""+str[8]+"\",\"rangqiu\":\""+str[9]+"\",\"shangxiapan\":\""+str[10]+"\",\"zongjinqiu\":\""+str[11]+"\",\"bifen\":\""+str[12]+"\",\"banquanchang\":\""+str[13]+"\",\"rangqiusp\":\""+str[14]+"\",\"shangxiapansp\":\""+str[15]+"\",\"zongjinqiusp\":\""+str[16]+"\",\"bifensp\":\""+str[17]+"\",\"banquanchangsp\":\""+str[18]+"\",\"color\":\""+str[19]+"\"}"+d+"");
	}
	out.print("]}");
	}catch(LotteryException e){
		
		out.print("{\"result\":\""+e.getMessage()+"\"}");
	}
%>