<%@page contentType="text/html; charset=UTF-8"%>
<%@include file="/inc/init.jsp"%>
<%
response.setHeader("Cache-Control", "no-cache"); //HTTP   1.1   
response.setHeader("Pragma", "no-cache"); //HTTP   1.0   
response.setDateHeader("Expires", 0);

String action=pu.getString("action");
String ip=pu.getIpAddr();
if(action.equals("add")){
	int orderid=0;
	int classid=0;
	Order_from_db ofdb=new Order_from_db();
	String url=pu.getString("referrer");
	String type="1";  //默认QQ
	if(!DOCUtil.isFine(ofdb.getOneByIP(ip))){
		ofdb.insert(classid,orderid,"",type,new DateUtil().getCurTime(),url,ip,"","","","");
	}
	return;
}else if(action.equals("getip")){
		out.print(ip);
		return;
}else{
	out.print(GetFrom.getIP());
}
%>