Subversion Repositories ALCASAR

Compare Revisions

Regard whitespace Rev 2236 → Rev 2237

/web/error.php
1,33 → 1,34
<?php
// $Id$
 
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)); }
$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]), 0, 2));
}
if($Language == 'fr'){
switch ($e){
if ($Language === 'fr') { // French
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 />
$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/>
$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/>
$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 />
$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:
60,222 → 61,136
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/>
$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 />
$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 />
$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.";
$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";
$l_explanation = "Erreur de négociation transparent content negociation.";
break;
default:
$l_error = "null";
$l_explanation = "Non reconnu";
$l_error = "Non reconnu";
$l_explanation = "Erreur non reconnu.";
break;
}
} elseif($Language == 'en'){
} else { // English
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.";
$l_error = "Error 400";
$l_explanation = "The HTTP request could not be understood by the server due to malformed syntax.<br>
The web browser may be too recent, or the HTTP server may be too old.";
break;
case 401:
$l_error = "Erreur 401";
$l_explanation = "The request requires user authentication.<br /
$l_error = "Error 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 />
$l_error = "Error 403";
$l_explanation = "The 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 />
$l_error = "Error 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_error = "Error 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_error = "Error 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_error = "Error 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";
$lerror = "Error 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_error = "Error 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_error = "Error 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_error = "Error 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 />
$l_error = "Error 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 />
$l_error = "Error 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 />
$l_error = "Error 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 />
$l_error = "Error 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_error = "Error 506";
$l_explanation = "Transparent content negotiation for the request results in a circular reference.";
break;
default:
$l_error = "null";
$l_explanation = "Unknown";
$l_error = "Unknown";
$l_explanation = "Unknown error.";
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";
 
// Cleaning the cache
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!DOCTYPE html>
<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">
<meta charset="UTF-8">
<title>ALCASAR - <?= $l_error; ?></title>
<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 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>
 
<div id="contenu_error">
<?php
echo $l_explanation;
?>
<?= $l_explanation ?>
</div>
</body>
</html>
Property changes:
Added: svn:keywords
+Id
\ No newline at end of property