-
Notifications
You must be signed in to change notification settings - Fork 1
/
-brijco2sp.jsp
294 lines (254 loc) · 7.18 KB
/
-brijco2sp.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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<!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/office.js" >
</script>
<body >
<%@ page language="java" session="true" import="java.sql.*" %>
<--jsp:useBean class="connection.Conn" id="con" scope="session"/-->
<%
String branch="cs";
// Statement stmt=con.getcon();
// out.println("--------");
String b=null;
//out.println("----viewfaculty.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";
//String query="select name,roll from csjan where sec='a1' and sem='6'";
//System.out.println("--->query-->"+query);
//ResultSet rs=stmt.executeQuery(query); %>
<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="" class="two" id="<% out.println(""+branch+""); %>" onClick=" return bak(this.id);" >Back</a></layer></li>
<li><a href="contact.html" class="two">Contact us</a></li>
</ul>
</div>
</div>
<div id="main-inner">
<div class="clear"></div>
<div align="center"><% out.println("<p><font color='#990000' size='3px'><b><u>THIRD YEAR COORDINATOR</u></b></font></p>"); %></div>
<div align="center">
<table border=2 bordercolor="#990000" bgcolor='#D8D8DA'>
<tr><td><font color="#990000" size="3px"><b>SUBJECT</b></font> </td> <td><font color="#990000" size="3px"><b>ABSENT DATE</b></font> </td><td><font color="#990000" size="3px"><b>FINE</b></font> </td><td><font color="#990000" size="3px"><b>STATUS</b></font> </td></tr>
<form action="-brijco5.jsp">
<%
java.util.Date now = new java.util.Date();
String date="1";
int f=31,u[];
u=new int[41];
HttpSession ses=request.getSession(true);
String day=""+now.getDay()+"";
String sem=(String)ses.getAttribute("sem");
// String sem="6";
String sec=(String)ses.getAttribute("sec");
//String sec="A1";
//String branch=(String)ses.getAttribute("branch");
//String branch="CS";
String roll=request.getParameter("stu");
//String roll="19";
ses.setAttribute("roll",roll);
ses.setAttribute("sem",sem);
ses.setAttribute("branch",branch);
ses.setAttribute("sec",sec);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:attendance");
PreparedStatement pstmt,pstmtq,pstmt1,pstmt2,pstmtw;
String que = "select * from cs6a2";
pstmt1 = con.prepareStatement(que);
ResultSet rs1 = pstmt1.executeQuery();
String pr="";
int ft=0;
%></table>
<br/><br/><table border=2 bordercolor="#990000" bgcolor='#D8D8DA'>
<%while (rs1.next()) {
pr = rs1.getString("pri");
String sub=rs1.getString("subject");
int fal=0,fi=0,fo=0;
%>
<tr><td> <%
out.println(sub);
%>
</td>
<td>
<%int p=Integer.parseInt(pr);
String motab="csjan";
if(branch.equals("CS"))
{
motab="csjan";
}
else if(branch.equals("ME"))
{
motab="mejan";
}
if(branch.equals("EC"))
{
motab="ecjan";
}
if(branch.equals("EI"))
{
motab="eijan";
}
if(branch.equals("EE"))
{
motab="eejan";
}
String qu ="select * from "+ motab +" where sem=? and sec=? and roll=?";
pstmt=con.prepareStatement(qu);
sem="6";
sec="a1";
pstmt.setString(1,sem);
pstmt.setString(2,sec);
pstmt.setString(3,roll);
ResultSet rs=pstmt.executeQuery();
int q=0;
String s="";
String upd="" ;
String updee="";
StringBuffer sb=new StringBuffer("");
int d= 42,i=0,k,n=0,e=0,z=0,a=0;
int fine=0;
double per,y;
String op []=new String[d];
while(rs.next())
{
fine=0;
for(i=0;i<f;i++)
{
op[i]=rs.getString(date);
k=Integer.parseInt(date);
k++;
char r=op[i].charAt(p-1);
z=k-1;
if((r=='0')||(r=='e'))
{
if(r=='0')
{
u[z]=u[z]+1;
n++;
fine= n*50;
if(u[z]<=3)
{
a++;
fo= a*50;
}
}
if(fal==1)
{ %>
<br>
<%} out.println("<b>absent date is"+z );
if(r=='0')
{%><input type="checkbox" name=<%out.println(pr + "w" + z);%> value="checkbox">
<%
}
fal=1;
}else if(r=='1')
{
e++;
}
date=""+k+"";
}
%>
</td><td>
<%
fi=fi+fine;
ft=ft+fo;
out.println("Fine is"+fine);
%>
</td>
<% date = "1";
//out.println("Roll number-->>"+roll);
%>
<td>
<%
if(e==0)
{
out.println(" HAS NOT ATTENDED ANY CLASS");
}
else if(e!=0)
{
int g =e+n;
per =(e*100)/g;
out.println("HIS ATTENDANCE IS=="+per+"%");
}
%>
</td></tr>
<%
e=0;
n=0;
}
}
%></table>
<br><br><br><br><br><br>
<%out.println("TOTAL FINE IS=<font color=#990000 size=3px><b>"+ft+"/-Rs.</font>");
%><input type= submit value=submit style='border:groove 2pt black;background:darkred;color:wheat;font-weight:bold'>
</form>
</html>
<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>