<?php
include('../common/db_connection.php');
$Mainclass=new DB_Controller();
$Mainclass->Employee_COOKIE_Check();
$check_attendance=$Mainclass->Num_rows_Check('attendance_master','Attendance_Date',date('Y-m-d'));
if($check_attendance=="")
{
?>
<script>
//window.location.href="attendance.php";
</script>
<?php
}
?>
<!DOCTYPE html>
<html lang="en">

<meta http-equiv="content-type" content="text/html;charset=UTF-8" /> 
<head>
<title>Leave Approval</title>
 

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="Admindek Bootstrap admin template made using Bootstrap 4 and it has huge amount of ready made feature, UI components, pages which completely fulfills any dashboard needs." />
<meta name="keywords" content="bootstrap, bootstrap admin template, admin theme, admin dashboard, dashboard template, admin template, responsive" />
<meta name="author" content="colorlib" />

 <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Quicksand:500,700" rel="stylesheet">

<link rel="stylesheet" type="text/css" href="files/bower_components/bootstrap/css/bootstrap.min.css">

<link rel="stylesheet" href="files/assets/pages/waves/css/waves.min.css" type="text/css" media="all">
<link rel="stylesheet" type="text/css" href="files/assets/icon/feather/css/feather.css">
<link rel="stylesheet" type="text/css" href="files/assets/icon/themify-icons/themify-icons.css">

<link rel="stylesheet" type="text/css" href="files/assets/icon/icofont/css/icofont.css">

<link rel="stylesheet" type="text/css" href="files/assets/icon/font-awesome/css/font-awesome.min.css">

<link rel="stylesheet" type="text/css" href="files/bower_components/datatables.net-bs4/css/dataTables.bootstrap4.min.css">
<link rel="stylesheet" type="text/css" href="files/assets/pages/data-table/css/buttons.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="files/bower_components/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css">

<link rel="stylesheet" type="text/css" href="files/assets/css/style.css">
<link rel="stylesheet" type="text/css" href="files/assets/css/pages.css">

 <style type="text/css">
#tooltip
{
text-align: center;
color: #fff;
background: #111;
position: absolute;
z-index: 100;
padding: 5px 10px;
font-size:10px !important;
line-height:12px !important;
}

#tooltip:after /* triangle decoration */
{
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #111;
content: '';
position: absolute;
left: 50%;
bottom: -10px;
margin-left: -10px;
}

#tooltip.top:after
{
border-top-color: transparent;
border-bottom: 10px solid #111;
top: -20px;
bottom: auto;
}

#tooltip.left:after
{
left: 10px;
margin: 0;
}

#tooltip.right:after
{
right: 10px;
left: auto;
margin: 0;
}

.message_maindiv{
float:left;
height:auto;
padding:15px;
background-color:#fff8e6;
text-align:left;
font-size:12px;
color:#503a27;
}

p{
    text-overflow:ellipsis;
    width: 180px;
    white-space: nowrap;
    overflow: hidden;
    cursor:pointer;
}

p:hover{
    text-overflow:clip;
    width:auto;
    white-space: normal;
}
</style>
 
<script>
function change_status(l_status,per)
{
$.ajax({
	url:"ajax_change_status.php",
	type:"post",
	data:{'l_status':l_status,'per':per},
	async:false,
	success:function(f)
	{
	    //alert(f);
	    if(l_status=="Approve")
	    {
	       alert("Leave Approved Successfully"); 
	    }
	    if(l_status=="Reject")
	    {
	       alert("Leave Rejected"); 
	    }
		window.location.href="leave-approval.php";
	}
	});
}
</script>   
</head>
<body>



<div id="pcoded" class="pcoded">
<div class="pcoded-overlay-box"></div>
<div class="pcoded-container navbar-wrapper">

<?php include('register-top-header.php'); ?>





<div class="pcoded-main-container">
<div class="pcoded-wrapper">

<?php include('register-side-menu.php'); ?>



<div class="pcoded-content">

<div class="page-header card">
<div class="row align-items-end">
<div class="col-lg-8">
<div class="page-header-title">

<div class="d-inline">
<h5 style="text-transform:uppercase; font-size:25px; font-weight:600;">Leave Approval</h5>

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

</div>
</div>

<div class="pcoded-inner-content">
<div class="main-body">
<div class="page-wrapper">

<div class="page-body">
<div class="row">
<div class="col-sm-12">

<div class="card">



<div class="card-block">



<div class="dt-responsive table-responsive">
<table id="order-table" class="table table-striped table-bordered nowrap">
<thead>
 <tr >
<th style="padding:.75rem">EMPLOYEE ID</th>
<th style="padding:.75rem">NAME</th>
<th style="padding:.75rem">LEAVE DATE</th>
<th style="padding:.75rem">LEAVE DAYS</th>
<th style="padding:.75rem">APPROVED REMARKS</th>
<th style="padding:.75rem">STATUS</th>



</tr>
</thead>
<tbody>
<?php
$Applied_Leaves=$Mainclass->Fetch_All_datas("leave_apply_master","Emp_Id","'".$_COOKIE['Payroll_Emp_Attendance']."'",'','',"Emp_Id");
foreach($Applied_Leaves as $Leaves)
{
    $Emp_Det=$Mainclass->Fetch_needed_datas("employee_master","Emp_First_Name,Emp_Middle_Name,Emp_Last_Name,Employee_Id","Emp_Temp_Id","'".$Leaves['Emp_Id']."'");
    
    $Leavetype=$Mainclass->Fetch_needed_datas("leave_type_master","Leave_Type","SLN","'".$Leaves['Leave_Type']."'");
?>
		<tr>
		<td style="padding-top:8px;"><?php echo $Emp_Det['Employee_Id'];?></td>
		<td style="padding-top:8px;"><?php echo ucwords($Emp_Det['Emp_First_Name']." ".$Emp_Det['Emp_Middle_Name']." ".$Emp_Det['Emp_Last_Name']);?></td>
		<td style="padding-top:8px;"><?php echo date('d-m-Y',strtotime($Leaves['Leave_From']))." to ".date('d-m-Y',strtotime($Leaves['Leave_Till']));?></td>
        <td style="padding-top:8px;"><?php echo $Leaves['Leave_Total_Days'];?></td>
        <td style="padding-top:8px;"><p><?php echo $Leaves['Admin_Remarks'];?></p></td>
        <td style="padding-top:8px;"><?php if($Leaves['Approved_Status']==1){echo "Approved";};?></td>

		

		</tr>
<?php
}
?>		

</tbody>


</table>
</div>


</div>
</div>










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

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

<div id="styleSelector">
</div>
</div>
</div>
</div>
</div>





<script type="text/javascript" src="files/bower_components/jquery/js/jquery.min.js"></script>
<script type="text/javascript" src="files/bower_components/jquery-ui/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="files/bower_components/popper.js/js/popper.min.js"></script>
<script type="text/javascript" src="files/bower_components/bootstrap/js/bootstrap.min.js"></script>

<script src="../files/assets/pages/waves/js/waves.min.js" type="text/javascript"></script>

<script type="text/javascript" src="files/bower_components/jquery-slimscroll/js/jquery.slimscroll.js"></script>

<script type="text/javascript" src="files/bower_components/modernizr/js/modernizr.js"></script>
<script type="text/javascript" src="files/bower_components/modernizr/js/css-scrollbars.js"></script>

<!--<script src="../../../../cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js" type="text/javascript"></script>
<script src="../../../../cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js" type="text/javascript"></script>-->
<!--<script type="text/javascript" src="files/assets/pages/form-validation/validate.js"></script>

<script type="text/javascript" src="files/assets/pages/form-validation/form-validation.js"></script>-->
<script src="files/assets/js/pcoded.min.js" type="text/javascript"></script>
<script src="files/assets/js/vertical/vertical-layout.min.js" type="text/javascript"></script>
<script src="files/assets/js/jquery.mCustomScrollbar.concat.min.js" type="text/javascript"></script>
<script type="text/javascript" src="files/assets/js/script.js"></script>


<script src="files/bower_components/datatables.net/js/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-buttons/js/dataTables.buttons.min.js" type="text/javascript"></script>
<script src="files/assets/pages/data-table/js/jszip.min.js" type="text/javascript"></script>
<script src="files/assets/pages/data-table/js/pdfmake.min.js" type="text/javascript"></script>
<script src="files/assets/pages/data-table/js/vfs_fonts.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-buttons/js/buttons.print.min.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-buttons/js/buttons.html5.min.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-bs4/js/dataTables.bootstrap4.min.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-responsive/js/dataTables.responsive.min.js" type="text/javascript"></script>
<script src="files/bower_components/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js" type="text/javascript"></script>

<script src="files/assets/pages/data-table/js/data-table-custom.js" type="text/javascript"></script>


<script src="files/assets/js/rocket-loader.min.js" data-cf-settings="49" defer=""></script>

<script src="../../../../ajax.cloudflare.com/cdn-cgi/scripts/95c75768/cloudflare-static/rocket-loader.min.js" data-cf-settings="49" defer=""></script>


</body>

<!-- Mirrored from colorlib.com//polygon/admindek/default/form-validation.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 23 Nov 2019 12:53:50 GMT -->
</html>
