Subversion Repositories eFlore/Applications.bibliobota

Compare Revisions

Ignore whitespace Rev 1 → Rev 2

/trunk/applications/bb_consultation/bibliotheque/bbc_affichage_lien.fonct.php
New file
0,0 → 1,159
<?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_lien.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Fonctions de création de l'affichage des résultats d'un lien.
*
* Contient une fonction créant l'affichage des résultats pour le paramètre "lien".
*
*@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.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/*Mettre ici les inclusions de fichiers*/
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
/*Mettre ici la liste de fonctions.*/
 
/*
Fichier de traitement de requêtes de l'appli FINDER v. 3.00 - 21/06/2002 - 08h30
Valable pour le paramètre "link".
 
retourne une chaine de données
*/
function mkresu()
{
global $result_final;
global $nbr_final;
global $tbl;
global $TabFinder;
global $var_biblio;
$retour = '';
$retour .= '<ul id="bb_liste_resultat_lien">'."\n";
// Boucle qui affiche les résultats
$i = 1;
while ($row = mysql_fetch_object($result_final)) {
$get_idlink = $row->B_L_IDLINK;
$get_urllink = $row->B_L_URL;
$get_titrelink = $row->B_L_TITRE;
$get_lkstr = $row->B_L_LKSTR;
$get_nomstr = $row->B_S_NOM;
$get_resum = $row->B_L_RESUMCLE;
$get_date = $row->B_L_MAJFICHE;
$get_part = $row->B_L_PARTENAIRE;
$get_ref = $row->B_L_REFERENCE;
$retour .= '<li>';
$retour .= '<img class="'.BB_CLASS_IMG_WEB.'" src="'.BB_IMG_WEB.'" alt="'.'Lien Web'.'" />'."\n";
$retour .= '<a href="'.$get_urllink.'">';
if ($get_titrelink != '') {
$retour .= $get_titrelink;
} else {
$retour .= ColorizeFound($get_urllink, strtolower($TabFinder['chaine']));
}
$retour .= '</a>'."\n";
if ($get_resum != '') {
$retour .= ' - '. ColorizeFound($get_resum, stripslashes($TabFinder['chaine']));
}
if ($get_lkstr != 0) {
$retour .= ' - <b>' . ColorizeFound($get_nomstr, stripslashes($TabFinder['chaine'])).'</b>'."\n\n";
}
// Affichage du lien vers la consultation avancée correspondant à la structure si elle existe dans la base
if ($var_biblio['open_biblio_link'] == true && $get_lkstr != 0) {
// Cross Biblio est le module qui permet d'avoir accès au popup transversal BBPOPUP
$retour .= '<a href="'.BB_URL_COURANTE_CONSULTATION_AVANCEE.'&amp;str='.$get_lkstr.'&amp;arg_0=str%3D'.$get_lkstr.
'&amp;arg_1=coll%3D'.$get_lkstr.'&amp;arg_2=book%3D'.$get_lkstr.'&amp;arg_3=media%3D'.$get_lkstr.'">'.'Plus d\'infos...'.'</a>';
}
if ($get_ref == 1) {
$retour .= '<img class="'.BB_CLASS_IMG_REFERENCE.'" src="'.BB_IMG_REFERENCE.'" alt="'.'Site Référence'.'" /> '."\n";
}
if ($get_part == 1) {
$retour .= '<img class="'.BB_CLASS_IMG_PARTENAIRE.'" src="'.BB_IMG_PARTENAIRE.'" alt="'.'Site Partenaire de Tela Botanica'.'" /> '."\n";
}
// Affichage des infos et des liens pour édition
$retour .= ' <span class="texte_inactif">('.'n°'.$get_idlink;
if ((check_if_modif($tbl['modif'], $tbl['link'], $get_idlink) == 0) && ($var_biblio['open_proposer_link'] == true)) {
$retour .= ' - ';
$retour .= '<a class="texte_inactif" href="'.BB_URL_COURANTE_ADMIN.'&amp;action=edit&ensemble=link&amp;ref='.$get_idlink.'">'.'éditer'.'</a>';
$retour .= ' - ';
$retour .= '<a class="texte_inactif" href="'.BB_URL_COURANTE_ADMIN.'&amp;action=supp&ensemble=link&amp;ref='.$get_idlink.'">'.'supprimer'.'</a>';
}
$retour .= ')'.'</span>'."\n";
if ($i < $nbr_final) {
$retour .= '<br /><br />';
}
$retour .= '</li>'."\n";
$i++;
}
$retour .= '</ul>'."\n";
if ($var_biblio['open_proposer_link'] == true) {
$retour .= '<p align="center">'."\n".
'<hr size="1" />'."\n".
'<a href="'.BB_URL_COURANTE_ADMIN.'&amp;action=new&ensemble=link">'.'Proposer un nouveau lien'.'</a>'."\n".
'<hr size="1" />'."\n".
'</p>'."\n";
}
return $retour;
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.3 2004/09/15 15:47:36 jpm
* Ajout des images de site partenaire et référence.
*
* Revision 1.2 2004/09/14 11:49:52 jpm
* Ajout de l'entête au fichier.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>