<?php
ob_start();
include("../connect.php");
$response = array();
if(isset($_POST['distributor_id']) && isset($_POST['customer_name']) && isset($_POST['customer_phone']) && isset($_POST['email_address'])   	&&  isset($_POST['password']))
{
	$distributor_id=$_POST['distributor_id'];
	$customer_name=$_POST['customer_name'];
	$email_address=$_POST['email_address'];
	$password=$_POST['password'];
	$customer_phone=$_POST['customer_phone'];
	$imei_no=$_POST['imei_no'];
	$carrier_name=$_POST['carrier_name'];
	$ip_address=$_POST['ip_address'];
	$device_id=$_POST['device_id'];
	$app_version=$_POST['app_version'];
	$phone_model=$_POST['phone_model'];
	$phone_manufacturer=$_POST['phone_manufacturer'];
	$sdk_phone_version=$_POST['sdk_phone_version'];
	
	date_default_timezone_set('Asia/Calcutta');
	$register_date  = date("Y-m-d");
	$register_time = date('H:i:sa');
	
	$query=mysqli_query($con,"INSERT INTO tbl_master_customer (distributor_id,customer_name,email_address,password,customer_phone,imei_no,carrier_name,ip_address,device_id,app_version,phone_model,phone_manufacturer,sdk_phone_version,register_date,register_time) VALUES ('$distributor_id','$customer_name','$email_address','$password','$customer_phone','$imei_no','$carrier_name','$ip_address','$device_id','$app_version','$phone_model','$phone_manufacturer','$sdk_phone_version','$register_date','$register_time')");
	
	if($query>0)
	{
		$response['success']=1;
		$response['details']="You are successfully sign-up !";
	}
	else
	{
		$response['success']=0;
		$response['details']="Error In Sign-up!";
	}
	
}
else
{
	$response['success']=0;
	$response['details']="Required fields missing";
}
echo json_encode($response);
?>