<%@ 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[21];

params[0]=null;
params[1]=null;
params[2]=request.getParameter("gameCode"); 					//玩法类型
params[3]=request.getParameter("issue");						//期号
params[4]=request.getParameter("manner");   					//投注方式
params[5]=request.getParameter("title"); 						//标题
params[6]=request.getParameter("description");					//描述
params[7]=request.getParameter("isopen"); 						//是否公开
params[8]=request.getParameter("openusers"); 					//面向全部网友
params[9]=request.getParameter("isUpload"); 					//是否上传
params[10]=request.getParameter("payofftc");  					//提成比例
params[11]=request.getParameter("money"); 						//投注总金额
params[12]=request.getParameter("multiple");  					//倍数
params[13]=request.getParameter("copies");						//总份数
params[14]=request.getParameter("copies1");      				//认购份数
params[15]=request.getParameter("eachPrice");					//每份单价
params[16]=request.getParameter("ensure");						//保底份数
params[17]=request.getParameter("chipinNums");					//投注号码
params[18]=request.getParameter("hmfaType");  					//代购1,合买2
params[19]=request.getParameter("spValue");   					//SP值
params[20]=request.getParameter("moneyFw"); 					//奖金范围


try{
	List list=new WinsFlat().betting(request,response,params);
	Object[] obj=list.toArray();
	String[] sn = (String[])obj[1];
	String[] bts = (String[])obj[0];
	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+"\",\"serialno\":\""+bts[0]+"\"}");
}catch(LotteryException e){
	
	out.print("{\"result\":\""+e.getMessage()+"\"}");
}

%>