forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodify_mend.jsp
More file actions
27 lines (27 loc) · 1.26 KB
/
modify_mend.jsp
File metadata and controls
27 lines (27 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="com.model.Mend" %>
<%@ 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,"mid");
BasetableFactory bf=BasetableFactory.getInstance();
if(action==null||"".equals(action)){
return;
}else if("del".equals(action)&&bf.DeleteMend(request,"WHERE mid="+lid)){
response.sendRedirect("manage_mend.jsp");
}else if("modify".equals(action)){
Mend l=bf.SearchMend("WHERE mid="+lid);
l.setName(ParamUtils.getRequestString(request,"name"));
l.setResume(ParamUtils.getRequestString(request,"resume"));
l.setSid(ParamUtils.getIntParameter(request,"sid"));
l.setState(ParamUtils.getIntParameter(request,"state"));
l.setCommend(ParamUtils.getIntParameter(request,"commend"));
l.setFilesize(ParamUtils.getIntParameter(request,"filesize"));
response.sendRedirect("manage_mend.jsp");
}else{ session.setAttribute("error","ÔÚ¹¤¾ßÈí¼þÖвÙ×÷ʧ°Ü");
response.sendRedirect("error.jsp");
}
%>