plateforme-corres2math/server_files/views/header.php

135 lines
6.7 KiB
PHP
Raw Normal View History

<?php $CONFIG->incrViews() ?>
<!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"/>
2019-10-22 20:51:25 +00:00
<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"/>
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>
<?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>
2019-09-27 22:12:40 +00:00
<?php if ($_SESSION["team"]->getValidationStatus() == ValidationStatus::VALIDATED) { ?>
2019-10-06 22:12:23 +00:00
<li class="nav-item active"><a class="nav-link" href="/ma-participation">Ma participation</a></li>
2019-09-27 22:12:40 +00:00
<?php
2019-09-23 22:41:53 +00:00
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>
2019-09-25 21:20:05 +00:00
<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>
2019-10-04 20:36:23 +00:00
<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>
2019-10-23 10:17:17 +00:00
<li class="nav-item active"><a class="nav-link" href="/admins">Administrateurs</a></li>
2019-09-25 21:20:05 +00:00
</ul>
</li>
<li class="nav-item active">
2019-10-18 20:23:00 +00:00
<a class="nav-link" href="/ajouter-admin">Ajouter un admin</a>
2019-09-23 22:41:53 +00:00
</li>
<li class="nav-item active">
2019-10-06 22:12:23 +00:00
<a class="nav-link" href="/suivi-correspondances">Suivi des Correspondances</a>
2019-09-23 22:41:53 +00:00
</li>
2019-10-18 20:23:00 +00:00
<li class="nav-item active">
<a class="nav-link" href="/exporter-donnees">Exporter les données</a>
</li>
2019-09-23 22:41:53 +00:00
<?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 } ?>
2019-09-23 22:41:53 +00:00
<?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 }