<!DOCTYPE html>
<html>
    <head>
        <title>Alerte mail pour Leboncoin.fr</title>
        <meta charset="utf-8">
        <meta name="robots" content="none">
        <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" href="static/styles.css?v=<?php echo STATIC_REV; ?>" />
        <link rel="stylesheet" href="static/font-awesome/css/font-awesome.min.css?v=<?php echo STATIC_REV; ?>" />
    </head>
    <body>
        <?php if ($userAuthed) : ?>
        <header>
            <h1><a href="./">Cheky</a></h1>

            <?php if ($userAuthed->isAdmin() && $version = $app->upgradeAvailable()) : ?>
            <p class="upgrade-available">
                <a href="?mod=admin&amp;a=upgrade">
                    <span class="fa fa-arrow-circle-up"></span>
                    Cheky <?php echo $version; ?> est disponible.
                    Cliquez ici pour mettre à jour votre version
                    (<?php echo APPLICATION_VERSION; ?>).
                    <span class="fa fa-arrow-circle-up"></span>
                </a>
            </p>
            <?php endif; ?>

            <ul class="topmenu">
                <li<?php echo $module === "default"?' class="active"':''; ?>><a href="./?"><img src="static/images/home.png" alt="" /></a></li>
                <li<?php echo $module === "mail"?' class="active"':''; ?>><a href="?mod=mail">Mes alertes</a></li>
                <li<?php echo $module === "rss"?' class="active"':''; ?>><a href="?mod=rss">Flux RSS</a></li>
                <li<?php echo $module === "annonce"?' class="active"':''; ?>><a href="?mod=annonce">Mes annonces sauvegardées</a></li>
                <li<?php echo $module === "user"?' class="active"':''; ?>><a href="?mod=user&amp;a=settings">Paramètres</a></li>
                <li><a href="https://forum.cheky.net">Forum</a></li>
                <li style="float: right;"><a href="?a=logout">Déconnexion <span>(<?php echo htmlspecialchars($userAuthed->getUsername()); ?>)</span></a></li>
            </ul>
        </header>
        <?php endif; ?>
        <div class="content">
            <?php echo $content; ?>
        </div>
        <?php if ($userAuthed) : ?>
        <footer>
            <?php if ($userAuthed->isAdmin()) : ?>
            <a href="?mod=admin&amp;a=users" style="color: #EF0000;">Administration</a> |
            <?php endif; ?>
            Version <?php echo APPLICATION_VERSION; ?>
            | <a href="https://github.com/Blount/LBCAlerte/issues">Rapporter un bug</a>
        </footer>
        <?php endif; ?>
        <script type="text/javascript" src="static/scripts.js"></script>
    </body>
</html>
