Subversion Repositories eFlore/Applications.bibliobota

Rev

Rev 5 | Rev 8 | 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";
// Titre de la page
$retour .= '<h1>'.'Revues'.'</h1>';
// Petit descriptif
$retour .= '<p>'.'Liste des revues indexées dans la base de données du projet BiblioBota.'.'</p>'."\n";

$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 {
    $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);
        
        $o = 1;
        $retour .= '<ul>'."\n";
        while ($row = mysql_fetch_object($do_query)) {
        $id = $row->B_C_CRAI;
        $idlink = $row->B_C_IDLINK;
        $nom_complet = $row->B_C_NOMCOMPLET;
        $abreviation = $row->B_C_ABREGE;
        $date_debut = $row->B_C_DATECREATION;
        $suite_de = $row->B_C_FAISUITE;
        $date_fin = $row->B_C_DATEFIN;
        $periodicite = $row->B_C_PERIODICITE;
        $contact_nom = $row->B_C_CONTACTNOM;
        $contact_mail = $row->B_C_CONTACTMAIL;
        $logo = $row->B_C_IMAGE;
        $commentaires = $row->B_C_COMMENT;
        $date_maj = $row->B_C_MAJFICHE;
                $retour .= '<li>';
        if ($nom_complet != '') {
            $retour .= '<h5 class="bbre_titre">'.$nom_complet.'</h5>';
            if ($commentaires != '') {
                $retour .= '<p>'.$commentaires.'</p>';
                }
            if ($logo != '') {
                $retour .= '<img class="bb_image_revue" src="'.BB_CHEMIN_IMAGES_ILLUSTRATION.$logo.'" alt="Couverture de la revue '.$nom_complet.'"/>';
                }
        }
        $retour .= '<dl class="ajout_2point">'."\n";
                if ($suite_de != '') {
                        $retour .= '<dt>Fait suite à </dt><dd>'.$suite_de.'</dd>';
                }
                if ($abreviation != '') {
                        $retour .= '<dt>Abreviation</dt><dd>'.$abreviation.'</dd>';
                }
                if ($date_debut != '') {
                        $retour .= '<dt>Date de début</dt><dd>'.$date_debut.'</dd>';
                }
                if ($date_fin != '') {
                        $retour .= '<dt>Date de fin</dt><dd>'.$date_fin.'</dd>';
                }
                if ($periodicite != '') {
                        $retour .= '<dt>Périodicité</dt><dd>'.$periodicite.'</dd>';
                }
                if ($contact_nom != '') {
                        if ($contact_mail != '') {
                                $retour .= '<dt>Contact</dt><dd><a href="mailto:'.$contact_mail.'">'.$contact_nom.'</a></dd>';
                        } else {
                                $retour .= '<dt>Contact</dt><dd>'.$contact_nom.'</dd>';
                        }
                }
                $retour .= '</dl>'."\n";
                $retour .= '<span class="texte_inactif">'.'Id. coll. : '.$id.' - Mise à jour : '.date('d/m/Y', $date_maj).'.</span>';
        $o++;
    }
    $retour .= '</ul>'."\n";
    mysql_free_result($do_query);
}

$retour .= '<!-- BiblioBota - Revue : FIN -->'."\n";
$sortie .= $retour;

/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log$
* 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 ----------------------------------------------------------------------------------------+
*/
?>