<?php
include('../common/db_connection.php');
$Mainclass=new DB_Controller();


$check_leave=$Mainclass->Fetch_needed_datas('working_hours_master',"Available_CL,Available_PL","Emp_Id",$_COOKIE['Payroll_Emp_Attendance']);
if($_REQUEST['leave_type']=="CL")
{
if($check_leave['Available_CL']==0)
{
echo "1";
}
}
else
{
if($check_leave['Available_PL']==0)
{
echo "2";
}	
}
?>