ok
Direktori : /home/gainstransformin/public_html/ |
Current File : /home/gainstransformin/public_html/product_detail.php |
<!DOCTYPE html> <html lang="en"> <?php include("include/config.php"); ?> <head> <meta charset="utf-8"> <title>GAINS - Transforming Lives</title> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta content="" name="keywords"> <meta content="" name="description"> <!-- Favicon --> <link href="img/favicon.ico" rel="icon"> <!-- Google Web Fonts --> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap" rel="stylesheet"> <!-- Icon Font Stylesheet --> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.0/css/all.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.1/font/bootstrap-icons.css" rel="stylesheet"> <!-- Libraries Stylesheet --> <link href="lib/animate/animate.min.css" rel="stylesheet"> <link href="lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet"> <link href="lib/lightbox/css/lightbox.min.css" rel="stylesheet"> <!-- Customized Bootstrap Stylesheet --> <link href="css/bootstrap.min.css" rel="stylesheet"> <!-- Template Stylesheet --> <link href="css/style.css" rel="stylesheet"> </head> <body> <!-- Spinner Start --> <div id="spinner" class="show bg-white position-fixed translate-middle w-100 vh-100 top-50 start-50 d-flex align-items-center justify-content-center"> <div class="spinner-border position-relative text-primary" style="width: 6rem; height: 6rem;" role="status"></div> <i class="fa fa-laptop-code fa-2x text-primary position-absolute top-50 start-50 translate-middle"></i> </div> <!-- Spinner End --> <!-- Navbar Start --> <?php $product_id = isset($_REQUEST['product_id']) ? $_REQUEST['product_id'] : ""; $query = "SELECT TP.product_id, TP.fk_category_id, TP.product_name, TP.product_discription, TP.img1, TP.img2, TP.pro_contain, TP.pro_direction_to_use, TC.category_name, TC.comp_name FROM tbl_product TP LEFT JOIN tbl_category TC ON TP.fk_category_id = TC.cate_id WHERE TP.product_id = '".$product_id."'"; $stmt = mysqli_prepare($con, $query); mysqli_stmt_bind_param($stmt, "s", $product_id); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); if (mysqli_num_rows($result) > 0) { $accountUserData = mysqli_fetch_array($result); ?> <?php if ($accountUserData['comp_name'] == "GeoMAX Plastchem (I) Pvt. Ltd.") { include "include/geomax_header.php" ; } else if ($accountUserData['comp_name'] == "Asean Agritechnologies (I) Pvt Ltd") { include "include/asean_header.php" ; } else if ($accountUserData['comp_name'] == "Innovative-Ag Transformataion Technologies") { include "include/innovative_header.php" ; } else if ($accountUserData['comp_name'] == "Newsol Agritechnologies (Opc) Pvt Ltd") { include "include/newsol_header.php" ; } else if ($accountUserData['comp_name'] == "Siddhivinayak lawns and Hotel Food Hub") { include "include/sidhhi_header.php" ; } else if ($accountUserData['comp_name'] == "Gains Academy Foundation") { include "include/gains_ac_foun_header.php" ; } else { include "include/b2b_header.php" ; } } ?> <!-- Navbar End --> <!-- Service Start --> <?php // Assuming $con is your database connection $product_id = isset($_REQUEST['product_id']) ? $_REQUEST['product_id'] : ""; // Prepare the SQL statement with a placeholder for product_id $query = "SELECT TP.product_id, TP.fk_category_id, TP.product_name, TP.product_discription, TP.img1, TP.img2, TP.pro_contain, TP.pro_direction_to_use, TC.category_name, TC.comp_name FROM tbl_product TP LEFT JOIN tbl_category TC ON TP.fk_category_id = TC.cate_id WHERE TP.product_id = '".$product_id."' "; // Prepare and bind the statement $stmt = mysqli_prepare($con, $query); mysqli_stmt_bind_param($stmt, "s", $product_id); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); // Check if any rows were returned if (mysqli_num_rows($result) > 0) { $accountUserData = mysqli_fetch_array($result); ?> <div class="container-xxl py-5"> <div class="container"> <div class="text-center mx-auto mb-5 wow fadeInUp" data-wow-delay="0.1s" style="max-width: 600px;"> <h1 class="display-6 mb-4"><?php echo $accountUserData['category_name']?> </h1> </div> <div class="row g-4"> <div class="col-lg-4 col-md-6 wow fadeInUp" data-wow-delay="0.1s"> <a class="service-item d-block rounded text-center h-100 p-4" href=""> <img class="img-fluid rounded" src="https://gainstransforminglives.com/Gains_admin/uploads/<?php echo $accountUserData['img1']; ?>" /> </a> </div> <div class="col-lg-8 col-md-6 wow fadeInUp" data-wow-delay="0.1s"> <?php if ($accountUserData['comp_name'] == "GeoMAX Plastchem (I) Pvt. Ltd.") { ?> <h4 class="mb-1 text-center"> <?php echo $accountUserData['product_name']; ?></h4> <img class="img-fluid rounded" src="https://gainstransforminglives.com/Gains_admin/uploads/<?php echo $accountUserData['img2']; ?>" /> <?php } else { ?> <h4 class="mb-1 text-center"> <?php echo $accountUserData['product_name']; ?></h4> <p><b>Product Description :</b> <?php echo $accountUserData['product_discription']; ?></p> <p><b>Product Contain :</b><?php echo $accountUserData['pro_contain']; ?> </p> <p><b>Direction to Use : </b><?php echo $accountUserData['pro_direction_to_use']; ?></p> <?php } ?> </div> </div> </div> </div> <?php } else { echo "No product found with the given ID."; } ?> <!-- Service End --> <!-- Footer Start --> <?php $product_id = isset($_REQUEST['product_id']) ? $_REQUEST['product_id'] : ""; $query = "SELECT TP.product_id, TP.fk_category_id, TP.product_name, TP.product_discription, TP.img1, TP.img2, TP.pro_contain, TP.pro_direction_to_use, TC.category_name, TC.comp_name FROM tbl_product TP LEFT JOIN tbl_category TC ON TP.fk_category_id = TC.cate_id WHERE TP.product_id = '".$product_id."' "; $stmt = mysqli_prepare($con, $query); mysqli_stmt_bind_param($stmt, "s", $product_id); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); if (mysqli_num_rows($result) > 0) { $accountUserData = mysqli_fetch_array($result); ?> <?php if ($accountUserData['comp_name'] == "GeoMAX Plastchem (I) Pvt. Ltd.") { include "include/geomax_footer.php" ; } else if ($accountUserData['comp_name'] == "Asean Agritechnologies (I) Pvt Ltd") { include "include/asean_footer.php" ; } else if ($accountUserData['comp_name'] == "Innovative-Ag Transformataion Technologies") { include "include/innovative_footer.php" ; } else if ($accountUserData['comp_name'] == "Newsol Agritechnologies (Opc) Pvt Ltd") { include "include/newsol_footer.php" ; } else if ($accountUserData['comp_name'] == "Siddhivinayak lawns and Hotel Food Hub") { include "include/sidhhi_footer.php" ; } else if ($accountUserData['comp_name'] == "Gains Academy Foundation") { include "include/gains_ac_foun_footer.php" ; } else { include "include/b2b_footer.php" ; } } mysqli_stmt_close($stmt); mysqli_close($con); ?> <!-- Footer End --> <!-- Back to Top --> <a href="#" class="btn btn-lg btn-primary btn-lg-square rounded-circle back-to-top"><i class="bi bi-arrow-up"></i></a> <!-- JavaScript Libraries --> <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"></script> <script src="lib/wow/wow.min.js"></script> <script src="lib/easing/easing.min.js"></script> <script src="lib/waypoints/waypoints.min.js"></script> <script src="lib/counterup/counterup.min.js"></script> <script src="lib/owlcarousel/owl.carousel.min.js"></script> <script src="lib/lightbox/js/lightbox.min.js"></script> <!-- Template Javascript --> <script src="js/main.js"></script> </body> </html>