Subversion Repositories Applications.papyrus

Rev

Rev 1489 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1489 Rev 2150
1
<?php
1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +------------------------------------------------------------------------------------------------------+
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 4.1                                                                                      |
4
// | PHP version 4.1                                                                                      |
5
// +------------------------------------------------------------------------------------------------------+
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
7
// +------------------------------------------------------------------------------------------------------+
8
// | This library is free software; you can redistribute it and/or                                        |
8
// | This library is free software; you can redistribute it and/or                                        |
9
// | modify it under the terms of the GNU Lesser General Public                                           |
9
// | modify it under the terms of the GNU Lesser General Public                                           |
10
// | License as published by the Free Software Foundation; either                                         |
10
// | License as published by the Free Software Foundation; either                                         |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
12
// |                                                                                                      |
12
// |                                                                                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
16
// | Lesser General Public License for more details.                                                      |
16
// | Lesser General Public License for more details.                                                      |
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
19
// | License along with this library; if not, write to the Free Software                                  |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: pap_envoi.inc.php,v 1.11 2007-06-25 15:44:32 jp_milcent Exp $
22
// CVS : $Id: pap_envoi.inc.php,v 1.11 2007-06-25 15:44:32 jp_milcent Exp $
23
/**
23
/**
24
* Gestion de l'envoie des pages à afficher.
24
* Gestion de l'envoie des pages à afficher.
25
*
25
*
26
* Ce fichier envoi les données en les compressant si possible.
26
* Ce fichier envoi les données en les compressant si possible.
27
*
27
*
28
*@package Papyrus
28
*@package Papyrus
29
//Auteur original :
29
//Auteur original :
30
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
30
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
31
//Autres auteurs :
31
//Autres auteurs :
32
*@author        Laurent COUDOUNEAU <lc@gsite.org>
32
*@author        Laurent COUDOUNEAU <lc@gsite.org>
33
*@copyright     Tela-Botanica 2000-2004
33
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.11 $ $Date: 2007-06-25 15:44:32 $
34
*@version       $Revision: 1.11 $ $Date: 2007-06-25 15:44:32 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
37
 
37
 
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTÊTE du PROGRAMME                                       |
39
// |                                            ENTÊTE du PROGRAMME                                       |
40
// +------------------------------------------------------------------------------------------------------+
40
// +------------------------------------------------------------------------------------------------------+
41
 
41
 
42
function pap_compress_sortie($output) {
42
function pap_compress_sortie($output) {
43
	return gzencode($output);
43
	return gzencode($output);
44
}
44
}
45
 
45
 
46
// Nous vérifions si le navigateur supporte la compression, HTTP_ACCEPT_ENCODING
46
// Nous vérifions si le navigateur supporte la compression, HTTP_ACCEPT_ENCODING
47
if (strstr ($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
47
if (strstr ($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
48
	// Nous mettons en buffer la sortie et nous demandons l'appel de la fonction de compression (voir ci-dessus)
48
	// Nous mettons en buffer la sortie et nous demandons l'appel de la fonction de compression (voir ci-dessus)
49
	ob_start ('pap_compress_sortie');
49
	ob_start ('pap_compress_sortie');
50
	// Nous prévenons le navigateur que le contenu est compressé avec gzip
50
	// Nous prévenons le navigateur que le contenu est compressé avec gzip
51
	header ('Content-Encoding: gzip');
51
	header ('Content-Encoding: gzip');
52
}
52
}
53
 
53
 
54
echo($GLOBALS['_GEN_commun']['sortie']);
54
echo($GLOBALS['_GEN_commun']['sortie']);
55
 
55
 
56
/* +--Fin du code ----------------------------------------------------------------------------------------+
56
/* +--Fin du code ----------------------------------------------------------------------------------------+
57
*
57
*
58
* $Log: not supported by cvs2svn $
58
* $Log: pap_envoi.inc.php,v $
-
 
59
* Revision 1.11  2007-06-25 15:44:32  jp_milcent
-
 
60
* Traduction des commentaires et mise en forme du code.
-
 
61
*
59
* Revision 1.10  2007-04-13 09:41:09  neiluj
62
* Revision 1.10  2007-04-13 09:41:09  neiluj
60
* réparration cvs
63
* réparration cvs
61
*
64
*
62
* Revision 1.9  2006/06/08 09:00:06  ddelon
65
* Revision 1.9  2006/06/08 09:00:06  ddelon
63
* Bug affichage wikini
66
* Bug affichage wikini
64
*
67
*
65
* Revision 1.8  2006/05/10 16:02:49  ddelon
68
* Revision 1.8  2006/05/10 16:02:49  ddelon
66
* Finition multilinguise et schizo flo
69
* Finition multilinguise et schizo flo
67
*
70
*
68
* Revision 1.7  2006/01/12 16:37:01  ddelon
71
* Revision 1.7  2006/01/12 16:37:01  ddelon
69
* compression N**t*n
72
* compression N**t*n
70
*
73
*
71
* Revision 1.6  2005/12/09 16:01:53  ddelon
74
* Revision 1.6  2005/12/09 16:01:53  ddelon
72
* retablissement compression
75
* retablissement compression
73
*
76
*
74
* Revision 1.5  2005/11/25 14:33:08  ddelon
77
* Revision 1.5  2005/11/25 14:33:08  ddelon
75
* desactivation compression
78
* desactivation compression
76
*
79
*
77
* Revision 1.4  2005/02/28 11:20:42  jpm
80
* Revision 1.4  2005/02/28 11:20:42  jpm
78
* Modification des auteurs.
81
* Modification des auteurs.
79
*
82
*
80
* Revision 1.3  2004/10/15 18:29:19  jpm
83
* Revision 1.3  2004/10/15 18:29:19  jpm
81
* Modif pour gérer l'appli installateur de Papyrus.
84
* Modif pour gérer l'appli installateur de Papyrus.
82
*
85
*
83
* Revision 1.2  2004/06/16 15:07:56  jpm
86
* Revision 1.2  2004/06/16 15:07:56  jpm
84
* Correction d'un chemin et nom de fichier.
87
* Correction d'un chemin et nom de fichier.
85
*
88
*
86
* Revision 1.1  2004/06/16 08:11:37  jpm
89
* Revision 1.1  2004/06/16 08:11:37  jpm
87
* Changement de nom de Génésia en Papyrus.
90
* Changement de nom de Génésia en Papyrus.
88
* Changement de l'arborescence.
91
* Changement de l'arborescence.
89
*
92
*
90
* Revision 1.3  2004/04/28 12:04:31  jpm
93
* Revision 1.3  2004/04/28 12:04:31  jpm
91
* Changement du modèle de la base de données.
94
* Changement du modèle de la base de données.
92
*
95
*
93
* Revision 1.2  2004/04/22 08:31:43  jpm
96
* Revision 1.2  2004/04/22 08:31:43  jpm
94
* Transformation de $GS_GLOBAL en $_GEN_commun.
97
* Transformation de $GS_GLOBAL en $_GEN_commun.
95
*
98
*
96
* Revision 1.1  2004/04/09 16:19:23  jpm
99
* Revision 1.1  2004/04/09 16:19:23  jpm
97
* Ajout du fichier indépendant d'envoi avec gestion des tables i18n.
100
* Ajout du fichier indépendant d'envoi avec gestion des tables i18n.
98
*
101
*
99
*
102
*
100
* +-- Fin du code ----------------------------------------------------------------------------------------+
103
* +-- Fin du code ----------------------------------------------------------------------------------------+
101
*/
104
*/
102
?>
105
?>