Current File : //home/obabain/public_html/abc/EmpMonthAttendenceview.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ include file="Connection.jsp" %>
    <%@include file="master.jsp" %>
    
    <%
    String mid=request.getParameter("mid");
    String emid=request.getParameter("emid");
    	Statement st=con.createStatement();
    
    %>
    <%!
 String clname=null;  %>
    <%
      ResultSet rsmat=st.executeQuery("select * from employee where emid="+emid+" ");
      while(rsmat.next())
      {
    	  
    	  clname=rsmat.getString("ename");
      }
      %>
<!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>

 <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">


</head>
<style>

table
{
border-collapse: ;
}
tr,td
{
border:1px solid #ccc;
 
text-align:center
}

#a1
{
border-left:1px solid #ccc;
height:10px
}
td
{

}

</style>

<body>
<script type="text/javascript">
$(document).ready(function() {
    $('#example').DataTable();
} );
</script>

<form>
<div class="col-md-9"  style="background-color:white;">
<div class="panel panel-default" >
       <div class="panel-heading main-color-bg">
        <h3 class="panel-title">Employee View</h3>
<!--          <a href="SupplierAp.jsp" class="btn btn-danger" style="color:white;margin-top:-22px;margin-left:110px; ">Approved List</a>    
 -->        
           
              </div>
                <div style="margin-top:-22px;" class="pull-right">
<!--       <a href="supplierRA.jsp" class="btn btn-danger" style="color:white;margin-top:-22px; ">Suppliers Rating List</a>    
 -->           
      <a class="btn btn-danger" style="margin-top:-20px;" href="EmpMonthAttendence.jsp">Employee Selection</a>
   </div>
        
             </div>
            
<!-- <div class="headerbar-item pull-right"  style="margin-top:10px;"><a class="btn btn-primary" style="background:#204b58"  onclick="goBack()">Back</a>
<a class="btn btn-primary" style="background:#204b58" href="supplier.jsp">New</a>
</div> -->
<div>
  <center>  <h3> Employee  Name:<%=clname%></h3></center> 
<table   id="example"  class="table table-striped table-bordered"   >
<thead>
<tr>
<th class="code">Sl.No</th>
<th>Edit</th>
<th>Delete</th>

<th class="Sname">Date</th>
<th class="person">Shift</th>

<th class="phone">Attendence</th>

 <th class="email">OT Hrs</th> 
<th class="address">OT Rate</th>
<th class="address">OT Amount</th> 


</tr>
</thead>
 <tbody>  	
<%
ResultSet rs=null;
int i=0;

rs=st.executeQuery("select * from  attendence  where monthid="+mid+" and enameid="+emid+"");


while(rs.next())  
{
	
	
	i+=1;
    		 %>
 
<tr>
<td><%=i %></td>
 <td> <a href="EmpEditAttendence.jsp?Id=<%=rs.getString("aid")%>" title="Edit">

 <span class="glyphicon glyphicon-pencil"></span></a></td>
  <td>
  <a  title="Delete" href="EmpDeleteAttendence.jsp?Id=<%=rs.getString("aid")%>" onclick = "if (! confirm('Continue?')) { return false; }">
 <span class="glyphicon glyphicon-remove"></span>
</a>               
  </td>               
                
             




<td> <%=rs.getString("date")%> </td>
  <td> <%=rs.getString("shift")%> </td>

<td><%=rs.getString("attendence")%></td>
<td> <%=rs.getString("othrs")%> </td>
  

<td>  <%=rs.getString("otrate")%>  </td>

<td><%=rs.getString("otamt")%></td>
</tr>



<%} %>


</tbody>
</table>

</div>
</div>
</div>
</div>

</form>
<script type="text/javascript">
function goBack() {
    window.history.back();
   
};
</script>
</body>
<%-- <%@include file="footer.jsp" %> --%>
</html>