if($_POST['dateStart'] != "" && $_POST['dateEnd'] != "") {
$dateStart = $_POST['dateStart'];
$dateEnd = $_POST['dateEnd'];
$query = "SELECT * FROM orders_1C WHERE date_order BETWEEN '" . $dateStart . "' AND '" . $dateEnd . "' AND code_client='000002805'";
} else {
$query = "SELECT * FROM orders_1C WHERE code_client='000002805'";
}
$result = db_connection($query);
$orders_1C = array();
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
array_push($orders_1C, array('id' => $row['id_order'], 'date' => $row['date_order'], 'product' => $row['product'], 'tirag' => $row['tirag'], 'price' => $row['price'], 'status' => $row['status']));
}
echo json_encode(array("orders1C" => $orders_1C));
exit;
$('#calculationTypeProduct').change(function(){
if($(this).val() == '1') {
$('#vizitka').css('display','block');
$('#fotoPrint').css('display','none');
$('#blank').css('display','none');
} else if($(this).val() == '2') {
$('#vizitka').css('display','none');
$('#fotoPrint').css('display','none');
$('#blank').css('display','block');
} else if($(this).val() == '3') {
$('#vizitka').css('display','none');
$('#fotoPrint').css('display','block');
$('#blank').css('display','none');
}
});
$query = mysql_query("INSERT INTO orders_in_shop (id_client, price_order, status, data_order) VALUES ('$id_client','$price','$status', '$data')");
$id_order_in_shop = mysql_insert_id();