forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodify_guestboard.jsp
More file actions
18 lines (18 loc) · 983 Bytes
/
modify_guestboard.jsp
File metadata and controls
18 lines (18 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="com.model.Guestboard" %>
<%@ 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,"gid");
BasetableFactory bf=BasetableFactory.getInstance();
if(action==null||"".equals(action)){ return;
}else if("del".equals(action)&&bf.DeleteGuestboard("WHERE gid="+lid)){
response.sendRedirect("manage_guestboard.jsp");
}else if("add".equals(action)){ Guestboard b=bf.SearchGuestboard("WHERE gid="+lid);
b.setRecontent(ParamUtils.getRequestString(request,"recontent"));
response.sendRedirect("manage_guestboard.jsp");
}else{ session.setAttribute("error","ÔÚÁôÑÔ²¾ÖвÙ×÷ʧ°Ü"); response.sendRedirect("error.jsp");}
%>