BLACKSITE
:
216.73.217.4
:
104.37.75.190 / alpenpass.ca
:
Linux server3.pointsplan.com 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
:
/
home
/
apca
/
www
/
Upload File:
files >> /home/apca/www/search-productresult.php
<?php session_start(); include('includes/config.php'); error_reporting(0); ?> <!DOCTYPE HTML> <html lang="en"> <head> <title>Motorcycle Rental Portal | Product Listing</title> <!--Bootstrap --> <link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css"> <!--Custome Style --> <link rel="stylesheet" href="assets/css/style.css" type="text/css"> <!--OWL Carousel slider--> <link rel="stylesheet" href="assets/css/owl.carousel.css" type="text/css"> <link rel="stylesheet" href="assets/css/owl.transitions.css" type="text/css"> <!--slick-slider --> <link href="assets/css/slick.css" rel="stylesheet"> <!--bootstrap-slider --> <link href="assets/css/bootstrap-slider.min.css" rel="stylesheet"> <!--FontAwesome Font Style --> <link href="assets/css/font-awesome.min.css" rel="stylesheet"> <!-- Fav and touch icons --> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicon-icon/apple-touch-icon-144-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/favicon-icon/apple-touch-icon-114-precomposed.html"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/favicon-icon/apple-touch-icon-72-precomposed.png"> <link rel="apple-touch-icon-precomposed" href="assets/images/favicon-icon/apple-touch-icon-57-precomposed.png"> <link rel="shortcut icon" href="assets/images/favicon-icon/favicon.png"> <link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet"> </head> <body> <?php include("includes/head.php"); include("includes/header.php"); ?> <body> <div class="container" style="min-height: 500px;"> <div class="row justify-content-center"> <div class="col-md-9 col-md-push-3"> <br /><br /><br /><h1>Product Search Results</h1> <h2>Search Term: <?php echo $_POST['searchTerm'];?></h2><br /><br /> <?php include('includes/config.php'); // Include your database connection if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Get the search term from the POST request $searchTerm = $_POST['searchTerm']; // Prepare the SQL query $sql = "SELECT id, ProductsTitle, ProductsBrnd, ProductsCategory, ProductsModelNumber, ProductsUPC, ProductsOverview, ProductsSize, ProductsColor FROM tblproducts WHERE ProductsTitle LIKE :searchTerm OR ProductsBrnd LIKE :searchTerm OR ProductsCategory LIKE :searchTerm OR ProductsModelNumber LIKE :searchTerm OR ProductsUPC LIKE :searchTerm OR ProductsOverview LIKE :searchTerm OR ProductsSize LIKE :searchTerm OR ProductsColor LIKE :searchTerm"; $query = $dbh->prepare($sql); $query->bindValue(':searchTerm', '%' . $searchTerm . '%', PDO::PARAM_STR); $query->execute(); // Fetch the results $results = $query->fetchAll(PDO::FETCH_ASSOC); if ($query->rowCount() > 0) { foreach ($results as $product) { // Create the link to product_details.php $productId = $product['id']; $productOverview = htmlentities($product['ProductsOverview']); $productsTitle=htmlentities($product['ProductsTitle']); $linkText = substr($productOverview, 0, 100) . (strlen($productOverview) > 100 ? '...' : ''); echo "<div style='margin-bottom: 20px;'>"; echo "<a href='product-details.php?phid={$productId}' style='text-decoration: none; color: #007bff; font-size:18px;'>"; echo "<h3>$productsTitle</h3>"; echo $linkText; echo "</a>"; echo "</div>"; echo "<hr>"; } } else { echo "<h3>No products found matching the search term.</h3>"; } } ?> </div> <!--Side-Bar--> <aside class="col-md-3 col-md-pull-9"> <div class="sidebar_widget"> <div class="widget_heading"> <h5><i class="fa fa-search" aria-hidden="true"></i> Find Your Product </h5> </div> <div class="sidebar_filter"> <form action="search-productresult.php" method="post"> <input type="text" name="searchTerm" class="form-control"/><br /><br /> <div class="form-group"> <button type="submit" class="btn btn-block"><i class="fa fa-search" aria-hidden="true"></i> Search Products</button> </div> </form> </div> </div> <div class="sidebar_widget"> <div class="widget_heading"> <h5><i class="fa fa-motorcycle" aria-hidden="true"></i> Recently Listed Products</h5> </div> <div class="recent_addedcars"> <ul> <?php $sql = "SELECT tblproducts.*,tblbrands.BrandName,tblbrands.id as bid from tblproducts join tblbrands on tblbrands.id=tblproducts.ProductsBrnd order by id desc limit 4"; $query = $dbh -> prepare($sql); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt=1; if($query->rowCount() > 0) { foreach($results as $result) { ?> <li class="gray-bg"> <div class="recent_post_img"> <a href="product-details.php?phid=<?php echo htmlentities($result->id);?>"><img src="admin/img/productimages/<?php echo htmlentities($result->Pimage1);?>" alt="image"></a> </div> <div class="recent_post_title"> <a href="product-details.php?phid=<?php echo htmlentities($result->id);?>"><?php echo htmlentities($result->ProductsTitle);?></a> <a href="product-details.php?phid=<?php echo htmlentities($result->id);?>" class="btn">View Details <span class="angle_arrow"><i class="fa fa-angle-right" aria-hidden="true"></i></span></a> </div> </li> <?php }} ?> </ul> </div> </div> </aside> <!--/Side-Bar--> </div> </div> <!--Footer --> <?php include('includes/footer.php');?> <!-- /Footer--> <!--Back to top--> <div id="back-top" class="back-top"> <a href="#top"><i class="fa fa-angle-up" aria-hidden="true"></i> </a> </div> <!--/Back to top--> <!--Login-Form --> <?php include('includes/login.php');?> <!--/Login-Form --> <!--Register-Form --> <?php include('includes/registration.php');?> <!--/Register-Form --> <!--Forgot-password-Form --> <?php include('includes/forgotpassword.php');?> <!-- Scripts --> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/interface.js"></script> <!--Switcher--> <script src="assets/switcher/js/switcher.js"></script> <!--bootstrap-slider-JS--> <script src="assets/js/bootstrap-slider.min.js"></script> <!--Slider-JS--> <script src="assets/js/slick.min.js"></script> <script src="assets/js/owl.carousel.min.js"></script> </body> </html>