<?php
if(isset($_GET['currency'])){
$currency = $_GET['currency'];
}
else if(!isset($currency)){
$currency = "BTC";
}

function convertSecToTime($sec){
	$date1 = time(); //starting seconds
	$interval =  $sec - $date1; //the time difference
        $interval = (($interval / 60) / 60) / 24; // convert to days
	return $interval; // convert seconds
}

$todays_date = time();
$end_date = "06/10/2024";
$end_date = strtotime($end_date);
$convert = convertSecToTime($end_date);

?>


<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
 <title>LVMX Real World Asset & Cypto Exchange</title>


  <!-- bootstrap core css -->
  <link rel="stylesheet" type="text/css" href="../css/bootstrap.css" />

  <!-- fonts style -->
  <link href="https://fonts.googleapis.com/css2?family=Sen:wght@400;700&display=swap" rel="stylesheet">

  <!-- font awesome style -->
  <link href="../css/font-awesome.min.css" rel="stylesheet" />

  <!-- Custom styles for this template -->
  <link href="../css/style.css" rel="stylesheet" />
  <!-- responsive style -->
  <link href="../css/responsive.css" rel="stylesheet" />
  <link rel="icon" href="assets/img/favicon.png" type="image/x-icon">
  <link rel="stylesheet" href="assets/css/style.css">
<style>.active {
    background-color: transparent;
}
.market-trade{
border:0px solid white;
}
.nav {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    width: 50%;
    margin-left: 25%;
}
.market-trade .tab-content {
    height: 520px;
    overflow-y: auto;
    padding: 14px;
}
.market-trade .nav-item {
    margin-right: 4.8%;
}
.market-trade .nav {
    padding: 14px 19px 0;
}
</style>
</head>
<body>
<div class="hero_area">
    <!-- header section strats -->
    <header class="header_section">
      <div class="container-fluid">
        <nav class="navbar navbar-expand-lg custom_nav-container ">
          <a class="navbar-brand" href="index.html">
            <span>
              <img src="../images/LVMXhead.png" alt="LVMX Exchange"/>
            </span>
          </a>

          <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class=""> </span>
          </button>

          <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav  ">
              <li class="nav-item active">
                <a class="nav-link" href="index.html">Home <span class="sr-only">(current)</span></a>
              </li>
              <li class="nav-item">
                <a class="nav-link" href="../#about"> About</a>
              </li>
              <li class="nav-item">
                <a class="nav-link" href="../#process">Process </a>
              </li>
              <li class="nav-item">
                <a class="nav-link" href="../#why">Why Us</a>
              </li>
              <li class="nav-item">
                <a class="nav-link" href="../#contact">Contact Us</a>
              </li>
            </ul>
            <div class="quote_btn-container">
              <a class="" href="#"> Login</a>
              <a href="" class="quote_btn">
                Sign Up
              </a>
            </div>
          </div>
        </nav>
      </div>
    </header>
    <!-- end header section -->
    <!-- slider section -->
    <section class="slider_section" style="z-index:7">
      <div class="container">
        <div class="detail-box">
          <h1 class="animate-charcter">
            LVMX Real World Asset Exchange
          </h1>
            <h5 class="secondary_heading">
            PRIVATE SALE ROUND 1 ENDS IN:
          </h5>
          <div class="box_container">
          <?php $times = explode("-",$convert);?></h5>
            <div class="box">
              <div class="num-box">

                <span id="countDay">
                 <?php echo $times[0];?>
                </span>
              </div>
              <h5>
                DAY
            </div>
            <div class="box">
              <div class="num-box">
                <span id="countHour">
                  <?php echo $times[1];?>
                </span>
              </div>
              <h5>
                Hours
              </h5>
            </div>
            <div class="box">
              <div class="num-box">
                <span id="countMin">
                  <?php echo $times[2];?>
                </span>
              </div>
              <h5>
                Min
              </h5>
            </div>
            <div class="box">
              <div class="num-box">
                <span id="countSec">
                  <?php echo $times[3];?>
                </span>
              </div>
              <h5>
SECS
              </h5>
            </div>
          </div>
          <a href="#why" class="btn2">
            READ MORE
          </a>
        </div>
      </div>
    </section>
    <!-- end slider section -->
  </div>
 <section class="subscribe_section" style="z-index:6">
    <div class="container form_container"  style="z-index:7">
  <div class="cube"></div>
  <div class="cube"></div>
  <div class="cube"></div>
  <div class="cube"></div>
  <div class="cube"></div>
  <div class="cube"></div>
      <h5>
        Enter Your email for Join our Newsletter
      </h5>
      <form action="">
        <input type="text" placeholder="Enter Your Email"/>
        <button type="submit">
          Join Now
        </button>
      </form>
    </div>
  </section>

<div class="market-trade mt15">
          <ul class="nav nav-pills" role="tablist" style="text-align:center">
            <li class="nav-item">
              <img src="img/BSC.png" width="25px" height="25px" alt="Binance Smart Chain LVMX" /><a class="nav-link active" data-toggle="pill" href="trade.php?currency=BSC" target="iframe" role="tab" aria-selected="true">BINANCE</a>
            </li>

            <li class="nav-item">
              <img src="img/BTC.png" width="25px" height="25px" alt="BTC LVMX" /><a class="nav-link active" data-toggle="pill" href="trade.php?currency=BTC" target="iframe" role="tab" aria-selected="true">BITCOIN</a>
            </li>
            <li class="nav-item">
<img src="img/ETH.png" width="25px" height="25px" alt="ETH LVMX" />
              <a class="nav-link" data-toggle="pill" href="trade.php?currency=ETH" target="iframe" role="tab" aria-selected="false">ETHEREUM</a>
            </li>
            <li class="nav-item">
<img src="img/POLYGON.png" width="25px" height="25px" alt="POLYGON LVMX" />
              <a class="nav-link" data-toggle="pill" href="trade.php?currency=MATIC" target="iframe" role="tab" aria-selected="false">POLYGON</a>
            </li>
            <li class="nav-item">
<img src="img/XRP.png" width="25px" height="25px" alt="XRP LVMX" />
              <a class="nav-link" data-toggle="pill" href="trade.php?currency=XRP" target="iframe" role="tab" aria-selected="false">RIPPLE</a>
            </li>
            <li class="nav-item">
<img src="img/SOL.png" width="25px" height="25px" alt="SOL LVMX" />
              <a class="nav-link" data-toggle="pill" href="trade.php?currency=SOL" target="iframe" role="tab" aria-selected="false" style="padding-top:15%">SOL</a>
            </li>

            <li class="nav-item">
<img src="img/USDC.png" width="25px" height="25px" alt="USDC LVMX" />
              <a class="nav-link" data-toggle="pill" href="trade.php?currency=USDC" target="iframe" role="tab" aria-selected="false">USDC</a>
            </li>
            <li class="nav-item">
<img src="img/USDT.png" width="25px" height="25px" alt="USDT LVMX" />
              <a class="nav-link" data-toggle="pill" href="trade.php?currency=USDT" target="iframe" role="tab" aria-selected="false">USDT</a>
            </li>

          </ul>
          <div class="tab-content">
<iframe name="iframe" src="trade.php" style="position:relative;width:100%;height:100%;height:550px;border:0px solid white;overflow:hidden"></iframe>
           </div>
</div>
  <!-- footer section -->
  <section class="footer_section" style="padding-top:2%">
    <div class="container">
      <p>
        &copy; <span id="displayYear"></span> LVMX
        <a href="https://html.design/"> All rights reserved</a>
      </p>
    </div>
  </section>
  <!-- footer section -->

  <!-- jQery -->
  <script type="text/javascript" src="../js/jquery-3.4.1.min.js"></script>
  <!-- popper js -->
  <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous">
  </script>
  <!-- bootstrap js
  <script type="text/javascript" src="../js/bootstrap.js"></script>  -->
<script>
// to get current year
function getYear() {
    var currentDate = new Date();
    var currentYear = currentDate.getFullYear();
    document.querySelector("#displayYear").innerHTML = currentYear;
}

getYear();



// owl.owlcarousel2_filter

$('.owl-filter-bar').on('click', '.item', function (e) {
    var $items = $('.owl-filter-bar a')
    var $item = $(this);
    var filter = $item.data('owl-filter')
    $items.removeClass("active");
    $item.addClass("active");
    owl.owlcarousel2_filter(filter);

    e.preventDefault();
})


// timer
// Set the date we're counting down to
var days = <?php echo $convert;?>;
var date = new Date();
var countDownDate = new Date(date.getTime() + (days * 24 * 60 * 60 * 1000));
// Update the count down every 1 second
var x = setInterval(function () {

    // Get today's date and time
    var now = new Date().getTime();

    // Find the distance between now and the count down date
    var distance = countDownDate - now;

    // Time calculations for days, hours, minutes and seconds
    var days = Math.floor(distance / (1000 * 60 * 60 * 24));
    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
    var seconds = Math.floor((distance % (1000 * 60)) / 1000);

    // Output the result in an element with id="demo"
    document.getElementById("countDay").innerHTML = days;

    document.getElementById("countHour").innerHTML = hours;

    document.getElementById("countMin").innerHTML = minutes;

    document.getElementById("countSec").innerHTML = seconds;

    // If the count down is over, write some text 
    if (distance < 0) {
        clearInterval(x);
        document.getElementById("countDay").innerHTML = "EXPIRED";
    }
}, 1000);
</script>

</body>
</html>