getLastUrl($pTransaction==1?"occasions.htm":"locations.htm"); //Check Id if(!$pId){ Header("Location: $backUrl"); exit(); } // DB $dbCar = DBCar::getInstance(); // Retrieve car $car = $dbCar->get($pId); if(!$car){ Header("Location: $backUrl"); exit(); } // Attributes $id = $car->id; $title = $car->getTitle($lang); $subtitle = $car->getSubtitle($lang); $author=$car->author; $registrationDate=NULL; if($car->registrationDate){ $registrationDate = formatDate($car->registrationDate,3,$lang); } $type=NULL; if($car->type){ $type=$TEXT["car_type_".$car->type]; } $km = ""; if($car->km){ $km = number_format($car->km,0,"."," "); } $fuel = ""; if($car->fuel){ $fuel = $TEXT["car_fuel_".$car->fuel]; } $gear = ""; if($car->gear){ $gear = $TEXT["car_gear_".$car->gear]; } $description = $car->getDescription($lang); if($pTransaction==2){ $priceTitle = $car->priceRent?number_format($car->priceRent,0,'',' ')." €/".$TEXT["rent_day"]:""; $price = $car->priceRent?number_format($car->priceRent,0,'',' ')." €/".$TEXT["rent_day"]:$TEXT["car_price_contactus"]; }else{ $priceTitle = $car->priceSale?number_format($car->priceSale,0,'',' ')." €":""; $price = $car->priceSale?number_format($car->priceSale,0,'',' ')." €":$TEXT["car_price_contactus"]; } $reference = $car->reference; $builder = $car->builder; $buildDate = $car->buildDate; $power = $car->power; $powerFisc = $car->powerFisc; $colorInt = $car->colorInt; $colorExt = $car->colorExt; $speed = $car->speed; $youtube=$car->youtube; $file = $car->getFile(); $fileUrl = NULL; if($file && $file->exists()){ $fileUrl = $file->url; } $photos = $car->getPhotos(1); // Menu selection if($pTransaction==1){ $menu="car"; $back = $TEXT["car_back"]; }else if ($pTransaction==2){ $menu="rent"; $back = $TEXT["rent_back"]; } ?>

getThumbParameters("force", $w, $h); $thumb="./manager/lib/thumb.php".$photoUrl; ?>