<%@ page language="java" import="com.anylotto.client.MD5Util,java.util.*,com.letousky.lottery.delegate.WinsFlat,com.letousky.exception.LotteryException" pageEncoding="UTF-8"%>
<%
	String[] params=new String[5];
	params[2]=request.getParameter("gameid");  //玩法类型
	params[3]=request.getParameter("Trading"); //交易号
	params[4]=request.getParameter("copies");  //参与份数
	
	try{
		List list=new WinsFlat().chipped_in(request,response,params);
		Object[] obj=list.toArray();
		String[] sn = (String[])obj[1];
		String key  = MD5Util.md5Hex("JINGCAILE"+sn[2]+sn[0]+sn[1]+"10");
		out.print("{\"result\":\"0000\",\"price\":\""+sn[0]+"\",\"uid\":\""+sn[1]+"\",\"serialno\":\""+sn[2]+"\",\"key\":\""+key+"\"}");
	}catch(LotteryException e){
		
		//out.print("{\"result\":\"1111\"}");
		System.out.println("--------------result"+e.getErrNo());
		out.print("{\"result\":\""+e.getErrNo()+"\"}");
	}
%>