<?php include('header.php');?>


 <!-- ================================
			///// Begin page header section /////
			================================= -->
			<section id="page-header-secion" class="alter-heading">

				<!-- Begin page header image 
				===============================
				* Use class "parallax" to enable parallax effect.
				-->
				<div class="page-header-image parallax bg-image" style="background-image: url(assets/img/headings/heading-3.jpg); background-position: 50% 70%;"></div>
				<!-- End page header image -->

				<!-- Element cover -->
				<div class="cover page-header-cover"></div>

				<!-- Begin page header info -->
				<div class="container page-header-content no-padding max-width-800 text-center">
					<div class="row">
						<div class="col-lg-12">

							<h1 class="album-title">Photo's</h1>
						 

						</div> <!-- /.col -->
					</div> <!-- /.row -->
				</div> 
				<!-- End page header info -->

			</section>
			<!-- End page header section -->

	 
			
				<!-- ============================
			///// Begin content section /////
			============================= -->
			<section id="content-section" class="portfolio-list-masonry min-height-850">
				<div class="container-fluid">
					<div class="row">
						<div class="col-md-12">

							<!-- Begin content wrap -->
							<div class="content-wrap">

								<!-- Begin isotope
								===================
								* Use classes "gutter-1", "gutter-2" or "gutter-3" to add more space between items.
								* Use class "col-1", "col-2", "col-3", "col-4", "col-5" or "col-6" for columns.
								-->
								<div class="isotope gutter-2 col-5">

							 		<!-- Begin gallery top content -->
									<div class="gallery-top-content">
 
											<div class="row margin-bottom-40">
											<div class="col-md-12">

												<!-- Begin isotope filter -->
												<div class="isotope-filter">

													<!-- Begin isotope filter links -->
													<div class="isotope-filter-links collapse navbar-collapse no-padding" id="isotope-filter-collapse">
														<a class="active" href="#" data-filter="*">all</a>
														<?php
														$photo_category_query = mysql_query("select * from photo_category where status = 'yes' order by photo_category_id asc");
														if(mysql_num_rows($photo_category_query)>0){	
														while($photo_category_row=mysql_fetch_array($photo_category_query)){
														echo "<a href='#' data-filter='.".$photo_category_row['photo_category_id']."'>".$photo_category_row['photo_category_name']."</a>";
														}
														}
														?>
													</div>
													<!-- End isotope filter links -->

												</div>
												<!-- End isotope filter -->
												
											</div> <!-- /.col -->

										
										</div> <!-- /.row -->

									</div>
									<!-- End gallery top content -->
 
									<div class="isotope-items-wrap ali-style-2 caption-outside lightgallery hover-center hover-boxed">
										<!-- Grid sizer (do not remove!!!) -->
										<div class="grid-sizer"></div>
										<!-- //////////////////
										// Begin isotope item. Note: use class "width2" for alternative item width (works best on first item)
										/////////////////////// -->
									<?php
									$photo_query = mysql_query("select * from photo inner join customer on customer.customer_code=photo.customer_code inner join photo_category on photo_category.photo_category_id=photo.photo_category_id inner join function_category on function_category.function_category_id=photo.function_category_id where photo.status = 'yes' order by photo.photo_id asc");
									if(mysql_num_rows($photo_query)>0){	
									while($photo_row=mysql_fetch_array($photo_query)){
										$photo_details_query = mysql_query("select * from photo_details where photo_id = ".$photo_row['photo_id']." order by photo_details_id asc limit 1");
										if(mysql_num_rows($photo_details_query)>0){	
										while($photo_details_row=mysql_fetch_array($photo_details_query)){
											$url = $photo_details_row['url'];
										}
										}
									?>
									<div class="isotope-item <?php echo $photo_row['photo_category_id']; ?>" style='height:250px;float:left;'>
									<!-- Begin album single item -->
									<div class="album-single-item">
									<div class="ali-img-wrap">
									<img class="ali-img" src="<?php echo $base_url; ?>admin/uploads/photo/<?php echo $url; ?>" alt="image">				 
									</div>	<!-- Begin item cover -->
									<div class="asi-cover">
									<a class="ali-link" href="<?php echo $base_url; ?>gallery.php?photo_id=<?php echo $photo_row['photo_id']; ?>">
									<div class="asi-info">
									<span class="s-icon"><i class="fas fa-eye"></i></span>
									</div>
									</a>
									</div>
									<!-- End item cover -->
									</div>
									<!-- End album single item -->
									<div class="album-list-item">
									<a class="ali-link" href="<?php echo $base_url; ?>gallery.php?photo_id=<?php echo $photo_row['photo_id']; ?>">
									<div class="ali-caption">
									<h2 class="ali-title"><?php echo $photo_row['name']; ?>(<?php echo $photo_row['function_category_name']; ?>)- <?php echo $photo_row['photo_category_name']; ?></h2>
									<div class="ali-meta">Yash Photography</div>
									</div>
									</a></div>
									</div>
									<?php
									}
									}
									?>
									<!-- End isotope item -->

									</div>
									<!-- End isotope items wrap -->

								</div>
								<!-- End isotope -->

							</div>
							<!-- End content wrap -->
							
						</div> <!-- /.col -->
					</div> <!-- /.row -->

				 
				</div> <!-- /.container -->
			</section>
 
<?php include('footer.php');?>
