]]jkjjgdjffksdkdxmnvbcbcvbvcbbbbbbbbbvcbcbvcbmnmbnwqeqwewqskfgj
במ12[cvbnvbnvcvbcvbcvbvvvccccccccccccccvbcvbcvbnmnmqewv;'
/
home
/
u729855735
/
public_html
/
vitaminforous
/
Upload FileeE
HOME
<?php require('inc/header.php'); if(isset($_GET['brand'])){ $brand = $_GET['brand']; $limit = 9; $page = isset($_GET['page']) ? $_GET['page'] : 1; $start = ($page - 1) * $limit; $query = "SELECT * FROM product WHERE brand LIKE '%$brand%' LIMIT $start, $limit"; $run = mysqli_query($conn,$query); $count = mysqli_num_rows($run); } ?> <style> .pagination{ gap:0.5rem; } ul.pagination li a.selected { background-color: #0D9B4D; color: #fff; border: 1px solid #0D9B4D; padding:5px 10px; } </style> <div class="inner-shop-area"><div class="container"> <div class="row justify-content-center"> <div class="col-xl-9 col-lg-8 col-md-12 col-sm-8"> <div class="shop-top-wrap"> <div class="row"> <div class="col-md-6"> <div class="shop-top-left"> <div class="woocommerce-notices-wrapper"></div><p> Showing <span><?php echo $count;?></span> results for "<?php echo $brand;?>"</p> </div> </div> <div class="col-md-6"> </div> </div> </div> <div class="row row-cols-xl-3 row-cols-lg-3 row-cols-md-2 row-cols-1"> <!-- product area start --> <?php if($count > 0){ while($row = mysqli_fetch_assoc($run)){ ?> <div class="col"> <div class="suxnix-product-main"> <div class="home-shop-item inner-shop-item"> <div class="home-shop-thumb"> <a href="shopdetails.php?id=<?php echo $row['id']?>" style="text-align: center;display: flex;"> <img src="admin/uploads/<?php echo $row['pr_img']?>" style="width:250px"/></a> <div class="on-sale-wrap"></div> </div> <div class="home-shop-content"> <div class="shop-item-cat"> <a href="category_product.php?cat=<?php echo $row['pr_cat']?>"><?php echo $row['pr_cat']?></a> </div> <h4 class="title"> <a href="shopdetails.php?id=<?php echo $row['id']?>"><?php echo $row['pr_nm']?></a> </h4> <div class="home-shop-price"> <?php if($row['sale_price'] != 0){ ?> <span class="price"><span class="woocommerce-Price-amount amount"><bdi><span class="woocommerce-Price-currencySymbol">$</span><?php echo $row['sale_price'];?></bdi></span></span> <?php } else{?> <span class="price"><span class="woocommerce-Price-amount amount"><bdi><span class="woocommerce-Price-currencySymbol">$</span><?php echo $row['pr_price'];?></bdi></span></span> <?php } ?> </div> <div class="home-shop-rating"> <div class="details-rating shop-single-rating" title="Rating 5.00 out of 5"><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><span class="rating-count">( 5.00 out of 5 )</span></div> </div> <div class="shop-content-bottom"> <?php if($row['sale_price'] != 0){ $price = $row['sale_price']; } else{ $price = $row['pr_price']; } ?> <form method="POST" action="manage_cart.php"> <input type="hidden" name="item_id" value="<?php echo $row['id'];?>"> <input type="hidden" name="item_image" value="<?php echo $row['pr_img'];?>"> <input type="hidden" name="item_name" value="<?php echo $row['pr_nm'];?>"> <input type="hidden" name="item_price" value="<?php echo $price;?>"> <input type="hidden" name="item_qty" value="1"> <input type="hidden" name="item_cat" value="<?php echo $row['pr_cat']?>"> <button type="submit" style="border:none" class="add-cart-btn cart-button icon-btn product_type_simple add_to_cart_button ajax_add_to_cart" name="add_cart"><i style="font-size:25px" class="flaticon-shopping-cart-1"></i></button> </form> <!--<a href="javascript:void(0)" class="add-cart-btn cart-button icon-btn product_type_simple add_to_cart_button ajax_add_to_cart"><i class="flaticon-shopping-cart-1"></i></a>--> <form method="POST" action="checkout.php"> <input type="hidden" value="<?php echo $row['id'];?>" name="itm_id"> <input type="hidden" value="<?php echo $row['pr_nm'];?>" name="itm_nm"> <input type="hidden" value="<?php echo $price;?>" name="itm_price"> <input type="submit" class="btn btn-two" name="buy" value="Buy Now"> </form> </div> </div> </div> <div class="tinv-wraper woocommerce tinv-wishlist tinvwl-after-add-to-cart tinvwl-loop-button-wrapper tinvwl-woocommerce_after_shop_loop_item" data-tinvwl_product_id="80"> <div class="tinv-wishlist-clear"></div><a role="button" tabindex="0" name="add-to-wishlist" aria-label="Add to Wishlist" class="tinvwl_add_to_wishlist_button tinvwl-icon-heart tinvwl-position-after tinvwl-loop" data-tinv-wl-list="[]" data-tinv-wl-product="80" data-tinv-wl-productvariation="0" data-tinv-wl-productvariations="[0]" data-tinv-wl-producttype="simple" data-tinv-wl-action="add"><span class="tinvwl_add_to_wishlist-text">Add to Wishlist</span></a><div class="tinv-wishlist-clear"></div> <div class="tinvwl-tooltip">Add to Wishlist</div> </div> </div> </div> <?php } }?> </div> <div class="suxnix-shop-pagination"> <!--<nav aria-label="Page navigation pagination-wrap"> <ul class='page-numbers'> <li><span aria-current="page" class="page-numbers current">1</span></li> <li><a class="page-numbers" href="#">2</a></li> <li><a class="next page-numbers" href="#"><i class="fas fa-angle-double-right"></i></a></li> </ul> </nav>--> <?php // Pagination links $query = "SELECT COUNT(*) AS count FROM product WHERE brand='$brand'"; $result = mysqli_query($conn, $query); $row = mysqli_fetch_assoc($result); $total_records = $row['count']; $total_pages = ceil($total_records / $limit); $previous_page = $page - 1; $next_page = $page + 1; echo "<ul class='pagination'>"; if ($page > 1) { echo "<li><a href='?page=$previous_page&&brand=$brand'>Previous</a></li>"; } for ($i = 1; $i <= $total_pages; $i++) { if ($i == $page) { echo "<li><a href='?page=$i&&brand=$brand' class='selected'>$i</a></li>"; } else { echo "<li><a href='?page=$i&&brand=$brand'>$i</a></li>"; } } if ($page < $total_pages) { echo "<li><a href='?page=$next_page&&brand=$brand'>Next</a></li>"; } echo "</ul>"; ?> </div> </div> <div class="col-xl-3 col-lg-4 col-md-8 col-sm-8"> <aside class="shop-sidebar"> <div id="woocommerce_product_categories-2" class="product-widgets side-cat woocommerce widget_product_categories"><h4 class="sidebar-title">Product Brands</h4><ul class="product-categories"> <?php $fetch = "SELECT DISTINCT brand FROM product"; $fetch_que = mysqli_query($conn,$fetch); $count = mysqli_num_rows($fetch_que); if($count > 0){ while($get_cat = mysqli_fetch_assoc($fetch_que)){ $catnm = $get_cat['brand']; $ct = "SELECT * FROM product WHERE brand LIKE '%$catnm%'"; $ct_rn = mysqli_query($conn,$ct); $ct_count = mysqli_num_rows($ct_rn); ?> <li class="cat-item cat-item-27"><a href="brand_product.php?brand=<?php echo $get_cat['brand'];?>"><?php echo $get_cat['brand']?></a> <span class="float-right"><?php echo $ct_count;?></span></li> <?php } }?> </ul></div> </div> </aside> </div> </div></div> <?php require('inc/footer.php'); ?>