-
Notifications
You must be signed in to change notification settings - Fork 3
/
error.php
40 lines (40 loc) · 1.2 KB
/
error.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
require('src/inc/functions.php');
$error = 404;
if (!empty($_GET['e']) && is_numeric($_GET['e']) && $_GET['e'] >= 400 && $_GET['e'] <= 527) $error = $_GET['e'];
$message;
switch ($error) {
case 403:
$message = 'Accès refusé';
break;
case 400:
$message = 'Syntaxe erronnée';
break;
default:
$message = 'Ressource non trouvée';
break;
}
$title = ' Erreur ' . $error . ' - Netron';
include('src/template/header.php');
?>
<section id="error">
<div class="container ">
<div class="error-content">
<div class="error-text">
<h1 class="error-txt"><?= $error ?></h1>
<p class="error-txt"><?= $message ?></p>
</div>
<?php if ($error == 404) : ?>
<div class="error-image">
<img class="error-img" src="assets/img/error_404.svg" alt="erreur">
</div>
<?php else : ?>
<div class="error-image">
<img class="error-img" src="assets/img/undraw_warning.svg" alt="erreur">
</div>
<?php endif; ?>
</div>
</div>
</section>
<?php
include('src/template/footer.php');