Redesign du site
This commit is contained in:
parent
a368dfbead
commit
7db606e6eb
|
@ -1,15 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="WebServers">
|
|
||||||
<option name="servers">
|
|
||||||
<webServer id="3455bbbe-7983-4ac6-b2f8-7e6c650508e4" name="inscription.tfjm.org" url="https://inscription.tfjm.org">
|
|
||||||
<fileTransfer host="tfjm.org" port="22" accessType="SFTP" authAgent="true">
|
|
||||||
<advancedOptions>
|
|
||||||
<advancedOptions dataProtectionLevel="Private" passiveMode="true" shareSSLContext="true" />
|
|
||||||
</advancedOptions>
|
|
||||||
<option name="port" value="22" />
|
|
||||||
</fileTransfer>
|
|
||||||
</webServer>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
|
@ -1,8 +1,47 @@
|
||||||
|
html, body {
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--navbar-height: 32px;
|
--navbar-height: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
min-height: 78%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inner {
|
||||||
|
margin: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert {
|
||||||
|
text-align: justify;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
footer .alert {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
#navbar-logo {
|
#navbar-logo {
|
||||||
height: var(--navbar-height);
|
height: var(--navbar-height);
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul .deroule {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
background: #f8f9fa !important;
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 20px;
|
||||||
|
z-index: 42;
|
||||||
|
}
|
||||||
|
|
||||||
|
li:hover ul.deroule {
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.nav-link:hover {
|
||||||
|
background-color: #d8d9da;
|
||||||
|
}
|
||||||
|
|
|
@ -38,9 +38,9 @@ $ROUTES["^equipe/([A-Z]{3})/?$"] = ["server_files/controllers/equipe.php", "trig
|
||||||
$ROUTES["^file/([a-z0-9]{64})/?$"] = ["server_files/controllers/view_file.php", "file_id"];
|
$ROUTES["^file/([a-z0-9]{64})/?$"] = ["server_files/controllers/view_file.php", "file_id"];
|
||||||
$ROUTES["^informations/([0-9]*)/.*?$"] = ["server_files/controllers/informations.php", "id"];
|
$ROUTES["^informations/([0-9]*)/.*?$"] = ["server_files/controllers/informations.php", "id"];
|
||||||
$ROUTES["^inscription/?$"] = ["server_files/controllers/inscription.php"];
|
$ROUTES["^inscription/?$"] = ["server_files/controllers/inscription.php"];
|
||||||
$ROUTES["^mon_compte/?$"] = ["server_files/controllers/mon_compte.php"];
|
$ROUTES["^mon-compte/?$"] = ["server_files/controllers/mon_compte.php"];
|
||||||
$ROUTES["^mon_equipe/(modifier)/?$"] = ["server_files/controllers/mon_equipe.php", "modifier"];
|
$ROUTES["^mon-equipe/(modifier)/?$"] = ["server_files/controllers/mon_equipe.php", "modifier"];
|
||||||
$ROUTES["^mon_equipe/?$"] = ["server_files/controllers/mon_equipe.php"];
|
$ROUTES["^mon-equipe/?$"] = ["server_files/controllers/mon_equipe.php"];
|
||||||
$ROUTES["^rejoindre_equipe/?$"] = ["server_files/controllers/rejoindre_equipe.php"];
|
$ROUTES["^rejoindre_equipe/?$"] = ["server_files/controllers/rejoindre_equipe.php"];
|
||||||
$ROUTES["^solutions/?$"] = ["server_files/controllers/solutions.php"];
|
$ROUTES["^solutions/?$"] = ["server_files/controllers/solutions.php"];
|
||||||
$ROUTES["^solutions_orga/?$"] = ["server_files/controllers/solutions_orga.php"];
|
$ROUTES["^solutions_orga/?$"] = ["server_files/controllers/solutions_orga.php"];
|
||||||
|
|
|
@ -5,6 +5,7 @@ class SchoolClass
|
||||||
const SECONDE = 0;
|
const SECONDE = 0;
|
||||||
const PREMIERE = 1;
|
const PREMIERE = 1;
|
||||||
const TERMINALE = 2;
|
const TERMINALE = 2;
|
||||||
|
const ADULT = 3;
|
||||||
|
|
||||||
public static function getTranslatedName($class) {
|
public static function getTranslatedName($class) {
|
||||||
switch ($class) {
|
switch ($class) {
|
||||||
|
@ -12,8 +13,12 @@ class SchoolClass
|
||||||
return "Seconde ou inférieur";
|
return "Seconde ou inférieur";
|
||||||
case self::PREMIERE:
|
case self::PREMIERE:
|
||||||
return "Première";
|
return "Première";
|
||||||
default:
|
case self::TERMINALE:
|
||||||
return "Terminale";
|
return "Terminale";
|
||||||
|
case self::ADULT:
|
||||||
|
return "Adulte";
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,8 +28,12 @@ class SchoolClass
|
||||||
return "SECONDE";
|
return "SECONDE";
|
||||||
case self::PREMIERE:
|
case self::PREMIERE:
|
||||||
return "PREMIERE";
|
return "PREMIERE";
|
||||||
default:
|
case self::TERMINALE:
|
||||||
return "TERMINALE";
|
return "TERMINALE";
|
||||||
|
case self::ADULT:
|
||||||
|
return "ADULT";
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,8 +43,12 @@ class SchoolClass
|
||||||
return self::SECONDE;
|
return self::SECONDE;
|
||||||
case "PREMIERE":
|
case "PREMIERE":
|
||||||
return self::PREMIERE;
|
return self::PREMIERE;
|
||||||
default:
|
case "TERMINALE":
|
||||||
return self::TERMINALE;
|
return self::TERMINALE;
|
||||||
|
case "ADULT":
|
||||||
|
return self::ADULT;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -3,12 +3,12 @@
|
||||||
if (!isset($_SESSION["role"]) || ($_SESSION["role"] != Role::PARTICIPANT && $_SESSION["role"] != Role::ENCADRANT))
|
if (!isset($_SESSION["role"]) || ($_SESSION["role"] != Role::PARTICIPANT && $_SESSION["role"] != Role::ENCADRANT))
|
||||||
require_once "server_files/403.php";
|
require_once "server_files/403.php";
|
||||||
|
|
||||||
$tournaments_response = $DB->query("SELECT `id`, `name` FROM `tournaments` WHERE `date_inscription` > CURRENT_DATE AND `year` = '$YEAR';");
|
$tournaments_response = $DB->query("SELECT `id`, `name` FROM `tournaments` WHERE `date_inscription` > CURRENT_TIMESTAMP AND `year` = $YEAR;");
|
||||||
|
|
||||||
$has_error = false;
|
$has_error = false;
|
||||||
$error_message = null;
|
$error_message = null;
|
||||||
|
|
||||||
if (isset($_POST["submitted"])) {
|
if (isset($_POST["add_team"])) {
|
||||||
$new_team = new NewTeam($_POST);
|
$new_team = new NewTeam($_POST);
|
||||||
try {
|
try {
|
||||||
$new_team->makeVerifications();
|
$new_team->makeVerifications();
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$has_error = false;
|
$has_error = false;
|
||||||
$error_message = null;
|
$error_message = null;
|
||||||
|
|
||||||
if (isset($_POST["submitted"]) && !isset($_SESSION["user_id"])) {
|
if (isset($_POST["login"]) && !isset($_SESSION["user_id"])) {
|
||||||
$logging_in_user = new LoggingInUser($_POST);
|
$logging_in_user = new LoggingInUser($_POST);
|
||||||
try {
|
try {
|
||||||
$logging_in_user->makeVerifications();
|
$logging_in_user->makeVerifications();
|
||||||
|
|
|
@ -4,5 +4,11 @@ unset($_SESSION["user_id"]);
|
||||||
session_destroy();
|
session_destroy();
|
||||||
|
|
||||||
require_once "server_files/views/header.php";
|
require_once "server_files/views/header.php";
|
||||||
echo "<h2>Déconnexion réussie !</h2>";
|
?>
|
||||||
|
|
||||||
|
<div class="alert alert-success">
|
||||||
|
Déconnexion réussie !
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
require_once "server_files/views/footer.php";
|
require_once "server_files/views/footer.php";
|
||||||
|
|
|
@ -9,7 +9,7 @@ $user = $_SESSION["user"];
|
||||||
$has_error = false;
|
$has_error = false;
|
||||||
$error_message = null;
|
$error_message = null;
|
||||||
|
|
||||||
if (isset($_POST["submitted"])) {
|
if (isset($_POST["update_account"])) {
|
||||||
$my_account = new MyAccount($_POST);
|
$my_account = new MyAccount($_POST);
|
||||||
try {
|
try {
|
||||||
$my_account->makeVerifications();
|
$my_account->makeVerifications();
|
||||||
|
@ -21,7 +21,7 @@ if (isset($_POST["submitted"])) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST["submitted_password"])) {
|
if (isset($_POST["update_password"])) {
|
||||||
$new_password = new NewPassword($_POST);
|
$new_password = new NewPassword($_POST);
|
||||||
try {
|
try {
|
||||||
$new_password->makeVerifications();
|
$new_password->makeVerifications();
|
||||||
|
@ -63,8 +63,10 @@ class MyAccount
|
||||||
$keys = ["email", "surname", "first_name", "birth_date", "gender", "address", "postal_code", "city", "country", "phone_number",
|
$keys = ["email", "surname", "first_name", "birth_date", "gender", "address", "postal_code", "city", "country", "phone_number",
|
||||||
"school", "class", "responsible_name", "responsible_phone", "responsible_email", "description"];
|
"school", "class", "responsible_name", "responsible_phone", "responsible_email", "description"];
|
||||||
|
|
||||||
if ($this->user->getRole() == Role::PARTICIPANT)
|
if ($this->user->getRole() != Role::PARTICIPANT)
|
||||||
$this->class = SchoolClass::fromName($this->class);
|
$this->class = SchoolClass::fromName(strtoupper($this->class));
|
||||||
|
else
|
||||||
|
$this->class = SchoolClass::ADULT;
|
||||||
|
|
||||||
foreach ($keys as $key)
|
foreach ($keys as $key)
|
||||||
$this->$key = $this->$key != null && $this->$key != "" ? $this->$key : $this->user->$key;
|
$this->$key = $this->$key != null && $this->$key != "" ? $this->$key : $this->user->$key;
|
||||||
|
|
|
@ -134,7 +134,7 @@ class MyTeam
|
||||||
|
|
||||||
$_SESSION["tournament"] = $this->tournament;
|
$_SESSION["tournament"] = $this->tournament;
|
||||||
|
|
||||||
header("Location: $URL_BASE/mon_equipe");
|
header("Location: $URL_BASE/mon-equipe");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ if (isset($_SESSION["team"]) || !isset($_SESSION["user"]) || ($_SESSION["role"]
|
||||||
$has_error = false;
|
$has_error = false;
|
||||||
$error_message = null;
|
$error_message = null;
|
||||||
|
|
||||||
if (isset($_POST["submitted"])) {
|
if (isset($_POST["join_team"])) {
|
||||||
$join_team = new JoinTeam($_POST);
|
$join_team = new JoinTeam($_POST);
|
||||||
try {
|
try {
|
||||||
$join_team->makeVerifications();
|
$join_team->makeVerifications();
|
||||||
|
@ -47,6 +47,8 @@ class JoinTeam
|
||||||
|
|
||||||
public function joinTeam()
|
public function joinTeam()
|
||||||
{
|
{
|
||||||
|
global $team;
|
||||||
|
|
||||||
$user = $_SESSION["user"];
|
$user = $_SESSION["user"];
|
||||||
|
|
||||||
$user->setTeamId($this->team->getId());
|
$user->setTeamId($this->team->getId());
|
||||||
|
@ -56,7 +58,7 @@ class JoinTeam
|
||||||
else
|
else
|
||||||
$this->team->setParticipant($this->min_null_index, $user->getId());
|
$this->team->setParticipant($this->min_null_index, $user->getId());
|
||||||
|
|
||||||
$_SESSION["team"] = $this->team;
|
$team = $_SESSION["team"] = $this->team;
|
||||||
$tournament = $_SESSION["tournament"] = Tournament::fromId($this->team->getTournamentId());
|
$tournament = $_SESSION["tournament"] = Tournament::fromId($this->team->getTournamentId());
|
||||||
|
|
||||||
Mailer::sendJoinTeamMail($user, $this->team, $tournament);
|
Mailer::sendJoinTeamMail($user, $this->team, $tournament);
|
||||||
|
|
|
@ -36,7 +36,7 @@ class SaveSolution
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->file = $_FILES["document"];
|
$this->file = $_FILES["solution"];
|
||||||
$this->problem = htmlspecialchars($_POST["problem"]);
|
$this->problem = htmlspecialchars($_POST["problem"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,8 @@ class SaveSynthesis
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->file = $_FILES["document"];
|
$this->file = $_FILES["synthese"];
|
||||||
$this->dest = DestType::fromName(strtoupper(htmlspecialchars($_POST["problem"])));
|
$this->dest = DestType::fromName(strtoupper(htmlspecialchars($_POST["dest"])));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function makeVerifications()
|
public function makeVerifications()
|
||||||
|
|
|
@ -1,55 +1,52 @@
|
||||||
<?php
|
<?php
|
||||||
require_once "header.php";
|
require_once "header.php";
|
||||||
|
?>
|
||||||
|
|
||||||
if (isset($new_team) && !$has_error) { ?>
|
<div class="mt-4 mb-4">
|
||||||
Votre équipe a bien été créée ! Voici le code d'accès à transmettre aux autres membres de votre équipe : <strong><?= $new_team->access_code ?></strong>
|
<h1 class="display-4">Ajouter une équipe</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if (isset($new_team) && !$has_error) { ?>
|
||||||
|
<div class="alert alert-success">
|
||||||
|
Votre équipe a bien été créée ! Voici le code d'accès à transmettre aux autres membres de votre équipe :
|
||||||
|
<strong><?= $new_team->access_code ?></strong>
|
||||||
|
</div>
|
||||||
<?php } elseif ($_SESSION["team"] != NULL) { ?>
|
<?php } elseif ($_SESSION["team"] != NULL) { ?>
|
||||||
<h2>Vous êtes déjà dans une équipe.</h2>
|
<div class="alert alert-danger">
|
||||||
|
Vous êtes déjà dans une équipe.
|
||||||
|
</div>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
|
||||||
<?php if (isset($error_message) && $error_message) echo "<h2>Erreur : " . $error_message . "</h2>"; ?>
|
|
||||||
|
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input type="hidden" name="submitted" value="true" />
|
<div class="form-row">
|
||||||
<table style="width: 100%;">
|
<div class="form-group col-md-6">
|
||||||
<tbody>
|
<label for="name">Nom (<em>Pas de caractères spéciaux</em>) :</label>
|
||||||
<tr>
|
<input class="form-control" type="text" id="name" name="name" pattern="[A-Za-zÀ-ÿ ]+"
|
||||||
<td style="width: 30%;">
|
value="<?php if (isset($new_team)) echo $new_team->name ?>" required/>
|
||||||
<label for="name">Nom :</label>
|
</div>
|
||||||
</td>
|
|
||||||
<td style="width: 70%;">
|
<div class="form-group col-md-6">
|
||||||
<input style="width: 100%;" type="text" id="name" name="name" />
|
<label for="trigram">Trigramme (<em>identifiant unique à trois lettres de l'équipe</em>) :</label>
|
||||||
</td>
|
<input class="form-control" type="text" id="trigram" name="trigram"
|
||||||
</tr>
|
value="<?php if (isset($new_team)) echo $new_team->trigram ?>" pattern="[A-Z]{3}" maxlength="3" required/>
|
||||||
<tr>
|
</div>
|
||||||
<td>
|
</div>
|
||||||
<label for="trigram">Trigramme :</label>
|
|
||||||
</td>
|
<div class="form-group row">
|
||||||
<td>
|
|
||||||
<input style="width: 100%;" type="text" id="trigram" name="trigram" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="tournament_id">Tournoi :</label>
|
<label for="tournament_id">Tournoi :</label>
|
||||||
</td>
|
<select id="tournament_id" name="tournament_id" class="custom-select">
|
||||||
<td>
|
<option value="0">Choisir un tournoi ...</option>
|
||||||
<select style="width: 100%;" id="tournament_id" name="tournament_id">
|
|
||||||
<?php
|
<?php
|
||||||
while (($data = $tournaments_response->fetch()) !== FALSE) {
|
while (($data = $tournaments_response->fetch()) !== FALSE) {
|
||||||
echo "<option value=\"" . $data["id"] . "\">" . $data["name"] . "</option>\n";
|
echo "<option value=\"" . $data["id"] . "\">" . $data["name"] . "</option>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
|
||||||
<tr>
|
<div class="form-group row">
|
||||||
<td colspan="2">
|
<input class="btn btn-primary btn-lg btn-block" name="add_team" type="submit" value="Ajouter une équipe"/>
|
||||||
<input style="width: 100%;" type="submit" value="Ajouter une équipe" />
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</form>
|
</form>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
|
@ -1,57 +1,43 @@
|
||||||
<?php
|
<?php
|
||||||
require_once "header.php";
|
require_once "header.php";
|
||||||
|
?>
|
||||||
|
|
||||||
if (isset($orga)) {
|
<div class="mt-4 mb-4">
|
||||||
if ($has_error) {
|
<h1 class="display-4">Ajouter un organisateur</h1>
|
||||||
echo "<h2>Erreur : " . $error_message . "</h2>";
|
</div>
|
||||||
} else {
|
|
||||||
echo "<h2>Organisateur ajouté avec succès ! Ses identifiants ont été transmis par mail.</h2>";
|
<?php if (isset($orga) && !$has_error) { ?>
|
||||||
}
|
<div class="alert alert-success">
|
||||||
} ?>
|
Organisateur ajouté avec succès ! Ses identifiants ont été transmis par mail.
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input type="hidden" name="submitted" value="true"/>
|
<div class="form-row">
|
||||||
<table style="width: 100%;">
|
<div class="form-group col-md-6">
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td style="width: 30%;">
|
|
||||||
<label for="surname">Nom :</label>
|
<label for="surname">Nom :</label>
|
||||||
</td>
|
<input class="form-control" type="text" id="surname" name="surname"
|
||||||
<td style="width: 70%;">
|
value="<?php if (isset($orga)) echo $orga->surname ?>" required/>
|
||||||
<input style="width: 100%;" type="text" id="surname" name="surname"/>
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
<div class="form-group col-md-6">
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="first_name">Prénom :</label>
|
<label for="first_name">Prénom :</label>
|
||||||
</td>
|
<input class="form-control" type="text" id="first_name" name="first_name"
|
||||||
<td>
|
value="<?php if (isset($orga)) echo $orga->first_name ?>" required/>
|
||||||
<input style="width: 100%;" type="text" id="first_name" name="first_name"/>
|
</div>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
|
||||||
<tr>
|
<div class="form-row">
|
||||||
<td>
|
<div class="form-group col-md-12">
|
||||||
<label for="email">Email :</label>
|
<label for="email">E-mail :</label>
|
||||||
</td>
|
<input class="form-control" type="email" id="email" name="email"
|
||||||
<td>
|
value="<?php if (isset($orga)) echo $orga->email ?>" required/>
|
||||||
<input style="width: 100%;" type="email" id="email" name="email"/>
|
</div>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
|
||||||
<tr>
|
<div class="form-group row">
|
||||||
<td>
|
<input class="btn btn-primary btn-lg btn-block" name="add_admin" type="submit" value="Ajouter un administrateur" />
|
||||||
<label for="admin">Compte administrateur :</label>
|
</div>
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input style="width: 100%;" type="checkbox" id="admin" name="admin"/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<input style="width: 100%;" type="submit" value="Ajouter un organisateur"/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php require_once "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
||||||
|
|
|
@ -1,127 +1,111 @@
|
||||||
<?php
|
<?php
|
||||||
require_once "header.php";
|
require_once "header.php";
|
||||||
|
?>
|
||||||
|
|
||||||
if (isset($tournament)) {
|
<div class="mt-4 mb-4">
|
||||||
if ($has_error) {
|
<h1 class="display-4">Ajouter un tournoi</h1>
|
||||||
echo "<h2>Erreur : " . $error_message . "</h2>";
|
</div>
|
||||||
}
|
|
||||||
else {
|
<?php
|
||||||
echo "<h2>Tournoi de " . htmlspecialchars($_POST["name"]) . " ajouté avec succès !</h2>";
|
/** @var NewTournament $tournament */
|
||||||
}
|
if (isset($tournament) && !$has_error) { ?>
|
||||||
}?>
|
<div class="alert alert-success">
|
||||||
|
Tournoi de <?= $tournament->name ?> ajouté avec succès !
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input type="hidden" name="submitted" value="true" />
|
<div class="form-row">
|
||||||
<table style="width: 100%;">
|
<div class="form-group col-md-6">
|
||||||
<tbody>
|
<label for="name">Nom du tournoi :</label>
|
||||||
<tr>
|
<input class="form-control" type="text" id="name" name="name" pattern="[A-Za-zÀ-ÿ ]+"
|
||||||
<td style="width: 30%;">
|
value="<?php if (isset($tournament)) echo $tournament->name ?>" required/>
|
||||||
<label for="name">Nom :</label>
|
</div>
|
||||||
</td>
|
|
||||||
<td style="width: 70%;">
|
<div class="form-group col-md-6">
|
||||||
<input style="width: 100%;" type="text" id="name" name="name" required />
|
<label for="place">Lieu :</label>
|
||||||
</td>
|
<input class="form-control" type="text" id="place" name="place"
|
||||||
</tr>
|
value="<?php if (isset($tournament)) echo $tournament->place ?>" required/>
|
||||||
<tr>
|
</div>
|
||||||
<td>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-12">
|
||||||
<label for="organizers">Organisateurs :</label>
|
<label for="organizers">Organisateurs :</label>
|
||||||
</td>
|
<select style="width: 100%;" id="organizers" name="organizers[]" multiple size="4" class="custom-select" required>
|
||||||
<td>
|
|
||||||
<select style="width: 100%;" id="organizers" name="organizers[]" multiple size="4" required>
|
|
||||||
<?php
|
<?php
|
||||||
while (($data = $orgas_response->fetch()) !== FALSE) {
|
while (($data = $orgas_response->fetch()) !== FALSE) {
|
||||||
echo "<option value=\"" . $data["id"] . "\">" . $data["first_name"] . " " . $data["surname"] . "</option>\n";
|
echo "<option value=\"" . $data["id"] . "\">" . $data["first_name"] . " " . $data["surname"] . "</option>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
|
||||||
<td>
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-6">
|
||||||
<label for="size">Nombre d'équipes :</label>
|
<label for="size">Nombre d'équipes :</label>
|
||||||
</td>
|
<input class="form-control" type="number" id="size" name="size"
|
||||||
<td>
|
value="<?php if (isset($tournament)) echo $tournament->size; else echo 6; ?>" required/>
|
||||||
<input style="width: 100%;" type="number" id="size" name="size" min="3" max="12" value="6" required />
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
<div class="form-group col-md-6">
|
||||||
<tr>
|
<label for="price">Prix par participant :</label>
|
||||||
<td>
|
<input class="form-control" type="number" id="price" name="price"
|
||||||
<label for="place">Lieu :</label>
|
value="<?php if (isset($tournament)) echo $tournament->price; else echo 0; ?>" required/>
|
||||||
</td>
|
</div>
|
||||||
<td>
|
</div>
|
||||||
<input style="width: 100%;" type="text" id="place" name="place" required />
|
|
||||||
</td>
|
<div class="form-group row">
|
||||||
</tr>
|
<div class="form-group col-md-6">
|
||||||
<tr>
|
<label for="date_start">Début du tournoi :</label>
|
||||||
<td>
|
<input class="form-control" type="date" id="date_start" name="date_start"
|
||||||
<label for="price">Prix par participant</label>
|
value="<?= isset($tournament) ? substr($tournament->getStartDate(), 0, 10) : date('Y-m-d') ?>"/>
|
||||||
</td>
|
</div>
|
||||||
<td>
|
<div class="form-group col-md-6">
|
||||||
<input style="width: 100%;" type="number" id="price" name="price" min="0" max="50" value="21" required />
|
<label for="date_end">Fin du tournoi :</label>
|
||||||
</td>
|
<input class="form-control" type="date" id="date_end" name="date_end"
|
||||||
</tr>
|
value="<?= isset($tournament) ? substr($tournament->getEndDate(), 0, 10) : date('Y-m-d') ?>"/>
|
||||||
<tr>
|
</div>
|
||||||
<td>
|
</div>
|
||||||
<label for="date_start">Dates :</label>
|
|
||||||
</td>
|
<div class="form-group row">
|
||||||
<td>
|
<div class="form-group col-md-4">
|
||||||
Du <input style="width: 45%;" type="date" id="date_start" name="date_start" required /> au <!--suppress HtmlFormInputWithoutLabel -->
|
|
||||||
<input style="width: 45%;" type="date" id="date_end" name="date_end" required />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="date_inscription">Date limite d'inscription :</label>
|
<label for="date_inscription">Date limite d'inscription :</label>
|
||||||
</td>
|
<input class="form-control" type="date" id="date_inscription" name="date_inscription"
|
||||||
<td>
|
value="<?= isset($tournament) ? substr($tournament->getInscriptionDate(), 0, 10) : date('Y-m-d') ?>"/>
|
||||||
<input style="width: 49%;" type="date" id="date_inscription" name="date_inscription" required />
|
<input class="form-control" type="time" id="time_inscription" name="time_inscription"
|
||||||
<!--suppress HtmlFormInputWithoutLabel -->
|
value="<?= isset($tournament) ? substr($tournament->getInscriptionDate(), 11, 5) : date('H:i') ?>"/>
|
||||||
<input style="width: 49%;" type="time" id="time_inscription" name="time_inscription" required />
|
</div>
|
||||||
</td>
|
<div class="form-group col-md-4">
|
||||||
</tr>
|
<label for="date_solutions">Date limite de remise des solutions :</label>
|
||||||
<tr>
|
<input class="form-control" type="date" id="date_solutions" name="date_solutions"
|
||||||
<td>
|
value="<?= isset($tournament) ? substr($tournament->getSolutionsDate(), 0, 10) : date('Y-m-d') ?>"/>
|
||||||
<label for="date_solutions">Date limite pour rendre les solutions :</label>
|
<input class="form-control" type="time" id="time_solutions" name="time_solutions"
|
||||||
</td>
|
value="<?= isset($tournament) ? substr($tournament->getSolutionsDate(), 11, 5) : date('H:i') ?>"/>
|
||||||
<td>
|
</div>
|
||||||
<input style="width: 49%;" type="date" id="date_solutions" name="date_solutions" required />
|
<div class="form-group col-md-4">
|
||||||
<!--suppress HtmlFormInputWithoutLabel -->
|
<label for="date_syntheses">Date limite de remise des notes de synthèse :</label>
|
||||||
<input style="width: 49%;" type="time" id="time_solutions" name="time_solutions" required />
|
<input class="form-control" type="date" id="date_syntheses" name="date_syntheses"
|
||||||
</td>
|
value="<?= isset($tournament) ? substr($tournament->getSynthesesDate(), 0, 10) : date('Y-m-d') ?>"/>
|
||||||
</tr>
|
<input class="form-control" type="time" id="time_syntheses" name="time_syntheses"
|
||||||
<tr>
|
value="<?= isset($tournament) ? substr($tournament->getSynthesesDate(), 11, 5) : date('H:i') ?>"/>
|
||||||
<td>
|
</div>
|
||||||
<label for="date_syntheses">Date limite pour rendre les notes de synthèse :</label>
|
</div>
|
||||||
</td>
|
|
||||||
<td>
|
<div class="form-group row">
|
||||||
<input style="width: 49%;" type="date" id="date_syntheses" name="date_syntheses" required />
|
<div class="form-group col-md-12">
|
||||||
<!--suppress HtmlFormInputWithoutLabel -->
|
|
||||||
<input style="width: 49%;" type="time" id="time_syntheses" name="time_syntheses" required />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="description">Description :</label>
|
<label for="description">Description :</label>
|
||||||
</td>
|
<textarea class="form-control" id="description" name="description"><?= isset($tournament) ? $tournament->getDescription() : "" ?></textarea>
|
||||||
<td>
|
</div>
|
||||||
<textarea style="width: 100%;" name="description" id="description" required></textarea>
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="final">Ce tournoi est la finale nationale :</label>
|
<label for="final">Ce tournoi est la finale nationale :</label>
|
||||||
</td>
|
<input type="checkbox" id="final" name="final" /><br /><br />
|
||||||
<td>
|
|
||||||
<input style="width: 100%;" type="checkbox" id="final" name="final" />
|
<div class="form-group row">
|
||||||
</td>
|
<input class="btn btn-primary btn-lg btn-block" name="add_tournament" type="submit" value="Ajouter un tournoi" />
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<input style="width: 100%;" type="submit" value="Ajouter un tournoi" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php require_once "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
|
@ -1,39 +1,41 @@
|
||||||
<?php
|
<?php
|
||||||
require_once "header.php";
|
require_once "header.php";
|
||||||
|
|
||||||
if (isset($error_message) && $error_message === FALSE) {
|
if (!$has_error) {
|
||||||
if (isset($recuperate_account))
|
if (isset($recuperate_account))
|
||||||
echo "<div class=\"alert alert-success\">Le mail de récupération de mot de passe a bien été envoyé.</div>";
|
echo "<div class=\"alert alert-warning\">Le mail de récupération de mot de passe a bien été envoyé.</div>";
|
||||||
else if (isset($reset_password))
|
elseif (isset($reset_password) && isset($_POST["password"]))
|
||||||
echo "<div class=\"alert alert-success\">Le mot de passe a bien été changé. Vous pouvez désormais vous connecter.</div>";
|
echo "<div class=\"alert alert-success\">Le mot de passe a bien été changé. Vous pouvez désormais vous connecter.</div>";
|
||||||
elseif (isset($_GET["confirmation-mail"]))
|
elseif (isset($_GET["confirmation-mail"]))
|
||||||
echo "<div class=\"alert alert-success\">Le mail a bien été renvoyé.</div>";
|
echo "<div class=\"alert alert-success\">Le mail a bien été renvoyé.</div>";
|
||||||
else if (isset($logging_in_user))
|
else if (isset($logging_in_user)) {
|
||||||
echo "<div class=\"alert alert-success\">Connexion réussie !</div>";
|
echo "<div class=\"alert alert-success\">Connexion réussie !</div>";
|
||||||
} else if (isset($_SESSION["user_id"])) { ?>
|
require_once "footer.php";
|
||||||
<div class="alert alert-danger">Vous êtes déjà connecté !</div>
|
} else if (isset($_SESSION["user_id"])) {
|
||||||
<?php } else { ?>
|
echo "<div class=\"alert alert-danger\">Vous êtes déjà connecté !</div>";
|
||||||
|
require_once "footer.php";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
<?php if (isset($_GET["mdp_oublie"])) { ?>
|
if (isset($_GET["mdp_oublie"])) { ?>
|
||||||
<form method="POST" class="jumbotron mt-5">
|
<form method="POST" class="jumbotron mt-5">
|
||||||
<h1 class="display-4">Réinitialisation du mot de passe</h1>
|
<h1 class="display-4">Réinitialisation du mot de passe</h1>
|
||||||
<label for="email">E-mail associée au compte :</label>
|
<label for="email">E-mail associée au compte :</label>
|
||||||
<input type="email" class="form-control" id="email" name="email"/>
|
<input type="email" class="form-control" id="email" name="email" required/>
|
||||||
</div>
|
<input class="btn btn-lg btn-primary btn-block" type="submit" name="forgotten_password"
|
||||||
<input class="btn btn-lg btn-primary" type="submit" name="forgotten_password"
|
|
||||||
value="Envoyer l'e-mail de récupération"/>
|
value="Envoyer l'e-mail de récupération"/>
|
||||||
</form>
|
</form>
|
||||||
<?php } elseif (isset($_GET["reset_password"])) { ?>
|
<?php } elseif (isset($reset_password) && $reset_password->user != null && ($has_error || !isset($_POST["password"]))) { ?>
|
||||||
<form method="POST" class="jumbotron mt-5">
|
<form method="POST" class="jumbotron mt-5">
|
||||||
<h1 class="display-4">Connexion</h1>
|
<h1 class="display-4">Connexion</h1>
|
||||||
<input type="hidden" name="token" value="<?= $_GET["token"] ?>"/>
|
<input type="hidden" name="token" value="<?= $_GET["token"] ?>"/>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="password">Nouveau mot de passe :</label>
|
<label for="password">Nouveau mot de passe :</label>
|
||||||
<input type="password" id="password" name="password" class="form-control" />
|
<input type="password" id="password" name="password" class="form-control" required/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="confirm_password">Confirmer le mot de passe :</label>
|
<label for="confirm_password">Confirmer le mot de passe :</label>
|
||||||
<input type="password" id="confirm_password" name="confirm_password" class="form-control" />
|
<input type="password" id="confirm_password" name="confirm_password" class="form-control" required/>
|
||||||
</div>
|
</div>
|
||||||
<input type="submit" name="reset_password" class="btn btn-block btn-primary"
|
<input type="submit" name="reset_password" class="btn btn-block btn-primary"
|
||||||
value="Changer le mot de passe"/>
|
value="Changer le mot de passe"/>
|
||||||
|
@ -43,22 +45,21 @@ if (isset($error_message) && $error_message === FALSE) {
|
||||||
<form method="POST" class="jumbotron mt-5">
|
<form method="POST" class="jumbotron mt-5">
|
||||||
<h1 class="display-4">Connexion</h1>
|
<h1 class="display-4">Connexion</h1>
|
||||||
<hr class="mt-2 mb-4"/>
|
<hr class="mt-2 mb-4"/>
|
||||||
<input type="hidden" name="submitted" value="true"/>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="email">E-mail :</label>
|
<label for="email">E-mail :</label>
|
||||||
<input class="form-control" type="email" id="email" name="email"
|
<input class="form-control" type="email" id="email" name="email"
|
||||||
value="<?php if (isset($email)) echo $email ?>"/>
|
value="<?php if (isset($email)) echo $email ?>" required/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="password">Mot de passe :</label>
|
<label for="password">Mot de passe :</label>
|
||||||
<input class="form-control" type="password" id="password" name="password"/>
|
<input class="form-control" type="password" id="password" name="password" required/>
|
||||||
</div>
|
</div>
|
||||||
<input class="btn btn-primary btn-block" type="submit" value="Se connecter"/>
|
<input class="btn btn-primary btn-block" name="login" type="submit" value="Se connecter"/>
|
||||||
</form>
|
</form>
|
||||||
<div class="alert">
|
<div class="alert">
|
||||||
<a href="/connexion/mdp_oublie">Mot de passe oublié ?</a>
|
<!--suppress HtmlUnknownTarget -->
|
||||||
|
<a href="/connexion/mdp-oublie">Mot de passe oublié ?</a>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<?php require_once "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
|
@ -1,30 +1,63 @@
|
||||||
<?php require_once "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<h2>Informations sur l'équipe</h2>
|
<div class="mt-4 mb-4">
|
||||||
|
<h1 class="display-4">Informations sur l'équipe</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
Nom de l'équipe : <?= $team->getName() ?><br/>
|
<div class="alert alert-info">
|
||||||
Trigramme : <?= $team->getTrigram() ?><br/>
|
<strong>Nom de l'équipe :</strong> <?= $team->getName() ?>
|
||||||
Tournoi : <a href="<?= "/tournoi/" . $tournament->getName() ?>"><?= $tournament->getName() ?></a><br/>
|
</div>
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<strong>Trigramme :</strong> <?= $team->getTrigram() ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<?php if ($team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
||||||
|
<label for="tournament">Tournoi :</label>
|
||||||
|
<form method="POST">
|
||||||
|
<select class="custom-select" id="tournament" name="select_tournament" onchange="this.form.submit()">
|
||||||
|
<option value="0">Pas de tournoi sélectionné</option>
|
||||||
|
<?php
|
||||||
|
foreach (Tournament::getAllTournaments(false, true) as $t) { ?>
|
||||||
|
<option value="<?= $t->getId() ?>" <?= $team->getTournamentId() == $t->getId() ? "selected" : "" ?>>
|
||||||
|
<?= $t->getName() ?>
|
||||||
|
</option>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</form>
|
||||||
|
<?php } else { ?>
|
||||||
|
<strong>Tournoi :</strong> <a href="<?= "/tournoi/" . $tournament->getName() ?>">
|
||||||
|
<?= $team->getTournamentId() == 0 ? "Pas de tournoi choisi" : $tournament->getName() ?>
|
||||||
|
</a>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="alert alert-<?= $team->getValidationStatus() == ValidationStatus::VALIDATED ? "success" : ($team->getValidationStatus() == ValidationStatus::WAITING ? "warning" : "danger") ?>">
|
||||||
|
<strong>Validation de l'équipe
|
||||||
|
:</strong> <?= ValidationStatus::getTranslatedName($team->getValidationStatus()) ?>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-info">
|
||||||
<?php
|
<?php
|
||||||
for ($i = 1; $i <= 2; ++$i) {
|
for ($i = 1; $i <= 2; ++$i) {
|
||||||
if ($team->getEncadrants()[$i - 1] == NULL)
|
if ($team->getEncadrants()[$i] == NULL)
|
||||||
continue;
|
continue;
|
||||||
$encadrant = User::fromId($team->getEncadrants()[$i - 1]);
|
$encadrant = User::fromId($team->getEncadrants()[$i - 1]);
|
||||||
$id = $encadrant->getId();
|
$id = $encadrant->getId();
|
||||||
echo "Encadrant $i : <a href=\"/informations/$id/" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "\">" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "</a><br />";
|
echo "<strong>Encadrant :</strong> <a href=\"$URL_BASE/informations/$id/" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "\">" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "</a><br />";
|
||||||
}
|
}
|
||||||
for ($i = 1; $i <= 6; ++$i) {
|
for ($i = 1; $i <= 6; ++$i) {
|
||||||
if ($team->getParticipants()[$i - 1] == NULL)
|
if ($team->getParticipants()[$i - 1] == NULL)
|
||||||
continue;
|
continue;
|
||||||
$participant = User::fromId($team->getParticipants()[$i - 1]);
|
$participant = User::fromId($team->getParticipants()[$i - 1]);
|
||||||
$id = $participant->getId();
|
$id = $participant->getId();
|
||||||
echo "Participant $i : <a href=\"/informations/$id/" . $participant->getFirstName() . " " . $participant->getSurname() . "\">" . $participant->getFirstName() . " " . $participant->getSurname() . "</a><br />";
|
echo "<strong>Participant $i :</strong> <a href=\"$URL_BASE/informations/$id/" . $participant->getFirstName() . " " . $participant->getSurname() . "\">" . $participant->getFirstName() . " " . $participant->getSurname() . "</a><br />";
|
||||||
}
|
}
|
||||||
if ($team->isSelectedForFinal()) {
|
if ($team->isSelectedForFinal()) {
|
||||||
$final_name = $FINAL->getName();
|
$final_name = $FINAL->getName();
|
||||||
echo "<strong>Équipe sélectionnée pour la <a href=\"/tournoi/$final_name\">finale nationale</a>.</strong>";
|
echo "<strong>Équipe sélectionnée pour la <a href=\"/tournoi/$final_name\">finale nationale</a>.</strong>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
|
@ -33,7 +66,7 @@ if ($team->isSelectedForFinal()) {
|
||||||
<?php printDocuments($documents) ?>
|
<?php printDocuments($documents) ?>
|
||||||
|
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input style="width: 100%;" type="submit" name="download_zip" value="Télécharger l'archive"/>
|
<input class="btn btn-secondary btn-lg btn-block" type="submit" name="download_zip" value="Télécharger l'archive"/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php if ($team->isSelectedForFinal()) { ?>
|
<?php if ($team->isSelectedForFinal()) { ?>
|
||||||
|
@ -41,23 +74,41 @@ if ($team->isSelectedForFinal()) {
|
||||||
<h2>Autorisations pour la finale</h2>
|
<h2>Autorisations pour la finale</h2>
|
||||||
<?php printDocuments($documents_final) ?>
|
<?php printDocuments($documents_final) ?>
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input type="hidden" name="final" value="true" />
|
<input class="btn btn-secondary btn-lg btn-block" type="submit" name="download_zip_final" value="Télécharger l'archive"/>
|
||||||
<input style="width: 100%;" type="submit" name="download_zip" value="Télécharger l'archive"/>
|
|
||||||
</form>
|
</form>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($team->getValidationStatus() == ValidationStatus::WAITING && $_SESSION["role"] == Role::ADMIN) { ?>
|
<?php if ($team->getValidationStatus() == ValidationStatus::WAITING && $_SESSION["role"] == Role::ADMIN) { ?>
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input style="width: 100%;" type="submit" name="validate" value="Valider l'équipe"/>
|
<div class="form-group row">
|
||||||
|
<label for="message">Message à adresser à l'équipe :</label>
|
||||||
|
<textarea class="form-control" id="message" name="message"></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="form-group row col-mod-6">
|
||||||
|
<input type="submit" class="btn btn-secondary btn-lg btn-block" name="unvalidate"
|
||||||
|
value="Refuser l'équipe"/>
|
||||||
|
<input type="submit" class="btn btn-primary btn-lg btn-block" name="validate" value="Valider l'équipe"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$team->isSelectedForFinal() && $_SESSION["role"] == Role::ADMIN) { ?>
|
if (!$team->isSelectedForFinal() && $team->getValidationStatus() == ValidationStatus::VALIDATED && $_SESSION["role"] == Role::ADMIN) { ?>
|
||||||
<hr/>
|
<hr/>
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input style="width: 100%;" type="submit" name="select" value="Sélectionner pour la finale nationale"/>
|
<input style="width: 100%;" type="submit" name="select" value="Sélectionner pour la finale nationale"/>
|
||||||
</form>
|
</form>
|
||||||
|
<?php }
|
||||||
|
|
||||||
|
if ($team->getValidationStatus() == ValidationStatus::NOT_READY && $_SESSION["role"] == Role::ADMIN) { ?>
|
||||||
|
<hr/>
|
||||||
|
<form method="POST">
|
||||||
|
<input type="submit" class="btn btn-primary btn-lg btn-block" name="delete_team" value="Supprimer l'équipe"
|
||||||
|
style="background-color: #ff2e34"/>
|
||||||
|
</form>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
||||||
<?php require_once "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
|
@ -1,4 +1,18 @@
|
||||||
|
<div class="mt-4 mb-4">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<hr/>
|
||||||
|
<div class="container.fluid">
|
||||||
|
<div class="alert alert-light inner">
|
||||||
|
<em>Ce site a été conçu pour Animath, avec amour et passion. Il est récent et il est possible que
|
||||||
|
certaines pages ne fonctionnent pas correctement. Si vous remarquez des bugs, merci de les signaler à
|
||||||
|
l'adresse <a href="mailto:contact@tfjm.org">contact@tfjm.org</a>.</em><br/>
|
||||||
|
© <?= $YEAR ?> Tournoi Français des Jeunes Mathématiciennes et Mathématiciens
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
<?php exit() ?>
|
<?php exit() ?>
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="description" content="Inscrivez-vous pour le TFJM² <?= $YEAR ?> !">
|
||||||
<meta name="google-site-verification" content="pCj5PNYVI9sAMZm8T9qoSjRrcXnEPj7tI07hBBfii04" />
|
<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">
|
||||||
<title>Site d'inscription pour le TFJM² <?= $YEAR ?></title>
|
<title>Site d'inscription pour le TFJM² <?= $YEAR ?></title>
|
||||||
<link rel="stylesheet" type="text/css" href="/style.css"/>
|
<link rel="stylesheet" type="text/css" href="/style.css">
|
||||||
<link REL="shortcut icon" href="/favicon.ico"/>
|
<link REL="shortcut icon" href="/favicon.ico">
|
||||||
|
|
||||||
<!-- Bootstrap -->
|
<!-- Bootstrap -->
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
||||||
|
@ -17,7 +19,7 @@
|
||||||
<div class="container.fluid bg-light">
|
<div class="container.fluid bg-light">
|
||||||
<nav class="navbar navbar-expand-lg navbar-light">
|
<nav class="navbar navbar-expand-lg navbar-light">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<a class="navbar-brand" href="/">
|
<a class="navbar-brand" href="https://tfjm.org/">
|
||||||
<img src="/logo.svg" alt="Logo TFJM²" id="navbar-logo">
|
<img src="/logo.svg" alt="Logo TFJM²" id="navbar-logo">
|
||||||
</a>
|
</a>
|
||||||
<ul class="navbar-nav mr-auto">
|
<ul class="navbar-nav mr-auto">
|
||||||
|
@ -29,7 +31,7 @@
|
||||||
</li>
|
</li>
|
||||||
<?php if (isset($_SESSION["user_id"])) { ?>
|
<?php if (isset($_SESSION["user_id"])) { ?>
|
||||||
<li class="nav-item active">
|
<li class="nav-item active">
|
||||||
<a class="nav-link" href="/mon_compte">Mon compte</a>
|
<a class="nav-link" href="/mon-compte">Mon compte</a>
|
||||||
</li>
|
</li>
|
||||||
<?php if ($_SESSION["role"] == Role::ENCADRANT || $_SESSION["role"] == Role::PARTICIPANT) { ?>
|
<?php if ($_SESSION["role"] == Role::ENCADRANT || $_SESSION["role"] == Role::PARTICIPANT) { ?>
|
||||||
<?php if ($_SESSION["team"] == NULL) { ?>
|
<?php if ($_SESSION["team"] == NULL) { ?>
|
||||||
|
@ -41,7 +43,7 @@
|
||||||
</li>
|
</li>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<li class="nav-item active">
|
<li class="nav-item active">
|
||||||
<a class="nav-link" href="/mon_equipe">Mon équipe</a>
|
<a class="nav-link" href="/mon-equipe">Mon équipe</a>
|
||||||
</li>
|
</li>
|
||||||
<?php if ($_SESSION["team"]->getValidationStatus() == ValidationStatus::VALIDATED || true) { ?>
|
<?php if ($_SESSION["team"]->getValidationStatus() == ValidationStatus::VALIDATED || true) { ?>
|
||||||
<li class="nav-item active">
|
<li class="nav-item active">
|
||||||
|
@ -83,6 +85,9 @@
|
||||||
<a class="nav-link" href="/inscription">Inscription</a>
|
<a class="nav-link" href="/inscription">Inscription</a>
|
||||||
</li>
|
</li>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link">Changer de point de vue</a>
|
||||||
|
<ul class="deroule">
|
||||||
<?php
|
<?php
|
||||||
if ($_SESSION["role"] != Role::ADMIN) {
|
if ($_SESSION["role"] != Role::ADMIN) {
|
||||||
echo "<li><a class=\"nav-link\" href=\"?be-admin=1\">Devenir administrateur</a></li>\n";
|
echo "<li><a class=\"nav-link\" href=\"?be-admin=1\">Devenir administrateur</a></li>\n";
|
||||||
|
@ -97,6 +102,8 @@
|
||||||
echo "<li><a class=\"nav-link\" href=\"?be-encadrant=1\">Devenir encadrant</a></li>\n";
|
echo "<li><a class=\"nav-link\" href=\"?be-encadrant=1\">Devenir encadrant</a></li>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
<li class="nav-item active">
|
<li class="nav-item active">
|
||||||
<a class="nav-link" href="/deconnexion">Déconnexion</a>
|
<a class="nav-link" href="/deconnexion">Déconnexion</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -107,3 +114,12 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="container">
|
<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 }
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="jumbotron bg-white">
|
<div class="jumbotron bg-white">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h1 class="display-3">
|
<h1 class="display-3">
|
||||||
Bienvenue sur le site d'inscription au <a href="https://tfjm.org">TFJM^2</a> !
|
Bienvenue sur le site d'inscription au <a href="https://tfjm.org">𝕋𝔽𝕁𝕄<sup>2</sup></a> !
|
||||||
</h1>
|
</h1>
|
||||||
<h2 class="display-4 text-muted">
|
<h2 class="display-4 text-muted">
|
||||||
Le Tournoi Français des Jeunes Mathématiciens et Mathématiciennes
|
Le Tournoi Français des Jeunes Mathématiciens et Mathématiciennes
|
||||||
|
|
|
@ -1,15 +1,87 @@
|
||||||
<?php require_once "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<h1><?= $user->getFirstName() . " " . $user->getSurname() ?></h1>
|
<div class="mt-4 mb-4">
|
||||||
|
<h1 class="display-4"><?= $user->getFirstName() . " " . $user->getSurname() ?></h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (!$has_error) {
|
||||||
|
if (isset($_POST["kick"])) { ?>
|
||||||
|
<div class="alert alert-success">
|
||||||
|
La personne a bien été exclue de l'équipe !
|
||||||
|
</div>
|
||||||
|
<?php } elseif (isset($attribute_team)) { ?>
|
||||||
|
<div class="alert alert-success">
|
||||||
|
La personne a bien rejoint l'équipe !
|
||||||
|
</div>
|
||||||
|
<?php }
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<strong>Rôle :</strong> <?= Role::getTranslatedName($user->getRole()) ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php if ($user->getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT) { ?>
|
<?php if ($user->getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT) { ?>
|
||||||
Équipe : <?= $team === null ? "Pas d'équipe" : "<a href=\"/equipe/" . $team->getTrigram() . "\">" . $team->getName() . " (" . $team->getTrigram() . ")</a>" ?><br />
|
<div class="alert alert-info">
|
||||||
|
<strong>Équipe
|
||||||
|
:</strong> <?= $team === null ? "Pas d'équipe" : "<a href=\"/equipe/" . $team->getTrigram() . "\">"
|
||||||
|
. $team->getName() . " (" . $team->getTrigram() . ")</a>" ?>
|
||||||
|
<?php if ($team == null) { ?>
|
||||||
|
<form method="POST">
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="form-group col-md-12">
|
||||||
|
<label for="team">Attribuer une équipe :</label>
|
||||||
|
<select class="custom-select" id="team" name="team">
|
||||||
|
<option value="no_team">Choisir une équipe ...</option>
|
||||||
|
<?php
|
||||||
|
/** @var Team $t */
|
||||||
|
foreach (Team::getAllTeams(true) as $t) {
|
||||||
|
if ($t->getValidationStatus() != ValidationStatus::NOT_READY)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
$team_name = $t->getName() . " (" . $t->getTrigram() . "), "
|
||||||
|
. ($t->getTournamentId() == 0 ? "pas de tournoi choisi" : "tournoi " . Tournament::fromId($t->getTournamentId())->getName());
|
||||||
|
$team_id = $t->getId();
|
||||||
|
echo "<option value=\"$team_id\">$team_name</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="submit" class="btn btn-secondary btn-lg btn-block" name="attribute_team"
|
||||||
|
value="Affecter dans une équipe"/>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<?php } elseif ($team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
||||||
|
<form method="POST">
|
||||||
|
<input type="hidden" name="kick"/>
|
||||||
|
<a href="#" onclick="this.parentNode.submit()">Virer de l'équipe</a>
|
||||||
|
</form>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
Date de naissance : <?= formatDate($user->getBirthDate()) ?><br />
|
</div>
|
||||||
Sexe : <?= $user->getGender() == "M" ? "Masculin" : "Féminin" ?><br />
|
<?php } ?>
|
||||||
Adresse : <?= $user->getAddress() . ", " . $user->getPostalCode() . " " . $user->getCity() . ($user->getCountry() == "France" ? "" : ", " . $user->getCountry()) ?><br />
|
|
||||||
Adresse e-mail : <a href="mailto:<?= $user->getEmail() ?>"><?= $user->getEmail() ?></a><br />
|
<div class="alert alert-info">
|
||||||
Numéro de téléphone : <?= $user->getPhoneNumber() ?><br />
|
<strong>Date de naissance :</strong> <?= formatDate($user->getBirthDate()) ?><br />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<strong>Sexe :</strong> <?= $user->getGender() == "M" ? "Masculin" : "Féminin" ?><br />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<strong>Adresse :</strong> <?= $user->getAddress() . ", " . $user->getPostalCode() . " " . $user->getCity() . ($user->getCountry() == "France" ? "" : ", " . $user->getCountry()) ?><br />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<strong>Adresse e-mail :</strong> <a href="mailto:<?= $user->getEmail() ?>"><?= $user->getEmail() ?></a><br />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<strong>Numéro de téléphone :</strong> <?= $user->getPhoneNumber() ?><br />
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php if ($user->getRole() == Role::PARTICIPANT) { ?>
|
<?php if ($user->getRole() == Role::PARTICIPANT) { ?>
|
||||||
Lycée : <?= $user->getSchool() ?><br />
|
Lycée : <?= $user->getSchool() ?><br />
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
require_once "header.php";
|
require_once "header.php";
|
||||||
|
|
||||||
if ($has_error)
|
|
||||||
echo "<div class=\"alert alert-danger\">Erreur : " . $error_message . "</div>";
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="mt-4 mb-4">
|
<div class="mt-4 mb-4">
|
||||||
|
@ -14,15 +11,16 @@ if ($has_error)
|
||||||
if (isset($user) && !$has_error) {
|
if (isset($user) && !$has_error) {
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-success">
|
<div class="alert alert-success">
|
||||||
Votre inscription est validée ! Merci désormais de confirmer votre boîte mail pour valider votre adresse.
|
Vous êtes bien inscrit ! Merci désormais de confirmer votre boîte mail pour valider votre adresse. Pensez à vérifier
|
||||||
|
vos courriers indésirables.
|
||||||
</div>
|
</div>
|
||||||
<?php } else if (isset($_SESSION["user_id"])) { ?>
|
<?php } else if (isset($_SESSION["user_id"])) { ?>
|
||||||
<div class="alert alert-success">Vous êtes déjà connecté !</div>
|
<div class="alert alert-danger">
|
||||||
|
Vous êtes déjà connecté !
|
||||||
|
</div>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input type="hidden" name="submitted" value="true"/>
|
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="role">Rôle :</label>
|
<label for="role">Rôle :</label>
|
||||||
<select id="role" name="role" onchange="selectRole()" class="custom-select">
|
<select id="role" name="role" onchange="selectRole()" class="custom-select">
|
||||||
|
@ -163,7 +161,7 @@ if (isset($user) && !$has_error) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<input class="btn btn-primary btn-lg btn-block" type="submit" value="S'inscrire"/>
|
<input class="btn btn-primary btn-lg btn-block" name="register" type="submit" value="S'inscrire"/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -1,178 +1,249 @@
|
||||||
<?php
|
<?php
|
||||||
require_once "header.php";
|
require_once "header.php";
|
||||||
|
|
||||||
if ($has_error)
|
|
||||||
echo "<h2>Erreur : " . $error_message . "</h2>";
|
|
||||||
|
|
||||||
elseif (isset($my_account) || isset($new_password)) {
|
|
||||||
?>
|
?>
|
||||||
<h2>Votre compte a bien été mis à jour !</h2>
|
|
||||||
|
<div class="mt-4 mb-4">
|
||||||
|
<h1 class="display-4">Mon compte</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if (!$has_error && isset($send_document)) { ?>
|
||||||
|
<div class="alert alert-success">
|
||||||
|
Le fichier a été correctement envoyé !
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (isset($my_account) && $user->getEmail() != $my_account->email) {
|
if (!$has_error && (isset($my_account) || isset($new_password))) {
|
||||||
echo "Votre adresse mail a bien été changée. Veuillez vérifier votre boîte mail pour valider votre nouvelle adresse, vous en aurez besoin pour vous reconnecter.";
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
<div class="alert alert-success">
|
||||||
|
Votre compte a bien été mis à jour !
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
if (isset($my_account) && $user->getEmail() != $my_account->email) { ?>
|
||||||
|
<div class="alert alert-info">
|
||||||
|
Votre adresse mail a bien été changée. Veuillez vérifier votre boîte mail pour valider votre nouvelle
|
||||||
|
adresse, vous en aurez besoin pour vous reconnecter.
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input type="hidden" name="submitted" value="true"/>
|
|
||||||
<table style="width: 100%">
|
<div class="form-row">
|
||||||
<tr>
|
<div class="form-group col-md-6">
|
||||||
<td style="width: 30%"><label for="email">E-mail :</label></td>
|
<label for="surname">Nom :</label>
|
||||||
<td style="width: 70%"><?= $user->getEmail() ?></td>
|
<input class="form-control" type="text" id="surname" name="surname"
|
||||||
</tr>
|
value="<?= $user->getSurname() ?>" required/>
|
||||||
<tr>
|
</div>
|
||||||
<td colspan="2"><input style="width: 100%" type="email" id="email" name="email"/></td>
|
|
||||||
</tr>
|
<div class="form-group col-md-6">
|
||||||
<tr>
|
<label for="first_name">Prénom :</label>
|
||||||
<td><label for="surname">Nom :</label></td>
|
<input class="form-control" type="text" id="first_name" name="first_name"
|
||||||
<td><?= $user->getSurname() ?></td>
|
value="<?= $user->getFirstName() ?>" required/>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
</div>
|
||||||
<td colspan="2"><input style="width: 100%" type="text" id="surname" name="surname"/></td>
|
|
||||||
</tr>
|
<div class="form-row">
|
||||||
<tr>
|
<div class="form-group col-md-6">
|
||||||
<td><label for="firstname">Prénom :</label></td>
|
<label for="email">E-mail :</label>
|
||||||
<td><?= $user->getFirstName() ?></td>
|
<input class="form-control" type="email" id="email" name="email"
|
||||||
</tr>
|
value="<?= $user->getEmail() ?>"
|
||||||
<tr>
|
required/>
|
||||||
<td colspan="2"><input style="width: 100%" type="text" id="firstname" name="firstname"/></td>
|
</div>
|
||||||
</tr>
|
<div class="form-group col-md-6">
|
||||||
<tr>
|
<label for="phone_number">Numéro de téléphone :</label>
|
||||||
<td><label for="birth_date">Date de naissance :</label></td>
|
<input class="form-control" type="text" id="phone_number" name="phone_number"
|
||||||
<td><?= formatDate($user->getBirthDate()) ?></td>
|
value="<?= $user->getPhoneNumber() ?>"/>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
</div>
|
||||||
<td colspan="2"><input style="width: 100%" type="date" id="birth_date" name="birth_date"/></td>
|
|
||||||
</tr>
|
<?php if ($user->getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT) { ?>
|
||||||
<tr>
|
|
||||||
<td><label for="gender">Sexe :</label></td>
|
<div class="form-row">
|
||||||
<td><input type="radio" id="male" name="gender" value="M" <?php if ($user->getGender() == "M") echo "checked" ?> /><label for="male">Homme</label>
|
<div class="form-group col-md-6">
|
||||||
<input type="radio" id="female" name="gender" value="F" <?php if ($user->getGender() == "F") echo "checked" ?> /><label for="female">Femme</label></td>
|
<label for="gender" class="mr-2">Sexe :</label>
|
||||||
</tr>
|
<br/>
|
||||||
<tr>
|
<div class="custom-control custom-radio custom-control-inline">
|
||||||
<td><label for="address">Adresse :</label></td>
|
<input type="radio" class="custom-control-input" id="male" name="gender" value="M"
|
||||||
<td><?= $user->getAddress() ?></td>
|
required <?= $user->getGender() == "M" ? "checked" : "" ?> />
|
||||||
</tr>
|
<label for="male" class="custom-control-label">Homme</label>
|
||||||
<tr>
|
</div>
|
||||||
<td colspan="2"><input style="width: 100%" type="text" id="address" name="address"/></td>
|
<div class="custom-control custom-radio custom-control-inline">
|
||||||
</tr>
|
<input type="radio" class="custom-control-input" id="female" name="gender" value="F"
|
||||||
<tr>
|
required <?= $user->getGender() == "F" ? "checked" : "" ?> />
|
||||||
<td><label for="postal_code">Code postal :</label></td>
|
<label for="female" class="custom-control-label">Femme</label>
|
||||||
<td><?= $user->getPostalCode() ?></td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
<div class="form-group col-md-6">
|
||||||
<td colspan="2"><input style="width: 100%" type="number" id="postal_code" name="postal_code" min="1000" max="95999"/></td>
|
<label for="birth_date">Date de naissance :</label>
|
||||||
</tr>
|
<input class="form-control" type="date" id="birth_date" name="birth_date"
|
||||||
<tr>
|
value="<?= $user->getBirthDate() ?>" required/>
|
||||||
<td><label for="city">Ville :</label></td>
|
</div>
|
||||||
<td><?= $user->getCity() ?></td>
|
</div>
|
||||||
</tr>
|
|
||||||
<tr>
|
<div class="form-row">
|
||||||
<td colspan="2"><input style="width: 100%" type="text" id="city" name="city"/></td>
|
<div class="form-group col-md-5">
|
||||||
</tr>
|
<label for="address">Adresse :</label>
|
||||||
<tr>
|
<input class="form-control" type="text" id="address" name="address"
|
||||||
<td><label for="country">Pays :</label></td>
|
value="<?= $user->getAddress() ?>"/>
|
||||||
<td><?= $user->getCountry() ?></td>
|
</div>
|
||||||
</tr>
|
<div class="form-group col-md-2">
|
||||||
<tr>
|
<label for="postal_code">Code postal :</label>
|
||||||
<td colspan="2"><input style="width: 100%" type="text" id="country" name="country"/></td>
|
<input class="form-control" type="number" id="postal_code" name="postal_code"
|
||||||
</tr>
|
value="<?= $user->getPostalCode() ?>" min="1000"
|
||||||
<tr>
|
max="95999" required/>
|
||||||
<td><label for="phone_number">Numéro de téléphone :</label></td>
|
</div>
|
||||||
<td><?= $user->getPhoneNumber() ?></td>
|
<div class="form-group col-md-3">
|
||||||
</tr>
|
<label for="city">Ville :</label>
|
||||||
<tr>
|
<input class="form-control" type="text" id="city" name="city"
|
||||||
<td colspan="2"><input style="width: 100%" type="text" id="phone_number" name="phone_number"/></td>
|
value="<?= $user->getCity() ?>"/>
|
||||||
</tr>
|
</div>
|
||||||
<?php if ($user->getRole() == Role::PARTICIPANT) { ?>
|
<div class="form-group col-md-2">
|
||||||
<tr>
|
<label for="country">Pays :</label>
|
||||||
<td><label for="school">Établissement dans lequel l'élève étudie :</label></td>
|
<input class="form-control" type="text" id="country" name="country"
|
||||||
<td><?= $user->getSchool() ?></td>
|
value="<?= $user->getCountry() ?>" required/>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
</div>
|
||||||
<td colspan="2"><input style="width: 100%" type="text" id="school" name="school"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><label for="class">Classe :</label></td>
|
|
||||||
<td><select style="width: 100%" id="class" name="class">
|
|
||||||
<option value="terminale" <?php if ($user->getClass() == SchoolClass::TERMINALE) echo "selected" ?>><?= SchoolClass::getTranslatedName(SchoolClass::TERMINALE) ?></option>
|
|
||||||
<option value="premiere" <?php if ($user->getClass() == SchoolClass::PREMIERE) echo "selected" ?>><?= SchoolClass::getTranslatedName(SchoolClass::PREMIERE) ?></option>
|
|
||||||
<option value="seconde" <?php if ($user->getClass() == SchoolClass::SECONDE) echo "selected" ?>><?= SchoolClass::getTranslatedName(SchoolClass::SECONDE) ?></option>
|
|
||||||
</select></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="responsible_name">Nom du responsable légal :</label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<?= $user->getResponsibleName() ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<input style="width: 100%;" type="text" id="responsible_name" name="responsible_name" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="responsible_phone">Téléphone du responsable légal :</label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<?= $user->getResponsiblePhone() ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<input style="width: 100%" type="text" id="responsible_phone" name="responsible_phone" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="responsible_email">Email du responsable légal :</label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<?= $user->getResponsibleEmail() ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<input style="width: 100%" type="email" id="responsible_email" name="responsible_email" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php } else { ?>
|
|
||||||
<tr>
|
|
||||||
<td><label for="description">Description :</label></td>
|
|
||||||
<td><textarea style="width: 100%" id="description" name="description"><?= $user->getDescription() ?></textarea></td>
|
|
||||||
</tr>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<tr>
|
|
||||||
<td colspan="2"><input type="submit" style="width: 100%" value="Mettre à jour mes données"/></td>
|
<?php if ($user->getRole() == Role::PARTICIPANT) { ?>
|
||||||
</tr>
|
|
||||||
</table>
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label id="school_label" for="school">Établissement dans lequel l'élève étudie :</label>
|
||||||
|
<input class="form-control" type="text" id="school" name="school"
|
||||||
|
value="<?= $user->getSchool() ?>"/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label id="class_label" for="class">Classe :</label>
|
||||||
|
<select id="class" name="class" class="custom-select">
|
||||||
|
<option value="terminale" <?= $user->getClass() == SchoolClass::TERMINALE ? "selected" : "" ?>>
|
||||||
|
<?= SchoolClass::getTranslatedName(SchoolClass::TERMINALE) ?>
|
||||||
|
</option>
|
||||||
|
<option value="premiere" <?= $user->getClass() == SchoolClass::PREMIERE ? "selected" : "" ?>>
|
||||||
|
<?= SchoolClass::getTranslatedName(SchoolClass::PREMIERE) ?>
|
||||||
|
</option>
|
||||||
|
<option value="seconde" <?= $user->getClass() == SchoolClass::SECONDE ? "selected" : "" ?>>
|
||||||
|
<?= SchoolClass::getTranslatedName(SchoolClass::SECONDE) ?>
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="responsible_name_label" for="responsible_name">Nom du responsable légal :</label>
|
||||||
|
<input class="form-control" type="text" id="responsible_name" name="responsible_name"
|
||||||
|
value="<?= $user->getResponsibleName() ?>"/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="responsible_phone_label" for="responsible_phone">Téléphone du responsable légal :</label>
|
||||||
|
|
||||||
|
<input class="form-control" type="text" id="responsible_phone" name="responsible_phone"
|
||||||
|
value="<?= $user->getResponsiblePhone() ?>"/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="responsible_email_label" for="responsible_email">Email du responsable légal :</label>
|
||||||
|
|
||||||
|
<input class="form-control" type="text" id="responsible_email" name="responsible_email"
|
||||||
|
value="<?= $user->getResponsibleEmail() ?>"/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } else { ?>
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<label id="description_label" for="description">Activité professionnelle :</label>
|
||||||
|
<textarea class="form-control" id="description"
|
||||||
|
name="description"><?= $user->getDescription() ?></textarea>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<input class="btn btn-primary btn-lg btn-block" name="update_account" type="submit" value="Mettre à jour mes données" />
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div style="padding: 20px"></div>
|
<div style="padding: 20px"></div>
|
||||||
|
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input type="hidden" name="submitted_password" value="true"/>
|
|
||||||
<table style="width: 100%">
|
<div class="form-row">
|
||||||
<tr>
|
<div class="form-group col-md-4">
|
||||||
<td style="width: 30%"><label for="old_password">Ancien mot de passe :</label></td>
|
<label for="old_password">Ancien mot de passe :</label>
|
||||||
<td style="width: 70%"><input style="width: 100%" type="password" id="old_password" name="old_password"/></td>
|
<input class="form-control" type="password" id="old_password" name="old_password" required/>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
|
||||||
<td><label for="new_password">Nouveau mot de passe :</label></td>
|
<div class="form-group col-md-4">
|
||||||
<td><input style="width: 100%" type="password" id="new_password" name="new_password"/></td>
|
<label for="new_password">Nouveau mot de passe :</label>
|
||||||
</tr>
|
<input class="form-control" type="password" id="new_password" name="new_password" required/>
|
||||||
<tr>
|
</div>
|
||||||
<td><label for="confirm_password">Confirmer le mot de passe :</label></td>
|
|
||||||
<td><input style="width: 100%" type="password" id="confirm_password" name="confirm_password"/></td>
|
<div class="form-group col-md-4">
|
||||||
</tr>
|
<label for="confirm_password">Confirmer le mot de passe :</label>
|
||||||
<tr>
|
<input class="form-control" type="password" id="confirm_password" name="confirm_password" required/>
|
||||||
<td colspan="2"><input type="submit" style="width: 100%" value="Mettre à jour mon mot de passe"/></td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
</table>
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<input class="btn btn-secondary btn-lg btn-block" type="submit" name="update_password"
|
||||||
|
value="Mettre à jour mon mot de passe"/>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<?php if (isset($_SESSION["team"]) && $user->getRole() == Role::PARTICIPANT) {
|
||||||
|
$not_validated = $_SESSION["team"]->getValidationStatus() == ValidationStatus::NOT_READY;
|
||||||
|
?>
|
||||||
|
<hr/>
|
||||||
|
<div class="mt-4 mb-4">
|
||||||
|
<h1 class="display-5">Mes autorisations</h1>
|
||||||
|
</div>
|
||||||
|
<?php if ($not_validated) { ?>
|
||||||
|
<em>Ces documents peut être modifiés tant que l'équipe n'est pas validée.</em>
|
||||||
|
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<strong>Modèle d'autorisation de droit à l'image :</strong>
|
||||||
|
<a href="/Autorisation de droit à l'image - majeur.pdf">majeur</a> - <a
|
||||||
|
href="/Autorisation de droit à l'image - mineur.pdf">mineur</a>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php printDocuments($documents); ?>
|
||||||
|
<?php if ($not_validated) { ?>
|
||||||
|
<form method="POST" enctype="multipart/form-data">
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-12">
|
||||||
|
<label for="type">Type de document</label>
|
||||||
|
<select class="custom-select" id="type" name="type">
|
||||||
|
<?php if ($_SESSION["user"]->getBirthDate() > strval($YEAR - 18) . substr($tournament->getStartDate(), 4)) { ?>
|
||||||
|
<option value="parental_consent">Autorisation parentale</option>
|
||||||
|
<?php } ?>
|
||||||
|
<option value="photo_consent">Autorisation de droit à l'image</option>
|
||||||
|
<option value="sanitary_plug">Fiche sanitaire</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-12">
|
||||||
|
<label for="document">Fichier :</label>
|
||||||
|
<input class="form-control" type="file" id="document" name="document" required/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<input class="btn btn-primary btn-lg btn-block" type="submit" name="send_document"
|
||||||
|
value="Envoyer le document"/>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<?php require_once "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
|
@ -1,161 +1,133 @@
|
||||||
<?php
|
<?php
|
||||||
require_once "header.php";
|
require_once "header.php";
|
||||||
|
|
||||||
if ($has_error)
|
|
||||||
echo "<h2>Erreur : " . $error_message . "</h2>";
|
|
||||||
elseif (isset($send_document))
|
|
||||||
echo "<h2>Le fichier a été correctement envoyé !</h2>";
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<h2>Informations sur l'équipe</h2>
|
<div class="mt-4 mb-4">
|
||||||
|
<h1 class="display-4">Mon équipe</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
Nom de l'équipe : <?= $team->getName() ?><br/>
|
<div class="alert alert-info">
|
||||||
Trigramme : <?= $team->getTrigram() ?><br/>
|
<strong>Nom de l'équipe :</strong> <?= $team->getName() ?>
|
||||||
Tournoi : <a href="<?= $tournament->getName() ?>"><?= $tournament->getName() ?></a><br/>
|
</div>
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<strong>Trigramme :</strong> <?= $team->getTrigram() ?>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<strong>Tournoi :</strong>
|
||||||
|
<?= $tournament == null ? "Pas de tournoi attribué" : "<a href=\"/tournoi/" . $tournament->getName() . "\">" . $tournament->getName() . "</a>" ?>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-info">
|
||||||
<?php
|
<?php
|
||||||
for ($i = 1; $i <= 2; ++$i) {
|
for ($i = 1; $i <= 2; ++$i) {
|
||||||
if ($team->getEncadrants()[$i] == NULL)
|
if ($team->getEncadrants()[$i] == NULL)
|
||||||
continue;
|
continue;
|
||||||
$encadrant = User::fromId($team->getEncadrants()[$i - 1]);
|
$encadrant = User::fromId($team->getEncadrants()[$i - 1]);
|
||||||
$id = $encadrant->getId();
|
$id = $encadrant->getId();
|
||||||
echo "Encadrant $i : <a href=\"/informations/$id/" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "\">" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "</a><br />";
|
echo "<strong>Encadrant $i :</strong> <a href=\"/informations/$id/" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "\">" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "</a><br />";
|
||||||
}
|
}
|
||||||
for ($i = 1; $i <= 6; ++$i) {
|
for ($i = 1; $i <= 6; ++$i) {
|
||||||
if ($team->getParticipants()[$i - 1] == NULL)
|
if ($team->getParticipants()[$i - 1] == NULL)
|
||||||
continue;
|
continue;
|
||||||
$participant = User::fromId($team->getParticipants()[$i - 1]);
|
$participant = User::fromId($team->getParticipants()[$i - 1]);
|
||||||
$id = $participant->getId();
|
$id = $participant->getId();
|
||||||
echo "Participant $i : <a href=\"/informations/$id/" . $participant->getFirstName() . " " . $participant->getSurname() . "\">" . $participant->getFirstName() . " " . $participant->getSurname() . "</a><br />";
|
echo "<strong>Participant $i :</strong> <a href=\"/informations/$id/" . $participant->getFirstName() . " " . $participant->getSurname() . "\">" . $participant->getFirstName() . " " . $participant->getSurname() . "</a><br />";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
Code d'accès : <strong><?= $team->getAccessCode() ?></strong><br/>
|
</div>
|
||||||
|
|
||||||
|
<div class="alert alert-info">
|
||||||
|
Code d'accès : <strong><?= $team->getAccessCode() ?></strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php if ($team->isSelectedForFinal()) {
|
<?php if ($team->isSelectedForFinal()) {
|
||||||
$final_name = $FINAL->getName();
|
$final_name = $FINAL->getName();
|
||||||
echo "<strong>Équipe sélectionnée pour la <a href=\"/tournoi/$final_name\">finale nationale</a>.</strong><br />";
|
echo "<div class=\"alert aler-success\">Équipe sélectionnée pour la <a href=\"/tournoi/$final_name\">finale nationale</a>.</div>";
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<?php if (isset($_GET["modifier"])) { ?>
|
<?php if (isset($_GET["modifier"])) { ?>
|
||||||
|
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input type="hidden" name="team_edit" value="true"/>
|
<div class="form-row">
|
||||||
<table style="width: 100%;">
|
<div class="form-group col-md-6">
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td style="width: 30%;">
|
|
||||||
<label for="name">Nom :</label>
|
<label for="name">Nom :</label>
|
||||||
</td>
|
<input class="form-control" type="text" id="name" name="name" pattern="[A-Za-zÀ-ÿ ]+"
|
||||||
<td style="width: 70%;">
|
value="<?= $team->getName() ?>" required/>
|
||||||
<input style="width: 100%;" type="text" id="name" name="name" value="<?= $team->getName() ?>"/>
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
<div class="form-group col-md-6">
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="trigram">Trigramme :</label>
|
<label for="trigram">Trigramme :</label>
|
||||||
</td>
|
<input class="form-control" type="text" id="trigram" name="trigram"
|
||||||
<td>
|
value="<?= $team->getTrigram() ?>" pattern="[A-Z]{3}" maxlength="3" required/>
|
||||||
<input style="width: 100%;" type="text" id="trigram" name="trigram"
|
</div>
|
||||||
value="<?= $team->getTrigram() ?>"/>
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
<div class="form-group row">
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="tournament">Tournoi :</label>
|
<label for="tournament">Tournoi :</label>
|
||||||
</td>
|
<select id="tournament" name="tournament_id" class="custom-select">
|
||||||
<td>
|
<option value="0">Choisir un tournoi ...</option>
|
||||||
<select style="width: 100%;" id="tournament" name="tournament_id">
|
|
||||||
<?php
|
<?php
|
||||||
foreach ($tournaments as $tournament)
|
foreach ($tournaments as $tournament)
|
||||||
echo "<option value=\"" . $tournament->getId() . "\">" . $tournament->getName() . "</option>\n";
|
echo "<option value=\"" . $tournament->getId() . "\" "
|
||||||
|
. ($tournament->getId() == $team->getTournamentId() ? "selected" : "") . ">"
|
||||||
|
. $tournament->getName() . "</option>\n";
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
|
||||||
<tr>
|
<div class="form-group row">
|
||||||
<td colspan="2">
|
<input class="btn btn-primary btn-lg btn-block" name="team_edit" type="submit"
|
||||||
<input style="width: 100%;" type="submit" value="Modifier l'équipe"/>
|
value="Modifier l'équipe"/>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
|
||||||
<?php if ($_SESSION["team_validation_status"] == ValidationStatus::NOT_READY) { ?>
|
<?php if ($_SESSION["team_validation_status"] == ValidationStatus::NOT_READY) { ?>
|
||||||
<!--suppress HtmlUnknownTarget -->
|
<!--suppress HtmlUnknownTarget -->
|
||||||
<a href="/mon_equipe/modifier">Modifier mon équipe</a>
|
<a href="/mon-equipe/modifier">
|
||||||
<?php } ?>
|
<button class="btn btn-secondary btn-lg btn-block">Modifier mon équipe</button>
|
||||||
<hr/>
|
</a>
|
||||||
<h2>Mes autorisations</h2>
|
|
||||||
<?php
|
|
||||||
printDocuments($documents);
|
|
||||||
|
|
||||||
if ($team->isSelectedForFinal()) { ?>
|
|
||||||
<hr/>
|
|
||||||
<h2>Mes autorisations pour la finale</h2>
|
|
||||||
<?php
|
|
||||||
printDocuments($documents_final);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
|
||||||
<hr />
|
|
||||||
<form method="post" enctype="multipart/form-data">
|
|
||||||
<input type="hidden" name="MAX_FILE_SIZE" value="5000000"/>
|
|
||||||
<table style="width: 100%;">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="type">Type de document :</label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select style="width: 100%;" id="type" name="type">
|
|
||||||
<?php if ($_SESSION["user"]->getBirthDate() > strval($YEAR - 18) . substr($tournament->getStartDate(), 4)) { ?>
|
|
||||||
<option value="parental_consent">Autorisation parentale</option>
|
|
||||||
<?php } ?>
|
|
||||||
<option value="photo_consent">Autorisation de droit à l'image</option>
|
|
||||||
<option value="sanitary_plug">Fiche sanitaire</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="file">Fichier :</label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input style="width: 100%;" type="file" id="file" name="document"/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<input style="width: 100%;" type="submit" name="send_document" value="Envoyer le document"/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
<?php if ($team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
||||||
<hr/>
|
<hr/>
|
||||||
<table style="width: 100%;">
|
|
||||||
<tr>
|
<form method="POST">
|
||||||
<td style="width: 50%;">
|
<input class="btn btn-primary btn-lg btn-block" type="submit" name="leave_team" style="background-color: #ff2e34"
|
||||||
<form method="post">
|
value="Quitter l'équipe"/>
|
||||||
<input style="width: 100%;" type="submit" name="leave_team" value="Quitter l'équipe"/>
|
|
||||||
</form>
|
</form>
|
||||||
</td>
|
|
||||||
<?php
|
<?php
|
||||||
$can_validate = canValidate($team, $tournament);
|
$can_validate = canValidate($team, $tournament);
|
||||||
if ($can_validate) { ?>
|
if ($can_validate) { ?>
|
||||||
<td style="width: 50%;">
|
<hr />
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<input style="width: 100%;" type="submit" name="request_validation"
|
<label for="engage">Je m'engage à participer à l'intégralité des Correspondances</label>
|
||||||
|
<input type="checkbox" name="engage" id="engage" required/>
|
||||||
|
<div class="alert alert-warning">
|
||||||
|
<strong>Attention !</strong> Une fois votre équipe validée, vous ne pourrez plus modifier le nom
|
||||||
|
de l'équipe, le trigramme, le problème sur lequel vous souhaitez travailler ou la composition de l'équipe.
|
||||||
|
</div>
|
||||||
|
<input class="btn btn-primary btn-lg btn-block" type="submit" name="request_validation"
|
||||||
value="Demander la validation"/>
|
value="Demander la validation"/>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
<?php } else { ?>
|
||||||
|
<hr />
|
||||||
|
<div class="alert alert-warning">
|
||||||
|
Pour demander à valider votre équipe, vous devez avoir au moins un encadrant, trois participants,
|
||||||
|
choisi un problème et soumis une autorisation de droit à l'image par participant.
|
||||||
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tr>
|
<?php }
|
||||||
</table>
|
elseif ($team->getValidationStatus() == ValidationStatus::WAITING) { ?>
|
||||||
|
<div class="alert alert-warning">
|
||||||
|
Votre équipe est en attente de validation.
|
||||||
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<h2>Autorisations de l'équipe</h2>
|
||||||
|
<?php printDocuments($documents); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php require_once "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
|
@ -1,31 +1,33 @@
|
||||||
<?php
|
<?php
|
||||||
require_once "header.php" ;
|
require_once "header.php" ; ?>
|
||||||
|
|
||||||
if (isset($join_team) && !$has_error) { ?>
|
<div class="mt-4 mb-4">
|
||||||
Vous avez bien rejoint l'équipe <?= $_SESSION["team"]->getName() ?> !
|
<h1 class="display-4">Rejoindre une équipe</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if (isset($join_team) && !$has_error) { ?>
|
||||||
|
<div class="alert alert-success">
|
||||||
|
Vous avez bien rejoint l'équipe <?= $team->getName() ?> !
|
||||||
|
</div>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
|
||||||
<?php if ($has_error) echo "<h2>Erreur : " . $error_message . "</h2>"; ?>
|
<?php if ($_SESSION["role"] == Role::ENCADRANT && sizeof($_SESSION["teams"]) > 0) { ?>
|
||||||
|
<div class="alert alert-warning">
|
||||||
|
Vous êtes déjà inscrit dans une équipe. Vous pouvez toutefois encadrer plusieurs équipes.
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input type="hidden" name="submitted" value="true" />
|
<div class="form-row">
|
||||||
<table style="width: 100%;">
|
<div class="form-group col-md-12">
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td style="width: 30%;">
|
|
||||||
<label for="access_code">Code d'accès :</label>
|
<label for="access_code">Code d'accès :</label>
|
||||||
</td>
|
<input class="form-control" type="text" id="access_code" name="access_code" pattern="[A-Za-z0-9]{6}" required/>
|
||||||
<td style="width: 70%;">
|
</div>
|
||||||
<input style="width: 100%;" type="text" id="access_code" name="access_code" />
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
<div class="form-group row">
|
||||||
<tr>
|
<input class="btn btn-primary btn-lg btn-block" name="join_team" type="submit" value="Rejoindre l'équipe"/>
|
||||||
<td colspan="2">
|
</div>
|
||||||
<input style="width: 100%;" type="submit" value="Rejoindre l'équipe" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -1,47 +1,34 @@
|
||||||
<?php
|
<?php
|
||||||
require_once "header.php";
|
require_once "header.php";
|
||||||
|
|
||||||
if ($has_error) {
|
if (!$has_error && isset($save_solution)) { ?>
|
||||||
echo "<h2>Erreur : " . $error_message . "</h2>";
|
<div class="alert alert-success">
|
||||||
} elseif (isset($save_solution)) {
|
Le fichier a été correctement envoyé !
|
||||||
echo "<h2>Le fichier a été correctement envoyé !</h2>";
|
</div>
|
||||||
}
|
<?php } ?>
|
||||||
?>
|
|
||||||
|
|
||||||
<?php if (date("yyyy-mm-dd") < $tournament->getSolutionsDate()) { ?>
|
<?php if (date("yyyy-mm-dd") < $tournament->getSolutionsDate()) { ?>
|
||||||
<form method="post" enctype="multipart/form-data">
|
<form method="post" enctype="multipart/form-data">
|
||||||
<input type="hidden" name="MAX_FILE_SIZE" value="5000000"/>
|
<input type="hidden" name="MAX_FILE_SIZE" value="5000000"/>
|
||||||
<table style="width: 100%;">
|
<div class="form-row">
|
||||||
<tbody>
|
<div class="form-group col-md-6">
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="problem">Problème :</label>
|
<label for="problem">Problème :</label>
|
||||||
</td>
|
<select class="custom-select" id="problem" name="problem">
|
||||||
<td>
|
|
||||||
<select style="width: 100%;" id="problem" name="problem">
|
|
||||||
<?php
|
<?php
|
||||||
for ($i = 1; $i <= 9; ++$i) {
|
for ($i = 1; $i <= 9; ++$i) {
|
||||||
echo "<option value=\"$i\">$i</option>\n";
|
echo "<option value=\"$i\">$i</option>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
|
||||||
<tr>
|
<div class="form-group col-md-6">
|
||||||
<td>
|
|
||||||
<label for="file">Fichier :</label>
|
<label for="file">Fichier :</label>
|
||||||
</td>
|
<input class="form-control" type="file" id="file" name="solution"/>
|
||||||
<td>
|
</div>
|
||||||
<input type="file" id="file" name="solution"/>
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
<input class="btn btn-lg btn-primary btn-block" type="submit" name="send_solution" value="Envoyer" />
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<input style="width: 100%;" type="submit" name="send_solution" value="Envoyer"/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</form>
|
</form>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
@ -55,7 +42,7 @@ foreach ($solutions as $sol) {
|
||||||
$file_id = $sol->getFileId();
|
$file_id = $sol->getFileId();
|
||||||
$problem = $sol->getProblem();
|
$problem = $sol->getProblem();
|
||||||
$version = $sol->getVersion();
|
$version = $sol->getVersion();
|
||||||
echo "Problème $problem (Version $version) : <a href=\"/file/$file_id\">Télécharger</a><br />";
|
echo "<div class=\"alert alert-info\"><strong>Problème $problem</strong> (Version $version) : <a href=\"/file/$file_id\">Télécharger</a></div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($team->isSelectedForFinal()) { ?>
|
if ($team->isSelectedForFinal()) { ?>
|
||||||
|
@ -68,7 +55,7 @@ if ($team->isSelectedForFinal()) { ?>
|
||||||
$file_id = $sol->getFileId();
|
$file_id = $sol->getFileId();
|
||||||
$problem = $sol->getProblem();
|
$problem = $sol->getProblem();
|
||||||
$version = $sol->getVersion();
|
$version = $sol->getVersion();
|
||||||
echo "Problème $problem (Version $version) : <a href=\"/file/$file_id\">Télécharger</a><br />";
|
echo "<div class=\"alert alert-info\"><strong>Problème $problem</strong> (Version $version) : <a href=\"/file/$file_id\">Télécharger</a></div>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "server_files/views/header.php";
|
require_once "server_files/views/header.php";
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="mt-4 mb-4">
|
||||||
|
<h1 class="display-4">Solutions</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
foreach ($tournaments as $tournament) {
|
foreach ($tournaments as $tournament) {
|
||||||
echo "<h1>Tournoi de " . $tournament->getName() . "</h1>\n";
|
echo "<h1>Tournoi de " . $tournament->getName() . "</h1>\n";
|
||||||
$sols = $tournament->getAllSolutions();
|
$sols = $tournament->getAllSolutions();
|
||||||
|
@ -13,13 +18,13 @@ foreach ($tournaments as $tournament) {
|
||||||
$team = Team::fromId($sol->getTeamId());
|
$team = Team::fromId($sol->getTeamId());
|
||||||
$team_name = $team->getName();
|
$team_name = $team->getName();
|
||||||
$team_trigram = $team->getTrigram();
|
$team_trigram = $team->getTrigram();
|
||||||
echo "Problème n°$problem de l'équipe $team_name ($team_trigram), version $version : <a href=\"/file/$file_id\">Télécharger</a><br />";
|
echo "<div class=\"alert alert-info\"><strong>Problème n°$problem de l'équipe $team_name</strong> ($team_trigram), version $version : <a href=\"/file/$file_id\">Télécharger</a></div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<form method=\"POST\">\n";
|
echo "<form method=\"POST\">\n";
|
||||||
echo "<input type=\"hidden\" name=\"tournament\" value=\"" . $tournament->getId() . "\" />\n";
|
echo "<input type=\"hidden\" name=\"tournament\" value=\"" . $tournament->getId() . "\" />\n";
|
||||||
echo "<input style=\"width: 100%\" type=\"submit\" name=\"download_zip\" value=\"Télécharger l'archive\" />\n";
|
echo "<input class=\"btn btn-lg btn-primary btn-block\" type=\"submit\" name=\"download_zip\" value=\"Télécharger l'archive\" />\n";
|
||||||
echo "</form><hr />\n";
|
echo "</form>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once "server_files/views/footer.php";
|
require_once "server_files/views/footer.php";
|
|
@ -1,51 +1,37 @@
|
||||||
<?php
|
<?php
|
||||||
require_once "header.php";
|
require_once "header.php";
|
||||||
|
|
||||||
|
|
||||||
if (date("yyyy-mm-dd") < $tournament->getSolutionsDate()) {
|
if (date("yyyy-mm-dd") < $tournament->getSolutionsDate()) {
|
||||||
echo "<h3>Il est trop tôt pour se préoccuper des notes de synthèse, attendez le tirage des poules.</h3>";
|
echo "<div class=\"alert alert-danger\"><h4>Il est trop tôt pour se préoccuper des notes de synthèse, attendez le tirage des poules.</h4></div>";
|
||||||
require_once "server_files/views/footer.php";
|
require_once "server_files/views/footer.php";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($error_message)) {
|
if (isset($save_synthesis) && !$has_error) { ?>
|
||||||
if ($error_message !== false) {
|
<div class="alert alert-success">
|
||||||
echo "<h2>Erreur : " . $error_message . "</h2>";
|
Le fichier a été correctement envoyé !
|
||||||
}
|
</div>
|
||||||
else {
|
<?php } ?>
|
||||||
echo "<h2>Le fichier a été correctement envoyé !</h2>";
|
|
||||||
}
|
|
||||||
}?>
|
|
||||||
|
|
||||||
<?php if (date("yyyy-mm-dd") < $tournament->getSynthesesDate()) { ?>
|
<?php if (date("yyyy-mm-dd") < $tournament->getSynthesesDate()) { ?>
|
||||||
<form method="post" enctype="multipart/form-data">
|
<form method="post" enctype="multipart/form-data">
|
||||||
<input type="hidden" name="MAX_FILE_SIZE" value="5000000"/>
|
<input type="hidden" name="MAX_FILE_SIZE" value="5000000"/>
|
||||||
<table style="width: 100%;">
|
<div class="form-row">
|
||||||
<tbody>
|
<div class="form-group col-md-6">
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="dest">Destination de la note de synthèse :</label>
|
<label for="dest">Destination de la note de synthèse :</label>
|
||||||
</td>
|
<select class="custom-select" id="dest" name="dest">
|
||||||
<td>
|
|
||||||
<select style="width: 100%;" id="dest" name="dest">
|
|
||||||
<option value="opposant">Opposant</option>
|
<option value="opposant">Opposant</option>
|
||||||
<option value="rapporteur">Rapporteur</option>
|
<option value="rapporteur">Rapporteur</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
|
||||||
<tr>
|
<div class="form-group col-md-6">
|
||||||
<td>
|
|
||||||
<label for="file">Fichier :</label>
|
<label for="file">Fichier :</label>
|
||||||
</td>
|
<input class="form-control" type="file" id="file" name="synthese" />
|
||||||
<td>
|
</div>
|
||||||
<input type="file" id="file" name="synthese" />
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
<input class="btn btn-lg btn-primary btn-block" type="submit" name="send_synthesis" value="Envoyer" />
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<input style="width: 100%;" type="submit" name="send_synthesis" value="Envoyer" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</form>
|
</form>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
@ -59,7 +45,7 @@ foreach ($syntheses as $synthesis) {
|
||||||
$file_id = $synthesis->getFileId();
|
$file_id = $synthesis->getFileId();
|
||||||
$dest = $synthesis->getDest();
|
$dest = $synthesis->getDest();
|
||||||
$version = $synthesis->getVersion();
|
$version = $synthesis->getVersion();
|
||||||
echo "Note de synthèse pour " . ($dest == DestType::OPPOSANT ? "l'opposant" : "le rapporteur") . " (version $version) : <a href=\"/file/$file_id\">Télécharger</a><br />";
|
echo "<div class=\"alert alert-info\"><strong>Note de synthèse pour " . ($dest == DestType::OPPOSANT ? "l'opposant" : "le rapporteur") . "</strong> (version $version) : <a href=\"/file/$file_id\">Télécharger</a></div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($team->isSelectedForFinal()) { ?>
|
if ($team->isSelectedForFinal()) { ?>
|
||||||
|
@ -72,7 +58,7 @@ if ($team->isSelectedForFinal()) { ?>
|
||||||
$file_id = $synthesis->getFileId();
|
$file_id = $synthesis->getFileId();
|
||||||
$dest = $synthesis->getDest();
|
$dest = $synthesis->getDest();
|
||||||
$version = $synthesis->getVersion();
|
$version = $synthesis->getVersion();
|
||||||
echo "Note de synthèse pour " . ($dest == DestType::OPPOSANT ? "l'opposant" : "le rapporteur") . " (version $version) : <a href=\"/file/$file_id\">Télécharger</a><br />";
|
echo "<div class=\"alert alert-info\"><strong>Note de synthèse pour " . ($dest == DestType::OPPOSANT ? "l'opposant" : "le rapporteur") . "</strong> (version $version) : <a href=\"/file/$file_id\">Télécharger</a></div>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "server_files/views/header.php";
|
require_once "server_files/views/header.php";
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="mt-4 mb-4">
|
||||||
|
<h1 class="display-4">Notes de synthèse</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
/** @var Tournament $tournament */
|
/** @var Tournament $tournament */
|
||||||
foreach ($tournaments as $tournament) {
|
foreach ($tournaments as $tournament) {
|
||||||
echo "<h1>Tournoi de " . $tournament->getName() . "</h1>\n";
|
echo "<h1>Tournoi de " . $tournament->getName() . "</h1>\n";
|
||||||
|
@ -14,14 +19,14 @@ foreach ($tournaments as $tournament) {
|
||||||
$team = Team::fromId($synthesis->getTeamId());
|
$team = Team::fromId($synthesis->getTeamId());
|
||||||
$team_name = $team->getName();
|
$team_name = $team->getName();
|
||||||
$team_trigram = $team->getTrigram();
|
$team_trigram = $team->getTrigram();
|
||||||
echo "Note de synthèse de l'équipe $team_name ($team_trigram) pour " . ($dest == DestType::OPPOSANT ? "l'opposant" : "le rapporteur")
|
echo "<div class=\"alert alert-info\"><strong>Note de synthèse de l'équipe $team_name ($team_trigram) pour " . ($dest == DestType::OPPOSANT ? "l'opposant" : "le rapporteur")
|
||||||
. ", version $version : <a href=\"/file/$file_id\">Télécharger</a><br />";
|
. "</strong>, version $version : <a href=\"/file/$file_id\">Télécharger</a></div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<form method=\"POST\">\n";
|
echo "<form method=\"POST\">\n";
|
||||||
echo "<input type=\"hidden\" name=\"tournament\" value=\"" . $tournament->getId() . "\" />\n";
|
echo "<input type=\"hidden\" name=\"tournament\" value=\"" . $tournament->getId() . "\" />\n";
|
||||||
echo "<input style=\"width: 100%\" type=\"submit\" name=\"download_zip\" value=\"Télécharger l'archive\" />\n";
|
echo "<input class=\"btn btn-lg btn-primary btn-block\" type=\"submit\" name=\"download_zip\" value=\"Télécharger l'archive\" />\n";
|
||||||
echo "</form><hr />\n";
|
echo "</form>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once "server_files/views/footer.php";
|
require_once "server_files/views/footer.php";
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
<?php require_once "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<?php
|
<div class="mt-4 mb-4">
|
||||||
if ($has_error)
|
<h1 class="display-4">Tournoi de <?= $tournament->getName() ?></h1>
|
||||||
echo "<h2>Erreur : $error_message</h2>";
|
</div>
|
||||||
?>
|
|
||||||
|
|
||||||
<h2>Tournoi de <?= $tournament->getName() ?></h2>
|
|
||||||
|
|
||||||
|
<div class="alert alert-info">
|
||||||
<strong>Organisateur<?= sizeof($orgas) >= 2 ? 's' : '' ?> :</strong>
|
<strong>Organisateur<?= sizeof($orgas) >= 2 ? 's' : '' ?> :</strong>
|
||||||
<?php
|
<?php
|
||||||
$s = "";
|
$s = "";
|
||||||
|
@ -22,22 +20,38 @@ foreach ($orgas as $orga) {
|
||||||
}
|
}
|
||||||
echo substr($s, 0, -2);
|
echo substr($s, 0, -2);
|
||||||
?>
|
?>
|
||||||
<br />
|
</div>
|
||||||
<strong>Nombre d'équipes maximal :</strong> <?= $tournament->getSize() ?><br />
|
<div class="alert alert-info">
|
||||||
<strong>Lieu :</strong> <?= $tournament->getPlace() ?><br />
|
<strong>Nombre d'équipes maximal :</strong> <?= $tournament->getSize() ?>
|
||||||
<strong>Prix par partipant :</strong> <?= $tournament->getPrice() == 0 ? "Gratuit" : $tournament->getPrice() . " €" ?><br />
|
</div>
|
||||||
<strong>Dates :</strong> Du <?= formatDate($tournament->getStartDate()) ?> au <?= formatDate($tournament->getEndDate()) ?><br />
|
<div class="alert alert-info">
|
||||||
<strong>Clôture des inscriptions :</strong> <?= formatDate($tournament->getInscriptionDate(), true) ?><br />
|
<strong>Lieu :</strong> <?= $tournament->getPlace() ?>
|
||||||
<strong>Date limite d'envoi des solutions :</strong> <?= formatDate($tournament->getSolutionsDate(), true) ?><br />
|
</div>
|
||||||
<strong>Date limite d'envoi des notes de synthèse :</strong> <?= formatDate($tournament->getSynthesesDate(), true) ?><br />
|
<div class="alert alert-info">
|
||||||
<strong>Description :</strong> <?= $tournament->getDescription() ?><br />
|
<strong>Prix par partipant :</strong> <?= $tournament->getPrice() == 0 ? "Gratuit" : $tournament->getPrice() . " €" ?>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<strong>Dates :</strong> Du <?= formatDate($tournament->getStartDate()) ?> au <?= formatDate($tournament->getEndDate()) ?>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<strong>Clôture des inscriptions :</strong> <?= formatDate($tournament->getInscriptionDate(), true) ?>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<strong>Date limite d'envoi des solutions :</strong> <?= formatDate($tournament->getSolutionsDate(), true) ?>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<strong>Date limite d'envoi des notes de synthèse :</strong> <?= formatDate($tournament->getSynthesesDate(), true) ?>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<strong>Description :</strong> <?= $tournament->getDescription() ?>
|
||||||
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if ($tournament->isFinal())
|
if ($tournament->isFinal())
|
||||||
echo "<strong>Ce tournoi est la finale nationale du TFJM² 2020.</strong><br />";
|
echo "<div class=\"alert alert-info\">\n\t<strong>Ce tournoi est la finale nationale du TFJM² 2020.</strong>\n</div>\n";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if (!isset($_GET["modifier"]) && ($_SESSION["role"] == Role::ADMIN || $_SESSION["role"] == Role::ORGANIZER && $tournament->organize($_SESSION["user_id"]))) { ?>
|
<?php if (!isset($_GET["modifier"]) && ($_SESSION["role"] == Role::ADMIN || $_SESSION["role"] == Role::ORGANIZER && $tournament->organize($_SESSION["user_id"]))) { ?>
|
||||||
<a href="/tournoi/<?= $tournament->getName() ?>/modifier">Éditer le tournoi</a>
|
<a href="/tournoi/<?= $tournament->getName() ?>/modifier"><button class="btn btn-secondary btn-lg btn-block">Éditer le tournoi</button></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,19 +60,19 @@ if ($tournament->isFinal())
|
||||||
|
|
||||||
<h2>Équipes inscrites à ce tournoi :</h2>
|
<h2>Équipes inscrites à ce tournoi :</h2>
|
||||||
|
|
||||||
<table style="border: 1px solid black; width: 100%;">
|
<table class="table table-striped table-bordered table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="border: 1px solid black; text-align: center">
|
<th>
|
||||||
Équipe
|
Équipe
|
||||||
</th>
|
</th>
|
||||||
<th style="border: 1px solid black; text-align: center">
|
<th>
|
||||||
Trigramme
|
Trigramme
|
||||||
</th>
|
</th>
|
||||||
<th style="border: 1px solid black; text-align: center">
|
<th>
|
||||||
Date d'inscription
|
Date d'inscription
|
||||||
</th>
|
</th>
|
||||||
<th style="border: 1px solid black; text-align: center">
|
<th>
|
||||||
État de validation de l'inscription
|
État de validation de l'inscription
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -69,7 +83,7 @@ if ($tournament->isFinal())
|
||||||
foreach ($teams as $team) {
|
foreach ($teams as $team) {
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border: 1px solid black; text-align: center">
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if (isset($_SESSION["role"]) && ($_SESSION["role"] == Role::ADMIN || ($_SESSION["role"] == Role::ORGANIZER && $tournament->organize($_SESSION["user_id"]))))
|
if (isset($_SESSION["role"]) && ($_SESSION["role"] == Role::ADMIN || ($_SESSION["role"] == Role::ORGANIZER && $tournament->organize($_SESSION["user_id"]))))
|
||||||
echo "<a href=\"/equipe/" . $team->getTrigram() . "\">" . $team->getName(). "</a>";
|
echo "<a href=\"/equipe/" . $team->getTrigram() . "\">" . $team->getName(). "</a>";
|
||||||
|
@ -77,9 +91,9 @@ if ($tournament->isFinal())
|
||||||
echo $team->getName();
|
echo $team->getName();
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td style="border: 1px solid black; text-align: center"><?= $team->getTrigram() ?></td>
|
<td><?= $team->getTrigram() ?></td>
|
||||||
<td style="border: 1px solid black; text-align: center"><?= formatDate($team->getInscriptionDate()) ?></td>
|
<td><?= formatDate($team->getInscriptionDate()) ?></td>
|
||||||
<td style="border: 1px solid black; text-align: center"><?= ValidationStatus::getTranslatedName($team->getValidationStatus()) ?></td>
|
<td><?= ValidationStatus::getTranslatedName($team->getValidationStatus()) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
@ -87,16 +101,16 @@ if ($tournament->isFinal())
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="border: 1px solid black; text-align: center">
|
<th>
|
||||||
Équipe
|
Équipe
|
||||||
</th>
|
</th>
|
||||||
<th style="border: 1px solid black; text-align: center">
|
<th>
|
||||||
Trigramme
|
Trigramme
|
||||||
</th>
|
</th>
|
||||||
<th style="border: 1px solid black; text-align: center">
|
<th>
|
||||||
Date d'inscription
|
Date d'inscription
|
||||||
</th>
|
</th>
|
||||||
<th style="border: 1px solid black; text-align: center">
|
<th>
|
||||||
État de validation de l'inscription
|
État de validation de l'inscription
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -108,24 +122,14 @@ if ($tournament->isFinal())
|
||||||
else {
|
else {
|
||||||
?>
|
?>
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input type="hidden" name="submitted" value="true" />
|
<div class="form-row">
|
||||||
<table style="width: 100%;">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td style="width: 30%;">
|
|
||||||
<label for="name">Nom :</label>
|
<label for="name">Nom :</label>
|
||||||
</td>
|
<input class="form-control" type="text" id="name" name="name" value="<?= $tournament->getName() ?>" required/>
|
||||||
<td style="width: 70%;">
|
</div>
|
||||||
<input style="width: 100%;" type="text" id="name" name="name" value="<?= $tournament->getName() ?>" required />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php if ($_SESSION["role"] == Role::ADMIN) { ?>
|
<?php if ($_SESSION["role"] == Role::ADMIN) { ?>
|
||||||
<tr>
|
<div class="form-row">
|
||||||
<td>
|
<label for="organizers">Organisateur·s :</label>
|
||||||
<label for="organizers">Organisateur :</label>
|
<select class="custom-select" id="organizers" name="organizers[]" multiple size="4" required>
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select style="width: 100%;" id="organizers" name="organizers[]" multiple size="4" required>
|
|
||||||
<?php
|
<?php
|
||||||
while (($orga_data = $orgas_response->fetch()) !== FALSE) {
|
while (($orga_data = $orgas_response->fetch()) !== FALSE) {
|
||||||
echo "<option value=\"" . $orga_data["id"] . "\" " . ($tournament->organize($orga_data["id"]) ? "selected" : "")
|
echo "<option value=\"" . $orga_data["id"] . "\" " . ($tournament->organize($orga_data["id"]) ? "selected" : "")
|
||||||
|
@ -133,86 +137,68 @@ else {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<tr>
|
|
||||||
<td>
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-4">
|
||||||
<label for="size">Nombre d'équipes :</label>
|
<label for="size">Nombre d'équipes :</label>
|
||||||
</td>
|
<input class="form-control" type="number" id="size" name="size" min="3" max="12" value="<?= $tournament->getSize() ?>" required/>
|
||||||
<td>
|
</div>
|
||||||
<input style="width: 100%;" type="number" id="size" name="size" min="3" max="12" value="<?= $tournament->getSize() ?>" required />
|
|
||||||
</td>
|
<div class="form-group col-md-4">
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="place">Lieu :</label>
|
<label for="place">Lieu :</label>
|
||||||
</td>
|
<input class="form-control" type="text" id="place" name="place" value="<?= $tournament->getPlace() ?>" required/>
|
||||||
<td>
|
</div>
|
||||||
<input style="width: 100%;" type="text" id="place" name="place" value="<?= $tournament->getPlace() ?>" required />
|
|
||||||
</td>
|
<div class="form-group col-md-4">
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="price">Prix par participant</label>
|
<label for="price">Prix par participant</label>
|
||||||
</td>
|
<input class="form-control" type="number" id="price" name="price" min="0" max="50" value="<?= $tournament->getPrice() ?>" required />
|
||||||
<td>
|
</div>
|
||||||
<input style="width: 100%;" type="number" id="price" name="price" min="0" max="50" value="<?= $tournament->getPrice() ?>" required />
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
<div class="form-row">
|
||||||
<tr>
|
<div class="form-group col-md-6">
|
||||||
<td>
|
<label for="date_start">Date de début de tournoi :</label>
|
||||||
<label for="date_start">Dates :</label>
|
<input class="form-control" type="date" id="date_start" name="date_start" value="<?= $tournament->getStartDate() ?>" required />
|
||||||
</td>
|
</div>
|
||||||
<td>
|
|
||||||
Du <input style="width: 45%;" type="date" id="date_start" name="date_start" value="<?= $tournament->getStartDate() ?>" required />
|
<div class="form-group col-md-6">
|
||||||
au <input style="width: 45%;" type="date" id="date_end" name="date_end" value="<?= $tournament->getEndDate() ?>" required />
|
<label for="date_end">Date de fin de tournoi :</label>
|
||||||
</td>
|
<input class="form-control" type="date" id="date_end" name="date_end" value="<?= $tournament->getEndDate() ?>" required />
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
</div>
|
||||||
<td>
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-4">
|
||||||
<label for="date_inscription">Date limite d'inscription :</label>
|
<label for="date_inscription">Date limite d'inscription :</label>
|
||||||
</td>
|
<input class="form-control" type="date" id="date_inscription" name="date_inscription" value="<?= substr($tournament->getInscriptionDate(), 0, 10) ?>" required />
|
||||||
<td>
|
<input class="form-control" type="time" id="time_inscription" name="time_inscription" value="<?= substr($tournament->getInscriptionDate(), 11) ?>" required />
|
||||||
<input style="width: 49%;" type="date" id="date_inscription" name="date_inscription" value="<?= substr($tournament->getInscriptionDate(), 0, 10) ?>" required />
|
</div>
|
||||||
<input style="width: 49%;" type="time" id="time_inscription" name="time_inscription" value="<?= substr($tournament->getInscriptionDate(), 11) ?>" required />
|
|
||||||
</td>
|
<div class="form-group col-md-4">
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="date_solutions">Date limite pour rendre les solutions :</label>
|
<label for="date_solutions">Date limite pour rendre les solutions :</label>
|
||||||
</td>
|
<input class="form-control" type="date" id="date_solutions" name="date_solutions" value="<?= substr($tournament->getSolutionsDate(), 0, 10) ?>" required />
|
||||||
<td>
|
<input class="form-control" type="time" id="time_solutions" name="time_solutions" value="<?= substr($tournament->getSolutionsDate(),11) ?>" required />
|
||||||
<input style="width: 49%;" type="date" id="date_solutions" name="date_solutions" value="<?= substr($tournament->getSolutionsDate(), 0, 10) ?>" required />
|
</div>
|
||||||
<input style="width: 49%;" type="time" id="time_solutions" name="time_solutions" value="<?= substr($tournament->getSolutionsDate(),11) ?>" required />
|
|
||||||
</td>
|
<div class="form-group col-md-4">
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="date_syntheses">Date limite pour rendre les notes de synthèse :</label>
|
<label for="date_syntheses">Date limite pour rendre les notes de synthèse :</label>
|
||||||
</td>
|
<input class="form-control" type="date" id="date_syntheses" name="date_syntheses"
|
||||||
<td>
|
|
||||||
<input style="width: 49%;" type="date" id="date_syntheses" name="date_syntheses"
|
|
||||||
value="<?= substr($tournament->getSynthesesDate(), 0, 10) ?>" required/>
|
value="<?= substr($tournament->getSynthesesDate(), 0, 10) ?>" required/>
|
||||||
<input style="width: 49%;" type="time" id="time_syntheses" name="time_syntheses"
|
<input class="form-control" type="time" id="time_syntheses" name="time_syntheses"
|
||||||
value="<?= substr($tournament->getSynthesesDate(), 11) ?>" required/>
|
value="<?= substr($tournament->getSynthesesDate(), 11) ?>" required/>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
|
||||||
<td>
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-12">
|
||||||
<label for="description">Description :</label>
|
<label for="description">Description :</label>
|
||||||
</td>
|
<textarea class="form-control" name="description" id="description" required><?= $tournament->getDescription() ?></textarea>
|
||||||
<td>
|
</div>
|
||||||
<textarea style="width: 100%;" name="description" id="description" required><?= $tournament->getDescription() ?></textarea>
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
<input class="btn btn-primary btn-lg btn-block" type="submit" name="edit_tournament" value="Modifier le tournoi" />
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<input style="width: 100%;" type="submit" name="edit_tournament" value="Modifier le tournoi" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</form>
|
</form>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue