1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2024-12-27 08:22:21 +00:00
plateforme-corres2math/server_files/views/header.php

111 lines
5.0 KiB
PHP
Raw Normal View History

<!DOCTYPE html>
<html lang="fr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Site d'inscription pour les Correspondances des Jeunes Mathématicien·ne·s <?= $YEAR ?></title>
<link rel="stylesheet" type="text/css" href="/style.css"/>
<link REL="shortcut icon" href="/favicon.ico"/>
2019-09-23 22:41:53 +00:00
<!-- Bootstrap -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
2019-09-23 22:41:53 +00:00
<div class="container.fluid bg-light">
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container">
<a class="navbar-brand" href="/">
<img src="/logo.png" alt="Logo Corres2Mat" id="navbar-logo">
</a>
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="/">Accueil</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="/calendrier">Calendrier</a>
</li>
<!-- TODO Menu déroulant pour la liste des problèmes -->
<?php if (isset($_SESSION["user_id"])) { ?>
<li class="nav-item active">
<a class="nav-link" href="/mon-compte">Mon compte</a>
</li>
<?php if ($_SESSION["role"] == Role::ENCADRANT || $_SESSION["role"] == Role::PARTICIPANT) { ?>
<?php if ($_SESSION["team"] == NULL) {
if (date("Y-m-d H:i:s") < $CONFIG->getInscriptionDate()) { ?>
<li class="nav-item active"><a class="nav-link" href="/ajouter-equipe">
Ajouter une équipe</a>
</li>
<li class="nav-item active"><a class="nav-link" href="/rejoindre-equipe">
Rejoindre une équipe</a>
</li>
<?php }
} else { ?>
<li class="nav-item active"><a class="nav-link" href="/mon-equipe">Mon équipe</a></li>
<?php if ($_SESSION["team"]->getValidationStatus() == ValidationStatus::VALIDATED) {
switch (Phase::getCurrentPhase()) {
case Phase::PHASE1: ?>
<li class="nav-item active"><a class="nav-link" href="/envoyer-video-1">
Envoyer ma vidéo (phase 1)</a>
</li>
<?php break;
case Phase::PHASE2: ?>
<li class="nav-item active"><a class="nav-link" href="/poser-questions-2">
Poser des questions (phase 2)</a>
</li>
<?php break;
case Phase::PHASE3: ?>
<li class="nav-item active"><a class="nav-link" href="/repondre-questions-3">
Répondre aux questions (phase 3)</a>
</li>
<?php break;
case Phase::PHASE4: ?>
<li class="nav-item active"><a class="nav-link" href="/commenter-echange-4">
Commenter l'échange (phase 4)</a></li>
<?php break;
}
} ?>
<?php } ?>
<?php } ?>
<?php if ($_SESSION["role"] == Role::ADMIN) { ?>
<li class="nav-item active"><a class="nav-link" href="/ajouter-admin">
Ajouter un administrateur</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="/videos-solutions">Vidéos des solutions</a>
</li>
<?php } ?>
<?php } ?>
</ul>
<ul class="navbar-nav">
<?php if (isset($_SESSION["user_id"])) { ?>
<li class="nav-item active">
<a class="nav-link" href="/deconnexion">Déconnexion</a>
</li>
<?php } else { ?>
<?php if (date("Y-m-d H:i:s") < $CONFIG->getInscriptionDate()) { ?>
<li class="nav-item active">
<a class="nav-link" href="/inscription">Inscription</a>
</li>
<?php } ?>
<li class="nav-item active">
<a class="nav-link" href="/connexion">Connexion</a>
</li>
<?php } ?>
</ul>
</div>
</nav>
</div>
<div class="container">
<div class="mt-4 mb-4">
</div>
<?php
if (isset($has_error) && $has_error) { ?>
<div class="alert alert-danger">
<strong>Erreur :</strong> <?= $error_message ?>
</div>
<?php }