Blame | Last modification | View Log
<?php
if(isset($_GET['error'])){
$e = $_GET['error'];
# Choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
switch ($e){
case 400:
$l_error = "Erreur 400";
$l_explanation = "La requête HTTP n'a pas pu être comprise par le serveur en raison d'une syntaxe erronée.<br />
Le problème peut provenir d'un navigateur web trop récent ou d'un serveur HTTP trop ancien.";
break;
case 401:
$l_error = "Erreur 401";
$l_explanation = "La requête nécessite une identification de l'utilisateur.<br/>
Concrètement, cela signifie que tout ou partie du serveur contacté est protégé par un mot de passe, qu'il faut indiquer au serveur pour pouvoir accéder à son contenu.";
break;
case 403:
$l_error = "Erreur 403";
$l_explanation = "Le serveur HTTP a compris la requête, mais refuse de la traiter.<br/>
Ce code est généralement utilisé lorsqu'un serveur ne souhaite pas indiquer pourquoi la requête a été rejetée, ou lorsque aucune autre réponse ne correspond (par exemple le serveur est un Intranet et seules les machines du réseau local sont autorisées à se connecter au serveur).";
break;
case 404:
$l_error = "Erreur 404";
$l_explanation = "Le serveur n'a rien trouvé qui corresponde à l'adresse (URI) demandée ( non trouvé ).<br />
Cela signifie que l'URL que vous avez tapée ou cliquée est mauvaise ou obsolète et ne correspond à aucun document existant sur le serveur (vous pouvez essayez de supprimer progressivement les composants de l'URL en partant de la fin pour éventuellement retrouver un chemin d'accès existant).";
break;
case 405:
$l_error = "Erreur 405";
$l_explanation = "Ce code indique que la méthode utilisée par le client n'est pas supportée pour cet URI.";
break;
case 408:
$l_error = "Erreur 408";
$l_explanation = "Le client n'a pas présenté une requête complète pendant le délai maximal qui lui était imparti, et le serveur a abandonné la connexion.";
break;
case 410:
$l_error = "Erreur 410";
$l_explanation = "L'adresse (URI) demandée n'existe plus et a été définitivement supprimée du serveur.";
break;
case 411:
$lerror = "Erreur 411";
$l_explanation = "Le serveur a besoin de connaître la taille de cette requête pour pouvoir y répondre.";
break;
case 413:
$l_error = "Erreur 413";
$l_explanation = "Le serveur ne peut traiter la requête car la taille de son contenu est trop importante.";
break;
case 414:
$l_error = "Erreur 414";
$l_explanation = "Le serveur ne peut traiter la requête car la taille de l'objet (URI) a retourner est trop importante.";
break;
case 415:
$l_error = "Erreur 415";
$l_explanation = "Le serveur ne peut traiter la requête car son contenu est écrit dans un format non supporté.";
break;
case 500:
$l_error = "Erreur 500";
$l_explanation = "Le serveur HTTP a rencontré une condition inattendue qui l'a empêché de traiter la requête.<br/>
Cette erreur peut par exemple être le résultat d'une mauvaise configuration du serveur, ou d'une ressource épuisée ou refusée au serveur sur la machine hôte.";
break;
case 501:
$l_error = "Erreur 501";
$l_explanation = "Le serveur HTTP ne supporte pas la fonctionnalité nécessaire pour traiter la requête.<br />
C'est la réponse émise lorsque le serveur ne reconnaît pas la méthode indiquée dans la requête et n'est capable de la mettre en oeuvre pour aucune ressource (soit le navigateur web est trop récent, soit le serveur HTTP est trop ancien).";
break;
case 502:
$l_error = "Erreur 502";
$l_explanation = "Le serveur intermédiaire a fourni une réponse invalide.<br />
Le serveur HTTP a agi en tant qu'intermédiaire (passerelle ou proxy) avec un autre serveur, et a reçu de ce dernier une réponse invalide en essayant de traiter la requête.";
break;
case 503:
$l_error = "Erreur 503";
$l_explanation = "Le serveur HTTP est actuellement incapable de traiter la requête en raison d'une surcharge temporaire ou d'une opération de maintenance.<br /> Cela sous-entend l'existence d'une condition temporaire qui sera levée après un certain délai.";
break;
case 506:
$l_error = "Erreur 506";
$l_explanation = "Erreur de négociation transparent content negociation";
break;
default:
$l_error = "null";
$l_explanation = "Non reconnu";
break;
}
} elseif($Language == 'en'){
switch ($_GET['error']){
case 400:
$l_error = "Erreur 400";
$l_explanation = "La requête HTTP n'a pas pu être comprise par le serveur en raison d'une syntaxe erronée.<br />
Le problème peut provenir d'un navigateur web trop récent ou d'un serveur HTTP trop ancien.";
break;
case 401:
$l_error = "Erreur 401";
$l_explanation = "The request requires user authentication.<br /
This means that all or a part of the requested server is protected by a password that should be given to the server to allow access to its contents.";
break;
case 403:
$l_error = "Erreur 403";
$l_explanation = "he HTTP server understood the request, but is refusing to fulfill it.<br />
This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable (for example the server is an Intranet and only the LAN machines are authorized to connect).";
break;
case 404:
$l_error = "Erreur 404";
$l_explanation = "The server has not found anything matching the requested address (URI) ( not found ).<br />
This means the URL you have typed or cliked on is wrong or obsolete and does not match any document existing on the server (you may try to gradualy remove the URL components from the right to the left to eventualy retrieve an existing path).";
break;
case 405:
$l_error = "Erreur 405";
$l_explanation = "This code is given with the Allow header and indicates that the method used by the client is not supported for this URI.";
break;
case 408:
$l_error = "Erreur 408";
$l_explanation = "This response code means the client did not produce a full request within some predetermined time (usually specified in the server's configuration), and the server is disconnecting the network connection.";
break;
case 410:
$l_error = "Erreur 410";
$l_explanation = "This code indicates that the requested URI no longer exists and has been permanently removed from the server.";
break;
case 411:
$lerror = "Erreur 411";
$l_explanation = "The server will not accept the request without a Content-Length header supplied in the request.";
break;
case 413:
$l_error = "Erreur 413";
$l_explanation = "The server will not process the request because its entity body is too large.";
break;
case 414:
$l_error = "Erreur 414";
$l_explanation = "The server will not process the request because its request URI is too large.";
break;
case 415:
$l_error = "Erreur 415";
$l_explanation = "The server will not process the request because its entity body is in an unsupported format.";
break;
case 500:
$l_error = "Erreur 500";
$l_explanation = "The HTTP server encountered an unexpected condition which prevented it from fulfilling the request.<br />
For example this error can be caused by a serveur misconfiguration, or a resource exhausted or denied to the server on the host machine.";
break;
case 501:
$l_error = "Erreur 501";
$l_explanation = "The HTTP server does not support the functionality required to fulfill the request.<br />
This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource (either the web browser is too recent, or the HTTP server is too old).";
break;
case 502:
$l_error = "Erreur 502";
$l_explanation = "The gateway server returned an invalid response.<br />
The HTTP server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.";
break;
case 503:
$l_error = "Erreur 503";
$l_explanation = "The HTTP server is currently unable to handle the request due to a temporary overloading or maintenance of the server.<br />
The implication is that this is a temporary condition which will be alleviated after some delay.";
break;
case 506:
$l_error = "Erreur 506";
$l_explanation = "Transparent content negotiation for the request results in a circular reference.";
break;
default:
$l_error = "null";
$l_explanation = "Unknown";
break;
}
} else {
switch ($_GET['error']){
case 400:
$l_error = "Erreur 400";
$l_explanation = "La requête HTTP n'a pas pu être comprise par le serveur en raison d'une syntaxe erronée.<br />
Le problème peut provenir d'un navigateur web trop récent ou d'un serveur HTTP trop ancien.";
break;
case 401:
$l_error = "Erreur 401";
$l_explanation = "The request requires user authentication.<br /
This means that all or a part of the requested server is protected by a password that should be given to the server to allow access to its contents.";
break;
case 403:
$l_error = "Erreur 403";
$l_explanation = "he HTTP server understood the request, but is refusing to fulfill it.<br />
This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable (for example the server is an Intranet and only the LAN machines are authorized to connect).";
break;
case 404:
$l_error = "Erreur 404";
$l_explanation = "The server has not found anything matching the requested address (URI) ( not found ).<br />
This means the URL you have typed or cliked on is wrong or obsolete and does not match any document existing on the server (you may try to gradualy remove the URL components from the right to the left to eventualy retrieve an existing path).";
break;
case 405:
$l_error = "Erreur 405";
$l_explanation = "This code is given with the Allow header and indicates that the method used by the client is not supported for this URI.";
break;
case 408:
$l_error = "Erreur 408";
$l_explanation = "This response code means the client did not produce a full request within some predetermined time (usually specified in the server's configuration), and the server is disconnecting the network connection.";
break;
case 410:
$l_error = "Erreur 410";
$l_explanation = "This code indicates that the requested URI no longer exists and has been permanently removed from the server.";
break;
case 411:
$lerror = "Erreur 411";
$l_explanation = "The server will not accept the request without a Content-Length header supplied in the request.";
break;
case 413:
$l_error = "Erreur 413";
$l_explanation = "The server will not process the request because its entity body is too large.";
break;
case 414:
$l_error = "Erreur 414";
$l_explanation = "The server will not process the request because its request URI is too large.";
break;
case 415:
$l_error = "Erreur 415";
$l_explanation = "The server will not process the request because its entity body is in an unsupported format.";
break;
case 500:
$l_error = "Erreur 500";
$l_explanation = "The HTTP server encountered an unexpected condition which prevented it from fulfilling the request.<br />
For example this error can be caused by a serveur misconfiguration, or a resource exhausted or denied to the server on the host machine.";
break;
case 501:
$l_error = "Erreur 501";
$l_explanation = "The HTTP server does not support the functionality required to fulfill the request.<br />
This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource (either the web browser is too recent, or the HTTP server is too old).";
break;
case 502:
$l_error = "Erreur 502";
$l_explanation = "The gateway server returned an invalid response.<br />
The HTTP server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.";
break;
case 503:
$l_error = "Erreur 503";
$l_explanation = "The HTTP server is currently unable to handle the request due to a temporary overloading or maintenance of the server.<br />
The implication is that this is a temporary condition which will be alleviated after some delay.";
break;
case 506:
$l_error = "Erreur 506";
$l_explanation = "Transparent content negotiation for the request results in a circular reference.";
break;
default:
$l_error = "null";
$l_explanation = "Unknown";
break;
}
}
}
$l_title = "Error page";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ALCASAR - <?php echo $l_error; ?></title>
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
<link rel="stylesheet" type="text/css" href="css/style_intercept.css">
<script type="text/javascript">
</script>
</head>
<body>
<?php
echo" <div id=\"cadre_titre\" class=\"titre_refus\">
<p id=\"acces_controle\" class=\"titre_refus\">$l_error</p>";
?>
<div id="boite_logo">
<img src="images/organisme.png">
</div>
</div>
<div id="contenu_error">
<?php
echo $l_explanation;
?>
</div>
</body>
</html>