1 23 27 package org.jresearch.gossip.actions.admin.topic; 28 29 import java.sql.SQLException ; 30 31 import javax.servlet.http.HttpServletRequest ; 32 import javax.servlet.http.HttpServletResponse ; 33 import javax.servlet.http.HttpSession ; 34 35 import org.apache.struts.action.ActionForm; 36 import org.apache.struts.action.ActionForward; 37 import org.apache.struts.action.ActionMapping; 38 import org.jresearch.gossip.IConst; 39 import org.jresearch.gossip.actions.BaseAction; 40 import org.jresearch.gossip.beans.user.User; 41 import org.jresearch.gossip.dao.ForumDAO; 42 import org.jresearch.gossip.exception.SystemException; 43 import org.jresearch.gossip.forms.ProcessTopicForm; 44 45 50 public class UnAnnounceAction extends BaseAction { 51 65 public ActionForward process(ActionMapping mapping, ActionForm form, 66 HttpServletRequest request, HttpServletResponse response) 67 throws SystemException { 68 HttpSession session = request.getSession(); 69 User user = (User) session.getAttribute(IConst.SESSION.USER_KEY); 70 ProcessTopicForm ptForm = (ProcessTopicForm) form; 71 ForumDAO dao = ForumDAO.getInstance(); 72 try { 73 if (!dao.checkMod(Integer.parseInt(ptForm.getFid()), user)) { 74 return (mapping.findForward(IConst.TOKEN.DENIED)); 75 } 76 77 dao.setThreadSortBy(ptForm.getTid(), 9); 78 log(request, "logs.LOG21", ptForm.getTid()); 79 } catch (SQLException sqle) { 80 getServlet().log("Connection.process", sqle); 81 throw new SystemException(sqle); 82 } 83 return (new ActionForward("/ShowForum.do?fid=" + ptForm.getFid(), true)); 84 } 85 } | Popular Tags |