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


//On vérifie si il y a quelqu'un de connecté ou non
if (!isset($user))
    {
    ?>
    <div class='form'>
        <form method = 'post' action = 'index.php?page=login'>
            <div class = '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'>
            <h3>Bienvenue <?php echo $user->getLogin(); ?></h3>
        </div>
    </div>
    <?php
    }
?>

