<?php include("header.php");
 include("side.php");
 include("../db.php");

?>

<style >
	.badge-statuss {
    color: #fff;
    background-color:red!important;
}

</style>
<?php $sql=mysqli_query($conn,"SELECT * FROM `shops` WHERE id='".$_SESSION['id2']."'");
 while ($row=mysqli_fetch_object($sql)) {  ?>
            <div id="layoutSidenav_content" >
                <main>
                    <div class="container-fluid">
                        <h2 class="mt-30 page-title">Store</h2>
                        <ol class="breadcrumb mb-30">
                            <li class="breadcrumb-item"><a href="index.php">Dashboard</a></li>
                            <li class="breadcrumb-item"><a href="shop_view.php?main=2&cat=1">Store</a></li>
                            <li class="breadcrumb-item active">Store view</li>
                        </ol>
                        <div class="row">
                        	<div class="col-lg-12">
								<a href="add_shop.php?main=2&cat=2" class="add-btn hover-btn">Edit</a>
							</div>
							<div class="col-lg-4 col-md-5">
								<div class="card card-static-2 mb-30">
									<div class="card-body-table">
										<div class="shop-content-left pd-20">
											<div class="shop_img">
												<?php if(!empty($row->image)){ echo '<img src="../uploads/'.$row->image.'" alt="" style="height:100px;width100px;">'; } else { echo '<img src="images/shop.svg" alt="">'; }?>
												
											</div>
											<div class="shop-dt-left">
												<h4><?php if(!empty($row->shop_name)){ echo $row->shop_name; } else { echo '----'; }?></h4>
												<span><?php if(!empty($row->categtory)){ echo $row->categtory; } else { echo '----'; }?></span>
											</div>
										</div>
									</div>
								</div>
								<div class="card card-static-2 mb-30">
									<div class="card-body-table">
										<div class="shopowner-content-left pd-20">
											<div class="shopowner-dt-left">
												<h4><?php if(!empty($row->name)){ echo $row->name; } else { echo '----'; }?></h4>
												<span>Shop Owner</span>
											</div>
											<div class="shopowner-dts">
												<div class="shopowner-dt-list">
													<span class="left-dt">Name</span>
													<span class="right-dt"><?php if(!empty($row->name)){ echo $row->name; } else { echo '----'; }?></span>
												</div>
												<div class="shopowner-dt-list">
													<span class="left-dt">Phone</span>
													<span class="right-dt"><?php if(!empty($row->mobile)){ echo $row->mobile; } else { echo '----'; }?></span>
												</div>
												<div class="shopowner-dt-list">
													<span class="left-dt">Email</span>
													<span class="right-dt"><?php if(!empty($row->email)){ echo $row->email; } else { echo '----'; }?></span>
												</div>
												<div class="shopowner-dt-list">
													<span class="left-dt">Address</span>
													<span class="right-dt"><?php if(!empty($row->address)){ echo $row->address; } else { echo '----'; }?></span>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col-lg-8 col-md-7">
								<div class="card card-static-2 mb-30">
									<div class="card-body-table">
										<div class="shopowner-content-left pd-20">
											<div class="shopowner-dts mt-0">
												<div class="shopowner-dt-list">
													<span class="left-dt">Name :</span>
													<span class="right-dt"><?php if(!empty($row->shop_name)){ echo $row->shop_name; } else { echo '----'; }?></span>
												</div>
												
												<div class="shopowner-dt-list">
													<span class="left-dt">Delivery Charge</span>
													<span class="right-dt">&#8377;<?php if(!empty($row->delivery_charge)){ echo $row->delivery_charge; } else { echo '----'; }?></span>
												</div>
												<div class="shopowner-dt-list">
													<span class="left-dt">Delivery range in km</span>
													<span class="right-dt"><?php if(!empty($row->km)){ echo $row->km; } else { echo '----'; }?>km</span>
												</div>
												
												<div class="shopowner-dt-list">
													<span class="left-dt">Opening Time</span>
													<span class="right-dt"><?php if(!empty($row->open_time)){ echo $row->open_time; } else { echo '----'; }?>AM</span>
												</div>
												<div class="shopowner-dt-list">
													<span class="left-dt">Close Time</span>
													<span class="right-dt"><?php if(!empty($row->close_time)){ echo $row->close_time; } else { echo '----'; }?>PM</span>
												</div>
												<div class="shopowner-dt-list">
													<span class="left-dt">Address</span>
													<span class="right-dt"><?php if(!empty($row->shop_address)){ echo $row->shop_address; } else { echo '----'; }?></span>
												</div>
												<div class="shopowner-dt-list">
													<span class="left-dt">Description</span>
													<span class="right-dt"><?php if(!empty($row->disc)){ echo $row->disc; } else { echo '----'; }?></span>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
                        </div>
                    </div>
                </main>
               <?php } include("footer.php"); ?>
