<?php include("header.php");
 include("side.php");
 include("../db.php");
 $id=$_GET['id'];

$sql=mysqli_query($conn,"SELECT * FROM `offer` WHERE id='$id'");

?>
<link rel="stylesheet" type="text/css" href="css/boot.css">
            <div id="layoutSidenav_content">
                <main>
                    <div class="container-fsluid">
                        <h2 class="mt-30 page-title">&nbsp;&nbsp;Product</h2>
                        <ol class="breadcrumb mb-30">
                            <li class="breadcrumb-item"><a href="index.php">Dashboard</a></li>
                            <li class="breadcrumb-item"><a href="products.php?main=7&cat=1">Product</a></li>
                            <li class="breadcrumb-item active">Product view</li>
                        </ol>
                        <div class="row">
							<div class="col-lg-6 col-lg-offset-3 col-md-6">
								<div class="card card-static-2 mb-30">
									<div class="card-body-table">
										<div class="shopowner-content-left text-center pd-20">
											<?php while ($row=mysqli_fetch_object($sql)) { ?>

											<div style="display: inline-block;">
												
												<img class="mySlides shop_img" src='../uploads/
												<?php if(isset($row->image)){ echo $row->image; } 
												 ?>
												'>
																							
												
											</div>

											<ul class="product-dt-purchases">
												<li>
													<div class="product-status">
													 <span class="badge-item-2 badge-status"><?=$row->title;?></span>
													</div>
												</li>
												<li>
													<div class="product-status">
														<span class="badge-item-2 badge-status"><?php if($row->status='1'){ echo 'Active'; } else { echo 'Unactive'; };?></span>
													</div>
												</li>
											</ul>
											<div class="shopowner-dts">
												<div class="shopowner-dt-list">
													<span class="left-dt">Offer title </span>
													<span class="right-dt"><?=$row->title;?></span>
												</div>
												<div class="shopowner-dt-list">
													<span class="left-dt">Offer</span>
													<span class="right-dt"><?=$row->offer;?></span>
												</div>
												<div class="shopowner-dt-list">
													<span class="left-dt">Expiry</span>
													<span class="right-dt"><?=$row->expiry;?></span>
												</div>
												<div class="shopowner-dt-list">
													<span class="left-dt"><?=$row->disc;?></span>
													<!-- <span class="right-dt"><?=$row->detail;?></span> -->
												</div>
	
											</div>
										<?php } ?>
										</div>
									</div>
								</div>
							</div>
                        </div>
                    </div>
                </main>
               <?php include("footer.php"); ?>

               <script>
               	var slideIndex = 1;
showDivs(slideIndex);

function plusDivs(n) {
  showDivs(slideIndex += n);
}

function showDivs(n) {
  var i;
  var x = document.getElementsByClassName("mySlides");
  if (n > x.length) {slideIndex = 1}
  if (n < 1) {slideIndex = x.length} ;
  for (i = 0; i < x.length; i++) {
    x[i].style.display = "none";
  }
  x[slideIndex-1].style.display = "block";
}
               </script>