<?php session_start();

include ("../conf/conn.php");
// page jump check
@$page = $_SESSION["page"];
if(@$_GET["page"]){$page = $_GET["page"];}
$_SESSION["page"]=0;
if(!@$_SESSION['jump']){$jump=0;}else{$jump=1;}
if(@$jump==0){
	if(@$_GET['id']){
	$url = 'includes/product_select.php?id='.$_GET["id"].'&name='.$_GET["name"];  
	$_SESSION['jump']=1;
	echo "<script language='javascript' 
	type='text/javascript'>";  
	echo "window.location.href='$url'";  
	echo "</script>";  }
}
?>


<!DOCTYPE html>
<html lang="en">
  <head>
  <meta name="keywords" content="Handmade Chocolates; Pastries; High Quality Ingredients; Gift; Wedding Banquet; Wedding Favor">
<meta name="h1" content="ABOUT SAYVOUR,Contact Us">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="../img/icon/sayvour-icon.ico" type="image/x-icon">
<link rel="shortcut icon" href="" type="image/x-icon">

<script>
function addcart(){
<!-- Facebook Pixel Code -->


!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?

n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;

n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;

t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,

document,'script','https://connect.facebook.net/en_US/fbevents.js');

fbq('init', '1705821553071403');

fbq('track', "PageView");

fbq('track', 'AddToCart');

<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1705821553071403&ev=PageView&noscript=1" /></noscript>

<!-- End Facebook Pixel Code -->}
</script>
  
        <!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-PRN4SW');</script>
<!-- End Google Tag Manager -->
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');

fbq('init', '1705821553071403');
fbq('track', "PageView");</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1705821553071403&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->


<?php
	if(isset($_GET["id"])){
	$p_id=$_GET["id"];
	$query = "select * from products where id='$p_id'";
	$result=mysqli_query($conn,$query);
	$row = mysqli_fetch_assoc($result);
	echo '  
	<title>'.$row["name"].'</title>
	<meta property="og:url" content="http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'" />
	<meta property="og:type" content="website" />	
	<meta property="og:title" content="'.$row["zh_name"].'" />
	<meta name="description" property="og:description"  content="Sayvour is an artisan confectionary specialising in handmade chocolates and pastries by using high quality ingredients from around the world." />
	<meta property="og:image" content="'.$row["image"].'" />
	<meta property="og:image:url" content="'.$row["image"].'" />';
	}
?>

    <!-- load CSS -->
    <link href="bootstrap-3.3.6-dist/css/bootstrap.css" rel="stylesheet" type="text/css">
    <link href="bootstrap-3.3.6-dist/css/bootstrap-theme.css" rel="stylesheet" type="text/css">
	<link href="css/child-style.css" rel="stylesheet" type="text/css">
    <!-- Custom CSS -->
    <link href="css/simple-sidebar.css" rel="stylesheet">
  </head>
  
  <body>	
    

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PRN4SW"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
  
  <script>function gender(){document.getElementById( 'gender' ).value = 2;} </script>
  <script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
 
  ga('create', 'UA-85255031-1', 'auto');
  ga('send', 'pageview');
  </script>

    
  	<!-- top list -->
  	<?php include "includes/e-shop-topbar.php"?>
  	<!-- end top list -->
  
    <!-- body -->
    <div class="container" id="container-wrap">
            <!-- main page -->
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 animate-show">
                <div class="tab-content">
                    <!-- products page -->
                    <div role="tabpanel" class="tab-pane 
                    <?php if($page == 0){echo "active";} if($page == 7){echo "active";} ?>
                    " id="products">
                    <?php include "includes/products-page.php"?>
                    </div>
                    <!-- end products page -->
                    
                    <!-- products info page -->
                    <div role="tabpanel" class="tab-pane
                    <?php if($page == "1"){echo "active";}if($page == "6"){echo "active";} ?>" 
                     id="products-info-page">
                    <?php include "includes/products-info-page.php"?>
                    </div>
                    <!-- end products info page -->

                    <!-- sign in page -->
                    <div role="tabpanel" class="tab-pane
                    <?php if($page == "5"){echo "active";} ?>
                    " id="sign-in">
                    <?php include "includes/sign-in-page.php"?>
                    </div>
                    <!-- end sign in page -->
                    
                    <!-- sign up page -->
                    <div role="tabpanel" class="tab-pane
					<?php if($page == "8"){echo "active";} ?>
					" id="sign-up">
                    <?php include "includes/sign-up-page.php"?>
                    </div>
                    <!-- end sign up page -->
                    
                    <!-- reset password page -->
                    <div role="tabpanel" class="tab-pane
                    <?php if($page == "4"){echo "active";} ?>" 
                    id="reset-password">
                    <?php include "includes/reset-password-page.php"?>
                    </div>
                    <!-- end reset password page -->
                    
                    <!-- forgot-password page -->
                    <div role="tabpanel" class="tab-pane
                    <?php if($page == "3"){echo "active";} ?>
                    " id="forgot-password">
					<?php include"includes/forgot-password-page.php"?>
                    </div>
                    <!-- end forgot-password page -->
                    
                    <!-- Personal info page -->
                    <div role="tabpanel" class="tab-pane
                    <?php if($page == "9"){echo "active";} ?>
                    " id="Profile">
                    <?php include "includes/Personal-info-page.php"?>
                    </div>
                    <!-- end Personal info page -->
                                        
                    <!-- verify page -->
                    <div role="tabpanel" class="tab-pane
                    <?php if($page == "10"){echo "active";} ?>
                    " id="verify">
                    <?php include "includes/verify.php"?>
                    </div>
                    <!-- end verify page -->
                    
                    <!-- thankyou1 page -->
                    <div role="tabpanel" class="tab-pane
                    <?php if($page == "11"){echo "active";} ?>
                    " id="thankyou1">
                    <?php include "includes/thankyou1.php"?>
                    </div>
                    <!-- end thankyou1 page -->

                    <!-- thankyou1 page -->
                    <div role="tabpanel" class="tab-pane
                    <?php if($page == "12"){echo "active";} ?>
                    " id="thankyou2">
                    <?php include "includes/thankyou2.php"?>
                    </div>
                    <!-- end thankyou1 page -->
                    
                    <!-- thankyou1 page -->
                    <div role="tabpanel" class="tab-pane
                    <?php if($page == "13"){echo "active";} ?>
                    " id="order-details">
                    <?php include "includes/order-details.php"?>
                    </div>
                    <!-- end thankyou1 page -->
                    
                    <!-- checkout page -->
                    <div role="tabpanel" class="tab-pane
                    <?php if($page == "2"){echo "active";} ?>
                    " id="checkout">
                    <?php include "includes/checkout-page.php"?>
                    </div>
                    <!-- end checkout page -->
                    
                    </div>
                </div>
            </div>
        </div>
            <!-- end main page -->
    </div>
    <!-- end body-->
	<!-- Go to www.addthis.com/dashboard to customize your tools -->
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-57997cf4862a16ef"></script>

  </body>
  <?php include "includes/footer.php"; mysqli_close($conn); ?>
  <!-- load js -->
  
  
  
<!-- jQuery -->
<script src="js/left-sidebar/jquery.js"></script>
    
  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css">
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
  <script>
  	var d = new Date();
    var n = d.getHours();
	var x = d.getDay();
	if(x >5){
    if(n > 16){
    $('#datepicker').datepicker({ beforeShowDay: noSunday,
         minDate: '+3' ,
		 dateFormat : "yy-mm-dd"
		 
    });    
    $('#datepicker1').datepicker({ beforeShowDay: noSunday,
         minDate: '+3' ,
		 dateFormat : "yy-mm-dd"
    });  
	}else{
	$('#datepicker').datepicker({ beforeShowDay: noSunday,
         minDate: '+2' ,
		 dateFormat : "yy-mm-dd"
		 
    });    
    $('#datepicker1').datepicker({ beforeShowDay: noSunday,
         minDate: '+2' ,
		 dateFormat : "yy-mm-dd"
    });  	
	}}else{
	if(n > 16){
    $('#datepicker').datepicker({ beforeShowDay: noSunday,
         minDate: '+4' ,
		 dateFormat : "yy-mm-dd"
		 
    });    
    $('#datepicker1').datepicker({ beforeShowDay: noSunday,
         minDate: '+4' ,
		 dateFormat : "yy-mm-dd"
    });  
	}else{
	$('#datepicker').datepicker({ beforeShowDay: noSunday,
         minDate: '+3' ,
		 dateFormat : "yy-mm-dd"
		 
    });    
    $('#datepicker1').datepicker({ beforeShowDay: noSunday,
         minDate: '+3' ,
		 dateFormat : "yy-mm-dd"
    });  	
	}}
	function noSunday(date){ 
		var day = date.getDay(); 
		return [(day > 0), '']; 
	}; 
  </script>  

<!-- Bootstrap Core JavaScript -->
<script src="js/left-sidebar/bootstrap.min.js"></script>

<!-- Menu Toggle Script -->
<script>
<?php 
if($page==1){
echo '$("#wrapper2").toggleClass("toggled2");';
}
if($page==7){
echo '$("#wrapper2").toggleClass("toggled2");';
}
?>

$(function() {
$("#menu-toggle").click(function(e) {
$("#wrapper2").toggleClass("toggled2",false);
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});

$(window).resize(function(){

$("#wrapper").toggleClass("toggled",false);

});


$("#container-wrap").click(function() {
$("#wrapper").toggleClass("toggled",false);
});

$("#account").click(function(e) {
$("#wrapper2").toggleClass("toggled2",false);
e.preventDefault();
$("#wrapper3").toggleClass("toggled3");
});

$(window).resize(function(){

$("#wrapper3").toggleClass("toggled3",false);

});


$("#container-wrap").click(function() {
$("#wrapper3").toggleClass("toggled3",false);
});

<!-- cart-toggle --!>

$("#cart-toggle").click(function(e) {
$("#wrapper").toggleClass("toggled",false);
$("#wrapper3").toggleClass("toggled3",false);
e.preventDefault();
$("#wrapper2").toggleClass("toggled2");
});

$(window).resize(function(){	
$("#wrapper2").toggleClass("toggled2",false);

});


$("#container-wrap").click(function() {
$("#wrapper2").toggleClass("toggled2",false);
});

});



</script>



   <script>
jQuery(document).ready(function(){
    // This button will increment the value
    $('.qtyplus').click(function(e){
        // Stop acting like a button
        e.preventDefault();
        // Get the field name
        fieldName = $(this).attr('field');
        // Get its current value
        var currentVal = parseInt($('input[name='+fieldName+']').val());
        // If is not undefined
        if (!isNaN(currentVal)) {
            // Increment
            $('input[name='+fieldName+']').val(currentVal + 1);
        } else {
            // Otherwise put a 0 there
            $('input[name='+fieldName+']').val(0);
        }
    });
    // This button will decrement the value till 0
    $(".qtyminus").click(function(e) {
        // Stop acting like a button
        e.preventDefault();
        // Get the field name
        fieldName = $(this).attr('field');
        // Get its current value
        var currentVal = parseInt($('input[name='+fieldName+']').val());
        // If it isn't undefined or its greater than 0
        if (!isNaN(currentVal) && currentVal > 1) {
            // Decrement one
            $('input[name='+fieldName+']').val(currentVal - 1);
        } else {
            // Otherwise put a 0 there
            $('input[name='+fieldName+']').val(1);
        }
    });
});

    </script>
</html>