if($i != $row['max_date']) {
$query = mysqli_query($link7, "SELECT `price` FROM `prices` WHERE price_product != 0 AND id_lab = '{$row_product['id_lab']}' AND `date` < '{$row['max_date']}' ORDER BY `date` ASC LIMIT 1");
$row_query = mysqli_fetch_assoc($query);
$price = $row_query['price'];
} else {
$price = $row['price'];
}
mysql_query("INSERT INTO enter ( login, sum, date, status, paysys, service) VALUES ( :user, :amount, '" . time() . "', '2', 'kassa', 'bal')");
mysql_query("UPDATE `{$this->config['table']}` SET `{$this->config['column_money']}` = {$this->config['column_money']} + :amount WHERE `{$this->config['column_user']}` = :user");