<?php 
require 'db.php';
 
$data = json_decode(file_get_contents('php://input'), true);

$rid = $data['deli_code'];
if ($rid == '')
{
$returnArr = array("ResponseCode"=>"401","Result"=>"false","ResponseMsg"=>"Something Went wrong  try again !");
}
else 
{
	$pok = array();
	$p =0 ;
	$riderdata = $con->query("select * from assist_settings where deli_code='$rid' and status = '1'")->fetch_assoc();
	$deli_status = $riderdata['delivery_status'];
    $total_reject_order = $riderdata['rejected_orders'];
    $total_complete_order = $riderdata['completed_orders'];
    $total_order = $riderdata['assigned_orders'];

    $returnArr = array("total_complete_order"=>$total_complete_order,"total_reject_order"=>$total_reject_order,"total_order"=>$total_order,"deli_status"=>$deli_status,"ResponseCode"=>"200","Result"=>"true","ResponseMsg"=>"Success");    
}
echo json_encode($returnArr);
mysqli_close($con);
?>
