GIF89a php
Current File : /home/hencockfreshchic/public_html/cart.php
<?php
ob_start();
ini_set('error_reporting', E_STRICT);
include("connect.php");
include("redirection.php");
if($rowRD["redirect"]=='1'){
setcookie("redirect","https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], time()+3600);
}
else
{
   setcookie("redirect","index.php", time()+3600);
}
include("checkSession.php");
mysqli_set_charset($conn,'utf8');
date_default_timezone_set('Asia/Kolkata');
?>
<!DOCTYPE php>
<html lang="en">
   <?php include'include/head.php'?>
   <body >
      <div class="se-pre-con"></div>
      <div class="main">
         <!-- HEADER START -->
         <?php include'include/header.php'?>
         <!-- HEADER END -->    
          <script> 
                     setInterval(function(){                                     

                       if (window.XMLHttpRequest) {
                       xmlhttp = new XMLHttpRequest();
                        } else {          
                       xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                       } 
                       xmlhttp.onreadystatechange=function() 
                        {
                         if (this.readyState==4 && this.status==200) 
                        {
                        if(this.responseText==0)
                        {
                          alert("No items found in cart");
                          window.location.href = ("index.php");
                        }        
                        }
                       };
                       xmlhttp.open("GET","checkKart.php",true);
                       xmlhttp.send();

                     },3000);
                     </script> 
         <!-- Bread Crumb STRAT -->
         <div class="banner inner-banner1 topmar">
            <div class="container">
               <section class="banner-detail center-xs">
                  <h1 class="banner-title">Shopping Cart</h1>
                  <!-- <div class="bread-crumb right-side float-none-xs">
                     <ul>
                        <li><a href="index.php">Home</a>/</li>
                        <li><span>Shopping Cart</span></li>
                     </ul>
                  </div> -->
               </section>
            </div>
         </div>
          <?php 
            include("include/session.php");
          ?>
         <!-- Bread Crumb END -->
         <script> 
                     setInterval(function(){                                     

                       if (window.XMLHttpRequest) {
                       xmlhttp = new XMLHttpRequest();
                        } else {          
                       xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                       } 
                       xmlhttp.onreadystatechange=function() 
                        {
                         if (this.readyState==4 && this.status==200) 
                        {
                        document.getElementById("my_cart").innerHTML=this.responseText;         
                        }
                       };
                       xmlhttp.open("GET","loadCart.php",true);
                       xmlhttp.send();

                     },3000);
                     </script>
         
         <!-- CONTAIN START -->
<section class="ptb-70">
  <div class="container">
    <div class="row">
      <div class="col-md-6" style="margin: auto">
        <!--  <div class="count-box">
          <span>Due To HIGH Demand, Cart Expires In: </span>
          <span class="timer-sec" id="demo"></span>
        </div> -->
      </div>
    </div>
    <div id="my_cart"></div>
    <div class="mb-30">
      <div class="row">
        <div class="col-md-6">
          <div class="mt-30">
            <a href="index.php" class="btn btn-color">
              <span><i class="fa fa-angle-left"></i></span>
              Continue Shopping
            </a>
          </div>
        </div>
        <div class="col-md-6">
          <!-- <div class="mt-30 right-side float-none-xs">
            <a class="btn btn-color">Update Cart</a>
          </div> -->
        </div>
      </div>
    </div>
    <hr>
    <div class="mtb-30">
      <div class="row">
        <div class="col-md-6 mb-30">
          
        </div>
        <script>
        setInterval(function(){
        if (window.XMLHttpRequest) {
        xmlhttp = new XMLHttpRequest();
        } else {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function()
        {
        if (this.readyState==4 && this.status==200)
        {
        document.getElementById("checkout_details").innerHTML=this.responseText;
        }
        };
        xmlhttp.open("GET","cartTotal.php",true);
        xmlhttp.send();
        },1000);
        </script>
        <div id="checkout_details" class="col-md-6 mb-xs-40"></div>
      </div>
    </div>
    <hr>
    <div class="mt-30">
      <div class="row">
        <div class="col-12">
          <div class="right-side float-none-xs">
            <a class="btn-lg p-4 fs-4 btn btn-success btn-color" onclick="proceedToCheckout()">Proceed to checkout
              <span><i class="fa fa-angle-right"></i></span>
            </a>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>
         <!-- CONTAINER END --> 

         <!-- FOOTER START -->
         <?php include'include/footer.php'?>
         <div class="scroll-top">
            <div class="scrollup"></div>
         </div>
         <!-- FOOTER END -->  
      </div>


      <script>
      // Set the date we're counting down to
      var minutes=4;
      var seconds=60;
      // Update the count down every 1 second
      var x = setInterval(function() {

        if(seconds==0)
        {
          if(minutes==0 && seconds==0)
          {
            minutes=4;
            seconds=59;
          }
          else
          {
          minutes=minutes-1;
          seconds=60-1;
        }
        }
        else
        {
          seconds=seconds-1;
        }
          
        // Output the result in an element with id="demo"
        document.getElementById("demo").innerHTML = minutes + ": " + seconds + "s ";
          
        // If the count down is over, write some text 
        if (distance < 0) {
          clearInterval(x);
          document.getElementById("demo").innerHTML = "EXPIRED";
        }
      }, 1000);
      </script>




      <script src="js/jquery-1.12.3.min.js"></script> 
      <script src="js/tether.min.js"></script>
      <script src="js/bootstrap.min.js"></script>  
      <script src="js/jquery.downCount.js"></script>
      <script src="js/jquery-ui.min.js"></script> 
      <script src="js/fotorama.js"></script>
      <script src="js/jquery.magnific-popup.js"></script> 
      <script src="js/owl.carousel.min.js"></script>  
      <script src="js/custom.js"></script>
   </body>
</html>