<%@ page language="java" import="java.util.*,com.letousky.lottery.action.UserRegisteredAction,com.letousky.lottery.delegate.WinsFlat,com.letousky.exception.LotteryException" pageEncoding="UTF-8"%>
<%@page import="com.letousky.lottery.util.HttpClientUtil"%>
<%
		String loginName=java.net.URLDecoder.decode(request.getParameter("uName"));
		String password=request.getParameter("pwd");
		String nickName=java.net.URLDecoder.decode(request.getParameter("uName"));
		String cardAccount="";
		String bank="";
		String bankAccountName="";
		String UserSex="";
		String UserBirth="";
		String IDCardType="";
		String IDCardNumber="";
		String UserTel="";
		String UserMob="";
		String UserEmail="";
		String UserAddress="";
		String PostCode="";
		String PasswordQuestion1="";
		String PasswordAnswer1="";
		String PasswordQuestion2="";
		String PasswordAnswer2="";
		String info="";
		String[] logins=new String[21];
		logins[0]=loginName;
		logins[1]=password;
		logins[2]=nickName;
		logins[3]=cardAccount;
		logins[4]=bank;
		logins[5]=bankAccountName;
		logins[6]=UserSex;
		logins[7]=UserBirth;
		logins[8]=IDCardType;
		logins[9]=IDCardNumber;
		logins[10]=UserTel;
		logins[11]=UserMob;
		logins[12]=UserEmail;
		logins[13]=UserAddress;
		logins[14]=PostCode;
		logins[15]=PasswordQuestion1;
		logins[16]=PasswordAnswer1;
		logins[17]=PasswordQuestion2;
		logins[18]=PasswordAnswer2;
		logins[19]=info;
		String str=new UserRegisteredAction().register(logins,request);
		if(str.equals("0")){
			new WinsFlat().newLogin(request,response,new String[]{request.getParameter("uName"),request.getParameter("pwd"),"sl","1234"});
		}
		out.print("{\"items\":[");
		out.print("{\"strs\":\""+str+"\"}");
		out.print("]}");
%>