-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin_group_subject_add.jsp
78 lines (73 loc) · 2.62 KB
/
admin_group_subject_add.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<%@page import="db.tables.Subject_Settings"%>
<%@page import="db.tables.Group_Settings"%>
<%@page import="util.Variables"%>
<%@page import="java.util.ArrayList"%>
<%@page import="db.DBProcess"%>
<!DOCTYPE html>
<%
Object obj= session.getAttribute("al");
if(obj==null)response.sendRedirect("admin_login.jsp");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Add Subject </title>
</head>
<!--
//2. subject_settings - id,s_name,s_descp
-->
<body>
<center>
<h1 ><font color="#366092"><%=Variables.prjName%></font></h1>
<%@include file="admin_menu.jsp" %>
<h2 ><font color="#366092">Add Subject</font></h2>
<%
int id = Integer.parseInt(request.getParameter("id") + "");
DBProcess dbp = new DBProcess();
dbp.open();
Group_Settings gs = dbp.select_group_settings(id);
dbp.close();
dbp.open();
ArrayList<Subject_Settings> ssList = dbp.selectAll_subject_settings();
dbp.close();
//4. group_subject_map - id,group_id,subject_id,is_elective
%>
<form name="frm" action="admin_group_subject_add_action.jsp" method="post">
<table>
<tr>
<td>Course Name </td>
<td><%=gs.g_name%> <input type="hidden" name="group_id" value="<%=id%>"> </td>
</tr>
<tr>
<td> Subjects </td>
<td>
<select name="subject_id">
<%
for(Subject_Settings ss : ssList){
%>
<option value="<%=ss.id%>"><%=ss.s_name%></option>
<% }%>
</select>
</td>
</tr>
<tr>
<td> Elective </td>
<td>
<select name="is_elective">
<option value="0">No</option>
<option value="1">Yes</option>
</select>
</td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" name="s1" value="Add">
<input type="reset" name="r1" value="Reset">
</td>
</tr>
</table>
</form>
<center>
</body>
</html>