[exec]
?>
query($query);
$type_of_fuel_all = array();
$type_of_fuel = array();
while ($row=mysqli_fetch_array($result)) {
array_push($type_of_fuel_all,$row[‘type_of_fuel’]);
}
mysqli_close($connection);
$type_of_fuel = array_unique($type_of_fuel_all);
sort($type_of_fuel);
for ($i = 0; $i «; $connection = mysqli_connect(‘localhost’, ‘u0489217_gb_htun’, ‘7ad8c76e3678’, ‘u0489217_gb_htun’); $generation_all = array(); $query_generation = «SELECT year FROM hell_tuning WHERE firm ='».$firm.»‘ AND model ='».$firm_model.»‘ AND type_of_fuel ='».$type_of_fuel[$i].»‘»; $result_generation = $connection->query($query_generation); while ($row=mysqli_fetch_array($result_generation)) { for ($z=0; $z < sizeof($generation_all) ; $z++) {
if(stristr($generation_all[$z], '_')) {
$expload_generation = explode("_", $generation_all[$z]);
for ($y=0; $y < sizeof($expload_generation) ; $y++) {
array_push($generation_all, $expload_generation[$y]);
}
unset($generation_all[$z]);
}
}
$generation = array_unique($generation_all);
sort($generation);
mysqli_close($connection);
for ($j=0; $j < sizeof($generation); $j++) {
echo "
«; echo »
$generation = array();
$expload_generation = array();
array_push($generation_all,$row[‘year’]);
}
}
«;}
else {
if (trim($type_of_fuel[$i]) == ‘Gasoline’) {
$type_of_fuel_print = ‘Бензиновые двигатели’;
}
else if (trim($type_of_fuel[$i]) == ‘Hybrid’) {
$type_of_fuel_print = ‘Гибридные двигатели’;
}
else if (trim($type_of_fuel[$i]) == ‘Diesel’) {
$type_of_fuel_print = ‘Дизельные двигатели’;
}
echo »
«;
$connection = mysqli_connect(‘localhost’, ‘u0489217_gb_htun’, ‘7ad8c76e3678’, ‘u0489217_gb_htun’);
$generation_all = array();
$generation = array();
$expload_generation = array();
$query_generation = «SELECT year FROM hell_tuning WHERE firm ='».$firm.»‘ AND model ='».$firm_model.»‘ AND type_of_fuel ='».$type_of_fuel[$i].»‘»;
$result_generation = $connection->query($query_generation);
while ($row=mysqli_fetch_array($result_generation)) {
array_push($generation_all,$row[‘year’]);
}
for ($z=0; $z < sizeof($generation_all) ; $z++) { if(stristr($generation_all[$z], '_')) { $expload_generation = explode("_", $generation_all[$z]); for ($y=0; $y < sizeof($expload_generation) ; $y++) { array_push($generation_all, $expload_generation[$y]); } unset($generation_all[$z]); } } $generation = array_unique($generation_all); sort($generation); mysqli_close($connection); for ($j=0; $j < sizeof($generation); $j++) { echo "
«;
}
echo »
«;}
}
[/exec]