<%@page contentType="text/html; charset=UTF-8"%>
<%@include file="/inc/init.jsp"%>
<%@include file="/inc/checklogin.jsp"%>
<%
	
	Config siteconfig=new Config();
	String action=pu.getString("action");
	String domain = pu.getString("domain");
	String topdomain = pu.getString("topdomain");
	String sitename=pu.getString("sitename");
	String vcode=pu.getString("vcode");
	String outemail=pu.getString("outemail");
	String emailpassword=pu.getString("emailpassword");
	String inemail=pu.getString("inemail");
	String usesms=pu.getString("usesms","0");
	String smsuserid=pu.getString("smsuserid");
	String smsaccount=pu.getString("smsaccount");
	String smspassword=pu.getString("smspassword");
	//String alipayurl=pu.getString("alipayurl");
	String noticephone=pu.getString("noticephone");
	String usedel=pu.getString("usedel");
	String ipcount=pu.getString("ipcount","5");
	String unicode=pu.getString("unicode");
	if (action.equals("edit")) {
		//siteconfig.set("domain",domain);
		siteconfig.set("topdomain",topdomain);
		siteconfig.set("sitename",sitename);
		siteconfig.set("vcode",vcode);
		siteconfig.set("outemail",outemail);
		siteconfig.set("emailpassword",emailpassword);
		siteconfig.set("inemail",inemail);
		siteconfig.set("noticephone",noticephone);
		siteconfig.set("usesms",usesms);
		siteconfig.set("smsuserid",smsuserid);
		siteconfig.set("smsaccount",smsaccount);
		siteconfig.set("smspassword",smspassword);
		//siteconfig.set("alipayurl",alipayurl);
		siteconfig.set("usedel",usedel);
		siteconfig.set("ipcount",ipcount);
		siteconfig.set("unicode",unicode);
		//重初始化
		ConfigUtil.init();
		pu.init(true);
		session.setAttribute("msg", "网站配置更新成功！");
		response.sendRedirect("../siteConfig.jsp");
		return;
	}else if (action.equals("init")) {
		//重初始化
		ConfigUtil.init();
		pu.init(true);
		session.setAttribute("msg", "网站配置更新成功！");
		response.sendRedirect("../siteConfig.jsp");
	}
%>