Modification mineure
This commit is contained in:
parent
39abeec4e6
commit
d2a0d0fbec
|
@ -1,12 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include_once "config.php";
|
require_once_once "config.php";
|
||||||
include_once "header.php";
|
require_once_once "header.php";
|
||||||
|
|
||||||
http_response_code(403);
|
http_response_code(403);
|
||||||
|
|
||||||
echo "<h1>Vous n'êtes pas autorisé à accéder à cette page.</h1>";
|
echo "<h1>Vous n'êtes pas autorisé à accéder à cette page.</h1>";
|
||||||
|
|
||||||
include "footer.php";
|
require_once "footer.php";
|
||||||
|
|
||||||
exit();
|
exit();
|
|
@ -1,12 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include_once "config.php";
|
require_once_once "config.php";
|
||||||
include_once "header.php";
|
require_once_once "header.php";
|
||||||
|
|
||||||
http_response_code(404);
|
http_response_code(404);
|
||||||
|
|
||||||
echo "<h1>Cette page n'existe pas.</h1>";
|
echo "<h1>Cette page n'existe pas.</h1>";
|
||||||
|
|
||||||
include "footer.php";
|
require_once "footer.php";
|
||||||
|
|
||||||
exit();
|
exit();
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'config.php';
|
require_once 'config.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_DATE AND `year` = '$YEAR';");
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ function registerTeam() {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -122,6 +122,6 @@ if (!isset($_SESSION["role"]) or ($_SESSION["role"] != "PARTICIPANT" && $_SESSIO
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php include "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'config.php';
|
require_once 'config.php';
|
||||||
|
|
||||||
if (isset($_POST["submitted"])) {
|
if (isset($_POST["submitted"])) {
|
||||||
$error_message = addOrganizer();
|
$error_message = addOrganizer();
|
||||||
|
@ -57,7 +57,7 @@ function addOrganizer() {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -119,6 +119,6 @@ if (!isset($_SESSION["role"]) or $_SESSION["role"] != "ADMIN") {
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php include "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'config.php';
|
require_once 'config.php';
|
||||||
|
|
||||||
$orgas_response = $DB->query("SELECT `id`, `surname`, `first_name` FROM `users` WHERE (`role` = 'ORGANIZER' OR `role` = 'ADMIN') AND `year` = '$YEAR';");
|
$orgas_response = $DB->query("SELECT `id`, `surname`, `first_name` FROM `users` WHERE (`role` = 'ORGANIZER' OR `role` = 'ADMIN') AND `year` = '$YEAR';");
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ function registerTournament() {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -239,6 +239,6 @@ if (!isset($_SESSION["role"]) or $_SESSION["role"] != "ADMIN") {
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php include "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'config.php';
|
require_once 'config.php';
|
||||||
|
|
||||||
$token = $_GET["token"];
|
$token = $_GET["token"];
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@ else {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<h2><?php echo $error_message ?></h2>
|
<h2><?php echo $error_message ?></h2>
|
||||||
|
|
||||||
<?php include "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'config.php';
|
require_once 'config.php';
|
||||||
|
|
||||||
if (isset($_POST["submitted"]) && !isset($_SESSION["user_id"])) {
|
if (isset($_POST["submitted"]) && !isset($_SESSION["user_id"])) {
|
||||||
$error_message = login();
|
$error_message = login();
|
||||||
|
@ -143,7 +143,7 @@ function sendConfirmEmail() {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<?php if (isset($error_message) && $error_message) echo "<h2>Erreur : " . $error_message . "</h2>"; ?>
|
<?php if (isset($error_message) && $error_message) echo "<h2>Erreur : " . $error_message . "</h2>"; ?>
|
||||||
|
|
||||||
|
@ -238,6 +238,6 @@ else if (isset($_SESSION["user_id"])) { ?>
|
||||||
</form>
|
</form>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php include "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'config.php';
|
require_once 'config.php';
|
||||||
|
|
||||||
unset($_SESSION["user_id"]);
|
unset($_SESSION["user_id"]);
|
||||||
session_destroy();
|
session_destroy();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<h2>Déconnexion réussie !</h2>
|
<h2>Déconnexion réussie !</h2>
|
||||||
|
|
||||||
<?php include "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include "config.php";
|
require_once "config.php";
|
||||||
|
|
||||||
$trigram = htmlspecialchars($_GET["trigram"]);
|
$trigram = htmlspecialchars($_GET["trigram"]);
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ if (isset($_POST["select"])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($team_data === false)
|
if ($team_data === false)
|
||||||
include "404.php";
|
require_once "404.php";
|
||||||
|
|
||||||
$tournament_data = $DB->query("SELECT `name`, `date_start` FROM `tournaments` WHERE `id` = '" . $team_data["tournament"] . "' AND `year` = '$YEAR';")->fetch();
|
$tournament_data = $DB->query("SELECT `name`, `date_start` FROM `tournaments` WHERE `id` = '" . $team_data["tournament"] . "' AND `year` = '$YEAR';")->fetch();
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ if ($team_data["final_selection"]) {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<h2>Informations sur l'équipe</h2>
|
<h2>Informations sur l'équipe</h2>
|
||||||
|
|
||||||
|
@ -170,4 +170,4 @@ if (!$team_data["final_selection"]) { ?>
|
||||||
</form>
|
</form>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php include "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'config.php';
|
require_once 'config.php';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
@ -111,4 +111,4 @@ include 'config.php';
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
|
@ -1,16 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include "config.php";
|
require_once "config.php";
|
||||||
|
|
||||||
if (!isset($_SESSION["role"]) || $_SESSION["role"] != "ORGANIZER" && $_SESSION["role"] != "ADMIN") {
|
if (!isset($_SESSION["role"]) || $_SESSION["role"] != "ORGANIZER" && $_SESSION["role"] != "ADMIN") {
|
||||||
include "403.php";
|
require_once "403.php";
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = $_GET["id"];
|
$id = $_GET["id"];
|
||||||
$user_data = $DB->query("SELECT * FROM `users` WHERE `id` = $id;")->fetch();
|
$user_data = $DB->query("SELECT * FROM `users` WHERE `id` = $id;")->fetch();
|
||||||
|
|
||||||
if ($user_data === false) {
|
if ($user_data === false) {
|
||||||
include "404.php";
|
require_once "404.php";
|
||||||
}
|
}
|
||||||
|
|
||||||
$team_data = false;
|
$team_data = false;
|
||||||
|
@ -22,7 +22,7 @@ $tournaments_req = $DB->query("SELECT `tournament`, `name` FROM `organizers` JOI
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<h1><?= $user_data["first_name"] . " " . $user_data["surname"] ?></h1>
|
<h1><?= $user_data["first_name"] . " " . $user_data["surname"] ?></h1>
|
||||||
|
|
||||||
|
@ -93,4 +93,4 @@ elseif ($user_data["role"] == "PARTICIPANT" || $user_data["role"] == "ENCADRANT"
|
||||||
}
|
}
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<?php include "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'config.php';
|
require_once 'config.php';
|
||||||
|
|
||||||
if (isset($_POST["submitted"])) {
|
if (isset($_POST["submitted"])) {
|
||||||
$error_message = register();
|
$error_message = register();
|
||||||
|
@ -130,7 +130,7 @@ function register() {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<?php if (isset($error_message) && $error_message) echo "<h2>Erreur : " . $error_message . "</h2>"; ?>
|
<?php if (isset($error_message) && $error_message) echo "<h2>Erreur : " . $error_message . "</h2>"; ?>
|
||||||
|
|
||||||
|
@ -276,6 +276,6 @@ function register() {
|
||||||
selectRole();
|
selectRole();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php include "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'config.php';
|
require_once 'config.php';
|
||||||
|
|
||||||
if (isset($_POST["submitted"])) {
|
if (isset($_POST["submitted"])) {
|
||||||
$error_message = updateAccount();
|
$error_message = updateAccount();
|
||||||
|
@ -138,11 +138,11 @@ function updatePassword()
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<?php if (!isset($_SESSION["user_id"])) {
|
<?php if (!isset($_SESSION["user_id"])) {
|
||||||
echo "<h2>Vous devez être connecté pour afficher cette page.</h2>";
|
echo "<h2>Vous devez être connecté pour afficher cette page.</h2>";
|
||||||
include "footer.php";
|
require_once "footer.php";
|
||||||
return;
|
return;
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
|
@ -320,4 +320,4 @@ if (isset($error_message) && $error_message === FALSE) {
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php include "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'config.php';
|
require_once 'config.php';
|
||||||
|
|
||||||
if (isset($_POST["leave_team"])) {
|
if (isset($_POST["leave_team"])) {
|
||||||
for ($i = 1; $i <= ($_SESSION["role"] == "PARTICIPANT" ? 6 : 2); ++$i)
|
for ($i = 1; $i <= ($_SESSION["role"] == "PARTICIPANT" ? 6 : 2); ++$i)
|
||||||
|
@ -191,11 +191,11 @@ function checkCanValidate()
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<?php if (!isset($_SESSION["user_id"]) || !isset($_SESSION["team_id"]) || $_SESSION["team_id"] == NULL) {
|
<?php if (!isset($_SESSION["user_id"]) || !isset($_SESSION["team_id"]) || $_SESSION["team_id"] == NULL) {
|
||||||
echo "<h2>Vous devez être dans une équipe pour afficher cette page.</h2>";
|
echo "<h2>Vous devez être dans une équipe pour afficher cette page.</h2>";
|
||||||
include "footer.php";
|
require_once "footer.php";
|
||||||
return;
|
return;
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
|
@ -364,4 +364,4 @@ Code d'accès : <strong><?php echo $team_data["access_code"] ?></strong><br/>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php include "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'config.php';
|
require_once 'config.php';
|
||||||
|
|
||||||
if (isset($_POST["submitted"])) {
|
if (isset($_POST["submitted"])) {
|
||||||
$error_message = joinTeam();
|
$error_message = joinTeam();
|
||||||
|
@ -52,7 +52,7 @@ function joinTeam() {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -88,6 +88,6 @@ if (!isset($_SESSION["role"]) or ($_SESSION["role"] != "PARTICIPANT" && $_SESSIO
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php include "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'config.php';
|
require_once 'config.php';
|
||||||
|
|
||||||
if (!isset($_SESSION["team_id"]))
|
if (!isset($_SESSION["team_id"]))
|
||||||
include "403.php";
|
require_once "403.php";
|
||||||
|
|
||||||
if (isset($_POST["send_solution"])) {
|
if (isset($_POST["send_solution"])) {
|
||||||
$error_message = saveSolution();
|
$error_message = saveSolution();
|
||||||
|
@ -60,7 +60,7 @@ function saveSolution() {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include 'header.php' ?>
|
<?php require_once 'header.php' ?>
|
||||||
|
|
||||||
<?php if (isset($error_message)) {
|
<?php if (isset($error_message)) {
|
||||||
if ($error_message !== false) {
|
if ($error_message !== false) {
|
||||||
|
@ -120,4 +120,4 @@ while (($data = $solutions_req->fetch()) !== false) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include 'footer.php' ?>
|
<?php require_once 'footer.php' ?>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php include 'config.php'; ?>
|
<?php require_once 'config.php'; ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (!isset($_SESSION["role"]) || $_SESSION["role"] != "ADMIN" && $_SESSION["role"] != "ORGANIZER")
|
if (!isset($_SESSION["role"]) || $_SESSION["role"] != "ADMIN" && $_SESSION["role"] != "ORGANIZER")
|
||||||
include "403.php";
|
require_once "403.php";
|
||||||
|
|
||||||
if (isset($_POST["download_zip"])) {
|
if (isset($_POST["download_zip"])) {
|
||||||
$id = $_POST["tournament"];
|
$id = $_POST["tournament"];
|
||||||
|
@ -43,7 +43,7 @@ if (isset($_POST["download_zip"])) {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include 'header.php'; ?>
|
<?php require_once 'header.php'; ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -78,4 +78,4 @@ while (($data_tournament = $req->fetch()) !== false) {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include 'footer.php'; ?>
|
<?php require_once 'footer.php'; ?>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'config.php';
|
require_once 'config.php';
|
||||||
|
|
||||||
if (!isset($_SESSION["team_id"]))
|
if (!isset($_SESSION["team_id"]))
|
||||||
include "403.php";
|
require_once "403.php";
|
||||||
|
|
||||||
if (isset($_POST["send_synthese"])) {
|
if (isset($_POST["send_synthese"])) {
|
||||||
$error_message = saveSynthese();
|
$error_message = saveSynthese();
|
||||||
|
@ -56,12 +56,12 @@ function saveSynthese() {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include 'header.php' ?>
|
<?php require_once 'header.php' ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (date("yyyy-mm-dd") < $tournament_data["date_solutions"]) {
|
if (date("yyyy-mm-dd") < $tournament_data["date_solutions"]) {
|
||||||
echo "<h3>Il est trop tôt pour se préoccuper des notes de synthèse, attendez le tirage des poules.</h3>";
|
echo "<h3>Il est trop tôt pour se préoccuper des notes de synthèse, attendez le tirage des poules.</h3>";
|
||||||
include "footer.php";
|
require_once "footer.php";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($error_message)) {
|
if (isset($error_message)) {
|
||||||
|
@ -120,4 +120,4 @@ while (($data = $syntheses_req->fetch()) !== false) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include 'footer.php' ?>
|
<?php require_once 'footer.php' ?>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php include 'config.php'; ?>
|
<?php require_once 'config.php'; ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (!isset($_SESSION["role"]) || $_SESSION["role"] != "ADMIN" && $_SESSION["role"] != "ORGANIZER")
|
if (!isset($_SESSION["role"]) || $_SESSION["role"] != "ADMIN" && $_SESSION["role"] != "ORGANIZER")
|
||||||
include "403.php";
|
require_once "403.php";
|
||||||
|
|
||||||
if (isset($_POST["download_zip"])) {
|
if (isset($_POST["download_zip"])) {
|
||||||
$id = $_POST["tournament"];
|
$id = $_POST["tournament"];
|
||||||
|
@ -43,7 +43,7 @@ if (isset($_POST["download_zip"])) {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include 'header.php'; ?>
|
<?php require_once 'header.php'; ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -77,4 +77,4 @@ while (($data_tournament = $req->fetch()) !== false) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include 'footer.php'; ?>
|
<?php require_once 'footer.php'; ?>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'config.php';
|
require_once 'config.php';
|
||||||
|
|
||||||
$tournament_name = htmlspecialchars($_GET["nom"]);
|
$tournament_name = htmlspecialchars($_GET["nom"]);
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ $response->execute([$tournament_name]);
|
||||||
$data = $response->fetch();
|
$data = $response->fetch();
|
||||||
|
|
||||||
if ($data === false)
|
if ($data === false)
|
||||||
include "404.php";
|
require_once "404.php";
|
||||||
|
|
||||||
$orgas_req = $DB->query("SELECT `users`.`id` AS `id`, `surname`, `first_name` FROM `users` JOIN `organizers` ON `users`.`id` = `organizer` WHERE `tournament` = " . $data["id"] . ";");
|
$orgas_req = $DB->query("SELECT `users`.`id` AS `id`, `surname`, `first_name` FROM `users` JOIN `organizers` ON `users`.`id` = `organizer` WHERE `tournament` = " . $data["id"] . ";");
|
||||||
$orgas = [];
|
$orgas = [];
|
||||||
|
@ -20,7 +20,7 @@ while (($orga_data = $orgas_req->fetch()) !== false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET["modifier"]) && $_SESSION["role"] != "ADMIN" && !in_array($_SESSION["user_id"], $orgas_id))
|
if (isset($_GET["modifier"]) && $_SESSION["role"] != "ADMIN" && !in_array($_SESSION["user_id"], $orgas_id))
|
||||||
include "403.php";
|
require_once "403.php";
|
||||||
|
|
||||||
if (isset($_POST["edit_tournament"])) {
|
if (isset($_POST["edit_tournament"])) {
|
||||||
$error_message = updateTournament();
|
$error_message = updateTournament();
|
||||||
|
@ -130,7 +130,7 @@ function updateTournament() {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<h2>Tournoi de <?php echo $data["name"] ?></h2>
|
<h2>Tournoi de <?php echo $data["name"] ?></h2>
|
||||||
|
|
||||||
|
@ -356,4 +356,4 @@ else {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include 'config.php';
|
require_once 'config.php';
|
||||||
|
|
||||||
$response = $DB->query("SELECT `name`, `date_start`, `date_end`, `date_inscription`, `date_solutions`, `size` FROM `tournaments`
|
$response = $DB->query("SELECT `name`, `date_start`, `date_end`, `date_inscription`, `date_solutions`, `size` FROM `tournaments`
|
||||||
WHERE `year` = '$YEAR' AND `final` = false ORDER BY `date_start`, `name`;");
|
WHERE `year` = '$YEAR' AND `final` = false ORDER BY `date_start`, `name`;");
|
||||||
|
@ -8,7 +8,7 @@ $final_data = $DB->query("SELECT `name`, `date_start`, `date_end`, `date_solutio
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php include "header.php" ?>
|
<?php require_once "header.php" ?>
|
||||||
|
|
||||||
<h2>Liste des tournois</h2>
|
<h2>Liste des tournois</h2>
|
||||||
|
|
||||||
|
@ -55,4 +55,4 @@ $final_data = $DB->query("SELECT `name`, `date_start`, `date_end`, `date_solutio
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php include "footer.php" ?>
|
<?php require_once "footer.php" ?>
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include "config.php";
|
require_once "config.php";
|
||||||
|
|
||||||
if (!isset($_GET["file_id"])) {
|
if (!isset($_GET["file_id"])) {
|
||||||
header("Location: $URL_BASE");
|
header("Location: $URL_BASE");
|
||||||
|
@ -54,7 +54,7 @@ if ($data !== false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
include_once "404.php";
|
require_once_once "404.php";
|
||||||
http_response_code(404);
|
http_response_code(404);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue