-
Notifications
You must be signed in to change notification settings - Fork 1
/
courses.jsp
94 lines (82 loc) · 3.53 KB
/
courses.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<%@page import="java.util.ArrayList"%>
<jsp:useBean id="pDAO" class="myPackage.DatabaseClass" scope="page"/>
<!-- SIDEBAR -->
<div class="sidebar" style="background-image: url(sidebar-1.jpg)">
<div class="sidebar-background" >
<h2 class="logo-text">
The Book Of IPL
</h2>
<div class="left-menu">
<a href="adm-page.jsp?pgprt=0"><h2>Profile</h2></a>
<a class="active" href="adm-page.jsp?pgprt=2"><h2>Courses</h2></a>
<a href="adm-page.jsp?pgprt=3"><h2>Questions</h2></a>
<a href="adm-page.jsp?pgprt=1"><h2>Accounts</h2></a>
</div>
</div>
</div>
<!-- CONTENT AREA -->
<div class="content-area">
<div class="panel" style="max-width: 420px;float:right">
<div class="title">
All Courses
</div>
<table id="one-column-emphasis" style="min-width: 400px;margin: 5px; margin-top: 35px" >
<colgroup>
<col class="oce-first" />
</colgroup>
<thead>
<tr>
<th scope="col">Courses</th>
<th scope="col">T.Marks</th>
<th scope="col">Action</th>
</tr>
</thead>
<%
ArrayList list=pDAO.getAllCourses();
for(int i=0;i<list.size();i=i+2){
%>
<tr>
<td><%=list.get(i)%></td>
<td><%=list.get(i+1)%></td>
<td ><a href="controller.jsp?page=courses&operation=del&cname=<%=list.get(i)%>"
onclick="return confirm('Are you sure you want to delete this ?');" class="del">
<div class="delete-btn" style="max-width: 40px;font-size: 17px; padding: 3px">X</div>
</a></td>
</tr>
<%
}
%>
</table>
</div>
<div class="panel form-style-6" style="max-width: 450px" >
<div class="title">
Add New Course
</div>
<center>
<form action="controller.jsp" >
<br>
<table >
<tr>
<td><label>Course Name</label></td>
<td> <input type="text" name="coursename" class="text" placeholder="Course Name" style="width: 230px;"></td>
</tr>
<tr>
<td><label>Total Marks</label></td>
<td><input type="text" name="totalmarks" class="text" placeholder="Total Marks" style="width: 230px;" ></td>
</tr>
<tr>
<td><label>Exam Time</label></td>
<td>
<input type="text" name="time" class="text" placeholder="MM" style="width: 230px;" >
</td>
</tr>
<tr>
<td colspan="2"><input type="hidden" name="page" value="courses">
<input type="hidden" name="operation" value="addnew">
<center><input type="submit" class="form-button" value="Add" name="submit"></center></td>
</tr>
</table>
</form>
</center>
</div>
</div>