Current File : //home/obabain/public_html/abc/EmpAttendenceView.jsp |
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ include file="Connection.jsp" %>
<%@include file="master.jsp" %>
<% String eid=request.getParameter("eid");
System.out.println("eid is...."+eid);
String mid=request.getParameter("mid");
System.out.println("mid is...."+mid);
String pid=request.getParameter("Id");
System.out.println("pid is...."+pid);
Statement st=con.createStatement();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<style>
.scrollmenu {
overflow: auto;
white-space: nowrap;
}
</style>
<script src='https://code.jquery.com/jquery-3.3.1.js'></script>
<script src='https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js'></script>
<script src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap4.min.js" charset="utf-8">
</script>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.5.6/css/buttons.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/select/1.3.0/css/select.dataTables.min.css">
<script src='https://code.jquery.com/jquery-3.3.1.js'></script>
<script src='https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js'></script>
<script src='https://cdn.datatables.net/buttons/1.5.6/js/dataTables.buttons.min.js'></script>
<script src='https://cdn.datatables.net/buttons/1.5.6/js/buttons.flash.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js'></script>
<script src='https://cdn.datatables.net/buttons/1.5.6/js/buttons.html5.min.js'></script>
<script src='https://cdn.datatables.net/buttons/1.5.6/js/buttons.print.min.js'></script>
<script src='https://cdn.datatables.net/select/1.3.0/js/dataTables.select.min.js'></script>
<script >
$(document).ready(function() {
$('#someTable').DataTable( {
dom: 'Bfrtip',
buttons: [
'copy',
'csv',
'excel',
'pdf',
{
extend: 'print',
text: 'Print all (not just selected)',
exportOptions: {
modifier: {
selected: null
}
}
}
],
select: true
} );
} );
</script>
<script>
$(function () {
var $chk = $("#grpChkBox input:checkbox");
var $tbl = $("#someTable");
var $tblhead = $("#someTable th");
$chk.prop('checked', true);
$chk.click(function () {
var colToHide = $tblhead.filter("." + $(this).attr("name"));
var index = $(colToHide).index();
$tbl.find('tr :nth-child(' + (index + 1) + ')').toggle();
});
});
</script>
</head>
<body>
<!-- <script type="text/javascript">
$(document).ready(function() {
$('#example').DataTable();
} );
</script> -->
<form>
<div class="content">
<div class="row">
<div class="col-md-9" style="background-color:white;">
<div class="panel panel-default" >
<div class="panel-heading main-color-bg" style="background: linear-gradient(55deg, #0fb8ad 0%, #1fc8db 40%, #2cb5e8 85%);">
<h3 class="panel-title"><a href="viewproduct_2.jsp">
<span class="glyphicon glyphicon-th"></span>
</a> Employee Attendence View</h3>
<div class="headerbar-item pull-right" style="margin-top:-23px;">
<a href="EmpAttendence.jsp" class="btn btn-danger" style="width:200px;">Attendence Creation</a>
<a style="background:#204b58" class="btn btn-info" onclick="goBack()">Back</a>
</div>
</div>
</div>
<div style="overflow-x:auto;width:100%;">
<table id="someTable" class="table table-striped table-bordered">
<thead>
<tr>
<th>Employee Name</th>
<th>No. Of Days Present</th>
<th>OT Hours</th>
<th>OT rate</th>
<th>OT amount</th>
</tr>
</thead>
<tbody>
<%
try{
ResultSet rs=null;
int l=0;
rs=st.executeQuery("select ename,sum(attendence)wk,sum(othrs)ot,sum(otrate)otr,sum(otamt)otamt1 from attendence where monthid="+mid+" and enameid="+eid+"");
while(rs.next())
{
%>
<tr>
<td><%=rs.getString("ename") %></td>
<td><%=rs.getString("wk") %></td>
<td><%=rs.getString("ot") %></td>
<td><%=rs.getString("otr") %></td>
<td><%=rs.getString("otamt1") %></td>
<% }
}
catch(Exception el){}
%>
</tr>
</tbody>
</table>
</div>
</div>
</div></div>
<%@include file="footer.jsp" %>
</form>
<script type="text/javascript">
function goBack() {window.history.back();};
</script>
</body>
</html>