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";
|
8 |
jp_milcent |
53 |
$retour .= '<div id="biblio_revue">';
|
5 |
jp_milcent |
54 |
// Titre de la page
|
8 |
jp_milcent |
55 |
$retour .= '<h1>'.'Liste des revues indexées dans la base de données du projet BiblioBota.'.'</h1>';
|
5 |
jp_milcent |
56 |
|
|
|
57 |
$query_tot = 'SELECT COUNT(*) AS cpt '.
|
|
|
58 |
'FROM '.$GLOBALS['tbl']['collection'].' '.
|
|
|
59 |
'WHERE B_C_CACHER = 0';
|
|
|
60 |
$do_query_tot = mysql_query($query_tot) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_tot));
|
|
|
61 |
$tmp_total = mysql_fetch_object($do_query_tot);
|
|
|
62 |
$nb_total = $tmp_total->cpt;
|
|
|
63 |
mysql_free_result($do_query_tot);
|
|
|
64 |
|
|
|
65 |
if ($nb_total == 0) {
|
|
|
66 |
$retour .= '<p>'.'Pas encore de revues indexées...'.'</p>'."\n";
|
|
|
67 |
} else {
|
18 |
jp_milcent |
68 |
$aso_revues = array();
|
5 |
jp_milcent |
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 |
while ($row = mysql_fetch_object($do_query)) {
|
18 |
jp_milcent |
76 |
$aso_revue = array();
|
|
|
77 |
$aso_revue['id'] = $row->B_C_CRAI;
|
|
|
78 |
$aso_revue['idlink'] = $row->B_C_IDLINK;
|
|
|
79 |
$aso_revue['nom_complet'] = $row->B_C_NOMCOMPLET;
|
|
|
80 |
$aso_revue['abreviation'] = $row->B_C_ABREGE;
|
|
|
81 |
$aso_revue['date_debut'] = $row->B_C_DATECREATION;
|
|
|
82 |
$aso_revue['suite_de'] = $row->B_C_FAISUITE;
|
|
|
83 |
$aso_revue['date_fin'] = $row->B_C_DATEFIN;
|
|
|
84 |
$aso_revue['periodicite'] = $row->B_C_PERIODICITE;
|
|
|
85 |
$aso_revue['contact_nom'] = $row->B_C_CONTACTNOM;
|
|
|
86 |
$aso_revue['contact_mail'] = $row->B_C_CONTACTMAIL;
|
|
|
87 |
$aso_revue['logo'] = $row->B_C_IMAGE;
|
|
|
88 |
$aso_revue['commentaires'] = $row->B_C_COMMENT;
|
|
|
89 |
$aso_revue['date_maj'] = $row->B_C_MAJFICHE;
|
|
|
90 |
|
|
|
91 |
$aso_fasc_serie = array();
|
|
|
92 |
$aso_fasc = array();
|
9 |
jp_milcent |
93 |
$query_fasc = 'SELECT '.$GLOBALS['tbl']['fascicule'].'.* '.
|
18 |
jp_milcent |
94 |
'FROM '.$GLOBALS['tbl']['fascicule'].' '.
|
9 |
jp_milcent |
95 |
'WHERE B_F_CRAICOLL = "'.$row->B_C_CRAI.'" '.
|
|
|
96 |
'AND B_F_CACHER = 0 '.
|
|
|
97 |
'ORDER BY B_F_CRAISERIE, B_F_NUMERO DESC';
|
8 |
jp_milcent |
98 |
$do_query_fasc = mysql_query($query_fasc) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_fasc));
|
|
|
99 |
while ($row_fasc = mysql_fetch_object($do_query_fasc)) {
|
|
|
100 |
if (!isset($aso_fasc_serie[$row_fasc->B_F_CRAISERIE])) {
|
9 |
jp_milcent |
101 |
$aso_fasc_serie[$row_fasc->B_F_CRAISERIE] = $row_fasc->B_F_CRAISERIE;
|
|
|
102 |
$aso_fasc['nbre_fasc'] = 1;
|
|
|
103 |
$aso_fasc['nom_fin_serie'] = $row_fasc->B_SER_SOUSTITRE;
|
|
|
104 |
$aso_fasc['nom_fin_fasc'] = $row_fasc->B_F_TITRE;
|
|
|
105 |
$aso_fasc['date_fin_fasc'] = date('d/m/Y', $row_fasc->B_F_MAJFICHE);
|
8 |
jp_milcent |
106 |
} else {
|
9 |
jp_milcent |
107 |
$aso_fasc['nbre_fasc']++;
|
8 |
jp_milcent |
108 |
}
|
|
|
109 |
}
|
18 |
jp_milcent |
110 |
mysql_free_result($do_query_fasc);
|
8 |
jp_milcent |
111 |
ksort($aso_fasc_serie, SORT_DESC);
|
18 |
jp_milcent |
112 |
$aso_revue['aso_fasc_serie'] = $aso_fasc_serie;
|
|
|
113 |
$aso_revue['aso_fasc'] = $aso_fasc;
|
|
|
114 |
|
|
|
115 |
$query_art = 'SELECT COUNT('.$GLOBALS['tbl']['article'].'.B_A_IDART) AS nbre_article '.
|
|
|
116 |
'FROM '.$GLOBALS['tbl']['article'].' '.
|
|
|
117 |
'WHERE B_A_CRAICOLL = "'.$row->B_C_CRAI.'" '.
|
|
|
118 |
'GROUP BY B_A_CRAICOLL';
|
|
|
119 |
//echo $query_art.'<br/>';
|
|
|
120 |
$resultat_art = mysql_query($query_art) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_art));
|
|
|
121 |
$ligne_article = mysql_fetch_assoc($resultat_art);
|
|
|
122 |
//echo '<pre>'.print_r($ligne_article, true).'</pre>';
|
|
|
123 |
$aso_revue['nbre_article'] = $ligne_article['nbre_article'];
|
|
|
124 |
$aso_revues[] = $aso_revue;
|
|
|
125 |
}
|
|
|
126 |
mysql_free_result($do_query);
|
|
|
127 |
if ($GLOBALS['_GEN_commun']['info_application']->affichage_type == 'tableau') {
|
|
|
128 |
$o = 1;
|
|
|
129 |
$retour .= '<table id="liste_biblio_revue" class="table_bordure" summary="Tableau résumant les informations sur les revues indexées dans la base de données du projet BiblioBota.">'."\n";
|
|
|
130 |
$retour .= '<thead><tr>'.
|
|
|
131 |
'<th>Collection</th>'.
|
|
|
132 |
'<th>Date début</th>'.
|
|
|
133 |
'<th>Date fin</th>'.
|
|
|
134 |
'<th title="Nombre de fascicules pour la collection, toutes séries confondues">Nombre fascicules</th>'.
|
|
|
135 |
'<th title="Nombre d\'articles pour la collection, toutes séries et fascicules confondues">Nombre d\'articles</th>'.
|
|
|
136 |
'<th>Périodicité</th>'.
|
|
|
137 |
'<th>Contact</th>'.
|
|
|
138 |
'<th title="Nom du dernier fascicule dans la dernière série">Dernier fascicule</th>'.
|
|
|
139 |
'<th title="Date de mise à jour du dernier fascicule dans la dernière série">Date dernier fascicule</th>'.
|
|
|
140 |
'</tr></thead>'."\n";
|
|
|
141 |
$retour .= '<tbody>';
|
|
|
142 |
foreach ($aso_revues as $revue) {
|
|
|
143 |
$retour .= '<tr>';
|
|
|
144 |
$retour .= '<th>';
|
|
|
145 |
if ($revue['nom_complet'] != '') {
|
|
|
146 |
$retour .= '<h5 class="bbre_titre">'.$revue['nom_complet'].'</h5>';
|
|
|
147 |
if ($revue['suite_de'] != '') {
|
|
|
148 |
$retour .= '<p><span class="bb_intitule">Fait suite à : </span>'.$revue['suite_de'].'</p>';
|
|
|
149 |
}
|
|
|
150 |
if ($revue['abreviation'] != '') {
|
|
|
151 |
$retour .= '<p><span class="bb_intitule">Abréviation : </span>'.$revue['abreviation'].'</p>';
|
|
|
152 |
}
|
|
|
153 |
if ($revue['commentaires'] != '') {
|
|
|
154 |
$retour .= '<p>'.$revue['commentaires'].'</p>';
|
|
|
155 |
}
|
|
|
156 |
if ($revue['logo'] != '') {
|
|
|
157 |
$retour .= '<img class="bbre_couverture" src="'.BB_CHEMIN_IMAGES_ILLUSTRATION.$revue['logo'].'" alt="Couverture de la revue '.$revue['nom_complet'].'"/>';
|
|
|
158 |
}
|
|
|
159 |
$retour .= '<p class="texte_inactif">Id. coll. : '.$revue['id'].' - Mise à jour : '.date('d/m/Y', $revue['date_maj']).'</p>';
|
8 |
jp_milcent |
160 |
}
|
18 |
jp_milcent |
161 |
$retour .= '</th>';
|
|
|
162 |
$retour .= '<td>';
|
|
|
163 |
if ($revue['date_debut'] != '') {
|
|
|
164 |
$retour .= $revue['date_debut'];
|
9 |
jp_milcent |
165 |
}
|
18 |
jp_milcent |
166 |
$retour .= '</td>';
|
|
|
167 |
$retour .= '<td>';
|
|
|
168 |
if ($revue['date_fin'] != '') {
|
|
|
169 |
$retour .= $revue['date_fin'];
|
|
|
170 |
}
|
|
|
171 |
$retour .= '</td>';
|
|
|
172 |
$retour .= '<td>';
|
|
|
173 |
if ($revue['aso_fasc']['nbre_fasc'] != '') {
|
|
|
174 |
$retour .= $revue['aso_fasc']['nbre_fasc'];
|
|
|
175 |
} else {
|
|
|
176 |
$retour .= 0;
|
|
|
177 |
}
|
|
|
178 |
$retour .= '</td>';
|
|
|
179 |
$retour .= '<td>';
|
|
|
180 |
if ($revue['nbre_article'] != '') {
|
|
|
181 |
$retour .= $revue['nbre_article'];
|
|
|
182 |
} else {
|
|
|
183 |
$retour .= 0;
|
|
|
184 |
}
|
|
|
185 |
$retour .= '</td>';
|
|
|
186 |
$retour .= '<td>';
|
|
|
187 |
if ($revue['periodicite'] != '') {
|
|
|
188 |
$retour .= $revue['periodicite'];
|
|
|
189 |
}
|
|
|
190 |
$retour .= '</td>';
|
|
|
191 |
$retour .= '<td>';
|
|
|
192 |
if ($revue['contact_nom'] != '') {
|
|
|
193 |
if ($contact_mail != '') {
|
|
|
194 |
$retour .= '<a href="mailto:'.$revue['contact_mail'].'">'.$revue['contact_nom'].'</a>';
|
|
|
195 |
} else {
|
|
|
196 |
$retour .= $revue['contact_nom'];
|
|
|
197 |
}
|
|
|
198 |
}
|
|
|
199 |
$retour .= '</td>';
|
|
|
200 |
$retour .= '<td>';
|
|
|
201 |
$retour .= $revue['aso_fasc']['nom_fin_fasc'];
|
|
|
202 |
$retour .= '</td>';
|
|
|
203 |
$retour .= '<td>';
|
|
|
204 |
$retour .= $revue['aso_fasc']['date_fin_fasc'];
|
|
|
205 |
$retour .= '</td>';
|
|
|
206 |
$retour .= '</tr>'."\n";
|
|
|
207 |
$o++;
|
5 |
jp_milcent |
208 |
}
|
18 |
jp_milcent |
209 |
$retour .= '</tbody>'."\n";
|
|
|
210 |
$retour .= '</table>'."\n";
|
|
|
211 |
} else {
|
|
|
212 |
$o = 1;
|
|
|
213 |
$retour .= '<ul id="liste_biblio_revue">'."\n";
|
|
|
214 |
foreach ($aso_revues as $revue) {
|
|
|
215 |
$retour .= '<li>';
|
|
|
216 |
if ($revue['nom_complet'] != '') {
|
|
|
217 |
$retour .= '<h5 class="bbre_titre">'.$revue['nom_complet'].'.</h5>';
|
|
|
218 |
}
|
|
|
219 |
if ($revue['periodicite'] != '') {
|
|
|
220 |
$retour .= ' '.$revue['periodicite'].'.';
|
5 |
jp_milcent |
221 |
} else {
|
18 |
jp_milcent |
222 |
$retour .= ' Périodicité inconnue';
|
5 |
jp_milcent |
223 |
}
|
18 |
jp_milcent |
224 |
$retour .= ' De ';
|
|
|
225 |
if ($revue['date_debut'] != '') {
|
|
|
226 |
$retour .= $revue['date_debut'];
|
|
|
227 |
} else {
|
|
|
228 |
$retour .= '?';
|
|
|
229 |
}
|
|
|
230 |
$retour .= ' à ';
|
|
|
231 |
if ($revue['date_fin'] != '') {
|
|
|
232 |
$retour .= $revue['date_fin'].'. ';
|
|
|
233 |
} else {
|
|
|
234 |
$retour .= '?. ';
|
|
|
235 |
}
|
|
|
236 |
if ($revue['aso_fasc']['nbre_fasc'] != '') {
|
|
|
237 |
$retour .= $revue['aso_fasc']['nbre_fasc'];
|
|
|
238 |
} else {
|
|
|
239 |
$retour .= 0;
|
|
|
240 |
}
|
|
|
241 |
$retour .= ' fascicules et ';
|
|
|
242 |
if ($revue['nbre_article'] != '') {
|
|
|
243 |
$retour .= $revue['nbre_article'];
|
|
|
244 |
} else {
|
|
|
245 |
$retour .= 0;
|
|
|
246 |
}
|
|
|
247 |
$retour .= ' articles indexés.';
|
|
|
248 |
$o++;
|
|
|
249 |
$retour .= '</li>'."\n";
|
5 |
jp_milcent |
250 |
}
|
18 |
jp_milcent |
251 |
$retour .= '</ul>'."\n";
|
|
|
252 |
}
|
5 |
jp_milcent |
253 |
}
|
8 |
jp_milcent |
254 |
$retour .= '</div>';
|
5 |
jp_milcent |
255 |
$retour .= '<!-- BiblioBota - Revue : FIN -->'."\n";
|
|
|
256 |
$sortie .= $retour;
|
|
|
257 |
|
|
|
258 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
|
|
259 |
*
|
|
|
260 |
* $Log$
|
18 |
jp_milcent |
261 |
* Revision 1.4 2006/09/12 16:13:05 jp_milcent
|
|
|
262 |
* Ajout de nouvelles informations à la liste des revues.
|
|
|
263 |
*
|
9 |
jp_milcent |
264 |
* Revision 1.3 2006/07/28 12:46:47 jp_milcent
|
|
|
265 |
* Début modification de l'interface de l'appli revue.
|
|
|
266 |
*
|
8 |
jp_milcent |
267 |
* Revision 1.2 2006/05/29 14:19:07 jp_milcent
|
|
|
268 |
* Ajout d'une classe css à l'image de la couverture de la revue.
|
|
|
269 |
* Correction du chemin d'accés à l'image.
|
|
|
270 |
*
|
6 |
jp_milcent |
271 |
* Revision 1.1 2006/05/23 16:20:50 jp_milcent
|
|
|
272 |
* Ajout de l'application affichant la liste des revues disponibles dans la base de données de BiblioBota.
|
5 |
jp_milcent |
273 |
*
|
6 |
jp_milcent |
274 |
*
|
5 |
jp_milcent |
275 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
|
|
276 |
*/
|
|
|
277 |
?>
|