⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 forbidcontroller.java

📁 目前系统具有功能如下: 用户注册 修改信息 自定义图像 用户升级 锁定用户 用户发帖 论坛好友 论坛版主 用户列表 建立用户组 用户等级定义 在线用户查看 论坛财富分配 用
💻 JAVA
字号:
package com.yhbbs.admin.web.sys;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import com.yhbbs.bbs.biz.BbsPropBiz;
import com.yhbbs.utils.ReqUtils;
/**
 * <p>Title:注册管理Controller</p>
 * <li>	保留用户名和e_mail设置
 * <li>	禁止注册和访问IP或IP段
 * <li>	0:用户 1:mail 2:ip 3:regip
 * <br><b>WebSite: www.yyhweb.com</b>
 * <br><b>CopyRight: yyhweb[由由华网]</b>
 * @author stephen
 * @version YHBBS-2.0
 */
public class ForbidController implements Controller{

	public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
		
		Map<String, Object> model = new HashMap<String, Object>();
		int option = ReqUtils.getInt(request, "type");
		String action = ReqUtils.getString(request, "action");
		if(option==0 || option==1 ||option==2 || option==3){
			if("post".equals(action)){
				String content = ReqUtils.getString(request, "content");
				if(BbsPropBiz.updateForbid(option, content)){
					model.put("okinfo", "此次设置");
					model.put("forward", "<a href='../admin/index.do'>管理首页</a>");
					return new ModelAndView("success",model);
				}else{
					model.put("errinfo", "当前操作");
					model.put("forward", "<a href='#' onclick='javascript:history.go(-1)'>返回</a>");
					return new ModelAndView("failure",model);
				}
			}
			String ctStr = BbsPropBiz.getForbid(option);
			model.put("type", option);
			model.put("content", ctStr);
			return new ModelAndView("forbid",model);
		}else{
			model.put("errinfo", "当前操作");
			model.put("forward", "<a href='../admin/index.do'>管理首页</a>");
			return new ModelAndView("failure",model);
		}
	}
}

⌨️ 快捷键说明

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