forked from rebillar/site-accueil-insa
Added error pages
This commit is contained in:
parent
090e57dad5
commit
779d799bdd
2 changed files with 46 additions and 0 deletions
25
errors/401.php
Normal file
25
errors/401.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
ob_start(); // Start reading html
|
||||
$relativePath = "../";
|
||||
|
||||
?>
|
||||
<div class="inner">
|
||||
<h1>Acces non autorise</h1>
|
||||
<h2>Erreur 401</h2>
|
||||
|
||||
<p>
|
||||
Vous n'avez pas le droit d'accéder à cette page
|
||||
</p>
|
||||
|
||||
<a href="<?= $relativePath ?>index.php" class="website-back-button">
|
||||
Retour sur le site
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$pageContent = ob_get_clean(); // Store html content in variable
|
||||
$pageTitle = "Erreur 401";
|
||||
|
||||
include($relativePath . "includes/template.php"); // Display template with variable content
|
||||
|
||||
?>
|
21
errors/404.php
Normal file
21
errors/404.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
ob_start(); // Start reading html
|
||||
$relativePath = "../";
|
||||
|
||||
?>
|
||||
<div class="inner">
|
||||
<h1>Page non trouvee</h1>
|
||||
<h2>Erreur 404</h2>
|
||||
|
||||
<a href="<?= $relativePath ?>index.php" class="website-back-button">
|
||||
Retour sur le site
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$pageContent = ob_get_clean(); // Store html content in variable
|
||||
$pageTitle = "Erreur 404";
|
||||
|
||||
include($relativePath . "includes/template.php"); // Display template with variable content
|
||||
|
||||
?>
|
Loading…
Reference in a new issue