<?php
include('../common/db_connection.php');
$Mainclass=new DB_Controller();
$condition="Emp_Temp_Id='".$_COOKIE['Payroll_Emp_Attendance']."'";
$fetch_supervisor=$Mainclass->application_fetch('employee_master',$condition);

$Fields="Request_Date,Reason_nonattn,Temp_Emp_Id,Supervisor_Id,Status,Applied_Date";
$Values="'".date('Y-m-d',strtotime($_REQUEST['ADate']))."','".$_REQUEST['reason']."','".$_COOKIE['Payroll_Emp_Attendance']."','".$fetch_supervisor['Reporting_Manager']."','Requested','".date('Y-m-d')."'";
$insert_request=$Mainclass->Insert_Data('attendance_request_master',$Fields,$Values);
?>