forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodify_new.jsp
More file actions
17 lines (17 loc) · 846 Bytes
/
modify_new.jsp
File metadata and controls
17 lines (17 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="com.model.New" %>
<%@ 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 nid=ParamUtils.getIntParameter(request,"nid");
BasetableFactory bf=BasetableFactory.getInstance();
if(action==null||"".equals(action)){ return;}else if("add".equals(action)&&bf.CreateNew(request)){
response.sendRedirect("manage_new.jsp");
}else if("del".equals(action)&&bf.DeleteNew("WHERE nid="+nid)){
response.sendRedirect("manage_new.jsp");
}else{ session.setAttribute("error","ÔÚ¹«¸æÐÅÏ¢ÖвÙ×÷ʧ°Ü");
response.sendRedirect("error.jsp");
}
%>