<?php include 'inc_classes.php';
$action = $_POST['action'];  
// $staff_id='';
if($action=='user_interface') 
{
    //   $dates_p=date("Y-m-d",strtotime('-2days'));
    $dates_p='2023-06-26';
     $branch_name=$_POST['branch_names'];
     $sel_cm="select cm_id from site_setting where 1 and branch_name='".$branch_name."'";
     $ptr_cm=mysql_query($sel_cm);
     $data_cm=mysql_fetch_array($ptr_cm);
     $daily_per_emp="select date,final_percentage,staff_id from pm_daily_emp_performance where 1 and date ='".$dates_p."' and cm_id='".$data_cm['cm_id']."'and status='present'  order by id ASC";
     $ptr_daily_per_emp=mysql_query($daily_per_emp);
     $staff_id=[];
     $daily_performance_array_emp=[];
     // $bgcolor_array=[];
     // $bgcolor_array1=[];
     while($data_daily_per_emp=mysql_fetch_array($ptr_daily_per_emp)){
     // if($data_daily_per_emp['final_percentage']<0){
     //     $bgcolors='rgba(255, 73, 45, 1)';
     // }
     // elseif($data_daily_per_emp['final_percentage']>0){
     //     $bgcolors1='rgba(35, 138, 53, 1)';
     // }
     // $bgcolor_array[]=$bgcolors;
     // $bgcolor_array1[]=$bgcolors1;
     $daily_performance_array_emp[]=$data_daily_per_emp['final_percentage'];
     $sel_name="select name from site_setting where 1 and admin_id='".$data_daily_per_emp['staff_id']."'";
     $ptr_name=mysql_query($sel_name);
     $data_name=mysql_fetch_array( $ptr_name);
     $staff_id[]=$data_name['name'];
     }
     print_r($staff_id);
    echo '<canvas id="emp_report">hello</canvas> ';
     echo '<div style="text-align:center"><strong>Staff Name </strong></div> ';
}

?>