-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathadmin_update.jsp
62 lines (43 loc) · 1.38 KB
/
admin_update.jsp
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<%@page import="oaapDao.oaapAdminDao" %>
<html>
<body>
<%
oaapAdminDao oad=new oaapAdminDao();
String subject=request.getParameter("subject");
String difficulty=request.getParameter("difficulty");
int new_sno=Integer.parseInt(request.getParameter("new_sno"));
int old_sno=Integer.parseInt(request.getParameter("old_sno"));
String question=request.getParameter("question");
String answer=request.getParameter("answer");
String a=request.getParameter("A");
String b=request.getParameter("B");
String c=request.getParameter("C");
String d=request.getParameter("D");
System.out.println("question"+question);
System.out.println("old_sno"+old_sno);
System.out.println("new"+new_sno);
System.out.println("answer"+answer);
System.out.println("1"+a);
System.out.println("1"+b);
System.out.println("1"+c);
System.out.println("1"+d);
try
{
int status=oad.oaapQuestionUpdate(subject,difficulty,old_sno,new_sno,question,answer,a,b,c,d);
if(status>0){
out.print("<h1>Successful</h1>");
RequestDispatcher rd1=request.getRequestDispatcher("admin_panel_update.jsp");
rd1.forward(request,response);
}
else{
out.print("<h1>Failed</h1>");
RequestDispatcher rd1=request.getRequestDispatcher("admin_panel_update.jsp");
rd1.forward(request,response);
}
}
catch(Exception e){
System.out.print(e);
}
%>
</body>
</html>