Subversion Repositories Applications.papyrus

Rev

Rev 1041 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1041 Rev 1339
Line 19... Line 19...
19
// |                                                                                                      |
19
// |                                                                                                      |
20
// | You should have received a copy of the GNU General Public License                                    |
20
// | You should have received a copy of the GNU General Public License                                    |
21
// | along with Foobar; if not, write to the Free Software                                                |
21
// | along with Foobar; if not, write to the Free Software                                                |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
23
// +------------------------------------------------------------------------------------------------------+
23
// +------------------------------------------------------------------------------------------------------+
24
// CVS : $Id: erreur_http.php,v 1.2 2006-10-26 16:29:52 jp_milcent Exp $
24
// CVS : $Id: erreur_http.php,v 1.3 2007-04-19 16:53:20 neiluj Exp $
25
/**
25
/**
26
* Gestion des erreurs HTTP
26
* Gestion des erreurs HTTP
27
*
27
*
28
* Permet d'afficher les pages d'erreur HTTP présentes dans Papyrus
28
* Permet d'afficher les pages d'erreur HTTP présentes dans Papyrus
29
*
29
*
Line 31... Line 31...
31
//Auteur original :
31
//Auteur original :
32
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
32
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
33
//Autres auteurs :
33
//Autres auteurs :
34
*@author        Aucun
34
*@author        Aucun
35
*@copyright     Tela-Botanica 2000-2005
35
*@copyright     Tela-Botanica 2000-2005
36
*@version       $Revision: 1.2 $ $Date: 2006-10-26 16:29:52 $
36
*@version       $Revision: 1.3 $ $Date: 2007-04-19 16:53:20 $
37
// +------------------------------------------------------------------------------------------------------+
37
// +------------------------------------------------------------------------------------------------------+
38
*/
38
*/
Line 39... Line 39...
39
 
39
 
40
// +------------------------------------------------------------------------------------------------------+
40
// +------------------------------------------------------------------------------------------------------+
41
// |                                            ENTETE du PROGRAMME                                       |
41
// |                                            ENTETE du PROGRAMME                                       |
42
// +------------------------------------------------------------------------------------------------------+
42
// +------------------------------------------------------------------------------------------------------+
43
// Définission de constantes
43
// Définition de constantes
44
/** Chemin et nom du fichier de configuration principal de Papyrus.*/
44
/** Chemin et nom du fichier de configuration principal de Papyrus.*/
45
define('PAP_FICHIER_CONFIG', 'papyrus/configuration/pap_config.inc.php');
45
define('PAP_FICHIER_CONFIG', 'papyrus/configuration/pap_config.inc.php');
46
/** Chemin et nom du fichier de configuration avancée de Papyrus.*/
46
/** Chemin et nom du fichier de configuration avancée de Papyrus.*/
47
define('PAP_FICHIER_CONFIG_AVANCEE', 'papyrus/configuration/pap_config_avancee.inc.php');
47
define('PAP_FICHIER_CONFIG_AVANCEE', 'papyrus/configuration/pap_config_avancee.inc.php');
Line 79... Line 79...
79
$aso_i18n_possible = array(GEN_I18N_ID_DEFAUT => true);
79
$aso_i18n_possible = array(GEN_I18N_ID_DEFAUT => true);
80
$i18n = HTTP::negotiateLanguage($aso_i18n_possible, GEN_I18N_ID_DEFAUT);
80
$i18n = HTTP::negotiateLanguage($aso_i18n_possible, GEN_I18N_ID_DEFAUT);
81
// Redirection vers le fichier erreur de Papyrus s'il existe
81
// Redirection vers le fichier erreur de Papyrus s'il existe
82
$fichier_erreur = sprintf(PAP_FICHIER_ERREUR_HTTP, $i18n, $_GET['erreur']);
82
$fichier_erreur = sprintf(PAP_FICHIER_ERREUR_HTTP, $i18n, $_GET['erreur']);
83
if (file_exists($fichier_erreur)) {
83
if (file_exists($fichier_erreur)) {
84
    header ('Location: '.sprintf(PAP_URL_ERREUR_HTTP, $i18n, $_GET['erreur'], $_SERVER['REQUEST_URI']));
84
    header ('Location: '.dirname(PAP_URL).sprintf(PAP_URL_ERREUR_HTTP, $i18n, $_GET['erreur'], $_SERVER['REQUEST_URI']));
85
} else {
85
} else {
86
    echo 	'ERREUR Papyrus : Impossible de trouver le fichier de l\'erreur '.$_GET['erreur'].'<br />'.
86
    echo 	'ERREUR Papyrus : Impossible de trouver le fichier de l\'erreur '.$_GET['erreur'].'<br />'.
87
			'Chemin fichier erreur : '.$fichier_erreur.' <br />'.
87
			'Chemin fichier erreur : '.$fichier_erreur.' <br />'.
88
			'Veuillez le créer ou supprimer l\'entrée correspondante dans le fichier .htaccess.<br />'.
88
			'Veuillez le créer ou supprimer l\'entrée correspondante dans le fichier .htaccess.<br />'.
89
			'Ligne n° : '. __LINE__ .'<br />'.
89
			'Ligne n° : '. __LINE__ .'<br />'.
Line 92... Line 92...
92
exit(0);
92
exit(0);
Line 93... Line 93...
93
 
93
 
94
/* +--Fin du code ----------------------------------------------------------------------------------------+
94
/* +--Fin du code ----------------------------------------------------------------------------------------+
95
*
95
*
-
 
96
* $Log: not supported by cvs2svn $
-
 
97
* Revision 1.2  2006/10/26 16:29:52  jp_milcent
-
 
98
* Correction erreur redirection en boucle.
96
* $Log: not supported by cvs2svn $
99
*
97
* Revision 1.1  2006/10/18 10:18:05  jp_milcent
100
* Revision 1.1  2006/10/18 10:18:05  jp_milcent
98
* Gestion des erreurs HTTP par Papyrus.
101
* Gestion des erreurs HTTP par Papyrus.
99
*
102
*
100
* Revision 1.5  2006/10/18 09:27:32  jp_milcent
103
* Revision 1.5  2006/10/18 09:27:32  jp_milcent