<?php
require 'config_db.php';
$data = json_decode(file_get_contents('php://input'), true);
$user_type = $data['user_type'];
$mode = $data['mode'];
$member_id = $data['member_id'];

if ($user_type == '' || $member_id == '') {
	$returnArr = array("ResponseCode" => "401", "Result" => "false", "ResponseMsg" => "Something Went wrong try again !");
} else {
    $member_details = array();
    $cy = $con->query("select * from app_users_details where member_id = '$member_id' and status = '1'");
    if ($row = $cy->fetch_assoc()) {
		$cus_id = $row['id'];
		$customer_chit_details['id'] = $row['id'];
		$customer_chit_details['member_id'] = $row['member_id'];
		$customer_chit_details['join_date'] = $row['join_date'];
		$customer_chit_details['referred_by'] = $row['referred_by'];

		$customer_chit_details['company_name'] = $row['company_name'];
		$customer_chit_details['company_type'] = $row['company_type'];
		$customer_chit_details['company_category'] = $row['company_category'];
		$customer_chit_details['owner_name'] = $row['owner_name'];
		$customer_chit_details['owner_mobile'] = $row['owner_mobile'];
		$customer_chit_details['owner_email'] = $row['owner_email'];

		$customer_chit_details['company_email'] =$row['company_email'];

		$customer_chit_details['company_pan'] = $row['company_pan'];
		$customer_chit_details['gst'] = $row['gst'];
		$customer_chit_details['state'] = $row['state'];
		$customer_chit_details['district'] = $row['district'];
		$customer_chit_details['city'] = $row['city'];
		$customer_chit_details['area'] = $row['area'];
		$customer_chit_details['pin_code'] = $row['pin_code'];

		$customer_chit_details['website'] = $row['website'];

		$customer_chit_details['pay_status'] = $row['pay_status'];
		$customer_chit_details['status'] = $row['status'];

		$member_details[] = $customer_chit_details;
	}
	$returnArr = array(
			"ResponseCode" => "200",
			"Result" => "true",
			"ResponseMsg" => "Success",
			"member_details" => $member_details);
	
}
echo json_encode($returnArr);
mysqli_close($con);
?>