Subversion Repositories Applications.papyrus

Rev

Rev 181 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6 jpm 1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 4.1                                                                                      |
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
8
// | This library is free software; you can redistribute it and/or                                        |
9
// | modify it under the terms of the GNU Lesser General Public                                           |
10
// | License as published by the Free Software Foundation; either                                         |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
12
// |                                                                                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
16
// | Lesser General Public License for more details.                                                      |
17
// |                                                                                                      |
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                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: afficheur.php,v 1.1 2004-06-16 14:35:26 jpm Exp $
23
/**
24
* Application réalisant l'affichage du contenu stocké dans Papyrus.
25
*
26
* Récupère le dernier contenu lié à un menu et le retourne.
27
*
28
*@package Afficheur
29
//Auteur original :
30
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
31
//Autres auteurs :
32
*@author        Alexandre GRANIER <alexandrel@tela-botanica.org>
33
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.1 $ $Date: 2004-06-16 14:35:26 $
35
// +------------------------------------------------------------------------------------------------------+
36
*/
37
 
38
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTÊTE du PROGRAMME                                       |
40
// +------------------------------------------------------------------------------------------------------+
41
                                    /*Mettre ici les inclusions de fichiers*/
42
 
43
 
44
// +------------------------------------------------------------------------------------------------------+
45
// |                                            CORPS du PROGRAMME                                        |
46
// +------------------------------------------------------------------------------------------------------+
47
                                       /*Mettre ici le code du programme*/
48
/** Fonction afficherContenuTete() - Fonction appelé par le gestionnaire Papyrus.
49
*
50
* Elle retourne l'entête de l'application..
51
*
52
* @return  string  du code XHTML correspondant à la zone d'entête de l'application.
53
*/
54
function afficherContenuTete()
55
{
56
    return '';
57
}
58
 
59
/** Fonction afficherContenuCorps() - Fonction appelé par le gestionnaire Papyrus.
60
*
61
* Elle retourne le contenu stocké dans Papyrus pour le menu courant demandé.
62
*
63
* @return  string  du code XHTML correspondant au contenu du menu demandé.
64
*/
65
function afficherContenuCorps()
66
{
67
    //----------------------------------------------------------------------------
68
    // Initialisation des variable
69
    global $_GEN_commun;
70
    $objet_pear_db = $_GEN_commun['pear_db'];
71
    if (isset($_GEN_commun['traduction_info_menu'])) {
72
        $id_menu_courant = $_GEN_commun['traduction_info_menu']->gm_id_menu;
73
    } else {
74
        $id_menu_courant = $_GEN_commun['info_menu']->gm_id_menu;
75
    }
76
    $retour = '';
77
    //----------------------------------------------------------------------------
78
    // Récupération du dernier contenu
79
 
80
    $requete =  'SELECT gmc_contenu '.
81
                'FROM gen_menu_contenu '.
82
                'WHERE gmc_ce_menu = '.$id_menu_courant.' '.
83
                'AND gmc_bool_dernier = 1';
84
 
85
    $resultat = $objet_pear_db->query($requete);
86
    $ligne_contenu = $resultat->fetchRow(DB_FETCHMODE_OBJECT);
87
    $retour = $ligne_contenu->gmc_contenu;
88
    (DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
89
 
90
    //----------------------------------------------------------------------------
91
    // Renvoie du contenu de la page
92
    return $retour;
93
}
94
// +------------------------------------------------------------------------------------------------------+
95
// |                                           LISTE de FONCTIONS                                         |
96
// +------------------------------------------------------------------------------------------------------+
97
                                        /*Mettre ici la liste de fonctions.*/
98
 
99
// +------------------------------------------------------------------------------------------------------+
100
// |                                            PIED du PROGRAMME                                         |
101
// +------------------------------------------------------------------------------------------------------+
102
                                           /*Partie non obligatoire*/
103
 
104
 
105
/* +--Fin du code ----------------------------------------------------------------------------------------+
106
*
107
* $Log: not supported by cvs2svn $
108
* Revision 1.12  2004/05/05 11:35:12  jpm
109
* Amélioration de la gestion de l'internationalisation.
110
*
111
* Revision 1.11  2004/05/05 06:45:40  jpm
112
* Suppression de l'appel de la fonction générant le "vous êtes ici" dans la fonction affichant l'entête de l'application.
113
*
114
* Revision 1.10  2004/05/04 16:28:22  jpm
115
* Réduction de code pour la fonction afficherContenuTete().
116
*
117
*
118
* +-- Fin du code ----------------------------------------------------------------------------------------+
119
*/
120
?>
121