Subversion Repositories eFlore/Applications.bibliobota

Rev

Rev 6 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5 jp_milcent 1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 5.1.1                                                                                    |
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
8
// | This file is part of eFlore.                                                                         |
9
// |                                                                                                      |
10
// | Foobar is free software; you can redistribute it and/or modify                                       |
11
// | it under the terms of the GNU General Public License as published by                                 |
12
// | the Free Software Foundation; either version 2 of the License, or                                    |
13
// | (at your option) any later version.                                                                  |
14
// |                                                                                                      |
15
// | Foobar is distributed in the hope that it will be useful,                                            |
16
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
17
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
18
// | GNU General Public License for more details.                                                         |
19
// |                                                                                                      |
20
// | You should have received a copy of the GNU General Public License                                    |
21
// | along with Foobar; if not, write to the Free Software                                                |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
23
// +------------------------------------------------------------------------------------------------------+
24
// CVS : $Id$
25
/**
26
* Titre
27
*
28
* Description
29
*
30
*@package eFlore
31
*@subpackage ef_fiche
32
//Auteur original :
33
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
34
//Autres auteurs :
35
*@author        aucun
36
*@copyright     Tela-Botanica 2000-2006
37
*@version       $Revision$ $Date$
38
// +------------------------------------------------------------------------------------------------------+
39
*/
40
 
41
// +------------------------------------------------------------------------------------------------------+
42
// |                                            ENTETE du PROGRAMME                                       |
43
// +------------------------------------------------------------------------------------------------------+
44
/** Inclusion du fichier de configuration de l'application Revue. */
45
//require_once BB_CHEMIN_APPLI.'bb_revue/configuration/bbre_config.inc.php';
46
 
47
// +------------------------------------------------------------------------------------------------------+
48
// |                                            CORPS du PROGRAMME                                        |
49
// +------------------------------------------------------------------------------------------------------+
50
// Initialisation de la variable à retourner
51
$retour = '';
52
$retour .= '<!-- BiblioBota - Revue : DEBUT -->'."\n";
53
// Titre de la page
54
$retour .= '<h1>'.'Revues'.'</h1>';
55
// Petit descriptif
56
$retour .= '<p>'.'Liste des revues indexées dans la base de données du projet BiblioBota.'.'</p>'."\n";
57
 
58
$query_tot =	'SELECT COUNT(*) AS cpt '.
59
				'FROM '.$GLOBALS['tbl']['collection'].' '.
60
				'WHERE B_C_CACHER = 0';
61
$do_query_tot = mysql_query($query_tot) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_tot));
62
$tmp_total = mysql_fetch_object($do_query_tot);
63
$nb_total = $tmp_total->cpt;
64
mysql_free_result($do_query_tot);
65
 
66
if ($nb_total == 0) {
67
	$retour .= '<p>'.'Pas encore de revues indexées...'.'</p>'."\n";
68
} else {
69
    $query =    'SELECT '.$GLOBALS['tbl']['collection'].'.* '.
70
                'FROM '.$GLOBALS['tbl']['collection'].' '.
71
                'WHERE B_C_CACHER = 0 '.
72
                'ORDER BY B_C_NOMCOMPLET ';
73
	$do_query = mysql_query($query) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query));
74
	$nb_results = mysql_num_rows($do_query);
75
 
76
	$o = 1;
77
	$retour .= '<ul>'."\n";
78
	while ($row = mysql_fetch_object($do_query)) {
79
        $id = $row->B_C_CRAI;
80
        $idlink = $row->B_C_IDLINK;
81
        $nom_complet = $row->B_C_NOMCOMPLET;
82
        $abreviation = $row->B_C_ABREGE;
83
        $date_debut = $row->B_C_DATECREATION;
84
        $suite_de = $row->B_C_FAISUITE;
85
        $date_fin = $row->B_C_DATEFIN;
86
        $periodicite = $row->B_C_PERIODICITE;
87
        $contact_nom = $row->B_C_CONTACTNOM;
88
        $contact_mail = $row->B_C_CONTACTMAIL;
89
        $logo = $row->B_C_IMAGE;
90
        $commentaires = $row->B_C_COMMENT;
91
        $date_maj = $row->B_C_MAJFICHE;
92
		$retour .= '<li>';
93
        if ($nom_complet != '') {
94
            $retour .= '<h5 class="bbre_titre">'.$nom_complet.'</h5>';
95
            if ($commentaires != '') {
96
            	$retour .= '<p>'.$commentaires.'</p>';
97
        	}
98
            if ($logo != '') {
99
            	$retour .= '<img src="'.$logo.'" alt="Couverture de la revue '.$nom_complet.'"/>';
100
        	}
101
        }
102
        $retour .= '<dl class="ajout_2point">'."\n";
103
		if ($suite_de != '') {
104
			$retour .= '<dt>Fait suite à </dt><dd>'.$suite_de.'</dd>';
105
		}
106
		if ($abreviation != '') {
107
			$retour .= '<dt>Abreviation</dt><dd>'.$abreviation.'</dd>';
108
		}
109
		if ($date_debut != '') {
110
			$retour .= '<dt>Date de début</dt><dd>'.$date_debut.'</dd>';
111
		}
112
		if ($date_fin != '') {
113
			$retour .= '<dt>Date de fin</dt><dd>'.$date_fin.'</dd>';
114
		}
115
		if ($periodicite != '') {
116
			$retour .= '<dt>Périodicité</dt><dd>'.$periodicite.'</dd>';
117
		}
118
		if ($contact_nom != '') {
119
			if ($contact_mail != '') {
120
				$retour .= '<dt>Contact</dt><dd><a href="mailto:'.$contact_mail.'">'.$contact_nom.'</a></dd>';
121
			} else {
122
				$retour .= '<dt>Contact</dt><dd>'.$contact_nom.'</dd>';
123
			}
124
		}
125
		$retour .= '</dl>'."\n";
126
		$retour .= '<span class="texte_inactif">'.'Coll. n°'.$id.' - Mise à jour : '.date('d/m/Y', $date_maj).'.</span>';
127
        $o++;
128
    }
129
    $retour .= '</ul>'."\n";
130
    mysql_free_result($do_query);
131
}
132
 
133
$retour .= '<!-- BiblioBota - Revue : FIN -->'."\n";
134
$sortie .= $retour;
135
 
136
/* +--Fin du code ----------------------------------------------------------------------------------------+
137
*
138
* $Log$
139
*
140
* +-- Fin du code ----------------------------------------------------------------------------------------+
141
*/
142
?>