1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2024-12-26 05:02:21 +00:00
plateforme-corres2math/server_files/views/header.php
2019-10-29 15:29:37 +01:00

138 lines
7.1 KiB
PHP

<?php $CONFIG->incrViews() ?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="description" content="Inscrivez-vous pour les Correspondances des Jeunes Mathématicien·ne·s <?= $YEAR . " - " . ($YEAR + 1) ?> !">
<meta name="keywords" content="Correspondances,Jeunes,Mathématicien·ne·s,Mathématiciens,Mathématiciennes,Corres2Math,Inscription,TFJM²,TFJM">
<meta name="author" content="Yohann D'ANELLO (yohann.danello[at]animath.fr)">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="google-site-verification" content="nTgyZnU1Uw0OYaAX-TMg-5hVIKkeKAYtj2sNQRDz_sQ">
<title>Site d'inscription pour les Correspondances des Jeunes Mathématicien·ne·s <?= $YEAR . " - " . ($YEAR + 1) ?></title>
<link rel="stylesheet" type="text/css" href="/style.css">
<link REL="shortcut icon" href="/favicon.ico">
<!-- 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>
<div class="container.fluid bg-light">
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container">
<a class="navbar-brand" href="https://correspondances-maths.fr/" target="_blank">
<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>
<?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) { ?>
<li class="nav-item active"><a class="nav-link" href="/ma-participation">Ma participation</a></li>
<?php
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">Liste des équipes</a>
<ul class="deroule">
<li class="nav-item active"><a class="nav-link" href="/probleme/1">Problème 1</a></li>
<li class="nav-item active"><a class="nav-link" href="/probleme/2">Problème 2</a></li>
<li class="nav-item active"><a class="nav-link" href="/probleme/3">Problème 3</a></li>
<li class="nav-item active"><a class="nav-link" href="/probleme/4">Problème 4</a></li>
<li class="nav-item active"><a class="nav-link" href="/probleme/0">Équipes sans problème</a></li>
<li class="nav-item active"><a class="nav-link" href="/profils-orphelins">Profils orphelins</a></li>
<li class="nav-item active"><a class="nav-link" href="/admins">Administrateurs</a></li>
</ul>
</li>
<li class="nav-item active">
<a class="nav-link" href="/ajouter-admin">Ajouter un admin</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="/suivi-correspondances">Suivi des Correspondances</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="/exporter-donnees">Exporter les données</a>
</li>
<?php } ?>
<?php } ?>
</ul>
<ul class="navbar-nav">
<?php if (isset($_SESSION["admin"])) { ?>
<li class="nav-item active">
<a class="nav-link" href="/?view-as-admin">Retourner en vue administrateur</a>
</li>
<?php } ?>
<?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 }