Modifications sur les pages d'erreur
This commit is contained in:
parent
273bd05944
commit
946d261c71
|
@ -1,5 +1,5 @@
|
|||
ErrorDocument 403 /tfjm/403.php
|
||||
ErrorDocument 404 /tfjm/404.php
|
||||
ErrorDocument 403 /tfjm/server_files/403.php
|
||||
ErrorDocument 404 /tfjm/server_files/404.php
|
||||
|
||||
Options +FollowSymlinks
|
||||
Options -Indexes
|
||||
|
|
18
403.php
18
403.php
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
include_once "server_files/config.php";
|
||||
include_once "server_files/header.php";
|
||||
|
||||
http_response_code(403);
|
||||
|
||||
?>
|
||||
|
||||
<h1>Vous n'êtes pas autorisé à accéder à cette page.</h1>
|
||||
|
||||
<?php
|
||||
|
||||
include "server_files/footer.php";
|
||||
|
||||
exit();
|
||||
|
||||
?>
|
18
404.php
18
404.php
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
include_once "server_files/config.php";
|
||||
include_once "server_files/header.php";
|
||||
|
||||
http_response_code(404);
|
||||
|
||||
?>
|
||||
|
||||
<h1>Cette page n'existe pas.</h1>
|
||||
|
||||
<?php
|
||||
|
||||
include "server_files/footer.php";
|
||||
|
||||
exit();
|
||||
|
||||
?>
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
include_once "config.php";
|
||||
include_once "header.php";
|
||||
|
||||
http_response_code(403);
|
||||
|
||||
echo "<h1>Vous n'êtes pas autorisé à accéder à cette page.</h1>";
|
||||
|
||||
include "footer.php";
|
||||
|
||||
exit();
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
include_once "config.php";
|
||||
include_once "header.php";
|
||||
|
||||
http_response_code(404);
|
||||
|
||||
echo "<h1>Cette page n'existe pas.</h1>";
|
||||
|
||||
include "footer.php";
|
||||
|
||||
exit();
|
|
@ -56,13 +56,3 @@ function echo_date($date = NULL, $with_time = false) {
|
|||
|
||||
return strftime("%d %B %G" . ($with_time ? " %H:%M" : ""), strtotime($date));
|
||||
}
|
||||
|
||||
function error403() {
|
||||
include "../403.php";
|
||||
}
|
||||
|
||||
function error404() {
|
||||
include "../404.php";
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -11,7 +11,7 @@ if (isset($_POST["validate"])) {
|
|||
$team_data = $DB->query("SELECT * FROM `teams` WHERE `trigram` = '$trigram' AND `year` = $YEAR;")->fetch();
|
||||
|
||||
if ($team_data === false)
|
||||
error404();
|
||||
include "404.php";
|
||||
|
||||
$tournament_data = $DB->query("SELECT `name`, `date_start` FROM `tournaments` WHERE `id` = '" . $team_data["tournament"] . "' AND `year` = '$YEAR';")->fetch();
|
||||
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
include "config.php";
|
||||
|
||||
if (!isset($_SESSION["role"]) || $_SESSION["role"] != "ORGANIZER" && $_SESSION["role"] != "ADMIN") {
|
||||
error403();
|
||||
include "403.php";
|
||||
}
|
||||
|
||||
$id = $_GET["id"];
|
||||
$user_data = $DB->query("SELECT * FROM `users` WHERE `id` = $id;")->fetch();
|
||||
|
||||
if ($user_data === false) {
|
||||
error404();
|
||||
include "404.php";
|
||||
}
|
||||
|
||||
$team_data = false;
|
||||
|
|
Loading…
Reference in New Issue