include_once("mysql_nitrousgarage.inc");
$clean_url = substr($PHP_SELF,1);
$clean_url = substr($clean_url,0,-5);
$q = "SELECT * from NG_product where active='Y' and clean_url='$clean_url'";
$results = mysql_query($q);
$row = mysql_fetch_array($results);
$product_id = $row["product_id"];
$product_name = $row["product_name"];
$sku = $row["sku"];
$description = $row["description"];
$meta_title = $row["meta_title"];
$meta_description = $row["meta_description"];
$magiczoomplus = "Y";
include_once("topnav.inc")
?>
Home ›
if ($saved_category_id || !$saved_brand_id)
{
if ($saved_category_id)
$q = "SELECT * from NG_category where category_id='$saved_category_id'";
else
$q = "SELECT * from NG_product_category as pc, NG_category as c where pc.product_id='$product_id' and pc.category_id=c.category_id order by c.order_placement limit 1";
$results = mysql_query($q);
$row = mysql_fetch_array($results);
$category_id = $row["category_id"];
$category = $row["category"];
$category_clean_url = $row["clean_url"];
echo "
$category Wheels";
}
else
{
$q = "SELECT * from NG_brand where brand_id='$saved_brand_id'";
$results = mysql_query($q);
$row = mysql_fetch_array($results);
$brand_id = $row["brand_id"];
$brand = $row["brand"];
$brand_clean_url = $row["clean_url"];
echo "
$brand Wheels";
}
?>
›
$image_id_arr = array();
$q1 = "SELECT * from NG_finish as f, NG_product_finish as pf, NG_finish_image as fi where f.active='Y' and f.finish_id=pf.finish_id and pf.active='Y' and pf.product_id='$product_id' and pf.product_finish_id=fi.product_finish_id and fi.active='Y' order by f.order_placement,fi.order_placement";
$r1 = mysql_query($q1);
while ($row1 = mysql_fetch_array($r1))
{
$image_id = $row1["image_id"];
$product_finish_name = $row1["product_finish_name"];
if (!$main_image)
{
$main_image = "finish-$image_id.jpg";
$selected_finish = $product_finish_name;
}
$image_id_arr[] = $image_id;
$product_finish_name_arr[] = $product_finish_name;
}
?>
Style:
Selected Finish:
Like this Wheel?
GET MORE INFO VIA
while(list($k,$v) = each($image_id_arr))
{
$product_finish_name = $product_finish_name_arr[$k];
echo "
";
}
?>
$q = "SELECT * FROM NG_gallery WHERE active='y' and product_id='$product_id' ORDER BY featured desc, orderplacement limit 3";
$results = mysql_query($q);
if (mysql_num_rows($results) > 0) { ?>
Vehicle Gallery
CLICK IMAGE TO
ENLARGE | VIEW MORE
while ($row = mysql_fetch_array($results))
{
$gallery_id = $row["gallery_id"];
$gallery_title = $row["gallery_title"];
$gallery_pics .= "";
}
?>
}?>
include_once("footer.inc") ?>