<?php
session_start();
include ('conexion/config.php');
include ('php/funciones.php');
include ('php/funciones_clientes.php');
include ('php/funciones_head.php');

if (CheckSesion($_SESSION, 'emailUser') == "1") {

    $session_var = VariablesSession($_SESSION, ['nameUser', 'emailUser', 'UserAdmin']);
    ?>
    <!DOCTYPE html>
    <html lang="es">

    <?php MostrarHead(1); ?>
    <!--"/css2/estilo_cliente.css" -->

    <body>

        <div class="header sticky">
            <div class="container">
                <div>
                    <a href="#home" class="navbar-link">Clientes</a>
                </div>

                <nav class="menu-principal" data-navbar>
                    <div>
                        <button id="boton-salir" class="boton-menu" aria-label="Toggle Menu" title="Toggle Menu">
                            <a href="#" class="navbar-link">Salir</a>
                        </button>
                    </div>
                    <div>
                        <button id="boton-cliente" class="boton-menu" aria-label="Toggle Menu" title="Toggle Menu">
                            <a href="#" class="navbar-link">Ver Clientes</a>
                        </button>
                    </div>
                </nav>
            </div>
        </div>

        <div class="left" id="columna-izquierda">
            <div class="header sticky">Buscar</div>
            <div class="container">
                <?php MostrarTarjetaClientes(100); ?>
            </div>
        </div>

        <div class="left-boton" id="columna-izquierda-boton" style="display:none;">
            <div class="header sticky">Buscar</div>
            <div class="container">
                <?php MostrarTarjetaClientes(100); ?>
            </div>
        </div>

        <div class="right" id="columna-derecha">
            <div class="header sticky">
                <?php MostrarCabeceraTituloCliente(); ?>
            </div>


            <div class="m-parent">
                <div class="m-div1">
                    <?php MostrarDatosClienteContacto(); ?>
                </div>
                <div class="m-div2">
                    <?php MostrarDatosClienteContacto(); ?>

                </div>
                <div class="m-div3">
                    <div class="tabs">
                        <input class="input" name="tabs" type="radio" id="tab-1" checked="checked" />
                        <label class="label" for="tab-1">Arlina Design</label>
                        <div class="panel">                                 
                            <?php MostrarTarjetaClientes2(100); ?>
                        </div>
                        <input class="input" name="tabs" type="radio" id="tab-2" />
                        <label class="label" for="tab-2">Idntheme</label>
                        <div class="panel">
                            <h1>Idntheme</h1>
                            <p>Idntheme (Citrus tangerina) is an orange-colored citrus fruit that is closely related to, or
                                possibly a type of, mandarin orange (Citrus reticulata).</p>
                            <p>The name was first used for fruit coming from Tangier, Morocco, described as a mandarin
                                variety. Under the Tanaka classification system, Citrus tangerina is considered a separate
                                species.</p>
                        </div>                        
                    </div>
                </div>
            </div>

            <!--

            <div class="wrapper">
                <div>

                    <div class="wrapper">
                        <?php MostrarDatosClienteContacto(); ?>

                    </div>
                    <div class="wrapper">
                        <?php MostrarDatosClienteContacto(); ?>
                    </div>

                </div>
                <div>
                    <div class="wrapper">
                        <?php MostrarDatosClienteContacto2(); ?>
                    </div>
                </div>
            </div>
-->
            <!--
            <div class="right-body">
                <div class="container">
                    <div class="info-cliente">
                        <?php MostrarDatosClienteContacto(); ?>
                        <?php MostrarDatosClienteContacto(); ?>
                    </div>
                </div>
                <div class="container">
                    <div class="info-cliente">
                        <?php MostrarDatosClienteContacto(); ?>
                    </div>
                </div>
            </div>
            -->
        </div>

        <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script>
        <script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.2/js/bootstrap.min.js'></script>
        <script src="assets/js/script.js"></script>

        <script>

            var colIzq = document.getElementById('columna-izquierda-boton');
            var colDch = document.getElementById('columna-derecha');

            const boton = document.getElementById("boton-cliente");
            boton.addEventListener("click", () => {
                if (colIzq.style.display == 'none') {
                    colIzq.style.display = 'block';
                } else {
                    colIzq.style.display = 'none';
                }
            });
            
        </script>

    </body>

    </html>

    <?php

} else {
    header("location:login/login.php");
}


