[exec]
?>
query($query);
$engine_pull = array();
$engine_sort_no_uniq = array();
$engine_sort = array();
while ($row=mysqli_fetch_array($result)) {
array_push($engine_pull,$row[‘Serienleistung_Motorname’]);
}
$engine = array_unique($engine_pull);
$count = sizeof($engine);
sort($engine);
$year_all = array();
$bool_year = false;
for ($i = 0; $i < $count; $i++) { $year_all = array(); $query = "SELECT year FROM hell_tuning WHERE firm ='".$firm."' AND model ='".$firm_model."' AND type_of_fuel = '".$fuil."' AND Serienleistung_Motorname ='".$engine[$i]."'"; $result = $connection->query($query);
while ($row=mysqli_fetch_array($result)) {
array_push($year_all,$row[‘year’]);
}
for ($z=0; $z < sizeof($year_all) ; $z++) {
if(stristr($year_all[$z], '_')) {
$expload_year = explode("_", $year_all[$z]);
for ($y=0; $y < sizeof($expload_year) ; $y++) {
if ($expload_year[$y] == $generation) {
$bool_year = true;
break;
} else {
$bool_year = false;
}
}
} else if ($year_all[$z] == $generation ) {
$bool_year = true;
} else if ($year_all[$z] == $generation) {
$bool_year = true;
} else {
$bool_year = false;
}
if ($engine[$i] == null) {
unset($engine[$i]);
}
if (strlen($engine[$i])>1 && $bool_year == true) {
array_push($engine_sort_no_uniq, $engine[$i]);
}
}
unset($year_all);
}
$engine_sort = array_unique($engine_sort_no_uniq);
sort($engine_sort);
mysqli_close($connection);
for ($i = 0; $i
$result_price = $connection->query($query_price);
while ($row=mysqli_fetch_array($result_PS)) {
array_push($engine_pull_HP,$row[‘Serienleistung_Max_Leistung’]);
}
while ($row=mysqli_fetch_array($result_price)) {
array_push($price,$row[‘Optimierung_der_Motorsteuerung’]);
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$query_year_all_hp = «SELECT year FROM hell_tuning WHERE firm ='».$firm.»‘ AND model ='».$firm_model.»‘ AND type_of_fuel = ‘».$fuil.»‘ AND Serienleistung_Motorname ='».$engine_for_HP.»‘»;
$result_year_all_hp = $connection->query($query_year_all_hp);
while ($row=mysqli_fetch_array($result_year_all_hp)) {
array_push($year_all_hp,$row[‘year’]);
}
for ($k=0; $k < sizeof($year_all_hp); $k++) {
// echo $year_all_hp[$k]."\n";
if(stristr($year_all_hp[$k], $generation) && stristr($year_all_hp[$k], '_')) {
$generation_exception = $year_all_hp[$k];
}
}
if ($generation_exception != $_GET['generation']) {
$query_engine_HP = "SELECT Serienleistung_Max_Leistung FROM hell_tuning WHERE Serienleistung_Motorname ='".$engine_for_HP."' AND model ='".$firm_model."' AND type_of_fuel = '".$fuil."' AND year = '".$generation_exception."'";
$query_price = "SELECT Optimierung_der_Motorsteuerung FROM hell_tuning WHERE Serienleistung_Motorname ='".$engine_for_HP."' AND model ='".$firm_model."' AND type_of_fuel = '".$fuil."' AND year = '".$generation_exception."'";
$result_PS1 = $connection->query($query_engine_HP);
$result_price1 = $connection->query($query_price);
while ($row=mysqli_fetch_array($result_PS1)) {
array_push($engine_pull_HP,$row[‘Serienleistung_Max_Leistung’]);
}
while ($row=mysqli_fetch_array($result_price1)) {
array_push($price,$row[‘Optimierung_der_Motorsteuerung’]);
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if ($i%2) {
echo »
«;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
for ($j=0; $j < sizeof($engine_pull_HP); $j++) {
// ЦЕНЫ СКРЫТЫ - ".$price[$j]."
$price_expload = array();
$price_expload = explode(" ", $price[$j]);
$price_en = ($price_expload[1]*$euro_rate)." рублей";
$sum_1 = $price_expload[1]*$euro_rate;
if ($sum_1 == 0) {
$price_en = 'В разработке';
}
if (sizeof($price_expload)>2) {
$price_en = ($price_expload[1].$price_expload[2])*$euro_rate.» рублей»;
$sum = ($price_expload[1].$price_expload[2])*$euro_rate;
if ($sum == 0) {
$price_en = ‘В разработке’;
}
}
echo »
«;
}
echo »
«;}
else {
echo »
«;
/////////////////////////////////////////////////////////
///////////////////////////////////////////////////////
for ($j=0; $j < sizeof($engine_pull_HP); $j++) {
$price_expload = array();
$price_expload = explode(" ", $price[$j]);
$price_en = ($price_expload[1]*$euro_rate)." рублей";
$sum_1 = $price_expload[1]*$euro_rate;
if ($sum_1 == 0) {
$price_en = 'В разработке';
}
if (sizeof($price_expload)>2) {
$price_en = ($price_expload[1].$price_expload[2])*$euro_rate.» рублей»;
$sum = ($price_expload[1].$price_expload[2])*$euro_rate;
if ($sum == 0) {
$price_en = ‘В разработке’;
}
}
// ЦЕНЫ СКРЫТЫ — «.$price[$j].»
echo »
«;
}
echo »
«;}
}
[/exec]