<!doctype html>
<html lang="en">
    <head>

    </head>

    <body>

        <!-- cart -->
        <div id="wrapper2">
            <div id='sidebar-wrapper2'>
                <div class='cart-header'>
                    購物車
                </div>
                <?php include "cart.php";?>
            </div>
        </div>
        <!-- end cart -->



        <!-- login check -->
        <?php
if (@$_SESSION['username']) {
	if (@$_SESSION['Tusername']) {
		$sign_in = "hidden";
		$sign_out = "";
		$cart = "";
	} else {
		$sign_in = "";
		$sign_out = "hidden";
		$cart = "";
	}
} else {
	$sign_in = "hidden";
	$sign_out = "";
	$cart = "hidden";
}
?>
        <!-- endlogin check -->
        <div id="wrapper3">
            <div id='sidebar-wrapper3'>
                <ul class=" col-lg-12 col-md-12 col-sm-12 col-xs-12  sidebar-nav">
                    <div class='<?php echo $sign_out; ?>'>
                        <li class="sidebar-brand">

                            <a data-toggle="collapse" href="#collapsefour" style="color:#074641; padding-top:35px; padding-bottom:15px;">
                                <strong>已註冊客戶</strong>
                            </a>

                        <li class="sidebar-b rand collapse in" id="collapsefour">

                            <div>
                                <a href="#sign-in" role="tab" data-toggle="tab">
                                    &nbsp;&nbsp;登入D.PROMISE
                                </a>
                            </div>

                            <div>
                                <a href="#forgot-password" role="tab" data-toggle="tab">
                                    &nbsp;&nbsp;忘記密碼
                                </a>
                            </div>

                        </li>
                        </li>
                        <li class="sidebar-brand">
                            <a data-toggle="collapse" href="#collapsefive" style="color:#074641; padding-top:35px;padding-bottom:15px;">
                                <strong>註冊新賬戶</strong>
                            </a>
                        <li class="sidebar-b rand collapse in" id="collapsefive">

                            <div>
                                <a href="#sign-up" role="tab" data-toggle="tab">
                                    &nbsp;&nbsp;註冊新賬戶
                                </a>
                            </div>

                        </li>
                        </li>
                    </div>

                    <div class='<?php echo $sign_in; ?>'>
                        <li class="sidebar-brand">
                            <a data-toggle="collapse" href="#collapsesix" style="color:#074641; padding-top:35px;padding-bottom:15px;">
                                <strong>歡迎 <?php echo @$_SESSION['username']; ?></strong>
                            </a>

                        <li class="sidebar-b rand collapse in" id="collapsesix">

                            <div>
                                <a href="#Profile" role="tab" data-toggle="tab">
                                    &nbsp;&nbsp;賬戶概要
                                </a>
                            </div>

                            <div>
                                <a href="includes/login.php?action=logout">
                                    &nbsp;&nbsp;登出
                                </a>
                            </div>

                        </li>
                        </li></div>
                </ul>
            </div>
        </div>
        <!-- menu -->
        <div id="wrapper">
            <div id="sidebar-wrapper">
                <ul class=" col-lg-12 col-md-12 col-sm-12 col-xs-12  sidebar-nav">

                    <li class="sidebar-brand" role="tablist">
                        <a href="#products" role="tab" data-toggle="tab">
                            主頁
                        </a>
                    </li>
                    <li class="sidebar-brand" role="tablist">
                        <!-- <a href="http://perle.at-appmaker.com/zh/aboutus.php" role="tab" data-toggle="tab"> -->
                        <a href="aboutus.php" >
                            關於我們
                        </a>
                    </li>



                    <li class="sidebar-brand">
                        <a data-toggle="collapse" href="#collapsefour">
                            我的賬戶
                        </a>

                    <li class="sidebar-b rand collapse in" id="collapsefour">
                        <div class='<?php echo $sign_out; ?>'>
                            <div>
                                <a href="#sign-in" role="tab" data-toggle="tab">
                                    &nbsp;&nbsp;登入Amigo Spa & Beauty
                                </a>
                            </div>

                            <div>
                                <a href="#sign-up" role="tab" data-toggle="tab">
                                    &nbsp;&nbsp;註冊新賬戶
                                </a>
                            </div>
                        </div>

                        <div class='<?php echo $sign_in; ?>'>
                            <div>
                                <a href="#Profile" role="tab" data-toggle="tab">
                                    &nbsp;&nbsp;賬戶概要
                                </a>
                            </div>

                            <div>
                                <a href="includes/login.php?action=logout">
                                    &nbsp;&nbsp;登出
                                </a>
                            </div>
                        </div>
                    </li>
                    </li>

                    <li class="hidden-lg hidden-md col-sm-12 col-xs-12">
                        <a style="text-decoration:none" data-toggle="collapse" href="#collapsec">
                            <h1>
                                熱門推廣
                            </h1>
                        </a>

                        <div id="collapsec" class="collapse in">
                            <ul>
                                <?php
$sql = "select * from ategories where belong='hot' and `status` != 'delete'";
$result = mysqli_query($conn, $sql);
if ($result->num_rows > 0) {
	while ($row = $result->fetch_assoc()) {
		echo '<a href="e-shop.php?ategory=' . str_replace(' ', '_', $row["zh_category"]) . '">';
		echo "<li>" . $row['zh_category'] . "</li>";
		echo '</a>';
	}
}
?>
                            </ul>
                        </div>
                    </li>

                    <li class="hidden-lg hidden-md col-sm-12 col-xs-12">
                        <a style="text-decoration:none" data-toggle="collapse" href="#collapsep">
                            <h1>
                                產品類別
                            </h1>
                        </a>

                        <div id="collapsep" class="collapse in">
                            <ul>
                                <?php
$sql = "select * from ategories where belong='category' and `status` != 'delete'";
$result = mysqli_query($conn, $sql);
if ($result->num_rows > 0) {
	while ($row = $result->fetch_assoc()) {
		echo '<a href="e-shop.php?ategory=' . str_replace(' ', '_', $row["zh_category"]) . '">';
		echo "<li>" . $row['zh_category'] . "</li>";
		echo '</a>';
	}
}
?>
                            </ul>
                        </div>
                    </li>

                    <li class="hidden-lg hidden-md col-sm-12 col-xs-12">
                        <a style="text-decoration:none" data-toggle="collapse" href="#collapseb">
                            <h1>
                                肌膚關注
                            </h1>
                        </a>

                        <div id="collapseb" class="collapse in" >
                            <ul>
                                <?php
$sql = "select * from ategories where belong='skin' and `status` != 'delete'";
$result = mysqli_query($conn, $sql);
if ($result->num_rows > 0) {
	while ($row = $result->fetch_assoc()) {
		echo '<a href="e-shop.php?ategory=' . str_replace(' ', '_', $row["zh_category"]) . '">';
		echo "<li>" . $row['zh_category'] . "</li>";
		echo '</a>';
	}
}
?>
                            </ul>
                        </div>
                    </li>

                    <!-- added whatsapp -->
                  <!--   <li class="hidden-lg hidden-md col-sm-12 col-xs-12" role="tablist">
                        <a href="https://www.instagram.com/perlesuisse/?hl=zh-hk" >
                            <span><i><img src="/indexpage-app/src/img/logo/icon-ig.png" style="border: 0px;"></i><span style="">Instagram</span></span>
                        </a>
                    </li> -->

                    <li class="hidden-lg hidden-md col-sm-12 col-xs-12" role="tablist">
                        <a href="https://api.whatsapp.com/send?phone=85212345678" >
                            <span><i><img src="/indexpage-app/src/img/logo/whatsapp.png" style="border: 0px;"></i><span style="">WhatsApp</span></span>
                        </a>
                    </li>
                    <!-- end added whatsapp -->



                </ul>
            </div>
        </div>
        <!-- end menu -->

        <!-- top menu -->
        <div>
            <!-- top row color -->
            <div class="row" style="margin-right: 0px;
    margin-left: 0px;">
                <div class="col-xs-2" style="background-color: #01a4cd;height:10px;">

                </div>
                <div class="col-xs-2" style="background-color: #333333;height:10px;">

                </div>
                <div class="col-xs-2" style="background-color: #F15A22;height:10px;">

                </div>
                <div class="col-xs-2" style="background-color: #01a4cd;height:10px;">

                </div>
                <div class="col-xs-2" style="background-color: #333333;height:10px;">

                </div>
                <div class="col-xs-2" style="background-color: #F15A22;height:10px;">

                </div>
            </div>
            <!-- end top row color -->

            <!-- top logo -->
            <div class="container">
                <div class="row">
                    <div class="col-xs-12">
                    </div>
                </div>
            </div>


            <!-- end top logo -->



            <div class="row">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 top-bar">
                    <div class="col-lg-10 col-md-9 col-sm-12 col-xs-12 fixed-menu-container" >
                        <!--<select class="btn btn-default">
                            <option value="EN">
                                EN
                            </option>

                            <option value="CN">
                                CN
                            </option>
                        </select>-->


                        <!-- <a href="includes/translate.php?url=<?php echo $_SERVER['PHP_SELF'] . "?" . $_SERVER["QUERY_STRING"]; ?>&page=<?php echo $page; ?>" class="btn btn-default" id="change_lang">
                            English
                        </a> -->

                        <a href="aboutus.php" class="btn btn-default" id="">
                            關於我們
                        </a>

                        <!-- <a href="#message" class="btn btn-default" id="message" data-toggle="modal" data-target="#myModal">
                            聯絡我們
                        </a> -->

                        <a href="#cart-toggle" class="<?php echo $cart; ?>btn btn-default" id="cart-toggle" onClick="addcart()">
                            <div class="<?php echo $cart; ?>">購物車</div>
                        </a>

                        <a href="#menu-toggle" class="col-sm-12 col-xs-12 hidden-lg hidden-md  btn btn-default" id="menu-toggle">
                            選單
                        </a>

                        <a href="#account" class="col-lg-12 col-md-12 hidden-xs hidden-sm btn btn-default" id="account">
                            我的賬戶
                        </a>
                        <a href="e-shop.php" class="btn btn-default" id="">
                            主頁
                        </a>
                        <a style="padding:0px" href="https://zh-tw.facebook.com/amigospa.leg/" class="btn btn-default" id="">
                            <img src="index-date/img/logo/icon-fb.png" style=" width:27px">
                        </a>
                        <!-- <a style="padding:0px" href="https://www.instagram.com/perlesuisse/?hl=zh-hk" class="btn btn-default" id="">
                            <img src="index-date/img/logo/icon-ig.png" style=" width:27px" >
                        </a> -->
                    </div>


                    <div class="col-lg-6 col-md-6 hidden-sm hidden-xs top-menu-bar">
                    <!-- <div class="col-lg-2 col-md-3 hidden-sm hidden-xs top-menu-bar"> -->
                        <!-- <img src="../img/sayvour-logo.png"  style="width: 100%; padding-top: 5%; padding-right: auto; padding-bottom: 5%; padding-left: auto;"/> -->
                        <img src="../img/weblogo.png"  style="width: 100%; padding-top: 5%; padding-right: auto; padding-bottom: 5%; padding-left: auto;max-width: 810px;"/>
                    </div>

                    <div class="hidden-lg hidden-md col-sm-12 hidden-xs top-menu-bar">
                        <img src="../img/weblogo.png"  style="width: 50%; padding-top: 5%; padding-bottom: 5%; margin-left:25%; margin-right:25%; margin-bottom:10px; "/>
                    </div>

                    <div class="hidden-lg hidden-md hidden-sm col-xs-12 top-menu-bar">
                        <img src="../img/weblogo.png"  style="width: 80%; padding-top: 5%; padding-bottom: 5%;  margin-left:10%; margin-right:10%; margin-bottom:10px; "/>
                    </div>

                    <!-- <div class="col-lg-10 col-md-9 col-sm-12 col-xs-12 our-product" > -->

                        <?php
// if (!@$_SESSION["username"]) {
// 	echo '<p class="our-product-text" style=" text-transform: capitalize">歡迎進入Amigo Spa & Beauty';
// } elseif (@$_SESSION["Tusername"]) {
// 	echo '<p class="our-product-text" style=" text-transform: capitalize">歡迎進入Amigo Spa & Beauty';
// } else {
// 	echo '<p class="our-product-text" style=" text-transform: capitalize">你好 ' . @$_SESSION["username"] . '!';
// }
?>
                       <!--  </p>
                    </div> -->
                </div>
            </div>
        </div>
        <!-- end top menu -->

        <!-- modal -->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">
                                &times;
                            </span>
                        </button>

                        <h4 class="modal-title" id="myModalLabel">
                            聯絡我們
                        </h4>
                    </div>

                    <form method="post" action="includes/add-message.php" >
                        <div class="modal-body">
                            <div class="form-group">
                                <input name="name" class="form-control" value="<?php echo @$_SESSION["username"]; ?>" placeholder="請輸入您的姓名" required>
                            </div>

                            <div class="form-group">
                                <input name="email" value="<?php echo @$_SESSION["email"]; ?>" type="email" class="form-control" placeholder="請輸入您的郵箱" required>
                            </div>

                            <div class="form-group">
                                <input name="phone" value="<?php echo @$_SESSION["phone"]; ?>" class="form-control" placeholder="請輸入您的電話" pattern="[0-9]{8}" title="八位的電話號碼" required>
                            </div>

                            <div class="form-group">
                                <textarea name="message" class="form-control" rows="3" placeholder="請輸入您的信息" required></textarea>
                            </div>
                            <div class="form-group">
                                <div class="g-recaptcha" data-sitekey="6LenKhYUAAAAAIwseMuOsziCxRQ5bxg5-gals1Cv"></div>
                            </div>
                        </div>

                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">
                                關閉
                            </button>

                            <input type="submit" name="submit" value="寄出" class="btn btn-info" />
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <!-- end modal -->


    </body>
</html>