<?php
require_once './metier/user.php';
$user = $_SESSION["user"];


//On vérifie si il y a quelqu'un de connecté ou non
if (!isset($user))
    {
    ?>
    <div id='form'>
        <form method = 'post' action = 'index.php'>
            <div id = 'form_input'>
                <label for = 'login_form'>Login</label>
                <input name = 'login' id = 'login_form' />
                <label for = 'login_form'>Mot de passe</label>
                <input type='password' name = 'mdp' id = 'mdp_form' />
                <button type = 'submit'>Se connecter</button>
            </div>
        </form>
    </div>
    <?php
    } else
    {
    ?>
    <div>
        <div id='menu_title'>
            Bienvenue <?php echo $user->getLogin(); ?>
        </div>
    </div>
    <?php
    }
?>

