<%@ page language="java" import="java.util.*,com.letousky.lottery.action.MemberCenter,com.letousky.exception.LotteryException" pageEncoding="UTF-8"%>
<%
	
	String[] params = new String[5];
	params[0]=request.getParameter("userNickName");
	params[1]=request.getParameter("gameCode");
	params[2]=request.getParameter("status");
	params[3]=request.getParameter("pages");
	params[4]=request.getParameter("every");
	
	try{
	List list=new MemberCenter().tarySelectSingle(params);
	
	String[] str=null;
	String d=",";
	Object[] objs=list.toArray();
	List items=(List)objs[0];
	String[] recod=(String[])objs[1];
	Object[] obj=items.toArray();
	
	out.print("{\"result\":\"0000\",\"record\":\""+recod[0]+"\",\"items\":[");
	for(int i=0;i<obj.length;i++){
		
		str=(String[])obj[i];
		if(i==(obj.length-1)){ d=""; }
		out.print("{\"autoHmId\":"+str[0]+",\"lotName\":\""+str[1]+"\",\"startUserNickName\":\""+str[2]+"\",\"canYuUserNickName\":\""+str[3]+"\",\"orderBets\":\""+str[4]+"\",\"orderStatus\":\""+str[5]+"\"}"+d+"");
	}
	out.print("]}");
	
	}catch(LotteryException e){
	
		out.print("{\"result\":\""+e.getMessage()+"\"}");
	}
%>