Rev 2 | 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: bbc_affichage_structure.fonct.php,v 1.2 2004/09/15 11:21:07 jpm Exp $/*** Fonctions de création de l'affichage des résultats d'une structure.** Contient une fonction créant l'affichage des résultats pour le paramètre "structure".**@package BiblioBota-Consultation*@subpackage Fonctions//Auteur original :*@author Jean-Charles GRANGER <tela@vecteur.org>//Autres auteurs :*@author Jean-Pascal MILCENT <jpm@clapas.org>*@copyright Tela-Botanica 2000-2004*@version $Revision: 1.2 $ $Date: 2004/09/15 11:21:07 $// +------------------------------------------------------------------------------------------------------+*/// +------------------------------------------------------------------------------------------------------+// | ENTETE du PROGRAMME |// +------------------------------------------------------------------------------------------------------+/*Mettre ici les inclusions de fichiers*/// +------------------------------------------------------------------------------------------------------+// | LISTE de FONCTIONS |// +------------------------------------------------------------------------------------------------------+/*Mettre ici la liste de fonctions.*//** Fonction mkresu() - Traitement des requêtes.** Fonction traitant la requête d'intérogation de la base de données pour le* paramêtre "structure".** @return string les résultats à afficher.*/function mkresu(){global $result_final;global $nbr_final;global $tbl;global $TabFinder;global $var_biblio;global $GS_GLOBAL;$ret = '';$ret .= '<ul id="bb_liste_resultat_structure">'."\n";$i = 1;while ($row = mysql_fetch_object($result_final)) {$get_idstr = $row->B_S_IDSTR;$get_name = $row->B_S_NOM;$get_cp = $row->B_S_CODEPOSTAL;$get_ville = $row->B_S_VILLE;$get_pays = $row->GC_NAME;$get_date = $row->B_S_MAJFICHE;$get_categ = $row->B_S_TYPESTR;$get_categ_nom = $row->B_TYPSTR_LABEL;$ret .= '<li>'."\n";$ret .= '<b>';$ret .= ColorizeFound($get_name, stripslashes($TabFinder['chaine']));$ret .= '</b> ';$ret .= '(';$ret .= ColorizeFound($get_ville, strtoupper($TabFinder['geo']));if (($get_ville != '') && ($get_pays != '')) {$ret .= ' - ';}if (($get_pays == 'France') && ($get_cp != '')) {// Calcul du code département pour la Franceif ($get_cp < 97000) {$calc_dpt = floor($get_cp / 1000);} else {$calc_dpt = floor($get_cp / 100);}$dpt_qu = 'SELECT GFD_NAME '.'FROM '.$tbl['dpt'].' '.'WHERE GFD_ID = '.$calc_dpt;$do_dpt = mysql_query($dpt_qu) or die("<B>Erreur lors de la recherche du département :</B> $dpt_qu");$nbr_dpt = mysql_num_rows($do_dpt);if ($nbr_dpt == 1) {$resu_dpt = mysql_fetch_object($do_dpt);$nom_dpt = $resu_dpt->GFD_NAME;} else {die('<b>Erreur lors de la recherche du département :</b> '.$nbr_dpt.' départements trouvés.');}$ret .= ColorizeFound($nom_dpt, ucFirst($TabFinder['geo'])) . ' - ';}if ($get_pays != '') {if ($TabFinder['geo'] != '') {$ret .= ColorizeFound($get_pays, ucFirst($TabFinder['geo']));} else {$ret .= $get_pays;}}$ret .= ') - '."\n";if ($get_categ != '') {$ret .= $get_categ_nom;}// Vérification de l'accès à la consultation avancée transversale de Bilblio Bota.if ($var_biblio['open_biblio_str'] == true) {$ret .= ' - <a href="'.BB_URL_COURANTE_CONSULTATION_AVANCEE.'&str='.$get_idstr.'&arg_0=str%3D'.$get_idstr.'&arg_1=coll%3D'.$get_idstr.'&arg_2=book%3D'.$get_idstr.'&arg_3=media%3D'.$get_idstr.'">'.'Plus d\'infos'.'</a>';}if ($i < $nbr_final) {$ret .= '<br /><br />';}$i++;$ret .= '</li>'."\n";}$ret .= '</ul>'."\n";// Vérification de l'accès à la proposition de nouvelles structures.if ($var_biblio['open_proposer_str'] == true) {$ret .= '<p class="bb_txt_centre">'.'<hr size="1" />'.'<a href="'.BB_URL_COURANTE_ADMIN.'&action=new&ensemble=str">'.'Proposer un nouvel organisme'.'</a>'.'<hr size="1" />'.'</p>'."\n";}return $ret;}/* +--Fin du code ----------------------------------------------------------------------------------------+** $Log: bbc_affichage_structure.fonct.php,v $* Revision 1.2 2004/09/15 11:21:07 jpm* Début mise en conformité avec la convention de codage et le standard XHTML Strict.*** +-- Fin du code ----------------------------------------------------------------------------------------+*/?>