<?php 

require_once("../includes/application.inc.php");

controllerForceHTTPSoff();

//check if a cached version exists first & return that if valid
$content = viewCache("colour_data".$colourid);
if($content !== false) {
	$colourArray = unserialize($content);
} else {
	
	//grab category details from the database
	$query = getColourDetails($colourid);
	$colourData = processQuery($query);
	if(is_array($colourData)) {	
		if(is_array($colourData['assocResults'])) {	
			$colourArray = $colourData['assocResults'][0];
		}
	}
	
	controllerSetViewCache("colour_data".$colourid, serialize($colourArray));
}


	
	echo viewHTMLheader(
			$colourArray['Colour'] . " | Flowers by post with free UK delivery | Bunches the online florist",
			$colourArray['Colour'] . " from Bunches, the online florist to send fresh flowers by post from only &#163;11.99 including free delivery, personal message card and free chocolates."
			);

?>
<body>

<div class="wrapper wfull centered plr15">

<?php 

echo viewPageHeader();


echo viewCategoryMenu();

?>

	<div class="main"> 
	
		<div class="content">
		
<?php 

echo viewBreadCrumbRoot($colourArray['Colour']);

echo viewColourTop($colourArray);

echo viewColourProducts($colourid);

?>		
		
		</div><!-- end content -->
		
		<div class="rightBar">
<?php 

echo viewRightBar();

?>
		</div><!-- end content -->
		
		<br class="clear" />
		
	</div><!--end main-->

</div><!--end wrapper-->

<?php 

echo viewPageFooter();

?>

</body>
</html>
