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 4.1 |// +------------------------------------------------------------------------------------------------------+// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |// +------------------------------------------------------------------------------------------------------+// | This library is free software; you can redistribute it and/or |// | modify it under the terms of the GNU Lesser General Public |// | License as published by the Free Software Foundation; either |// | version 2.1 of the License, or (at your option) any later version. |// | |// | This library 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 |// | Lesser General Public License for more details. |// | |// | You should have received a copy of the GNU Lesser General Public |// | License along with this library; if not, write to the Free Software |// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |// +------------------------------------------------------------------------------------------------------+// CVS : $Id: bbc_info_media.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $/*** Appli bb_consultation : gestion des informations avancées "media" de Biblio Bota** Ce fichier permet d'afficher les informations concernant les "médias" d'un organisme lié à la botanique.**@package BiblioBota-Consultation//Auteur original :*@author Jean-Charles GRANGER <tela@vecteur.org>//Autres auteurs :*@author Jean-Pascal MILCENT <jpm@clapas.org>*@copyright Tela-Botanica 2000-2004*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $// +------------------------------------------------------------------------------------------------------+*/// +------------------------------------------------------------------------------------------------------+// | ENTETE du PROGRAMME |// +------------------------------------------------------------------------------------------------------+// +------------------------------------------------------------------------------------------------------+// | CORPS du PROGRAMME |// +------------------------------------------------------------------------------------------------------+if ($tableau['pstart']== '') {$tableau['pstart'] = 0;}$tableau['args'] = '&arg_0=str%3D'.$tableau['media'].'&arg_1=coll%3D'.$tableau['media'].'&arg_2=book%3D'.$tableau['media'].'&arg_3=media%3D'.$tableau['media'];// Proposition d'édition/*$sortie .= '<p>'."\n";if ($var_biblio['open_proposer_media'] == 1) {$sortie .= CreateNavigBiblio('add', 'media', 'Proposer un nouveau media', $tableau['media'], 1, $tableau);} else {$sortie .= ' ';}$sortie .= '</p>'."\n";*/// Récupèration du nom de la structure$requete = 'SELECT B_S_NOM '.'FROM '.$tbl['str'].' '.'WHERE B_S_IDSTR = '.$tableau['media'];$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));$num_s = mysql_num_rows($resultat);if ($num_s != 1) {$sortie .= '<p class="erreur"><strong>'.'Erreur de requête MEDIA !'.'</strong>'.' nombre de résultats (= '.$num_s.') incohérent pour la requête : '.'<br />'.$requete.'</p>';} else {$ligne = mysql_fetch_object($resultat);$la_structure = $ligne->B_S_NOM;mysql_free_result($resultat);// Comptage du nombre de médias$requete = 'SELECT COUNT(*) AS COMPTAGE '.'FROM '.$tbl['item'].', '.$tbl['media'].' '.'WHERE '.$tbl['media'].'.B_M_LKSTR = '.$tableau['media'].' '.'AND '.$tbl['item'].'.B_I_TYPPHY <> '.$def_livre.' '.'AND '.$tbl['item'].'.B_I_IDITEM = '.$tbl['media'].'.B_M_IDMEDIA';$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));$tmp_nb_c = mysql_fetch_object($resultat);$num_c = $tmp_nb_c->COMPTAGE;mysql_free_result($resultat);$requete = 'SELECT '.$tbl['item'].'.*, '.$tbl['media'].'.*, GEN_MON_SYMBOLE, B_AS_LIBELLE, GEN_MON_VAL1EURO, '.$tbl['item_typphy'].'.*, '.$tbl['item_typlog'].'.*, '.$tbl['domaine'].'.* '.'FROM '.$tbl['item'].', '.$tbl['media'].', '.$tbl['monnaie'].', '.$tbl['saisie'].', '.$tbl['item_typphy'].', '.$tbl['item_typlog'].', '.$tbl['domaine'].', '.$tbl['domaine_lk'].' '.'WHERE B_M_LKSTR = '.$tableau['media'].' '.'AND B_I_TYPPHY <> '.$def_livre.' '.'AND B_I_IDITEM = B_M_IDMEDIA '.'AND GEN_MON_IDMONNAIE = B_M_LKMONNAIE '.'AND B_I_AUTEURSAISIE = B_AS_ID '.'AND B_I_TYPLOG = B_IL_ID '.'AND B_I_TYPPHY = B_IP_ID '.'AND B_I_IDITEM = B_DL_IDITEM '.'AND B_DL_IDDOM = B_D_ID '.'ORDER BY B_I_TYPLOG, B_I_TYPPHY, B_I_AUTEURS '.'LIMIT '.$tableau['pstart'].', '.$var_biblio['how_book'];$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));$nb_m = mysql_num_rows($resultat);// Affichage du titre$sortie .= '<h1>'.$la_structure.' : médias'.'</h1>'."\n";// Récupération d'informationsif (empty($tableau['step'])) {$tableau['step'] = $var_biblio['how_book'];}if (empty($tableau['pend'])) {$tableau['pend'] = $num_c;}if (empty($tableau['libelle'])) {$tableau['libelle'] = 'média';}if (empty($tableau['feminin'])) {$tableau['feminin'] = 0;}// Affichage du nbre de résultats$sortie .= '<p id="frag_nbre_resultat">';$sortie .= FRAG_afficherTxtNbreResultat('bbpopup', $tableau, $nb_m, $num_c);$sortie .= '</p>'."\n";// Ici on fragmente en pages, pour une navigation plus facile$frag = new fragmenteur(' - ', 10, BB_URL_COURANTE_CONSULTATION_AVANCEE);$frag_txt = $frag->fragmente($tableau, $num_c);if (($frag->nb_pages)>1) {$sortie .= '<p class="frag_navigation">'.$frag_txt.'</p>'."\n";}// Affichage des médiasif ($num_c == 0) {$sortie .= '<p class="information">'.'Aucun média indexé.'.'</p>'."\n";} else {$sortie .= '<ul id="bb_liste_article">'."\n";while ($ligne = mysql_fetch_object($resultat)) {$id_a = $ligne->B_I_IDITEM;$titre = $ligne->B_I_TITRE;$auteurs = $ligne->B_I_AUTEURS;$geo = $ligne->B_I_GEO;$langue = $ligne->B_I_LANGUE;$resum = $ligne->B_I_RESUMCLE;$image = $ligne->B_I_IMAGE;$saisie = $ligne->B_AS_LIBELLE;$comment = $ligne->B_I_COMMENT;$date = $ligne->B_M_DATE;$prix = $ligne->B_M_PRIX;$idmonnaie = $ligne->B_M_LKMONNAIE;$monnaie = $ligne->GEN_MON_SYMBOLE;$converter = $ligne->GEN_MON_VAL1EURO;$volume = $ligne->B_M_VOLUME;$edite = $ligne->B_M_EDITE;$vendu = $ligne->B_M_VEND;$editeur = $ligne->B_M_EDITEUR;$collection_book = $ligne->B_M_COLLECTION;$numcoll_book = $ligne->B_M_NUMCOLL;$get_domaine_id = $ligne->B_D_ID;$get_domaine_nom = $ligne->B_D_LABEL;$item_phy = $ligne->B_IP_LABEL;$icon_phy = $ligne->B_IP_IMAGE;$item_log = $ligne->B_IL_LABEL;$icon_log = $ligne->B_IL_IMAGE;$sortie .= '<li>'."\n";if ($image != '') {$sortie .= '<img class="bb_img_media" src="'.BB_CHEMIN_IMAGES_ILLUSTRATION.$image.'" '.'alt="'.'Illustration du média : '.$titre.'" />';}$sortie .= '<span class="texte_inactif">';if ($get_domaine_id != 1) {$sortie .= '['.$get_domaine_nom.']'."\n";}if ($icon_phy != '') {$sortie .= '<img class="'.BB_CLASS_IMG_ICONE.'" src="'.BB_CHEMIN_IMAGES_TYPE_PHYSIQUE.$icon_phy.'" alt="'.$item_phy.'" />';} else {$sortie .= '['.$item_phy.']';}if (($icon_phy == '') && ($icon_log)) {$sortie .= ' - ';}if ($icon_log != '') {$sortie .= '<img class="'.BB_CLASS_IMG_ICONE.'" src="'.BB_CHEMIN_IMAGES_TYPE_LOGIQUE.$icon_log.'" alt="'.$item_log.'" />';} else {$sortie .= '['.$item_log.']';}$sortie .= '</span> ';$sortie .= $auteurs.' - '.'<strong>'.$titre.'</strong>'.' -'."\n";$sortie .= ' Éditeur : ';if ($editeur != '') {$sortie .= $editeur;} else {$sortie .= 'inconnu';}$sortie .= ' - ';if (($collection_book != '') || ($numcoll_book != '')) {$sortie .= 'Collection : '.$collection_book.' '.$numcoll_book.' - ';}if ($geo != '') {$sortie .= 'Départ./Région : '.'<em>'.$geo.'</em>'.' -';}if ($date > 0) {$sortie .= ' '.DAT_formaterDateYYYYMMJJ($date).', ';}if ($volume != '') {$sortie .= $volume.', ';}if ($prix > 0) {$sortie .= $prix.' '.$monnaie;}if (($def_euro != $idmonnaie) && ($converter > 0)) {$sortie .= ' (env. '.round($prix / $converter, 2).' €)';}if ($langue != '') {$sortie .= ' ('.$langue.')';}if (($resum != '') || ($comment != '')) {$sortie .= ' - '.'<em>'.$comment;if (($resum != '') && ($comment != '')) {$sortie .= ' - ';}$sortie .= $resum.'</em>';}if ($vendu == -1) {$sortie .= ' - '.'<img class="'.BB_CLASS_IMG_EPUISE.'" src="'.BB_IMG_EPUISE.'" alt="'.'Épuisé'.'" />';}if (($edite == 1) || ($vendu == 1)) {$sortie .= ' - '.'Organisme ';if ($edite == 1) {$sortie .= 'éditeur';}if (($edite == 1) && ($vendu == 1)) {$sortie .= ' et ';}if ($vendu == 1) {$sortie .= 'vendeur';}$sortie .= ' de l\'article';}if ($saisie != '') {$sortie .= '<span class="texte_inactif">'.' - '.'Saisie : '.$saisie.' - '.'Art. n°'.$id_a.'.'.'</span>';}// Là on affiche les Voir Aussi Médias ... si y'en a$UnVoirAussi = new VoirAussi($id_a, $tbl['article']);if ($UnVoirAussi->NbVA > 0) {$sortie .= '<br />'.'Consulter : ';$liste_va = $UnVoirAussi->ListerVoirAussi();for ($i = 0; $i == (($UnVoirAussi->NbVA) - 1); $i++) {$sortie .= '<img class="'.BB_CLASS_IMG_ICONE.'" src="'.$liste_va[$i]['icon_src'].'" alt="'.$liste_va[$i]['icon_alt'].'" /> ';$sortie .= '<a '.$liste_va[$i]['target'].'>'.$liste_va[$i]['texte'].'</a>';if ($liste_va[$i]['desc'] != '') {$ret .= ' - '.'<em>'.$liste_va[$i]['desc'].'</em>';}}}$sortie .= '</li>'."\n";}$sortie .= '</ul>'."\n";}mysql_free_result($resultat);}/* +--Fin du code ----------------------------------------------------------------------------------------+** $Log: not supported by cvs2svn $** +-- Fin du code ----------------------------------------------------------------------------------------+*/?>