관리-도구
편집 파일: products1.php
<?php include 'connection.php'; ?> <!DOCTYPE html> <html lang="en"> <head> <title>Product</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!--===============================================================================================--> <link rel="icon" type="image/png" href="images/icons/favicon.png" /> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="fonts/iconic/css/material-design-iconic-font.min.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="fonts/linearicons-v1.0.0/icon-font.min.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="vendor/animate/animate.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="vendor/css-hamburgers/hamburgers.min.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="vendor/animsition/css/animsition.min.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="vendor/daterangepicker/daterangepicker.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="vendor/slick/slick.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="vendor/MagnificPopup/magnific-popup.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="vendor/perfect-scrollbar/perfect-scrollbar.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="css/util.css"> <link rel="stylesheet" type="text/css" href="css/main.css"> <!--===============================================================================================--> </head> <body class="animsition"> <!-- Header --> <?php include 'publicheader.php'; ?> <!-- Cart --> <?php include 'cart-side.php' ?> <!-- Product --> <div class="bg0 m-t-63 p-b-50"> <div class="container"> <div class="flex-w flex-sb-m p-b-52"> <div class="flex-w flex-l-m filter-tope-group m-tb-10"> <button class="stext-106 cl6 hov1 bor3 trans-04 m-r-32 m-tb-5 how-active1" data-filter="*"> All Products </button> <button class="stext-106 cl6 hov1 bor3 trans-04 m-r-32 m-tb-5" data-filter=".White Single"> White Single </button> <button class="stext-106 cl6 hov1 bor3 trans-04 m-r-32 m-tb-5" data-filter=".White Double"> White Double </button> <button class="stext-106 cl6 hov1 bor3 trans-04 m-r-32 m-tb-5" data-filter=".Cream Single"> Cream Single </button> <button class="stext-106 cl6 hov1 bor3 trans-04 m-r-32 m-tb-5" data-filter=".Cream Double"> Cream Double </button> </div> <!-- <div class="flex-w flex-c-m m-tb-10"> <div class="flex-c-m stext-106 cl6 size-104 bor4 pointer hov-btn3 trans-04 m-r-8 m-tb-4 js-show-filter"> <i class="icon-filter cl2 m-r-6 fs-15 trans-04 zmdi zmdi-filter-list"></i> <i class="icon-close-filter cl2 m-r-6 fs-15 trans-04 zmdi zmdi-close dis-none"></i> Sort </div> <div class="flex-c-m stext-106 cl6 size-105 bor4 pointer hov-btn3 trans-04 m-tb-4 js-show-search"> <i class="icon-search cl2 m-r-6 fs-15 trans-04 zmdi zmdi-search"></i> <i class="icon-close-search cl2 m-r-6 fs-15 trans-04 zmdi zmdi-close dis-none"></i> Search </div> </div> --> <!-- Search product --> <!-- <div class="dis-none panel-search w-full p-t-10 p-b-15"> <div class="bor8 dis-flex p-l-15"> <button class="size-113 flex-c-m fs-16 cl2 hov-cl1 trans-04"> <i class="zmdi zmdi-search"></i> </button> <input class="mtext-107 cl2 size-114 plh2 p-r-15" type="text" name="search-product" placeholder="Search"> </div> </div> --> <!-- Filter --> <!-- <div class="dis-none panel-filter w-full p-t-10"> <div class="wrap-filter flex-w bg6 w-100 p-lr-40 p-t-27 p-lr-15-sm"> <div class="filter-col1 p-r-15 p-b-27"> <div class="mtext-102 cl2 p-b-15"> Sort By </div> <ul> <li class="p-b-6"> <a href="#" class="filter-link stext-106 trans-04"> Default </a> </li> <li class="p-b-6"> <a href="#" class="filter-link stext-106 trans-04"> Popularity </a> </li> <li class="p-b-6"> <a href="#" class="filter-link stext-106 trans-04"> Average rating </a> </li> <li class="p-b-6"> <a href="#" class="filter-link stext-106 trans-04 filter-link-active"> Newness </a> </li> <li class="p-b-6"> <a href="#" class="filter-link stext-106 trans-04"> Price: Low to High </a> </li> <li class="p-b-6"> <a href="#" class="filter-link stext-106 trans-04"> Price: High to Low </a> </li> </ul> </div> </div> </div> --> </div> <div class="row isotope-grid"> <?php // Check if the form is submitted if (isset($_GET['query'])) { // Retrieve and sanitize the search query $searchQuery = $_GET['query']; $searchQuery = htmlspecialchars($searchQuery); // Perform the database query (assuming you have a database connection) $conn=mysqli_connect('localhost','u539723576_riro','ICT@rir0#','u539723576_riro','3306'); if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } $sql = "SELECT * FROM product WHERE product_name LIKE '%$searchQuery%'"; $result = mysqli_query($conn, $sql); // Display the search results if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_assoc($result)) { // Output each product within the isotope-grid div ?> <div style="width: 50%;" class="col-12 col-sm-6 col-md-6 col-lg-4 col-xl-3 p-b-35 isotope-item"> <!-- Block2 --> <div class="block2"> <div class="block2-pic hov-img0"> <img src="uploads/<?php echo $row['product_image'] ?>" alt="IMG-PRODUCT"> <a href="publicproductdetails.php?id=<?php echo $row['product_id']; ?>&pname=<?php echo $row['product_name'];?>&rate=<?php echo $row['product_price'];?>&cid=<?php echo $row['cat_id'];?>" class="block2-btn flex-c-m stext-103 cl2 size-102 bg0 bor2 hov-btn1 p-lr-15 trans-04"> View </a> </div> <div class="block2-txt flex-w flex-t p-t-14"> <div class="block2-txt-child1 flex-col-l"> <a href="publicproductdetails.php" class="stext-104 cl4 hov-cl1 trans-04 js-name-b2 p-b-6"> <?php echo $row['product_name'] ?> </a> <span class="stext-105 cl3"> ₹<?php echo $row['product_price'] ?> </span> </div> <div class="block2-txt-child2 flex-r p-t-3"> <a href="#" class="btn-addwish-b2 dis-block pos-relative js-addwish-b2"> <img class="icon-heart1 dis-block trans-04" src="images/icons/icon-heart-01.png" alt="ICON"> <img class="icon-heart2 dis-block trans-04 ab-t-l" src="images/icons/icon-heart-02.png" alt="ICON"> </a> </div> </div> </div> </div> <?php } } else { echo "<p>No results found.</p>"; } // Close the database connection mysqli_close($conn); } ?> </div> </div> </div> <div class="sec-banner bg0 p-b-55"> <div class="container"> <div class="row"> <div class="col-md-6 col-lg-4 col-sm-4 p-b-30 m-lr-auto"> <!-- Block1 --> <div class="block1 wrap-pic-w"> <img src="images/tissue1.jpg" alt="IMG-BANNER"> <a href="tissue-dhoti.php" class="block1-txt ab-t-l s-full flex-col-l-sb p-lr-38 p-tb-34 trans-03 respon3"> <div class="block1-txt-child1 flex-col-l"> <span class="block1-name ltext-101 trans-04 p-b-8"> Tissue Dhoti </span> <span class="block1-info stext-102 trans-04"> New Collection </span> </div> <div class="block1-txt-child2 p-b-4 trans-05"> <div class="block1-link stext-101 cl0 trans-09"> Shop Now </div> </div> </a> </div> </div> <div class="col-md-6 col-lg-4 col-sm-4 p-b-30 m-lr-auto"> <!-- Block1 --> <div class="block1 wrap-pic-w"> <img src="images/color_dhoti.jpg" alt="IMG-BANNER"> <a href="colour-dhoti.php" class="block1-txt ab-t-l s-full flex-col-l-sb p-lr-38 p-tb-34 trans-03 respon3"> <div class="block1-txt-child1 flex-col-l"> <span class="block1-name ltext-101 trans-04 p-b-8"> Colour Dhoti </span> <span class="block1-info stext-102 trans-04"> New Collection </span> </div> <div class="block1-txt-child2 p-b-4 trans-05"> <div class="block1-link stext-101 cl0 trans-09"> Shop Now </div> </div> </a> </div> </div> <div class="col-md-6 col-lg-4 col-sm-4 p-b-30 m-lr-auto"> <!-- Block1 --> <div class="block1 wrap-pic-w"> <img src="images/iyer.jpg" alt="IMG-BANNER"> <a href="iyer-dhoti.php" class="block1-txt ab-t-l s-full flex-col-l-sb p-lr-38 p-tb-34 trans-03 respon3"> <div class="block1-txt-child1 flex-col-l"> <span class="block1-name ltext-101 trans-04 p-b-8"> Iyer Dhoti </span> <span class="block1-info stext-102 trans-04"> New Collection </span> </div> <div class="block1-txt-child2 p-b-4 trans-05"> <div class="block1-link stext-101 cl0 trans-09"> Shop Now </div> </div> </a> </div> </div> </div> </div> </div> <!-- Footer --> <?php include 'publicfooter.php' ?> </body> </html>