Rev 9 | Rev 21 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php/*vim: set expandtab tabstop=4 shiftwidth=4: */// +------------------------------------------------------------------------------------------------------+// | PHP version 5.1.1 |// +------------------------------------------------------------------------------------------------------+// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) |// +------------------------------------------------------------------------------------------------------+// | This file is part of eFlore. |// | |// | Foobar is free software; you can redistribute it and/or modify |// | it under the terms of the GNU General Public License as published by |// | the Free Software Foundation; either version 2 of the License, or |// | (at your option) any later version. |// | |// | Foobar 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 General Public License for more details. |// | |// | You should have received a copy of the GNU General Public License |// | along with Foobar; if not, write to the Free Software |// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |// +------------------------------------------------------------------------------------------------------+// CVS : $Id$/*** Titre** Description**@package eFlore*@subpackage ef_fiche//Auteur original :*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>//Autres auteurs :*@author aucun*@copyright Tela-Botanica 2000-2006*@version $Revision$ $Date$// +------------------------------------------------------------------------------------------------------+*/// +------------------------------------------------------------------------------------------------------+// | ENTETE du PROGRAMME |// +------------------------------------------------------------------------------------------------------+/** Inclusion du fichier de configuration de l'application Revue. *///require_once BB_CHEMIN_APPLI.'bb_revue/configuration/bbre_config.inc.php';// +------------------------------------------------------------------------------------------------------+// | CORPS du PROGRAMME |// +------------------------------------------------------------------------------------------------------+// Initialisation de la variable à retourner$retour = '';$retour .= '<!-- BiblioBota - Revue : DEBUT -->'."\n";$retour .= '<div id="biblio_revue">';// Titre de la page$retour .= '<h1>'.'Liste des revues indexées dans la base de données du projet BiblioBota.'.'</h1>';$query_tot = 'SELECT COUNT(*) AS cpt '.'FROM '.$GLOBALS['tbl']['collection'].' '.'WHERE B_C_CACHER = 0';$do_query_tot = mysql_query($query_tot) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_tot));$tmp_total = mysql_fetch_object($do_query_tot);$nb_total = $tmp_total->cpt;mysql_free_result($do_query_tot);if ($nb_total == 0) {$retour .= '<p>'.'Pas encore de revues indexées...'.'</p>'."\n";} else {$aso_revues = array();$query = 'SELECT '.$GLOBALS['tbl']['collection'].'.* '.'FROM '.$GLOBALS['tbl']['collection'].' '.'WHERE B_C_CACHER = 0 '.'ORDER BY B_C_NOMCOMPLET ';$do_query = mysql_query($query) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query));$nb_results = mysql_num_rows($do_query);while ($row = mysql_fetch_object($do_query)) {$aso_revue = array();$aso_revue['id'] = $row->B_C_CRAI;$aso_revue['idlink'] = $row->B_C_IDLINK;$aso_revue['nom_complet'] = $row->B_C_NOMCOMPLET;$aso_revue['abreviation'] = $row->B_C_ABREGE;$aso_revue['date_debut'] = $row->B_C_DATECREATION;$aso_revue['suite_de'] = $row->B_C_FAISUITE;$aso_revue['date_fin'] = $row->B_C_DATEFIN;$aso_revue['periodicite'] = $row->B_C_PERIODICITE;$aso_revue['contact_nom'] = $row->B_C_CONTACTNOM;$aso_revue['contact_mail'] = $row->B_C_CONTACTMAIL;$aso_revue['logo'] = $row->B_C_IMAGE;$aso_revue['commentaires'] = $row->B_C_COMMENT;$aso_revue['date_maj'] = $row->B_C_MAJFICHE;$aso_fasc_serie = array();$aso_fasc = array();$query_fasc = 'SELECT '.$GLOBALS['tbl']['fascicule'].'.* '.'FROM '.$GLOBALS['tbl']['fascicule'].' '.'WHERE B_F_CRAICOLL = "'.$row->B_C_CRAI.'" '.'AND B_F_CACHER = 0 '.'ORDER BY B_F_CRAISERIE, B_F_NUMERO DESC';$do_query_fasc = mysql_query($query_fasc) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_fasc));while ($row_fasc = mysql_fetch_object($do_query_fasc)) {if (!isset($aso_fasc_serie[$row_fasc->B_F_CRAISERIE])) {$aso_fasc_serie[$row_fasc->B_F_CRAISERIE] = $row_fasc->B_F_CRAISERIE;$aso_fasc['nbre_fasc'] = 1;$aso_fasc['nom_fin_serie'] = $row_fasc->B_SER_SOUSTITRE;$aso_fasc['nom_fin_fasc'] = $row_fasc->B_F_TITRE;$aso_fasc['date_fin_fasc'] = date('d/m/Y', $row_fasc->B_F_MAJFICHE);} else {$aso_fasc['nbre_fasc']++;}}mysql_free_result($do_query_fasc);ksort($aso_fasc_serie, SORT_DESC);$aso_revue['aso_fasc_serie'] = $aso_fasc_serie;$aso_revue['aso_fasc'] = $aso_fasc;$query_art = 'SELECT COUNT('.$GLOBALS['tbl']['article'].'.B_A_IDART) AS nbre_article '.'FROM '.$GLOBALS['tbl']['article'].' '.'WHERE B_A_CRAICOLL = "'.$row->B_C_CRAI.'" '.'GROUP BY B_A_CRAICOLL';//echo $query_art.'<br/>';$resultat_art = mysql_query($query_art) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_art));$ligne_article = mysql_fetch_assoc($resultat_art);//echo '<pre>'.print_r($ligne_article, true).'</pre>';$aso_revue['nbre_article'] = $ligne_article['nbre_article'];$aso_revues[] = $aso_revue;}mysql_free_result($do_query);if ($GLOBALS['_GEN_commun']['info_application']->affichage_type == 'tableau') {$o = 1;$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";$retour .= '<thead><tr>'.'<th>Collection</th>'.'<th>Date début</th>'.'<th>Date fin</th>'.'<th title="Nombre de fascicules pour la collection, toutes séries confondues">Nombre fascicules</th>'.'<th title="Nombre d\'articles pour la collection, toutes séries et fascicules confondues">Nombre d\'articles</th>'.'<th>Périodicité</th>'.'<th>Contact</th>'.'<th title="Nom du dernier fascicule dans la dernière série">Dernier fascicule</th>'.'<th title="Date de mise à jour du dernier fascicule dans la dernière série">Date dernier fascicule</th>'.'</tr></thead>'."\n";$retour .= '<tbody>';foreach ($aso_revues as $revue) {$retour .= '<tr>';$retour .= '<th>';if ($revue['nom_complet'] != '') {$retour .= '<h5 class="bbre_titre">'.$revue['nom_complet'].'</h5>';if ($revue['suite_de'] != '') {$retour .= '<p><span class="bb_intitule">Fait suite à : </span>'.$revue['suite_de'].'</p>';}if ($revue['abreviation'] != '') {$retour .= '<p><span class="bb_intitule">Abréviation : </span>'.$revue['abreviation'].'</p>';}if ($revue['commentaires'] != '') {$retour .= '<p>'.$revue['commentaires'].'</p>';}if ($revue['logo'] != '') {$retour .= '<img class="bbre_couverture" src="'.BB_CHEMIN_IMAGES_ILLUSTRATION.$revue['logo'].'" alt="Couverture de la revue '.$revue['nom_complet'].'"/>';}$retour .= '<p class="texte_inactif">Id. coll. : '.$revue['id'].' - Mise à jour : '.date('d/m/Y', $revue['date_maj']).'</p>';}$retour .= '</th>';$retour .= '<td>';if ($revue['date_debut'] != '') {$retour .= $revue['date_debut'];}$retour .= '</td>';$retour .= '<td>';if ($revue['date_fin'] != '') {$retour .= $revue['date_fin'];}$retour .= '</td>';$retour .= '<td>';if ($revue['aso_fasc']['nbre_fasc'] != '') {$retour .= $revue['aso_fasc']['nbre_fasc'];} else {$retour .= 0;}$retour .= '</td>';$retour .= '<td>';if ($revue['nbre_article'] != '') {$retour .= $revue['nbre_article'];} else {$retour .= 0;}$retour .= '</td>';$retour .= '<td>';if ($revue['periodicite'] != '') {$retour .= $revue['periodicite'];}$retour .= '</td>';$retour .= '<td>';if ($revue['contact_nom'] != '') {if ($contact_mail != '') {$retour .= '<a href="mailto:'.$revue['contact_mail'].'">'.$revue['contact_nom'].'</a>';} else {$retour .= $revue['contact_nom'];}}$retour .= '</td>';$retour .= '<td>';$retour .= $revue['aso_fasc']['nom_fin_fasc'];$retour .= '</td>';$retour .= '<td>';$retour .= $revue['aso_fasc']['date_fin_fasc'];$retour .= '</td>';$retour .= '</tr>'."\n";$o++;}$retour .= '</tbody>'."\n";$retour .= '</table>'."\n";} else {$o = 1;$retour .= '<ul id="liste_biblio_revue">'."\n";foreach ($aso_revues as $revue) {$retour .= '<li>';if ($revue['nom_complet'] != '') {$retour .= '<h5 class="bbre_titre">'.$revue['nom_complet'].'.</h5>';}if ($revue['periodicite'] != '') {$retour .= ' '.$revue['periodicite'].'.';} else {$retour .= ' Périodicité inconnue';}$retour .= ' De ';if ($revue['date_debut'] != '') {$retour .= $revue['date_debut'];} else {$retour .= '?';}$retour .= ' à ';if ($revue['date_fin'] != '') {$retour .= $revue['date_fin'].'. ';} else {$retour .= '?. ';}if ($revue['aso_fasc']['nbre_fasc'] != '') {$retour .= $revue['aso_fasc']['nbre_fasc'];} else {$retour .= 0;}$retour .= ' fascicules et ';if ($revue['nbre_article'] != '') {$retour .= $revue['nbre_article'];} else {$retour .= 0;}$retour .= ' articles indexés.';$o++;$retour .= '</li>'."\n";}$retour .= '</ul>'."\n";}}$retour .= '</div>';$retour .= '<!-- BiblioBota - Revue : FIN -->'."\n";$sortie .= $retour;/* +--Fin du code ----------------------------------------------------------------------------------------+** $Log$* Revision 1.4 2006/09/12 16:13:05 jp_milcent* Ajout de nouvelles informations à la liste des revues.** Revision 1.3 2006/07/28 12:46:47 jp_milcent* Début modification de l'interface de l'appli revue.** Revision 1.2 2006/05/29 14:19:07 jp_milcent* Ajout d'une classe css à l'image de la couverture de la revue.* Correction du chemin d'accés à l'image.** Revision 1.1 2006/05/23 16:20:50 jp_milcent* Ajout de l'application affichant la liste des revues disponibles dans la base de données de BiblioBota.*** +-- Fin du code ----------------------------------------------------------------------------------------+*/?>