<?php session_start();
   require_once("./config/config.php");
   $sql_tag = "SELECT * FROM meta_tag_setting WHERE pages = 'index'";
$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'];
	}
}
// function URL($key=null){
//    $arr=explode("/", trim($_GET("id") ??  'index' ,"/"));
//    if(!is_numeric($key))
//    return $arr;

//    return $arr[$key]  ??  '';
// }
// $file = URL(0);
// echo$file;

// 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

// Get the current protocol (http or https)
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http';

// Get the current domain
$domain = $_SERVER['HTTP_HOST'];

// Get the current path
$path = $_SERVER['REQUEST_URI'];

// Build the full URL
$currentUrl = $protocol . '://' . $domain . $path;

   ?>

<!DOCTYPE html>
<html lang="en">
   <head>
      <!-- Character set configuration -->
      <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="<?php echo $currentUrl; ?>"/>
      <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"> -->
      
       <!-- sweetalert.min.js Begin-->
      <script src="js/sweetalert.min.js"></script>
       <!-- sweetalert.min.js End-->
      <!-- Google Analytics Code Begin-->
      <?=$google_ana ?>
      <!-- Google Analytics Code End-->
      <!-- 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]-->
   </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-->
      <!--Banner Section Begin-->
      <?php include("./contentpages/home/banner.php"); ?>
      <!--Banner Section End-->
      <!--Discounts Offers Of The Day Section Begin-->
      <?php include("./contentpages/home/popular_lead.php"); ?>
      <!--Discounts Offers Of The Day Section End-->
      <!--Popular Stores Section Begin-->
      <?php include("./contentpages/home/popular_store.php"); ?>
      <!--Popular Stores Section End-->
      <!--Today's Top Coupons & offers Section Begin-->
      <?php include("./contentpages/home/top_coupon.php"); ?>
      <!--Today's Top Coupons & offers Section End-->
      <!--Get The Latest & Best Coupon/Offer Alerts Begin-->
      <?php include("./contentpages/common-files/hubspot.php"); ?>
      <!--Get The Latest & Best Coupon/Offer Alerts End-->
      <!--Deal of the Day Begin-->
      <?php include("./contentpages/home/deals_of_day.php"); ?>
      <!--Deal of the Day End-->
      <!--Modal Begin-->
      <?php include("./contentpages/common-files/modal.php"); ?>
      <!--Modal End-->

      <!--Best Offers Begin-->
      <?php include("./contentpages/home/icouponworld_collection.php"); ?>
      <!--Best Offers End-->
      <!--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-->
      <!--skimlinks js Begin-->
      <script type="text/javascript" src="js/skimlinks.js"></script>
      <!--skimlinks 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-->
      <!--common js Begin-->  
      <?php include("./contentpages/common-files/common-js.php"); ?>
      <!--common js 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
?>