1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-27 13:02:23 +00:00
plateforme-tfjm2/server_files/views/header.php

163 lines
9.0 KiB
PHP
Raw Normal View History

2019-09-06 11:48:50 +00:00
<!DOCTYPE html>
<html lang="fr">
<head>
2019-12-19 12:02:01 +00:00
<meta charset="UTF-8">
<meta name="description" content="Inscrivez-vous pour le TFJM² <?= $YEAR ?> !">
<meta name="keywords" content="TFJM,TFJM²,Tournoi,Français,Jeunes,Mathématiciennes,Mathématiciens">
<meta name="author" content="Yohann D'ANELLO (yohann.danello[at]animath.fr)">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2019-09-08 22:58:53 +00:00
<title>Site d'inscription pour le TFJM² <?= $YEAR ?></title>
2019-12-19 12:02:01 +00:00
<link rel="stylesheet" type="text/css" href="/style.css">
<link REL="shortcut icon" href="/favicon.ico">
2019-09-06 11:48:50 +00:00
2020-04-26 22:48:39 +00:00
<!-- Bootstrap CSS -->
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.13.0/css/all.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.13.0/css/v4-shims.css">
<!-- JQuery, Bootstrap and Turbolinks JavaScript -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha384-vk5WoKIaW/vJyUAd9n/wmopsmNhiy+L2Z+SBxGYnUkunIxVxAv/UtMOhba/xskxh"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/turbolinks/5.2.0/turbolinks.js"
crossorigin="anonymous"></script>
2019-09-06 11:48:50 +00:00
</head>
<body>
2019-09-08 22:58:53 +00:00
<div class="container.fluid bg-light">
2020-04-26 22:48:39 +00:00
<nav class="navbar navbar-expand-md navbar-light bg-light fixed-navbar shadow-sm">
2019-12-19 12:02:01 +00:00
<a class="navbar-brand" href="https://tfjm.org/">
2019-09-08 22:58:53 +00:00
<img src="/logo.svg" alt="Logo TFJM²" id="navbar-logo">
</a>
2020-04-26 22:48:39 +00:00
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarNavDropdown"
aria-controls="navbarNavDropdown" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div id="navbarNavDropdown" class="collapse navbar-collapse">
2019-09-08 22:58:53 +00:00
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a href="/" class="nav-link"><i class="fas fa-home"></i>Accueil</a>
2019-09-08 22:58:53 +00:00
</li>
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="/tournois"><i class="fas fa-calendar"></i>Liste des tournois</a>
<?php if ($_SESSION["role"] == Role::ADMIN || $_SESSION["role"] == Role::ORGANIZER) { ?>
<ul class="deroule">
2020-01-21 11:43:13 +00:00
<?php if ($_SESSION["role"] == Role::ADMIN) { ?>
2020-04-26 22:48:39 +00:00
<li class="nav-item active"><a class="nav-link" href="/profils-orphelins"><i class="fas fa-user"></i> Profils orphelins</a></li>
<li class="nav-item active"><a class="nav-link" href="/profils"><i class="fas fa-users"></i> Tous les profils</a></li>
2020-01-21 11:43:13 +00:00
<?php } ?>
2020-04-26 22:48:39 +00:00
<li class="nav-item active"><a class="nav-link" href="/organisateurs"><i class="fas fa-user-tie"></i> Organisateurs</a></li>
</ul>
<?php } ?>
2019-09-08 22:58:53 +00:00
</li>
<?php if (isset($_SESSION["user_id"])) { ?>
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="/mon-compte"><i class="fas fa-user"></i>Mon compte</a>
2019-09-08 22:58:53 +00:00
</li>
<?php if ($_SESSION["role"] == Role::ENCADRANT || $_SESSION["role"] == Role::PARTICIPANT) { ?>
<?php if ($_SESSION["team"] == NULL) { ?>
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="/ajouter_equipe"><i class="fas fa-folder-plus"></i>Ajouter une équipe</a>
2019-09-08 22:58:53 +00:00
</li>
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="/rejoindre_equipe"><i class="fas fa-users"></i>Rejoindre une équipe</a>
2019-09-08 22:58:53 +00:00
</li>
<?php } else { ?>
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="/mon-equipe"><i class="fas fa-users-cog"></i>Mon équipe</a>
2019-09-08 22:58:53 +00:00
</li>
2020-01-16 21:04:29 +00:00
<?php if ($_SESSION["team"]->getValidationStatus() == ValidationStatus::VALIDATED) { ?>
2020-04-13 01:41:15 +00:00
<!-- <li class="nav-item active">
<a class="nav-link" href="/paiement">Paiement</a>
2020-04-13 01:41:15 +00:00
</li> -->
2019-09-08 22:58:53 +00:00
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="/solutions"><i class="fas fa-lightbulb">Solutions</a>
2019-09-08 22:58:53 +00:00
</li>
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="/syntheses"><i class="fas fa-feather">Notes de synthèse</a>
2019-09-08 22:58:53 +00:00
</li>
<?php } ?>
<?php } ?>
<?php } ?>
<?php if ($_SESSION["role"] == Role::ADMIN) { ?>
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="/ajouter_tournoi"><i class="fas fa-calendar-plus"></i>Ajouter un tournoi</a>
2019-09-08 22:58:53 +00:00
</li>
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="/ajouter_organisateur"><i class="fas fa-user-plus"></i>Ajouter un organisateur</a>
2019-09-08 22:58:53 +00:00
</li>
<?php } ?>
<?php if ($_SESSION["role"] == Role::ADMIN || $_SESSION["role"] == Role::ORGANIZER) { ?>
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="/solutions_orga"><i class="fas fa-lightbulb"></i>Solutions</a>
2019-09-08 22:58:53 +00:00
</li>
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="/syntheses_orga"><i class="fas fa-feather"></i>Notes de synthèse</a>
2019-09-08 22:58:53 +00:00
</li>
<?php } ?>
<?php } ?>
2020-04-13 01:41:15 +00:00
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="https://www.helloasso.com/associations/animath/formulaires/5/widget"><i class="fas fa-hand-holding-heart"></i>Faire un don</a>
2020-04-13 01:41:15 +00:00
</li>
2019-09-08 22:58:53 +00:00
</ul>
<ul class="navbar-nav">
<?php if (!isset($_SESSION["user_id"])) { ?>
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="/connexion"><i class="fas fa-sign-in-alt"></i>Connexion</a>
2019-09-08 22:58:53 +00:00
</li>
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="/inscription"><i class="fas fa-user-plus"></i>Inscription</a>
2019-09-08 22:58:53 +00:00
</li>
<?php } else { ?>
2019-12-19 14:05:11 +00:00
<?php if (isset($_SESSION["admin"])) { ?>
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="/?view-as-admin"><i class="fas fa-tools"></i>Retourner en vue administrateur</a>
2019-12-19 14:05:11 +00:00
</li>
<?php } ?>
2019-09-08 22:58:53 +00:00
<li class="nav-item active">
2020-04-26 22:48:39 +00:00
<a class="nav-link" href="/deconnexion"><i class="fas fa-sign-out-alt"></i>Déconnexion</a>
2019-09-08 22:58:53 +00:00
</li>
2019-09-06 11:48:50 +00:00
<?php } ?>
2019-09-08 22:58:53 +00:00
</ul>
2020-04-26 22:48:39 +00:00
</div>
2019-09-08 22:58:53 +00:00
</nav>
</div>
2019-10-22 20:53:07 +00:00
2019-09-06 11:48:50 +00:00
2019-12-19 12:02:01 +00:00
<div class="container">
2020-04-13 01:41:15 +00:00
2019-12-19 12:02:01 +00:00
<div class="mt-4 mb-4">
</div>
2020-04-13 01:41:15 +00:00
<?php
if ($_SESSION["role"] == Role::PARTICIPANT || $_SESSION["role"] == Role::ENCADRANT) {
if ($_SESSION["team"] != null && $_SESSION["team"]->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
<div class="alert alert-danger">
Votre équipe n'est pas validée. Rendez-vous sur la page <a href="mon-equipe">Mon équipe</a> pour demander à
valider votre équipe. Si vous aviez déjà effectué cette procédure par le passé, sachez qu'en raison du
changement de format de l'édition 2020 du TFJM<sup>2</sup>, toutes les validations ont été retirées, et
vous devez à nouveau demander à valider votre équipe. Plus d'informations sur <a href="/">la page d'accueil</a>.
</div>
<?php }
}
?>
2019-12-19 12:02:01 +00:00
<?php
if (isset($has_error) && $has_error) { ?>
<div class="alert alert-danger">
<strong>Erreur :</strong> <?= $error_message ?>
</div>
2020-01-22 12:04:49 +00:00
<?php }