<?php
session_start();
include ('conexion/config.php');
include ('php/funciones.php');
if (CheckSesion($_SESSION, 'emailUser') == true) {

    /*
    $nameUser = $_SESSION['nameUser'];
    $email = $_SESSION['emailUser'];
    $admin = $_SESSION['UserAdmin'];
    */
    $session_var = VariablesSession($_SESSION,['nameUser','emailUser','UserAdmin']);

    ?>
    <!DOCTYPE html>
    <html lang="es">

    <?php include ('php/head.php'); ?>

    <body>
        <p>
            <?php 
            $texto_admin = VarBoolIntToTexto($session_var[2],"Admin","");
            echo "Logueado como " . $session_var[0]." (".$session_var[1]." - ". $texto_admin.")"; ?>
        </p>
        <p><a href="login/salirSesion.php?email=<?php echo $session_var[1]; ?>" style="color: #333; font-weight: bold;">Salir</a></p>
        <p><a href="clientes.php" style="color: #333; font-weight: bold;">Clientes</a></p>       
    </body>

    </html>

    <?php
} else {
    header("Location:login/login.php");
} ?>