addtopictodbwe.jsp

来自「这是论坛原代码,希望大家能好好看看,说明需要的太多了吧」· JSP 代码 · 共 40 行

JSP
40
字号
<%@ page contentType="text/html;charset=utf-8"
import = "java.io.File"
import = "cn.js.fan.web.SkinUtil"
import = "cn.js.fan.util.ErrMsgException"
import = "com.redmoon.forum.MsgMgr"
import = "java.util.Calendar"
%><jsp:useBean id="form" scope="page" class="cn.js.fan.security.Form" /><%
boolean isSuccess = false;
String privurl = "";
String boardcode = "";

boolean cansubmit = false;
com.redmoon.forum.Config cfg = new com.redmoon.forum.Config();
int interval = cfg.getIntProperty("forum.addMsgInterval");
int maxtimespan = interval;
try {
	cansubmit = form.cansubmit(request, "addtopic", maxtimespan);// 防止重复刷新	
}
catch (ErrMsgException e) {
	out.println(e.getMessage());
	return;
}

if (cansubmit) {
	MsgMgr Topic = new MsgMgr();
	try {
		isSuccess = Topic.AddNewWE(application, request);
		//privurl = Topic.getprivurl();
		//boardcode = Topic.getCurBoardCode();
	}
	catch (ErrMsgException e) {
		out.print("-" + SkinUtil.LoadString(request, "info_op_fail") + e.getMessage());
	}
	if (isSuccess) {
		out.print("+" + SkinUtil.LoadString(request, "info_op_success"));
	}
}
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?