 <?php
require 'db.php';
 header( 'Content-Type: text/html; charset=utf-8' ); 
$data = json_decode(file_get_contents('php://input'), true);

$shop_id =  strip_tags(mysqli_real_escape_string($con,$data['shop_id']));
$shop_code =  strip_tags(mysqli_real_escape_string($con,$data['shop_code']));
$status = $data['status'];
if ($shop_id =='' or $status =='')
{
$returnArr = array("ResponseCode"=>"401","Result"=>"false","ResponseMsg"=>"Something Went wrong  try again !");
}
else 
{
	$con->query("update shop_settings set shop_status='$status' where shop_id = '$shop_id' and shop_code = '$shop_code'");
	if($status == '1')
    $returnArr = array("ResponseCode"=>"200","Result"=>"true","ResponseMsg"=>"Shop Opened");
    else
    $returnArr = array("ResponseCode"=>"200","Result"=>"false","ResponseMsg"=>"Shop Closed");
}
echo json_encode($returnArr);
mysqli_close($con);
?>