<?php session_start();
   require_once("./config/config.php");
      $data=($_REQUEST['referer']);
        $sqlcou="SELECT * FROM  product_master WHERE rowId= '$data'";
                    $myquerycou=$conn->query($sqlcou);
      $mydaracou= $myquerycou->fetchAll()  ;
      
      $rows_foundcou = $myquerycou->rowCount();
     
   
       
    
       foreach( $mydaracou as $rowcou ){
              $rowId    = $rowcou["rowId"];
               $short_title   = $rowcou["title"];
               $discription   = $rowcou["discription"];
               $link = $rowcou["product_url"];
               $product_image   = $rowcou["product_image"];
               $type = $rowcou["exp_date"];
               $category = $rowcou["category"];
               $coupon_code   = $rowcou["country_name"];
               $company_name   = $rowcou["company_name"];
               $currency    = $rowcou["currency"];
               $amount   = $rowcou["amount"];  }


               $sql_tag = "SELECT * FROM meta_tag_setting WHERE pages = 'product-details'";
               $mydara_sql = $conn->query($sql_tag);
               $fetch_tag = $mydara_sql->fetchAll();
               $rows_tag =$mydara_sql->rowCount();
               
               if($rows_tag !=0 ){
                  foreach( $fetch_tag  as $rowcon ) {
                     $title = $rowcon['title'];
                     $description  = $rowcon['description'];
                     $keyword = $rowcon['keyword'];
                  }
               }

// This is a code for php minifiers Begin
ob_start("minifier");
function minifier($code) {
    $search = array(
         
        // Remove whitespaces after tags
        '/\>[^\S ]+/s',
         
        // Remove whitespaces before tags
        '/[^\S ]+\</s',
         
        // Remove multiple whitespace sequences
        '/(\s)+/s',
         
        // Removes comments
        '/<!--(.|\s)*?-->/'
    );
    $replace = array('>', '<', '\\1');
    $code = preg_replace($search, $replace, $code);
    return $code;
}
// This is a code for php minifiers End
   
   ?>
<!DOCTYPE html>
<html lang="en">
   <head>
      <!-- Character set configuration -->
      <base href="<?=$base_link?>" target="_self">
      <meta charset="UTF-8" />
      <title><?=$title?></title>
      <meta http-equiv="X-UA-Compatible" content="IE=edge" />
      <link id="favicon" rel="icon" type="image/x-icon" href="images/web-images/home/favicon.png"/>
      <meta name="robots" content="index, follow" />
      <link rel="canonical" href="product-details.php"/>
      <meta name="description" content="<?=$description?>">
      <meta name="keywords" content="<?=$keyword?>">
      <!-- Viewport configuration, scaling options -->
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>

      <!-- CSS Stylesheet -->
      <link href="css/icouponworld.css" rel="stylesheet" />
      <!-- Font Awesome icon -->
      <link href="fontawesome/css/fontawesome.css" rel="stylesheet" />
      <!-- Owl Stylesheets -->
      <!-- <link rel="stylesheet" href="css/owl.carousel.min.css">
      <link rel="stylesheet" href="css/owl.theme.default.min.css"> -->
      <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
      <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
      <![endif]-->
      <!-- Google Analytics Code Begin-->
      <?=$google_ana ?>
      <!-- Google Analytics Code End-->
   </head>
   <body>
         <!-- Preloader Begin-->
         <div class="preloader">
         <div class="loading">
           <img src="images/web-images/home/loader.gif" alt="loader" title="loader" class="mx-auto d-flex"> 
            <h2 class="text-center fw-light">loading...</h2>
         </div>
      </div>
      <!-- Preloader End-->
      <!--Header Begin-->
      <?php include("./includefiles/header.php"); ?>
      <!--Header End-->
      <!--Overlay Begin-->
      <div id="overlay"></div>
      <!--Overlay End-->
      <!--Product Details Begin-->
      <section class="gap-top">
         <div class="container">
            <div class="row">
              
               <div class="col-lg-12">
                  <div class="product-details-bx">
                     <div class="row">
                        <div class="col-lg-4">
                           <div class="product-details-left text-center">
                              <img src="<?=$product_image ?>" alt="<?= $short_title?>" title="<?= $short_title?>" class="img-fluid rounded-3">
                              <h3 class="h4 my-3"> <?=$currency?>   <?=$amount?></h3>
                              <a href="<?=$link?>" class="btn btn-primary text-uppercase mb-3">Buy Now</a>
                           </div>
                        </div>
                        <div class="col-lg-8">
                           <div class="product-details-right">
                              <h1 class="h6 text-truncate"><?= $short_title?></h1>
                              <span class="badge-lg bg-secondary my-3">Product Discription :</span>
                              <p class="fw-light"><?=$discription?></p>
                           </div>
                        </div>
                        <div class="col-lg-12">
                           <div class="product-details-social">
                              <div class="row justify-content-center align-items-center">
                                 <div class="col-md-5">
                                    <div class="d-flex">
                                       <h6 class="text-truncate"><strong>Category :</strong><span class="text-primary">
                                          <?=$category?>
                                          </span>
                                       </h6>
                                    </div>
                                 </div>
                                 <div class="col-md-7">
                                    <!--share Via Begin-->
                                    <div class="d-flex justify-content-start align-items-center">
                                       <h6>Share via : </h6>
                                       <a title="share via linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=<?=$link?>" class="share-linkedin ms-2"><i class="fab fa-linkedin-in"></i></a>
                                       <a title="share via facebook" href="https://www.facebook.com/sharer.php?u=<?=$link?>" class="share-facebook ms-2"><i class="fab fa-facebook-f"></i></a>
                                       <a title="share via twitter" href="https://twitter.com/intent/tweet?url=<?=$link?>" class="share-twitter ms-2"><i class="fab fa-twitter"></i></a>
                                       <a title="share via pinterest" href="https://www.pinterest.com/pin/create/button/?url=<?=$link?>" class="share-pinterest ms-2"><i class="fab fa-pinterest-p"></i></a>
                                       <a title="share via whatsapp" href="https://web.whatsapp.com/send?text=<?=$link?>" class="share-whatsapp ms-2"><i class="fab fa-whatsapp"></i></a>
                                       <a title="share via telegram" href="https://t.me/share/url?url=<?=$link?>&text=telegram" class="share-telegram ms-2"><i class="fab fa-telegram"></i></a>
                                       <a title="share via reddit" href="http://www.reddit.com/submit?url=<?=$link?>" class="share-reddit ms-2"><i class="fab fa-reddit"></i></a>
                                       <a title="share via tumblr" href="http://www.tumblr.com/share?v=3&u=<?=$link?>&t=tumblr" class="share-tumblr ms-2"><i class="fab fa-tumblr"></i></a>
                                    </div>
                                    <!--share Via End-->
                                 </div>
                              </div>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
               <div class="col-md-12 my-3">
                  <?php    if(!empty($google_adar )){
                     echo $google_adar ;
                     }else{
                     echo ' <img src="admin/forms/'.$adimg3.'" alt="Horizontal Banner" title="Horizontal Banner" class="img-fluid w-100 rounded-3 mt-4 mb-4">';
                     } ?>
               </div>
            </div>
         </div>
      </section>
      <!--Product Details End-->
      <!--Related Product Begin-->
      <section class="bg-primary-gradient py-4">
         <div class="container">
            <div class="row">
               <div class="col-md-12">
                  <div class="bottom-line">
                     <h6 class="h5 mb-4">Related Product</h6>
                  </div>
               </div>
            </div>
            <div class="row">
               <div id="product-details" class="owl-carousel owl-theme">
                  <?php  $sqlcou="SELECT * FROM  product_master WHERE category= '$category' ORDER BY rand() LIMIT 6";
                     $myquerycou=$conn->query($sqlcou);
                     $mydaracou= $myquerycou->fetchAll()  ;
                     $rows_foundcou = $myquerycou->rowCount();
                     
                     foreach( $mydaracou as $rowcou ){
                     $rowId    = $rowcou["rowId"];
                     $short_title   = $rowcou["title"];
                     $discription   = $rowcou["discription"];
                     $link = $rowcou["product_url"];
                     $product_image   = $rowcou["product_image"];
                     $type = $rowcou["exp_date"];
                     $category = $rowcou["category"];
                     $coupon_code   = $rowcou["country_name"];
                     $company_name   = $rowcou["company_name"];
                     $currency    = $rowcou["currency"];
                     $amount   = $rowcou["amount"];   ?>
                  <!--Related Product-->
                  <div class="item">
                     <div class="deals">
                        <div class="card border-0">
                           <div class="card-body">
                              <span class="left-wrapper">36 % OFF</span>
                              <img src="<?=$product_image?>" alt="<?=$short_title?>" title="<?=$short_title?>" class="img-fluid mx-auto d-block">
                              <div class="d-grid">
                                 <small title="<?=$short_title?>" class="context-menu text-muted text-truncate"><?=$short_title?></small>
                                 <p class="d-para">
                                    <a class="context-menu" title="<?=$discription?>"><?=$discription?></a> 
                                 </p>
                              </div>
                              <div class="row align-items-center">
                                 <div class="col-md-7">
                                    <h3 class="mb-2 fw-bold text-truncate">
                                    <?=$currency?>   <?=$amount?>
                                    </h3>
                                 </div>
                                 <div class="col-md-5 text-end">
                                    <h6 class="shop-now"><a href="product-details/<?=($rowId)?>">Shop now</a></h6>
                                 </div>
                              </div>
                           </div>
                           <div class="card-footer social-icons bg-white">
                              <ul class="list-unstyled mb-0">
                                 <li data-bs-toggle="modal" data-bs-target="#favorite-product"><i title="Favourite Store" class="fas fa-heart"></i></li>
                                 <li data-bs-toggle="modal" data-bs-target="#like-product"><i title="I Like This" class="fas fa-thumbs-up"></i></li>
                                 <li  data-bs-toggle="modal" data-bs-target="#share-product"><i title="Share" class="fas fa-share pe-1"></i>Share</li>
                              </ul>
                           </div>
                        </div>
                     </div>
                  </div>
                  <!--Related Product-->
                  <?php } ?>      
               </div>
               <div class="col-md-12 my-4">
                  <?php    if(!empty($google_adar )){
                     echo $google_adar ;
                     }else{
                     echo ' <img src="admin/forms/'.$adimg4.'" alt="Horizontal Banner" title="Horizontal Banner" class="img-fluid w-100 rounded-3 mt-4 mb-4">';
                     } ?>
               </div>
            </div>
         </div>
      </section>
      <!--Related Product End-->
      <!--share-product Modal -->
      <div class="modal fade" id="share-product" tabindex="-1"  aria-hidden="true">
         <div class="modal-dialog modal-dialog-centered modal-lg">
            <div class="modal-content">
               <div class="modal-header border-0">
                  <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
               </div>
               <div class="modal-body p-5">
                  <div id="removemodalproductdealoftheday">
                     <div class="row justify-content-center align-items-center">
                        <div class="col-md-5">
                           <div class="d-modal-left">
                              <img alt="<?=$short_title?>" title="<?=$short_title?>" src="<?=$product_image?>" class="img-fluid mx-auto d-block context-menu">
                           </div>
                        </div>
                        <div class="col-md-7">
                           <div class="dm-price">
                              <h3 title="<?=$short_title?>" class="fw-bold text-truncate context-menu"><?=$short_title?></h3>
                              <a href="#" class="btn btn-view-deal w-100 d-block mt-2 mb-4">View Product Deal</a>
                              <!--Copy url Begin-->
                              <div class="mb-3 row">
                                 <label class="col-sm-4 col-form-label">Copy url</label>
                                 <div class="col-sm-8">
                                    <!--copy to clipboarddealoftheday Begin-->
                                    <div class="input-group clipboarddealoftheday">
                                       <input  class="form-control form-control-sm" value="<?php echo $link; ?>" id="copyclipboardproductdealoftheday">
                                       <span class="input-group-text bg-secondary text-white" onclick="copiedTextproductdealoftheday()"><i class="far fa-copy"></i></span>
                                    </div>
                                    <div id="copiedtextproductdealsday" class="copieddealoftheday">
                                       <span>Copied!</span>
                                    </div>
                                    <!--copy to clipboarddealoftheday End-->
                                 </div>
                              </div>
                              <div class="mb-3 row">
                                 <label class="col-sm-4 col-form-label">Share via</label>
                                 <div class="col-sm-8">
                                    <!--share Via Begin-->
                                    <div class="d-flex justify-content-start align-items-center">
                                       <a title="share via linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=<?=$link?>" class="share-linkedin ms-2"><i class="fab fa-linkedin-in"></i></a>
                                       <a title="share via facebook" href="https://www.facebook.com/sharer.php?u=<?=$link?>" class="share-facebook ms-2"><i class="fab fa-facebook-f"></i></a>
                                       <a title="share via twitter" href="https://twitter.com/intent/tweet?url=<?=$link?>" class="share-twitter ms-2"><i class="fab fa-twitter"></i></a>
                                       <a title="share via pinterest" href="https://www.pinterest.com/pin/create/button/?url=<?=$link?>" class="share-pinterest ms-2"><i class="fab fa-pinterest-p"></i></a>
                                       <a title="share via whatsapp" href="https://web.whatsapp.com/send?text=<?=$link?>" class="share-whatsapp ms-2"><i class="fab fa-whatsapp"></i></a>
                                       <a title="share via telegram" href="https://t.me/share/url?url=<?=$link?>&text=telegram" class="share-telegram ms-2"><i class="fab fa-telegram"></i></a>
                                       <a title="share via reddit" href="http://www.reddit.com/submit?url=<?=$link?>" class="share-reddit ms-2"><i class="fab fa-reddit"></i></a>
                                       <a title="share via tumblr" href="http://www.tumblr.com/share?v=3&u=<?=$link?>&t=tumblr" class="share-tumblr ms-2"><i class="fab fa-tumblr"></i></a>
                                    </div>
                                    <!--share Via End-->
                                 </div>
                              </div>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
      <!--like Product Modal -->
      <div class="modal fade" id="like-product" tabindex="-1" aria-labelledby="likeproductLabel" aria-hidden="true">
         <div class="modal-dialog modal-dialog-centered">
            <div class="modal-content">
               <div class="modal-header border-0">
                  <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
               </div>
               <div class="modal-body">
                  <div class="mx-auto d-block text-center">
                     <h6 class="likethead">Please <a href="#">Sign in </a><strong> for like</strong></h6>
                     <img src="images/web-images/home/like.png" alt="like" title="like" width="50" class="img-fluid">
                  </div>
               </div>
               <div class="modal-footer bg-transparent">
                  <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
               </div>
            </div>
         </div>
      </div>
      <!--favourate  Product Modal -->
      <div class="modal fade" id="favorite-product" tabindex="-1" aria-labelledby="favoriteproductLabel" aria-hidden="true">
         <div class="modal-dialog modal-dialog-centered">
            <div class="modal-content">
               <div class="modal-header border-0">
                  <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
               </div>
               <div class="modal-body">
                  <div class="mx-auto d-block text-center">
                     <h6 class="likethead">Please <a href="#">Sign in </a><strong> for favorite</strong></h6>
                     <img src="images/web-images/home/favorite.png" alt="favorite" title="favorite" width="50" class="img-fluid">
                  </div>
               </div>
               <div class="modal-footer bg-transparent">
                  <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
               </div>
            </div>
         </div>
      </div>
    
     <!--Popular Category Begin-->
     <?php include("./contentpages/home/popular_cateogories.php"); ?>
      <!--Popular Category End-->
     
      <!--footer Section Begin-->
      <?php include("./includefiles/footer.php"); ?>
      <!--footer Section End-->
      <!--scroll to top Begin-->
      <button onclick="topFunction()" id="gobackToTop" title="Go To Top"><i class="fas fa-angle-up"></i></button>
      <!--scroll to top end-->
      <!-- jquery-3.4.1.min js Begin-->
      <script src="js/jquery-3.4.1.min.js"></script>
      <!-- jquery-3.4.1.min js End-->
      <!-- bootstrap.bundle.min js Begin-->
      <script src="js/bootstrap.bundle.min.js"></script>
      <!-- bootstrap.bundle.min js End-->
      <!-- icouponworld js Begin-->
      <script src="js/icouponworld.js"></script>
      <!-- icouponworld js End-->
      <!--owl.carousel js Begin--> 
      <!-- <script src="js/owl.carousel.js"></script> -->
      <!--owl.carousel js End-->
      <!--owl.carousel Script Begin-->
      <!-- <script>
         $('#product-details.owl-carousel').owlCarousel({
         loop:true,
         responsiveClass:true,
         responsive:{
         0:{
          items:1,
          nav:true
         },
         600:{
          items:3,
          margin:7,
          nav:true,
          loop:false
         },
         1000:{
          items:4,
          margin:7,
          nav:true,
          loop:false
         },
         1500:{
          items:4,
          margin:17,
          nav:true,
          loop:false
         }
         }
         })
         $( ".owl-prev").html('<i class="fa fa-chevron-left"></i>');
         $( ".owl-next").html('<i class="fa fa-chevron-right"></i>');
      </script> -->
      <!--owl.carousel Script End-->
      <!--script for googleTranslateElementInit Begin-->
      <!-- <script>
         function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
      </script> -->
      <!--script for googleTranslateElementInit End-->
      <!--script for googleTranslate Begin-->
      <!-- <script src="js/googletranslate.js"></script> -->
      <!--script for googleTranslate End-->
   </body>
</html>
<?php
ob_end_flush();  // This is a code for php minifiers
?>