Subversion Repositories eFlore/Applications.bibliobota

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 jp_milcent 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: bbc_affichage_lien.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
23
/**
24
* Fonctions de création de l'affichage des résultats d'un lien.
25
*
26
* Contient une fonction créant l'affichage des résultats pour le paramètre "lien".
27
*
28
*@package BiblioBota-Consultation
29
*@subpackage Fonctions
30
//Auteur original :
31
*@author        Jean-Charles GRANGER <tela@vecteur.org>
32
//Autres auteurs :
33
*@author        Jean-Pascal MILCENT <jpm@clapas.org>
34
*@copyright     Tela-Botanica 2000-2004
35
*@version       $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
36
// +------------------------------------------------------------------------------------------------------+
37
*/
38
 
39
// +------------------------------------------------------------------------------------------------------+
40
// |                                            ENTETE du PROGRAMME                                       |
41
// +------------------------------------------------------------------------------------------------------+
42
                                    /*Mettre ici les inclusions de fichiers*/
43
 
44
 
45
// +------------------------------------------------------------------------------------------------------+
46
// |                                           LISTE de FONCTIONS                                         |
47
// +------------------------------------------------------------------------------------------------------+
48
                                        /*Mettre ici la liste de fonctions.*/
49
 
50
/*
51
  Fichier de traitement de requêtes de l'appli FINDER v. 3.00 - 21/06/2002 - 08h30
52
  Valable pour le paramètre "link".
53
 
54
  retourne une chaine de données
55
*/
56
function mkresu()
57
{
58
    global $result_final;
59
    global $nbr_final;
60
    global $tbl;
61
    global $TabFinder;
62
    global $var_biblio;
63
 
64
    $retour = '';
65
    $retour .= '<ul id="bb_liste_resultat_lien">'."\n";
66
 
67
    // Boucle qui affiche les résultats
68
    $i = 1;
69
    while ($row = mysql_fetch_object($result_final)) {
70
        $get_idlink = $row->B_L_IDLINK;
71
        $get_urllink = $row->B_L_URL;
72
        $get_titrelink = $row->B_L_TITRE;
73
        $get_lkstr = $row->B_L_LKSTR;
74
        $get_nomstr = $row->B_S_NOM;
75
        $get_resum = $row->B_L_RESUMCLE;
76
        $get_date = $row->B_L_MAJFICHE;
77
        $get_part = $row->B_L_PARTENAIRE;
78
        $get_ref = $row->B_L_REFERENCE;
79
 
80
        $retour .= '<li>';
81
        $retour .= '<img class="'.BB_CLASS_IMG_WEB.'" src="'.BB_IMG_WEB.'" alt="'.'Lien Web'.'" />'."\n";
82
 
83
        $retour .= '<a href="'.$get_urllink.'">';
84
 
85
        if ($get_titrelink != '') {
86
            $retour .= $get_titrelink;
87
        } else {
88
            $retour .= ColorizeFound($get_urllink, strtolower($TabFinder['chaine']));
89
        }
90
        $retour .= '</a>'."\n";
91
 
92
        if ($get_resum != '') {
93
            $retour .= ' - '. ColorizeFound($get_resum, stripslashes($TabFinder['chaine']));
94
        }
95
 
96
        if ($get_lkstr != 0) {
97
            $retour .= ' - <b>' . ColorizeFound($get_nomstr, stripslashes($TabFinder['chaine'])).'</b>'."\n\n";
98
        }
99
 
100
        // Affichage du lien vers la consultation avancée correspondant à la structure si elle existe dans la base
101
        if ($var_biblio['open_biblio_link'] == true && $get_lkstr != 0) {
102
            // Cross Biblio est le module qui permet d'avoir accès au popup transversal BBPOPUP
103
            $retour .= '<a href="'.BB_URL_COURANTE_CONSULTATION_AVANCEE.'&amp;str='.$get_lkstr.'&amp;arg_0=str%3D'.$get_lkstr.
104
                                '&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>';
105
        }
106
 
107
        if ($get_ref == 1) {
108
            $retour .= '<img class="'.BB_CLASS_IMG_REFERENCE.'" src="'.BB_IMG_REFERENCE.'" alt="'.'Site Référence'.'" /> '."\n";
109
        }
110
        if ($get_part == 1) {
111
            $retour .= '<img class="'.BB_CLASS_IMG_PARTENAIRE.'" src="'.BB_IMG_PARTENAIRE.'" alt="'.'Site Partenaire de Tela Botanica'.'" /> '."\n";
112
        }
113
 
114
        // Affichage des infos et des liens pour édition
115
        $retour .= ' <span class="texte_inactif">('.'n°'.$get_idlink;
116
 
117
        if ((check_if_modif($tbl['modif'], $tbl['link'], $get_idlink) == 0) && ($var_biblio['open_proposer_link'] == true)) {
118
            $retour .= ' - ';
119
            $retour .= '<a class="texte_inactif" href="'.BB_URL_COURANTE_ADMIN.'&amp;action=edit&ensemble=link&amp;ref='.$get_idlink.'">'.'éditer'.'</a>';
120
            $retour .= ' - ';
121
            $retour .= '<a class="texte_inactif" href="'.BB_URL_COURANTE_ADMIN.'&amp;action=supp&ensemble=link&amp;ref='.$get_idlink.'">'.'supprimer'.'</a>';
122
        }
123
        $retour .= ')'.'</span>'."\n";
124
 
125
        if ($i < $nbr_final) {
126
            $retour .= '<br /><br />';
127
        }
128
        $retour .= '</li>'."\n";
129
        $i++;
130
    }
131
    $retour .= '</ul>'."\n";
132
 
133
    if ($var_biblio['open_proposer_link'] == true) {
134
        $retour .=  '<p align="center">'."\n".
135
                        '<hr size="1" />'."\n".
136
                            '<a href="'.BB_URL_COURANTE_ADMIN.'&amp;action=new&ensemble=link">'.'Proposer un nouveau lien'.'</a>'."\n".
137
                        '<hr size="1" />'."\n".
138
                    '</p>'."\n";
139
    }
140
 
141
    return $retour;
142
}
143
 
144
/* +--Fin du code ----------------------------------------------------------------------------------------+
145
*
146
* $Log: not supported by cvs2svn $
147
* Revision 1.4  2005/05/17 10:10:08  jpm
148
* Correction des bogues avant mise en ligne du site v4.
149
*
150
* Revision 1.3  2004/09/15 15:47:36  jpm
151
* Ajout des images de site partenaire et référence.
152
*
153
* Revision 1.2  2004/09/14 11:49:52  jpm
154
* Ajout de l'entête au fichier.
155
*
156
*
157
* +-- Fin du code ----------------------------------------------------------------------------------------+
158
*/
159
?>