-
Notifications
You must be signed in to change notification settings - Fork 1
/
delsub.jsp
154 lines (126 loc) · 5.17 KB
/
delsub.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Home</title>
<meta name="keywords" content="keyword1, keyword2, keyword3, etc..." />
<meta name="description" content="Description of website here..." />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<!--[if IE ]>
<link href="css/ie.css" rel="stylesheet" type="text/css" />
<![endif]-->
<style type="text/css">
a.two:hover {font-size: 150%}
a.two:visited{color:#6F6F6F}
a.one:hover {font-size:150%}
a.one:visited{color:#464646}
<!--
.style3 {
color: #99bb00;
font-size: 16px;
font-weight: bold;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
.style6 {color: #464646}
.style1 {
color: #990000;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
font-size:14px;
}
.style2 {
color: #464646;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
-->
</style>
</head>
<script language="javascript" src="js/deletesub.js" >
</script>
<body >
<div id="main">
<div id="logo">
<img src="images/bg-logo.gif" alt="Your Business" width="254" height="42" border="0" align="left" />
<div id="navbar">
<ul>
<li><a href="index.htm" class="two">Home</a></li>
<li><a href="help.html" class="two">Help</a></li>
<li><layer name="kl" width="87" height="19" id="kl"><a href="office.jsp" class="two" id="FACULTY" onclick=" return STUDENT();" >Back</a></layer></li>
<li><a href="contact.html" class="two">Contact us</a></li>
</ul>
</div>
</div>
<div id="main-inner">
<%@ page language="java" session="true" import="java.sql.*" %>
<jsp:useBean class="connection.Conn" id="con" scope="session"/>
<%
//String p="viewsub.jsp";
//session.setAttribute("prev",p);
//System.out.println("------>VIEW SUBJECT--");
Statement stmt=con.getcon();
// out.println("--------");
String branch=session.getAttribute("branch").toString();
String b=null;
System.out.println("----delsub.jsp->"+branch);
if(branch.equals("COMPUTER SCIENCE"))
b="CS";
if(branch.equals("ELECTRONICS AND COMMUNICATION"))
b="EC";
if(branch.equals("ELECTRICAL SCIENCE"))
b="EE";
if(branch.equals("ELECTRONICS AND INSTRUMENTATION"))
b="EI";
if(branch.equals("MECHANICAL ENGINEERING"))
b="ME";
System.out.println("------->"+b);
String query="SELECT * FROM "+b+"SUBJECT" ;
System.out.println("--->query-->"+query);
ResultSet rs=stmt.executeQuery(query); %>
<div class="clear"></div>
<div align="center"><% out.println("<p><font color='#990000' size='3px'><b><u>REMOVE "+branch+" SUBJECTS</u></b></font></p>"); %></div>
<div align="center">
<form name="delsub" action="deletesubject.jsp" method="post">
<table width='340' height="35" border='0' align='center' bordercolor='#990000' bgcolor='#D8D8DA' cellpadding="3" cellspacing="5">
<tr ><td><div align="center"><font color="#990000" size="3px"><b><u>SUBJECT NAME</u></b></font></div></td> <td><div align="center"><font color="#990000" size="3px"><b><u>SUBJECT CODE</u></b></font></div></td> <td><div align="center"><font color="#990000" size="3px" ><b><u>SUBJECT ID</u></b></font></div></td> <td><div align="center"><font color="#990000" size="3px"><b><u>SELECT</u></b></font></div></td></tr>
</br>
</br>
</br>
<% while(rs.next())
{
String subname=rs.getString(1);
out.println("<tr id='select'><td><font color='#464646' size='2px'><div align='center'><strong>"+subname+"</strong></div></font></td>");
String subcode=rs.getString(2);
out.println("<td><font color='#464646' size='2px'><div align='center'><strong>"+subcode+"</strong></div></font></td>");
String subid=rs.getString(3);
out.println("<td><font color='#464646' size='2px'><div align='center'><strong>"+subid+"</strong></div></font></td>");
out.println("<td><font color='#464646' size='2px'><div align='center'><input type='radio' name='dsub' value='"+subid+"' id='"+subid+"' onFocus='return DELETE(this.id);' ></div></font></td><tr/>");
}
%>
</table>
<br/><br/>
<div id='del'></div>
</form>
<br/>
</div>
</div>
<div id="footer"> ©2009 Attendance Tracker <br />
<!-- This template is provided free of charge as long as you keep the link to http://www.finerdesign.com -->
<a href="index.hot.htm" style="text-decoration:none;">Home</a> |
<a href="legal.htm" style="text-decoration:none;"> Legal </a>|
<a href="Privecy_p.htm" style="text-decoration:none;">Privacy Policy </a>|
<a href="terms.htm" style="text-decoration:none;">Terms Of Services </a></div>
</div>
</body>
</html>