forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodify_affiche.jsp
More file actions
21 lines (21 loc) · 1.12 KB
/
modify_affiche.jsp
File metadata and controls
21 lines (21 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="com.model.Affiche" %>
<%@ 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 aid=ParamUtils.getIntParameter(request,"aid");
BasetableFactory bf=BasetableFactory.getInstance();
if(action==null||"".equals(action)){
return;}else if("add".equals(action)&&bf.CreateAffiche(request)){
response.sendRedirect("manage_affiche.jsp");
}else if("del".equals(action)&&bf.DeleteAffiche("WHERE aid="+aid)){
response.sendRedirect("manage_affiche.jsp");}else if("modify".equals(action)){
Affiche a=bf.SearchAffiche("WHERE aid="+aid); a.setTitle(ParamUtils.getRequestString(request,"title"));
a.setContent(ParamUtils.getRequestString(request,"content"));
response.sendRedirect("manage_affiche.jsp");
}else{ session.setAttribute("error","ÔÚ¹«¸æÐÅÏ¢ÖвÙ×÷ʧ°Ü");
response.sendRedirect("error.jsp");
}
%>