forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodify_question.jsp
More file actions
14 lines (14 loc) · 865 Bytes
/
modify_question.jsp
File metadata and controls
14 lines (14 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="com.model.Question"%>
<%@ page import="com.core.*" %>
<link href="../css/admin.css" rel="stylesheet" type="text/css">
<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;
session.removeAttribute("error");String action =request.getParameter("action").toString();
int lid=ParamUtils.getIntParameter(request,"qid");
BasetableFactory bf=BasetableFactory.getInstance();
if(action==null||"".equals(action)){ return;
}else if("add".equals(action)&&bf.CreateQuestion(request)){ response.sendRedirect("manage_question.jsp");
}else if("del".equals(action)&&bf.DeleteQuestion("WHERE qid="+lid)){
response.sendRedirect("manage_question.jsp");
}else { session.setAttribute("error","ÔÚ³£¼ûÎÊÌâÖвÙ×÷ʧ°Ü"); response.sendRedirect("error.jsp");}
%>