Rev 959 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php/*vim: set expandtab tabstop=4 shiftwidth=4: */// +------------------------------------------------------------------------------------------------------+// | PHP version 5.1 |// +------------------------------------------------------------------------------------------------------+// | Copyright (C) 1999-2006 Tela Botanica (accueil@tela-botanica.org) |// +------------------------------------------------------------------------------------------------------+// | This file is part of papyrus_bp. |// | |// | Foobar is free software; you can redistribute it and/or modify |// | it under the terms of the GNU General Public License as published by |// | the Free Software Foundation; either version 2 of the License, or |// | (at your option) any later version. |// | |// | Foobar 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 General Public License for more details. |// | |// | You should have received a copy of the GNU General Public License |// | along with Foobar; if not, write to the Free Software |// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |// +------------------------------------------------------------------------------------------------------+// CVS : $Id: syndication.php,v 1.11 2008-10-29 15:55:56 alexandre_tb Exp $/*** papyrus_bp - syndication.php** Description :**@package papyrus_bp//Auteur original :*@author Grégoire Duché <gregoire@tela-botanica.org>//Autres auteurs :*@author Aucun*@copyright Tela-Botanica 1999-2010*@version $Revision: 0.01 $ $Date: 2008-10-29 15:55:56 $// +------------------------------------------------------------------------------------------------------+*/// +------------------------------------------------------------------------------------------------------+// | ENTÊTE du PROGRAMME |// +------------------------------------------------------------------------------------------------------+$GLOBALS['_GEN_commun']['info_applette_nom_fonction'] = 'afficherRechercheEvenement';$GLOBALS['_GEN_commun']['info_applette_balise'] = '\{\{[Rr]echercheEvenements'.'(?:\s*'.'(?:'.'(url="[^"]*")|'.'(titre="[^"]*")|'.'(nb="?\d+"?)|'.'(tailledesc="?\d+"?)|'.'(id="[^"]*")|'.'(nbmax="?\d+"?)|'.'(nouvellefenetre="?(?:0|1)"?)|'.'(formatdate="[^"]*")|'.'(formatdatepro="[^"]*")|'.'(template=".*")|'.')'.')+'.'\s*\}\}';// +------------------------------------------------------------------------------------------------------+/** Inclusion du fichier de configuration de cette application.*/require_once GEN_CHEMIN_CLIENT.'recherche_evenements'.GEN_SEP.'configuration'.GEN_SEP.'recherche_evenement_config.inc.php';// Inclusion des fichiers de traduction de l'applette SYND de Papyrusif (file_exists(R_EVTS_CHEMIN_LANGUE.'synd_langue_'.$GLOBALS['_GEN_commun']['i18n'].'.inc.php')) {/** Inclusion du fichier de traduction suite à la transaction avec le navigateur.*/require_once R_EVTS_CHEMIN_LANGUE.'synd_langue_'.$GLOBALS['_GEN_commun']['i18n'].'.inc.php';} else {/** Inclusion du fichier de traduction par défaut.*/require_once R_EVTS_CHEMIN_LANGUE.'synd_langue_'.SYND_I18N_DEFAUT.'.inc.php';}// +------------------------------------------------------------------------------------------------------+// | CORPS du PROGRAMME |// +------------------------------------------------------------------------------------------------------+/** Fonction afficherRechercheEvenement() - Affiche un formulaire renvoyant vers** Cette fonction retourne la liste des pages des sites syndiqués.** @param array contient les arguments de la fonction.* @param array tableau global de Papyrus.* @return string XHTML le formulaire de recherche dans Bazar.*/function afficherRechercheEvenement($tab_applette_arguments, $_GEN_commun){// Initialisation des variables$sortie = '';$string_arguments = "";//+----------------------------------------------------------------------------------------------------------------+// Gestion des arguments$balise = $tab_applette_arguments[0];$tab_arguments = $tab_applette_arguments;unset($tab_arguments[0]);foreach($tab_arguments as $argument) {if ($argument != '') {$string_arguments .= $argument;$tab_parametres = explode('=', $argument, 2);$options[$tab_parametres[0]] = trim($tab_parametres[1], '"');}}////+----------------------------------------------------------------------------------------------------------------+// Gestion des erreurs de paramétrage/** FIXME : mettre un template paramétré* if (!isset($options['template'])) {$options['template'] = SYND_CHEMIN_SQUELETTE.SYND_SQUELETTE_LISTE;} else {if (file_exists(SYND_CHEMIN_SQUELETTE.$options['template'])) {$options['template'] = SYND_CHEMIN_SQUELETTE.$options['template'];}}*///+----------------------------------------------------------------------------------------------------------------+// Gestion des squelettesif (!isset($options['template'])) {$options['template'] = R_EVTS_CHEMIN_SQUELETTE."defaut.tpl.html";} else {if (file_exists(R_EVTS_CHEMIN_SQUELETTE.$options['template'])) {$options['template'] = R_EVTS_CHEMIN_SQUELETTE.$options['template'];}}extract($GLOBALS['_R_EVTS_']);// Demarre le bufferob_start();// Inclusion du fichierinclude($options['template']);// Recuperer le contenu du buffer$sortie = ob_get_contents();// Arrete et detruit le bufferob_end_clean();//+----------------------------------------------------------------------------------------------------------------+// Sortiereturn $sortie;}?>