<?
	header("Content-Type: text/html; charset=utf-8");
	
	$g_path = '../../my/';
	
	include $g_path."u_globals.php";
	include $g_path."html/f.php";
	include $g_path."u_spoj_na_bazu.php";
	
	include $g_path."u_headers.php";
	
	$y = get_item('select value from settings where name = "duty.free" ');
	if($y == 'yes'){
		$l_pdv_obveznik = 1;
	}else{
		$l_pdv_obveznik = 0;
	}
	
	$la_data = array();
	$la_value = explode(':', $_GET['value']);
	for($i = $_GET['min']; $i <= $_GET['max']; $i++){
		if($l_pdv_obveznik == 1){
			$x = get_item('select tax_group_id from articles where id = "'.$la_value[$i - 1].'" ');
			$l_pdv = get_item('select tax_1 from tax_groups where id = "'.$x.'" ');
		}else{
			$l_pdv = 0;
		}
		$la_data []= $l_pdv;
	}
	
	$la_json = json_encode($la_data);
	print $la_json;
?>
