set('make', $make); $children[0] = $makeObj; } elseif ($make == "Specials") { $cars = null; $car_count = get_specials($cars, "inv", $user); $makeObj = new make(); $makeObj->set('make', $make); $children[0] = $makeObj; } elseif ($make == "Recent movers") { $cars = null; $car_count = get_recent_sold(21, $cars, $user, "feature_inv DESC, special_inv DESC, year DESC"); $makeObj = new make(); $makeObj->set('make', $make); $children[0] = $makeObj; } elseif ($make == "New arrivals") { $cars = null; $car_count = get_recent_additions(40, $cars, $user, "feature_inv DESC, special_inv DESC, year DESC"); $makeObj = new make(); $makeObj->set('make', $make); $children[0] = $makeObj; } elseif ($make == "eBay") { $cars = null; $car_count = get_ebay($cars, $user, "feature_inv DESC, special_inv DESC, year DESC"); $makeObj = new make(); $makeObj->set('make', $make); $children[0] = $makeObj; } else { if ($make == "All") { $makeObj = get_root_make(); $makeObj->lookup(); $children = $makeObj->get_children(); } else { $query = "select make_id, make from makes where make=\"" . $make . "\""; $children = get_records_from_query("make", $query); } } foreach($children as $c) { if ( ($make != "Specials") && ($make != "Featured cars") && ($make != "New arrivals") && ($make != "Recent movers") && ($make != "eBay") ) { $make_id = $c->get("make_id"); $vars["make_id"] = $make_id; $vars["_date_sold-op"] = "<="; $vars["date_sold"] = "1999-01-01"; $cars = null; $car_count = get_cars($vars, 0, 50, $cars, $user, "feature_inv DESC, special_inv DESC, year DESC"); } if (!$car_count) continue; ?>
get("make") ?>
get("make") . ".jpg"; if (file_exists($bg_image)) { $bg_image = "img/inv_header_" . $c->get("make") . ".jpg"; ?>
$car) { /* * Handle the different display styles. */ $car->lookup(); if ($car->get('feature_inv')) { $text_class1 = "class=\"featured\""; $text_class2 = "class=\"featured\""; $text_class3 = "class=\"featured\""; $div_class_b = "
Featured!"; } elseif ($car->get('special_inv')) { $text_class1 = ""; $text_class2 = ""; $text_class3 = "style=\"color:#ff0000\""; $div_class_b = "
Special!"; $text_class5 = ""; } else { $text_class1 = ""; $text_class2 = ""; $text_class3 = ""; $div_class_b = "