<?PHP 
require_once('core.php');
if(!isset($_SESSION['id']))
{
header("Location: index.php");
exit();
}
$menu = "commu";
$page = "staffsecondaire";
?>
<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title><?PHP echo htmlentities(trim($cms['nom_hotel'])); ?> - L'équipe Secondaire </title>
        <link type="text/css" href="web/css/material.css" rel="stylesheet">
        <link rel="stylesheet" type="text/css" href="web/css/nav.css">
        <script src="web/js/jquery.js"></script>
        <script type="text/javascript" src="web/js/smoothscroll.js"></script>
    </head> 
    <body>
    <?PHP require_once('template/header/template_header.php'); ?>
        <div class="container_24">
        <?PHP require_once('template/header/template_nav.php'); ?>
        <!-- Parti gauche de la page -->
            <div class="grid_12" style="float: left;">
                <div id="contentBox" class="activity" style="overflow: hidden;">
                    <div class="head">
                        <div class="badgeImage staff"></div>
                        Pubeur
                        <br>
                        <span class="date">Un pubeur a pour mission de faire de la publicité sur les réseaux sociaux et autres.</span>
                    </div>
                    <?PHP
                    $SelectStaff = $bdd->prepare('SELECT * FROM users WHERE rank = ?');
                    $SelectStaff->execute(array(3));
                    if($SelectStaff->rowCount() >= 1) {
                    while ($Info = $SelectStaff->fetch()) { ?>
                    <div class="text" style="width: 250px;height: 120px;">
                    <div class="lookstaff" style="background-image: url(https://www.habbo.de/habbo-imaging/avatarimage?figure=<?PHP echo htmlspecialchars(htmlentities(trim($Info['look']))); ?>&direction=2&head_direction=3&action=wav&size=m&gesture=sml);"></div>
                    <b class="bstaff"><?PHP echo htmlspecialchars(htmlentities(trim($Info['username']))); ?></b><br><br>
                    <i class="istaff"><?PHP echo htmlspecialchars(trim($Info['motto'])); ?></i><br>
                    <?PHP if($Info['online'] == 0) { ?><img style="margin-left: 10px;" src="web/img/offline.gif"><?PHP } else { ?><img style="margin-left: 10px;" src="web/img/online.gif"><?PHP } ?>
                    <b class="bstaffconect">Connecté le <?PHP echo date('d.m.Y à H:i', htmlspecialchars(htmlentities(trim($Info['last_online'])))); ?></b>
                    </div>
                    <?PHP } } else { ?>
                    <div class="text" style="text-align: center;">
                        <b>Aucun pubeur pour le moment.</b>
                    </div>
                    <?PHP } ?>
                </div>
            </div>
            <!-- Parti droit de la page -->
            <div class="grid_12" style="float: right;">
                <div id="contentBox" class="activity" style="overflow: hidden;">
                    <div class="head">
                        <div class="badgeImage staff"></div>
                        Guide
                        <br>
                        <span class="date">Un guide a pour mission d'accueillir les nouveaux arrivants et facilité leur intégration au sein de la communauté.</span>
                    </div>
                    <?PHP
                    $SelectStaff = $bdd->prepare('SELECT * FROM users WHERE rank = ?');
                    $SelectStaff->execute(array(4));
                    if($SelectStaff->rowCount() >= 1) {
                    while ($Info = $SelectStaff->fetch()) { ?>
                    <div class="text" style="width: 250px;height: 120px;">
                    <div class="lookstaff" style="background-image: url(https://www.habbo.de/habbo-imaging/avatarimage?figure=<?PHP echo htmlspecialchars(htmlentities(trim($Info['look']))); ?>&direction=2&head_direction=3&action=wav&size=m&gesture=sml);"></div>
                    <b class="bstaff"><?PHP echo htmlspecialchars(htmlentities(trim($Info['username']))); ?></b><br><br>
                    <i class="istaff"><?PHP echo htmlspecialchars(trim($Info['motto'])); ?></i><br>
                    <?PHP if($Info['online'] == 0) { ?><img style="margin-left: 10px;" src="web/img/offline.gif"><?PHP } else { ?><img style="margin-left: 10px;" src="web/img/online.gif"><?PHP } ?>
                    <b class="bstaffconect">Connecté le <?PHP echo date('d.m.Y à H:i', htmlspecialchars(htmlentities(trim($Info['last_online'])))); ?></b>
                    </div>
                    <?PHP } } else { ?>
                    <div class="text" style="text-align: center;">
                        <b>Aucun guide pour le moment.</b>
                    </div>
                    <?PHP } ?>
                </div>
            </div>
            
            <div class="grid_24">
                <div id="contentBox">
                    <div class="title red">
                        <?PHP echo htmlentities(trim($cms['nom_hotel'])); ?> est propulsé par PlusCMS par Dodone.
                    </div>
                </div>
            </div>
        </div>
    </body>
</html>