// Service : updatesettings

global $HTTP_RAW_POST_DATA;
$post = json_decode($HTTP_RAW_POST_DATA, true);
 

/*$post["pushnotification"] = 1;
$post['favoritenotification']=0;
$post['user_id']=478;*/


	if(@$post['user_id']){
	
		$update='UPDATE #__jetour_appusers SET pushnotification="'.$post['pushnotification'].'",favoritenotification="'.$post['favoritenotification'].'" WHERE user_id='.$post['user_id'];
		$db->setQuery($update);
		if($db->query()){
			$arr = array('success' => 1, 'message' => 'Setting Updated');
			echo json_encode($arr);exit;
		}else{
			$arr = array('success' => 0, 'message' => 'Please Try Again');
			echo json_encode($arr);exit;
		}
	
	}else{
		$arr = array('success' => 0, 'message' => 'Please Login to update settings');
		echo json_encode($arr);exit;
	}