<?php
include("../config/database.php");
$shop_id = $_POST['shop_id'];			     
$sql     = mysqli_query($cn, "select * from `tbl_retailer` where `id`='".$shop_id."' and `status`=1");
if(mysqli_num_rows($sql)>0)
{
	$sqlData = mysqli_fetch_array($sql);
		$name =""; $address = ""; $pincode = "";
		if(!empty($sqlData['name'])){$name = $sqlData['name'];}
		if(!empty($sqlData['address'])){$address = $sqlData['address'];}
		if(!empty($sqlData['pincode'])){$pincode = $sqlData['pincode'];}
		$arr = array('status'=>true, 'msg'=>"Login Successfully.", 'shop_id'=>$sqlData['id'], 'name'=>$name, 'shop_name'=>$sqlData['shop_name'], 'mobile'=>$sqlData['mobile'], 'state'=>$sqlData['state'], 'district'=>$sqlData['district'], 'town'=>$sqlData['sale_district'], 'address'=>$address, 'pincode'=>$pincode, 'ds_name'=>dsName($sqlData['ds_code']), 'beat'=>$sqlData['beat']);		
}
else
{
	$arr = array('status'=>false,'msg'=>"Account Suspended.");
}
echo json_encode($arr);		    	
mysqli_close($cn);		
?>

