plateforme-tfjm2/server_files/views/header.php

123 lines
6.1 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
2019-09-08 22:58: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">
2019-09-06 11:48:50 +00:00
</head>
<body>
2019-09-08 22:58:53 +00:00
<div class="container.fluid bg-light">
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container">
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>
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a href="/" class="nav-link">Accueil</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="/tournois">Liste des tournois</a>
<?php if ($_SESSION["role"] == Role::ADMIN || $_SESSION["role"] == Role::ORGANIZER) { ?>
<ul class="deroule">
<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="/profils">Tous les profils</a></li>
<li class="nav-item active"><a class="nav-link" href="/organisateurs">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">
2019-12-19 12:02:01 +00:00
<a class="nav-link" href="/mon-compte">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">
<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">
2019-12-19 12:02:01 +00:00
<a class="nav-link" href="/mon-equipe">Mon équipe</a>
2019-09-08 22:58:53 +00:00
</li>
<?php if ($_SESSION["team"]->getValidationStatus() == ValidationStatus::VALIDATED || true) { ?>
<li class="nav-item active">
<a class="nav-link" href="/paiement">Paiement</a>
2019-09-08 22:58:53 +00:00
</li>
<li class="nav-item active">
<a class="nav-link" href="/solutions">Solutions</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="/syntheses">Notes de synthèse</a>
</li>
<?php } ?>
<?php } ?>
<?php } ?>
<?php if ($_SESSION["role"] == Role::ADMIN) { ?>
<li class="nav-item active">
<a class="nav-link" href="/ajouter_tournoi">Ajouter un tournoi</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="/ajouter_organisateur">Ajouter un organisateur</a>
</li>
<?php } ?>
<?php if ($_SESSION["role"] == Role::ADMIN || $_SESSION["role"] == Role::ORGANIZER) { ?>
<li class="nav-item active">
<a class="nav-link" href="/solutions_orga">Solutions</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="/syntheses_orga">Notes de synthèse</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="/connexion">Connexion</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="/inscription">Inscription</a>
</li>
<?php } else { ?>
2019-12-19 14:05:11 +00:00
<?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-08 22:58:53 +00:00
<li class="nav-item active">
<a class="nav-link" href="/deconnexion">Déconnexion</a>
</li>
2019-09-06 11:48:50 +00:00
<?php } ?>
2019-09-08 22:58:53 +00:00
</ul>
</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">
<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>
2019-12-27 20:37:08 +00:00
<?php }
if (!isset($_SESSION["user"]) && $view != "server_files/controllers/connexion.php") {
echo "<div style=\"text-align: center;\" class=\"alert alert-success\"><h1>Cette plateforme ouvrira le 22 janvier 2020 ! :)</h1></div>";
require_once "footer.php";
}