Subversion Repositories Applications.papyrus

Rev

Rev 286 | Rev 656 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1                                                                                      |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or                                        |
// | modify it under the terms of the GNU Lesser General Public                                           |
// | License as published by the Free Software Foundation; either                                         |
// | version 2.1 of the License, or (at your option) any later version.                                   |
// |                                                                                                      |
// | This library is distributed in the hope that it will be useful,                                      |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
// | Lesser General Public License for more details.                                                      |
// |                                                                                                      |
// | You should have received a copy of the GNU Lesser General Public                                     |
// | License along with this library; if not, write to the Free Software                                  |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: pap_envoi.inc.php,v 1.5 2005-11-25 14:33:08 ddelon Exp $
/**
* Gestion de l'envoie des pages à afficher.
*
* Ce fichier envoi les données en les compressant si possible.
*
*@package Papyrus
//Auteur original :
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author        Laurent COUDOUNEAU <lc@gsite.org>
*@copyright     Tela-Botanica 2000-2004
*@version       $Revision: 1.5 $ $Date: 2005-11-25 14:33:08 $
// +------------------------------------------------------------------------------------------------------+
*/

// +------------------------------------------------------------------------------------------------------+
// |                                            ENTÊTE du PROGRAMME                                       |
// +------------------------------------------------------------------------------------------------------+

/** <BR> Inclusion de la bibliothèque de fonctions de compression des données à envoyer.*/
include_once GEN_CHEMIN_BIBLIO.'pap_compression.fonct.php';

// +------------------------------------------------------------------------------------------------------+
// |                                            CORPS du PROGRAMME                                        |
// +------------------------------------------------------------------------------------------------------+
/*
$page_gzippe = GEN_compresserDonneesZLIB($_GEN_commun['sortie']);
// Nous mettons à jour le cache
if (!empty($_GEN_commun['info_application']) && $_GEN_commun['info_application']->cache) {
    // Mise en cache de la page demandée
    if ( ($page_gzippe != false) ) {
        $contenu_en_cache = (empty($page_gzippe)) ? $_GEN_commun['sortie'] : $page_gzippe;
        $requete =  'INSERT INTO gen_page_cache '.
                    'SET    gpc_id_md5_url = "'.GEN_donnerMD5UriPostSession().'", '.
                    '       gpc_ce_site = '.$_GEN_commun['site_info']->gsi_id_site.', '.
                    '       gpc_ce_i18n = "'.$_GEN_commun['site_info']->gsi_id_i18n.'", '.
                    '       gpc_corps = "'.mysql_escape_string($contenu_en_cache).'", '.
                    '       gpc_date_heure = NOW(), '.
                    '       gpc_taille = '.strlen($_GEN_commun['sortie']).', '.
                    '       gpc_gz_taille = '.strlen($contenu_en_cache);

        $resultat = $db->query($requete);
        (DB::isError($resultat))
            ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete))
            : '';
    }
}
// Si les données sont compréssées, nous essayons de réaliser un envoi au client.
if (!empty($page_gzippe)) {
    if (GEN_envoyerDonneesCompressees($page_gzippe)) {
        exit();
    }
}
*/
// La compression ne fonctionne pas ou les données ne sont pas compressées,
// nous envoyons directement la page.
echo($_GEN_commun['sortie']);

/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4  2005/02/28 11:20:42  jpm
* Modification des auteurs.
*
* Revision 1.3  2004/10/15 18:29:19  jpm
* Modif pour gérer l'appli installateur de Papyrus.
*
* Revision 1.2  2004/06/16 15:07:56  jpm
* Correction d'un chemin et nom de fichier.
*
* Revision 1.1  2004/06/16 08:11:37  jpm
* Changement de nom de Génésia en Papyrus.
* Changement de l'arborescence.
*
* Revision 1.3  2004/04/28 12:04:31  jpm
* Changement du modèle de la base de données.
*
* Revision 1.2  2004/04/22 08:31:43  jpm
* Transformation de $GS_GLOBAL en $_GEN_commun.
*
* Revision 1.1  2004/04/09 16:19:23  jpm
* Ajout du fichier indépendant d'envoi avec gestion des tables i18n.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>