New file |
0,0 → 1,121 |
<?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: afficheur.php,v 1.1 2004-06-16 14:35:26 jpm Exp $ |
/** |
* Application réalisant l'affichage du contenu stocké dans Papyrus. |
* |
* Récupère le dernier contenu lié à un menu et le retourne. |
* |
*@package Afficheur |
//Auteur original : |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
//Autres auteurs : |
*@author Alexandre GRANIER <alexandrel@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.1 $ $Date: 2004-06-16 14:35:26 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
// +------------------------------------------------------------------------------------------------------+ |
// | ENTÊTE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/*Mettre ici les inclusions de fichiers*/ |
|
|
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/*Mettre ici le code du programme*/ |
/** Fonction afficherContenuTete() - Fonction appelé par le gestionnaire Papyrus. |
* |
* Elle retourne l'entête de l'application.. |
* |
* @return string du code XHTML correspondant à la zone d'entête de l'application. |
*/ |
function afficherContenuTete() |
{ |
return ''; |
} |
|
/** Fonction afficherContenuCorps() - Fonction appelé par le gestionnaire Papyrus. |
* |
* Elle retourne le contenu stocké dans Papyrus pour le menu courant demandé. |
* |
* @return string du code XHTML correspondant au contenu du menu demandé. |
*/ |
function afficherContenuCorps() |
{ |
//---------------------------------------------------------------------------- |
// Initialisation des variable |
global $_GEN_commun; |
$objet_pear_db = $_GEN_commun['pear_db']; |
if (isset($_GEN_commun['traduction_info_menu'])) { |
$id_menu_courant = $_GEN_commun['traduction_info_menu']->gm_id_menu; |
} else { |
$id_menu_courant = $_GEN_commun['info_menu']->gm_id_menu; |
} |
$retour = ''; |
//---------------------------------------------------------------------------- |
// Récupération du dernier contenu |
|
$requete = 'SELECT gmc_contenu '. |
'FROM gen_menu_contenu '. |
'WHERE gmc_ce_menu = '.$id_menu_courant.' '. |
'AND gmc_bool_dernier = 1'; |
|
$resultat = $objet_pear_db->query($requete); |
$ligne_contenu = $resultat->fetchRow(DB_FETCHMODE_OBJECT); |
$retour = $ligne_contenu->gmc_contenu; |
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : ''; |
|
//---------------------------------------------------------------------------- |
// Renvoie du contenu de la page |
return $retour; |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
/*Mettre ici la liste de fonctions.*/ |
|
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/*Partie non obligatoire*/ |
|
|
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.12 2004/05/05 11:35:12 jpm |
* Amélioration de la gestion de l'internationalisation. |
* |
* Revision 1.11 2004/05/05 06:45:40 jpm |
* Suppression de l'appel de la fonction générant le "vous êtes ici" dans la fonction affichant l'entête de l'application. |
* |
* Revision 1.10 2004/05/04 16:28:22 jpm |
* Réduction de code pour la fonction afficherContenuTete(). |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
|