<?php

//session_set_cookie_params(['lifetime' => 0, 'path' => '/', 'domain' => '', 'secure' => true, 'httponly' => true, 'samesite' => 'Lax');
session_start(); // start session

require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/categories.lib.php';
includeContainer('_library_page_lib.php', 1);

$tag = GETPOST('tag', 'alpha');
$cat_id = GETPOST('cat', 'alpha');
$search = GETPOST('search_query', 'alpha');
$action = GETPOST('action', 'alpha');

if (!empty($action) && $action == "logout") {
    // Update Order details before unset session and logout
    ws_refreshOrder();
    unset($_SESSION['user']);
    redirectToContainer('index');
}
if (empty($_SESSION['user']['id_user'])) {
    redirectToContainer('login-register');
}
// END PHP 
?>
<div id="page">
  <div class="header-container">
    <?php
        includeContainer('header');
        $__PAGE__TITLE__ = $weblangs->trans("myAccountPageTitle");
    ?>
  </div>
  <div class="columns-container">
    <div id="columns" class="container">
        <!--  Breadcrumb  -->
        <div class="breadcrumb clearfix">
        	<a class="home" href="index.php" title="Return to Home"><i class="icon-home"></i></a>
        	<span class="navigation-pipe">&gt;</span> <?php print $weblangs->trans("myAccount"); ?>
        </div>
        <!--  Breadcrumb  -->
      <div id="slider_row" class="row">
        <div id="top_column" class="center_column col-xs-12 col-sm-12"></div>
      </div>
      <div class="row">
        <!-- include lefet sidebar container -->
        <?php includeContainer('sidebar'); ?>
        <div id="center_column" class="center_column col-xs-12 col-sm-9">
            <div id="my-account">
                <h1 class="page-heading"><?php print $weblangs->trans("myAccount"); ?></h1>
                <p class="info-account"><?php print $weblangs->trans("welcomeToYourAccount"); ?></p>
                <br>
                <div class="row addresses-lists">
                	<div class="col-xs-12 col-sm-12 col-lg-12">
                		<ul class="myaccount-link-list">
                		    <li><a href="account-information.php" title="<?php print $weblangs->trans("personalInfo"); ?>"><i class="icon-user"></i><span><?php print $weblangs->trans("personalInfo"); ?></span></a></li>
                            <li><a href="order-history.php" title="<?php print $weblangs->trans("orderHistoryDetails"); ?>"><i class="icon-list-ol"></i><span><?php print $weblangs->trans("orderHistoryDetails"); ?></span></a></li>
                        </ul>
                	</div>
                    
                    <br>
                	
                	
                	<div class="col-xs-12 col-sm-12 col-lg-12">
                    	<br><b><?php print $weblangs->trans("VendorArea"); ?></b><br><br>

                        <ul class="myaccount-link-list">
                		    <li><a href="edit-module-product.php" title="<?php print $weblangs->trans("newModuleProduct"); ?>"><i class="icon-add"></i><span><?php print $weblangs->trans("newModuleProduct"); ?></span></a></li>
                		    <li><a href="manage-products.php" title="<?php print $weblangs->trans("manageProducts"); ?>"><i class="icon-manage"></i><span><?php print $weblangs->trans("manageProducts"); ?></span></a></li>
                            <li><a href="income-payments.php" title="<?php print $weblangs->trans("incomeAndPayments"); ?>"><i class="icon-euro"></i><span><?php print $weblangs->trans("incomeAndPayments"); ?></span></a></li>
                        </ul>
                    </div>
                </div>
                <ul class="footer_links clearfix">
                    <li><a class="btn btn-default button button-small" href="https://www.dolistore.com/" title="<?php print $weblangs->trans("Home"); ?>"><span><i class="icon-chevron-left"></i> <?php print $weblangs->trans("Home"); ?></span></a></li>
                </ul>
            </div>
		</div>
      </div>
    </div>
  </div>
  <!-- .columns-container -->
  <div class="footer-container">
    <?php includeContainer('footer'); ?>
  </div>
</div>