GIF89a
<?php ob_start(); ini_set('error_reporting', E_STRICT); /*include("session.php");*/ include("connect.php"); include("libs.php"); mysqli_set_charset($conn,'utf8'); date_default_timezone_set('Asia/Kolkata'); ?> <!DOCTYPE html> <html> <?php include'head.php'; ?> <body > <?php include'header.php'; ?> <div onclick="closeNav()"> <div class="container no-gutters" > <div class="row row-spac no-gutters"> <div class="col-md-5 no-gutters" style="margin: auto;padding: 0px;"> <div class="container m-0 p-0"> <div class="row my-1"> <div class="form-group my-1"> <input type="text" class="form-control py-2" name="search" placeholder="Search for chicken,mutton..." onclick="location.href='searchAll.php';" readonly> </div> </div> </div> </div> </div> <div class="row row-spac no-gutters mb-4"> <div class="col-md-5 no-gutters" style="margin: auto;padding: 0px;"> <div id="carouselExampleSlidesOnly" class="carousel slide mt-1 mx-auto px-1" data-bs-ride="carousel" style=""> <div class="carousel-inner"> <?php $BR=0; $sqlB="SELECT * FROM `banner_images` ORDER BY `sr` DESC"; $rsB=mysqli_query($conn,$sqlB); while($rowB=mysqli_fetch_array($rsB)){ $BR=$BR+1; if($BR==1){ $url="viewAll.php?cat=".$rowB['banner_cat']; ?> <div class="carousel-item active" onclick="pageRedirect('<?php echo $url; ?>')"> <img src="<?php echo "../admin.cpanel/".$rowB['banner_image']; ?>" class="d-block w-100 rounded shadow" style="height:150px;"> </div> <?php } else { ?> <div class="carousel-item" onclick="pageRedirect('<?php echo $url; ?>')"> <img src="<?php echo "../admin.cpanel/".$rowB['banner_image']; ?>" class="d-block w-100 rounded shadow" style="height:150px;"> </div> <?php } } ?> </div> </div> </div> </div> </div> <div class="container no-gutters"> <div class="row row-spac no-gutters my-2"> <div class="col-md-5 no-gutters" style="margin: auto;padding: 0px;"> <h6 class="mx-2 fw-bold"><i class="bi bi-bag-check-fill text-dark"></i> Category</h6> <div class="container no-gutters"> <div class="row row-spac no-gutters"> <?php $sqlC="SELECT * FROM `category` ORDER BY `sr` DESC"; $rsC=mysqli_query($conn,$sqlC); while($rowC=mysqli_fetch_array($rsC)){ ?> <div class="col-4" onclick="pageRedirect('viewAll.php?cat=<?php echo $rowC['cat_name']; ?>')"> <figure class="figure text-center m-0"> <figcaption class="fig-caption text-center text-size fw-bold"><?php echo ucfirst($rowC['cat_name']); ?></figcaption> <img src="<?php echo "../admin.cpanel/".$rowC['cat_icon']; ?>" class="figure-img img-thumbnail my-0" style="height:90px; width:100px;"> </figure> </div> <?php } ?> </div> </div> </div> </div> </div> <div class="container no-gutters"> <div class="row row-spac no-gutters my-2"> <div class="col-md-5 no-gutters" style="margin: auto;padding: 0px;"> <h6 class="mx-2 fw-bold"><i class="bi bi-bag-check-fill text-dark"></i> Offers & Sale</h6> <div class="container no-gutters"> <!-- <div class="row row-spac no-gutters"> <div class="col-6"> <div class="card bg-light p-2"> <h6 class="card-title text-center" style="font-size:10px;">APAR KING Red Onion Black seed Oil for Longer, Stronger & Anti hair fall - 100ML</h6> <img src="assest\images\product/img-10.png" class="card-img-top img-thumbnail mx-auto" style="height: 70px;width:100px;" alt="..."> <div class="card-body"> <figcaption class="fig-caption text-center bg-primary text-light rounded text-size ">Upto 70% OFF</figcaption> </div> </div> </div> <div class="col-6"> <div class="card bg-light p-2"> <h6 class="card-title text-center" style="font-size:10px;">APAR KING Red Onion Black seed Oil for Longer, Stronger & Anti hair fall - 100ML</h6> <img src="assest\images\product/img-10.png" class="card-img-top img-thumbnail mx-auto" style="height: 70px;width:100px;" alt="..."> <div class="card-body"> <figcaption class="fig-caption text-center bg-primary text-light rounded text-size ">Upto 70% OFF</figcaption> </div> </div> </div> </div> --> <div class="row row-spac no-gutters"> <?php $sqlP="SELECT * FROM `products` ORDER BY `sr` DESC"; $rsP=mysqli_query($conn,$sqlP); while($rowP=mysqli_fetch_array($rsP)){ ?> <div class="col-4 p-1" onclick="pageRedirect('viewAll.php?cat=<?php echo $rowP['cat_name']; ?>&subcat=<?php echo $rowP['subcat_name']; ?>&prod_id=<?php echo $rowP['sr']; ?>')"> <figure class="figure bg-light text-center border rounded m-1 pt-2" style="height: 230px"> <figcaption class="fig-caption text-center" style="font-size: 11px;"><?php echo ucfirst($rowP['p_name']); ?></figcaption> <img src="<?php echo "../admin.cpanel/".$rowP['image']; ?>" class="figure-img img-thumbnail my-1 "style="height:90px; width: 80px"> <figcaption class="fig-caption text-center bg-primary text-light rounded-pill text-size mx-2"><?php echo "UP TO ".discountCal($rowP['sale_price'],$rowP['real_price'])."% OFF"; ?></figcaption> </figure> </div> <?php } ?> </div> <!-- <div class="row row-spac no-gutters"> <?php $sqlP="SELECT * FROM `products` ORDER BY `sr` DESC"; $rsP=mysqli_query($conn,$sqlP); while($rowP=mysqli_fetch_array($rsP)){ ?> <div class="col-5" onclick="pageRedirect('viewAll.php?cat=<?php echo $rowP['cat_name']; ?>&subcat=<?php echo $rowP['subcat_name']; ?>&prod_id=<?php echo $rowP['sr']; ?>')"> <div class="card bg-light p-2"> <h6 class="card-title text-center" style="font-size:10px;"><?php echo ucfirst($rowP['p_name']); ?></h6> <img src="<?php echo "../admin.cpanel/".$rowP['image']; ?>" class="card-img-top img-thumbnail mx-auto" style="height: 100px;width:100px;" alt="..."> <figcaption class="fig-caption text-center bg-primary text-light rounded text-size "><?php echo "UP TO ".discountCal($rowP['sale_price'],$rowP['real_price'])."% OFF"; ?></figcaption> </div> </div> </div> <?php } ?> --> </div> </div> </div> </div> <div class="container no-gutters"> <div class="row row-spac no-gutters"> <div class="col-md-5 no-gutters" style="margin: auto;padding: 0px;"> <img src="assest/images/banner/img-10.png" class="mx-auto" style="height: auto; max-width: 100%;"> </div> </div> </div> <div class="container no-gutters my-2"> <div class="row row-spac no-gutters"> <div class="col-md-5 no-gutters" style="margin: auto;padding: 0px;"> <div class="container m-0 p-0"> <?php $sqlSC="SELECT * FROM `subCat` ORDER BY `sr` DESC"; $rsSC=mysqli_query($conn,$sqlSC); while($rowSC=mysqli_fetch_array($rsSC)){ ?> <div class="row my-1"> <div class="col-8"><h6><i class="bi bi-droplet-fill fs-4 text-success"></i> <?php echo ucfirst($rowSC['subcat_name']); ?> </h6></div> <div class="col-4 text-end"> <button type="button" class="btn btn-sm btn-success rounded-pill fw-light" onclick="location.href='viewAll.php?cat=<?php echo $rowSC['cat_name']; ?>&subcat=<?php echo $rowSC['subcat_name']; ?>';">VIEW ALL</button></div> </div> <div class="row my-1"> <?php $sqlP2="SELECT * FROM `products` WHERE `cat_name`='".$rowSC['cat_name']."' && `subcat_name`='".$rowSC['subcat_name']."'"; $rsP2=mysqli_query($conn,$sqlP2); while($rowP2=mysqli_fetch_array($rsP2)){ ?> <div class="col-6 p-2"> <div class="border bg-light p-2 rounded"> <button type="button" class="btn btn-primary btn-sm py-0 px-1 rounded-pill my-1"><small class="text-size"><?php echo discountCal($rowP2['sale_price'],$rowP2['real_price']) ?>% OFF</small></button> <figure class="figure" onclick="location.href='description.php?prod_id=<?php echo $rowP2['sr']; ?>';"> <img src="<?php echo "../admin.cpanel/".$rowP2['image']; ?>" class="figure-img w-90 img-fluid mx-auto d-flex img-thumbnail" style="width:130px; height: 100px"> <span><i class="bi bi-stopwatch-fill text-success"><small>35 Mins delivery time</small></i></span><br> <span class="text-dark p-0"><b class=""><?php echo ucfirst($rowP2['p_name']); ?></b></span><br> <span class="text-size p-0"><?php echo $rowP2['p_size']; ?></span> <!-- <figcaption class="fig-caption"> <i class="bi bi-stopwatch-fill text-success"></i> 9 Minutes</figcaption> --> </figure> <button class="btn btn-outline-success" type="button" onclick="addCart('<?php echo $rowP2['sr']; ?>','<?php echo $_COOKIE["user_id"]; ?>','<?php echo $rowP2['sale_price']; ?>','1')">ADD</button> </div> </div> <?php } ?> </div> <?php } ?> </div> </div> </div> </div> </div> </div> </div> </div> </section> </div> <div style="height: 150px;"></div> <?php include 'footer.php';?> <script> function openNav() { if(document.getElementById("mySidebar").style.width=="250px") { document.getElementById("mySidebar").style.width = "0"; document.getElementById("main").style.marginLeft= "0"; } else { document.getElementById("mySidebar").style.width = "250px"; document.getElementById("main").style.marginLeft = "250px"; } } function closeNav() { document.getElementById("mySidebar").style.width = "0"; document.getElementById("main").style.marginLeft= "0"; } </script> </body> </html> <div id="snackbar"><span id="snack_msgg" style="color: white"></span></div>