<?php include('header.php'); ?>
<?php
	include('manager/includes/connection.php');
	$getCollections = mysql_query("select * from collection order by corder");
	$collCount = mysql_num_rows($getCollections);
	$collList='';
	if($collCount>0){
		while($row = mysql_fetch_array($getCollections)){
			$cid = $row['cid'];
			$name = $row['name'];
			$thumb = $row['thumb'];
			$logo = $row['logo'];
			
			$collList.='<div class="col-md-4 collectionBox">
								<div class="col-sm-12" style="padding:0;">
									<img src="collections/'.$cid.'/thumb/'.$thumb.'" class="img-responsive">
									<div class="collOverlay">
										<img src="collections/'.$cid.'/logo/'.$logo.'" class="img-responsive collectionLogo">
										<a href="collection-inner.php?cid='.$cid.'&'.$name.'" class="viewButton">View Collection</a>
									</div>
								</div>
							</div>';
		}
	}else{
		$collList.='Collections not found!';
	}
?>
</head>
    <body class="fixed-header">
			<?php include('nav.php'); ?>
			
            <section class="mySection pageHeader">
				<div class="container">
					<div class="row">
						<div class="col-sm-12"><h1>Collections</h1></div>
					</div>
				</div>
			</section>
			
            <section class="mySection creamColor">
				<div class="container">
					<div class="row">
						<div class="col-sm-12">
							<?php echo $collList; ?>
						</div>					
					</div>
				</div>
			</section>
      		<?php include('footer.php'); ?>
			<?php include('footerjs.php'); ?>
    </body>
</html>