Subversion Repositories eFlore/Applications.bibliobota

Compare Revisions

Ignore whitespace Rev 23 → Rev 29

/tags/2015_03_02/applications/bb_consultation/configuration/bbc_config.inc.php
New file
0,0 → 1,50
<?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_config.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Configuration de l'application de consultation de Biblio Bota
*
* Ce fichier permet de stocker les valeurs de configuration spécifique à l'application
* de consultation de Biblio Bota.
*
*@package BiblioBota-Consultation
*@subpackage Configuration
//Auteur original :
*@author Jean-Charles GRANGER <tela@vecteur.org>
//Autres auteurs :
*@author Jean-Pascal MILENT <jpm@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/*Mettre ici les inclusions de fichiers*/
 
// +------------------------------------------------------------------------------------------------------+
// Définition des chemins de fichiers.
/** Constante stockant le chemin du dossier contenant les styles de l'application de consultation de Biblio Bota..*/
define('BBC_CHEMIN_STYLES', BB_CHEMIN_APPLI.'bb_consultation/presentations/styles/');
/** Constante stockant le chemin du dossier contenant la bibliothèque de code de l'application de consultation de Biblio Bota.*/
define('BBC_CHEMIN_BIBLIO', BB_CHEMIN_APPLI.'bb_consultation/bibliotheque/');
/tags/2015_03_02/applications/bb_consultation/bbc_info_collection.inc.php
New file
0,0 → 1,296
<?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_collection.inc.php,v 1.2 2007-02-13 18:06:41 jp_milcent Exp $
/**
* Appli bb_consultation : gestion des informations avancées "collection" de Biblio Bota
*
* Ce fichier permet d'afficher les informations concernant les "collections" 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.2 $ $Date: 2007-02-13 18:06:41 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// DEBUT COLLECTION
 
$tableau['args'] = '&amp;arg_0=str%3D'.$tableau['coll'].'&amp;arg_1=coll%3D'.$tableau['coll'].
'&amp;arg_2=book%3D'.$tableau['coll'].'&amp;arg_3=media%3D'.$tableau['coll'];
 
// Proposition d'édition
/*
if ($var_biblio['open_proposer_collection'] == 1) {
$sortie .= CreateNavigBiblio('add', 'coll', 'un périodique', '', 1, $tableau);
}
*/
 
// Récupèration du nom de la structure
$querybis = 'SELECT '.$tbl['str'].'.B_S_NOM '.
'FROM '.$tbl['str'].' WHERE '.$tbl['str'].'.B_S_IDSTR = '.$tableau['coll'];
$do_querybis = mysql_query($querybis) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $querybis));
$nbbis = mysql_num_rows($do_querybis);
 
// Gestion des messages d'erreurs
if ($nbbis == 1) {
$rowbis = mysql_fetch_object($do_querybis);
$get_nom = $rowbis->B_S_NOM;
} else {
$sortie .= '<p class="erreur"><b>'.'Erreur !!'.'</b> - '.$nbbis.' données trouvées pour la structure source.</p>'."\n";
}
mysql_free_result ($do_querybis);
 
// Affichage du titre de la page
$sortie .= '<h1>'.$get_nom.' : Périodiques'.'</h1>'."\n";
 
// Recherche des périodiques
$query = 'SELECT '.$tbl['collection'].'.*, '.$tbl['str'].'.B_S_NOM '.
'FROM '.$tbl['collection'].', '.$tbl['str'].' '.
'WHERE '.$tbl['collection'].'.B_C_LKSTR = "'.$tableau['coll'].'" '.
'AND '.$tbl['collection'].'.B_C_LKSTR = '.$tbl['str'].'.B_S_IDSTR '.
'AND B_C_CACHER = 0 '.
'ORDER BY B_C_CRAI';
$do_query = mysql_query($query) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query));
$nb = mysql_num_rows($do_query);
 
// Pour savoir à quelle collection on en est
$ktest = 1;
 
if ($nb > 1) {
$pluriel = 's';
} else {
$pluriel = '';
}
$sortie .= '<p id="frag_nbre_resultat"><b>'.$nb.'</b> '.'périodique'.$pluriel.' trouvé'.$pluriel.'.'.'</p>'."\n";
if ($nb == 0) {
$sortie .= '<p class="information">'.'Aucun périodique indexé.'.'</p>'."\n";
} else {
// Il y a des resultats : on affiche les collections (périodiques) de la structure.
$sortie .= '<ul id="bb_liste_periodique">'."\n";
while ($row = mysql_fetch_object($do_query)) {
$idcoll = $row->B_C_CRAI;
$tableau['pass'] = $idcoll;
$nom = $row->B_C_NOMCOMPLET;
$nom_str = $row->B_S_NOM;
$abrege = $row->B_C_ABREGE;
$date = $row->B_C_DATECREATION;
$faissuite = $row->B_C_FAISSUITE;
$datefin = $row->B_C_DATEFIN;
$devient = $row->B_C_DEVIENT;
$perio = $row->B_C_PERIODICITE;
$contact = $row->B_C_CONTACTNOM;
$mail = $row->B_C_CONTACTMAIL;
$image = $row->B_C_IMAGE;
$comment = $row->B_C_COMMENT;
$datemaj = $row->B_C_MAJFICHE;
$sortie .= '<li>'."\n";
// Affichage d'un image du périodique
if ($image != '') {
$sortie .= '<img class="bb_img_periodique" src="'.BB_CHEMIN_IMAGES_ILLUSTRATION.$image.'" '.
'alt="'.'Photo de couverture de la revue : '.$nom.'" />'."\n";
}
// Affichage du titre de la collection
$sortie .= '<h3>'.$nom;
if ($abrege != '') {
$sortie .= ' ('.$abrege.')';
}
$sortie .= ' </h3>'."\n";
// Affichage de la navigation avancée
if ($intobiblio > 0) {
$sortie .= CreateNavigBiblio('goto', 'fasc', $tableau, 'Voir la liste des fascicules indexés', 1)."\n";
}
// Comptage du nombre de fascicules indexés
$query_ser = 'SELECT COUNT(*) AS CPT '.
'FROM '.$tbl['fascicule'].' '.
'WHERE B_F_CRAICOLL = "'.$idcoll.'" '.
'AND B_F_CACHER = 0';
$result_ser = mysql_query($query_ser) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_ser));
$nb_ser = mysql_num_rows($result_ser);
if($nb_ser != 1) {
$sortie .= '<p class="erreur"><strong>'.'Échec du programme : '.'</strong> '.'Nombre de fascicules incohérent'.' '.'('.$nb_ser.')</p>'."\n";
} else {
$row_ser = mysql_fetch_object($result_ser);
$intobiblio = $row_ser->CPT;
mysql_free_result($result_ser);
$sortie .= '<p>'."\n";
if ($date > 0) {
$sortie .= '<span class="champ_cle">'.'Créé en'.' </span>'.FormateDateYYYYMMJJ($date).'.'.'<br />'."\n";
}
if ($faissuite != '') {
$sortie .= '<span class="champ_cle">'.'Fait suite à'.' '.':'.'</span> '.$faissuite.'.'.'<br />'."\n";
}
if ($datefin > 0) {
$sortie .= '<span class="champ_cle">'.'S\'est arrêté en'.'</span> '.FormateDateYYYYMMJJ($datefin).'.'.'<br />'."\n";
}
if ($devient != '') {
$sortie .= '<span class="champ_cle">'.'Est devenu'.' '.':'.'</span> '.$devient.'.'.'<br />'."\n";
}
if (($date > 0) || ($faissuite != '') || ($datefin > 0) || ($devient != '')) {
$sortie .= '<br />';
}
if ($comment != '') {
$sortie .= '<span class="champ_cle">'.'Remarques'.' '.':'.'</span> '.$comment.'<br />'."\n";
}
if ($perio != '') {
$sortie .= '<span class="champ_cle">'.'Périodicité'.' '.':'.'</span> '.$perio.'<br />'."\n";
}
if ($mail != '') {
if ($contact != '') {
$aff_url = $contact;
} else {
$aff_url = $mail;
}
$sortie .= '<span class="champ_cle">'.'Contact'.' '.':'.'</span> <a href="mailto:'.$mail.'">'.$aff_url.'</a><br />'."\n";
}
// Visualisation des séries
$query_visu = 'SELECT * '.
'FROM '.$tbl['serie'].' '.
'WHERE B_SER_CRAICOLL = "'.$idcoll.'" '.
'ORDER BY B_SER_CRAICOLL, B_SER_IDSERIE';
$resu_visu = mysql_query($query_visu) or die("<B>Erreur de récup des séries</B> : $query_visu");
$nb_visu = mysql_num_rows($resu_visu);
$sortie .= '</p>'."\n";
if ($nb_visu > 0) {
$sortie .= '<p>'."\n";
$sortie .= '<span class="champ_cle">'.'Séries'.' '.':'.'</span> '."\n";
$sortie .= '</p>'."\n";
$sortie .= '<ul>'."\n";
while ($row = mysql_fetch_object($resu_visu)) {
$visu_id_serie = $row->B_SER_IDSERIE;
$visu_ss_titre = $row->B_SER_SOUSTITRE;
$visu_debut = $row->B_SER_DATEDEBUT;
$visu_fin = $row->B_SER_DATEFIN;
$visu_into = $row->B_SER_INTOBIBLIO;
$sortie .= '<li>'."\n";
if ($visu_ss_titre == '') {
$visu_ss_titre = 'Série n°'.$visu_id_serie;
}
$sortie .= ' '.$visu_ss_titre.' ';
if (($visu_ss_titre != '') && ($visu_debut > 0)) {
$sortie .= '-';
}
if ($visu_debut > 0) {
$sortie .= ' <i>'.'Début'.'</i> '.':'.' '.FormateDateYYYYMMJJ($visu_debut);
}
if (($visu_debut > 0) && ($visu_fin > 0)) {
$sortie .= ' -';
}
if ($visu_fin > 0) {
$sortie .= ' <i>'.'Fin'.'</i> '.':'.' '.FormateDateYYYYMMJJ($visu_fin);
}
if ($visu_into == 1) {
$visu_aff = ' '.'['.'indexée'.']'."\n";
} else {
$visu_aff = ' '.'['.'non indexée'.']'."\n";
}
$sortie .= $visu_aff;
$sortie .= '</li>'."\n";
}
$sortie .= '</ul>'."\n";
}
mysql_free_result($resu_visu);
// Là on affiche les Voir Aussi Collections ... si y'en a
$UnVoirAussi = new VoirAussi($idcoll, $tbl['collection']);
if ($UnVoirAussi->NbVA > 0) {
$sortie .= '<p>'."\n";
$sortie .= '<strong>'.'Consulter'.' '.':'.'</strong><br />';
$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 .= '</p>'."\n";
}
// Affichage des méta-données
$sortie .= '<p class="texte_inactif bb_txt_centre">';
if ($datemaj > 0) {
$sortie .= 'Dernière mise à jour de la fiche'.' '.':'.' '.date('d/m/Y',$datemaj).' '.'-'.' ';
} else {
$sortie .= 'Réf.'.' ';
}
$sortie .= $idcoll;
$sortie .= '</p>'."\n";
// Affichage d'un séparateur
if ($ktest < $nb) {
$sortie .= '<hr class="bb_separateur_horizontal" />'."\n";
}
$sortie .= '</li>'."\n";
$ktest++;
}
}
$sortie .= '</ul>'."\n";
}
mysql_free_result($do_query);
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/11/23 10:22:25 jp_milcent
* Ajout au dépot de l'application BiblioBota.
* Elle doit à terme migrer dans eFlore.
*
* Revision 1.3 2005/08/18 10:43:15 jpm
* Correction chemin.
*
* Revision 1.2 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.1 2004/09/16 12:06:31 jpm
* Décomposition du fichier information en plusieurs fichiers.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bb_consultation.php
New file
0,0 → 1,137
<?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: bb_consultation.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Appli bb_consultation : moteur de recherche de Biblio Bota
*
* Cette application permet de gérer les moteurs de recherches et la consultation des informations
* de l'ensemble des données comprise dans le modèle de Biblio Bota :
* - articles
* - livres et média
* - sites web
* - organismes
*
*@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 |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier de configuration spécifique à l'application consultation de BiblioBota.*/
require_once 'client/biblio_bota/applications/bb_consultation/configuration/bbc_config.inc.php';
/** Inclusion de la bibliothèque de fonction d'affichage spécifique à l'application consultation de BiblioBota.*/
require_once BBC_CHEMIN_BIBLIO.'bbc_affichage.fonct.php';
 
// Initialisation de variables
$sortie .= '<!-- BiblioBota - Consultation : DEBUT -->'."\n";
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
if (!isset($_GET['consultation'])) {
include_once 'bbc_recherche.inc.php';
} elseif (isset($_GET['consultation']) && $_GET['consultation'] == 'avancee') {
global $tbl;
global $var_biblio;
global $def_livre;
global $def_euro;
global $TransTab;
if ((isset($TransTab)) && ($TransTab != '')) {
$tableau = FRAG_decoupageChaine($TransTab);
}
if (empty($tableau['pstart'])) {
$tableau['pstart'] = 0;
}
if (isset($_GET['str']) && !empty($_GET['str'])) {
$tableau['str'] = $_GET['str'];
include_once 'bbc_info_structure.inc.php';
} else if (isset($_GET['coll']) && !empty($_GET['coll'])) {
$tableau['coll'] = $_GET['coll'];
include_once 'bbc_info_collection.inc.php';
} else if (isset($_GET['fasc']) && !empty($_GET['fasc'])) {
$tableau['fasc'] = $_GET['fasc'];
include_once 'bbc_info_fascicule.inc.php';
} else if (isset($_GET['art']) && !empty($_GET['art'])) {
$tableau['art'] = $_GET['art'];
include_once 'bbc_info_article.inc.php';
} else if (isset($_GET['book']) && !empty($_GET['book'])) {
$tableau['book'] = $_GET['book'];
include_once 'bbc_info_livre.inc.php';
} else if (isset($_GET['media']) && !empty($_GET['media'])) {
$tableau['media'] = $_GET['media'];
include_once 'bbc_info_media.inc.php';
} else {
$sortie .= '<p>'."\n";
$sortie .= 'Pas de paramètre str, coll, fasc, art, media ou livre -- Impossible d\'afficher des données.';
if (isset($tableau['str'])) {
$sortie .= ' '.'('.'id_str'.' '.'='.' '.$tableau['str'].')';
}
$sortie .= '</p>'."\n";
}
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
$sortie .= '<!-- BiblioBota - Consultation : FIN -->'."\n";
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.7 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.6 2005/02/24 18:32:40 jpm
* Mise en global d'une variable.
*
* Revision 1.5 2004/09/16 12:28:57 jpm
* Ajout de l'affichage d'un message d'erreur.
*
* Revision 1.4 2004/09/16 12:06:39 jpm
* Décomposition du fichier information en plusieurs fichiers.
*
* Revision 1.3 2004/09/14 10:18:31 jpm
* Mise en forme et amélioration du code.
* Passage au XHTML strict.
*
* Revision 1.2 2004/09/10 18:42:44 jpm
* Transformations des ancien pop-up de Bilblio Bota en consultation avancée...
* Ajout d'un fichier fournissant les moteurs de recherche et d'un fichier gérant la consultation avancée.
*
* Revision 1.1 2004/09/10 09:45:28 jpm
* Ajout des fichiers BiblioBota configurer pour Papyrus.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bbc_recherche.inc.php
New file
0,0 → 1,373
<?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_recherche.inc.php,v 1.3 2006-12-08 17:39:26 jp_milcent Exp $
/**
* Appli bb_consultation : gestion des moteurs de recherche de Biblio Bota
*
* Cette application permet de gérer les moteurs de recherches de l'ensemble des données comprise
* dans le modèle de Biblio Bota :
* - articles botaniques
* - livres et média botaniques
* - sites web
* - organismes liés à 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.3 $ $Date: 2006-12-08 17:39:26 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
/** Inclusion de la bibliothèque de réaliser les statistiques spécifiques à l'application consultation de BiblioBota.*/
require_once BBC_CHEMIN_BIBLIO.'bbc_statistique.fonct.php';
 
// Globalisation des variables
global $TabFinder, $TransTab, $plugin, $tbl;
if (isset($TransTab)) {
$TabFinder = FRAG_decoupageChaine($TransTab);
}
 
// Vérification de l'utilisation de BiblioBota comme service web
if (empty($TabFinder['plugin'])) {
$TabFinder['plugin'] = '';
}
if (BB_ARGUMENT_SERVICE != '' && $TabFinder['plugin'] == '') {
$TabFinder['plugin'] = BB_ARGUMENT_SERVICE;
}
// Limitation au domaine ?
if (BB_ARGUMENT_DOMAINE != 1) {
$var_biblio['limit_domain'] = 1;
} else {
$var_biblio['limit_domain'] = 0;
}
 
// Gestion du mode du moteur: nomal ou avancé ( = plus d'options)
if (empty($TabFinder['finder_mode'])) {
$TabFinder['finder_mode'] = 'normal';
}
 
// Initialisation de TabFinder au cas ou cela n'aurait pas été fait
if (!isset($TabFinder['plugin'])) $TabFinder['plugin'] = '';
if (!isset($TabFinder['geo'])) $TabFinder['geo'] = '';
if (!isset($TabFinder['chaine'])) $TabFinder['chaine'] = '';
if (!isset($TabFinder['sort'])) $TabFinder['sort'] = $GLOBALS['moteur_biblio']['defaut_sort'];
if (!isset($TabFinder['auteur'])) $TabFinder['auteur'] = '';
if (!isset($TabFinder['categ'])) $TabFinder['categ'] = '';
if (!isset($TabFinder['pstart'])) $TabFinder['pstart'] = '0';
if (!isset($TabFinder['step'])) $TabFinder['step'] = '20';
if (!isset($TabFinder['valid'])) $TabFinder['valid'] = '0';
if (!isset($TabFinder['typque'])) $TabFinder['typque'] = '1';
if (!isset($TabFinder['categ_2'])) $TabFinder['categ_2'] = '';
if (!isset($TabFinder['categ_3'])) $TabFinder['categ_3'] = '';
if (!isset($TabFinder['since'])) $TabFinder['since'] = '';
if (!isset($TabFinder['finder_mode'])) $TabFinder['finder_mode'] = 'normal';
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// no_help est une variable qui est passée par un PlugIn s'il n'y a pas besoin d'aide
global $no_help;
 
// +------------------------------------------------------------------------------------------------------+
// Début de gestion des services Web (plugin)
if ($TabFinder['plugin'] != '') {
// Séparation des éléments du PlugIn
$plugin_exp = explode('-', $TabFinder['plugin']);
// Mise en global des variables utilisées ailleurs
global $plugin_store;
// Création des arguments pour les onglets
$TabFinder['args'] = '&amp;arg_0=plugin%3D'.$TabFinder['plugin'].'&amp;arg_1=plugin%3D'.$TabFinder['plugin'];
 
// L'argument 0 de plugin_exp peut avoir les valeurs :
// str (réduction à une structure), coll (réduction à une collection), aut (réduction à des auteurs)
switch ($plugin_exp[0]) {
case 'str':
// On récupère ici dans plugin l'identifiant d'une structure,
// il faut donc réduire à cette structure dans la requête
if (BB_ARGUMENT_REGROUPEMENT == 'article') {
$plugin_store['count_add_table'] = ', '.$tbl['article'].', '.$tbl['fascicule'].', '.$tbl['serie'].', '.$tbl['collection'];
$plugin_store['count_add_query'] = ' AND B_C_LKSTR = '.$plugin_exp[1].' '.
'AND B_C_CRAI = B_SER_CRAICOLL '.
'AND B_SER_CRAICOLL = B_F_CRAICOLL '.
'AND B_SER_IDSERIE = B_F_CRAISERIE '.
'AND B_F_CRAICOLL = B_A_CRAICOLL '.
'AND B_F_CRAISERIE = B_A_CRAISERIE '.
'AND B_F_NUMERO = B_A_CRAIFASC '.
'AND B_I_IDITEM = B_A_IDART ';
$plugin_store['categ_add_table'] = ', '.$tbl['article'].', '.$tbl['fascicule'].', '.$tbl['item'];
$plugin_store['categ_add_query'] = ' AND B_C_LKSTR = '.$plugin_exp[1].' '.
'AND B_SER_IDSERIE = B_F_CRAISERIE '.
'AND B_F_CRAICOLL = B_A_CRAICOLL '.
'AND B_F_CRAISERIE = B_A_CRAISERIE '.
'AND B_F_NUMERO = B_A_CRAIFASC '.
'AND B_I_IDITEM = B_A_IDART ';
} else if (BB_ARGUMENT_REGROUPEMENT == 'media') {
$plugin_store['count_add_table'] = ', '.$tbl['media'];
$plugin_store['count_add_query'] = ' AND B_M_LKSTR = '.$plugin_exp[1].' '.
'AND B_I_IDITEM = B_M_IDMEDIA ';
$plugin_store['categ_add_table'] = '';
$plugin_store['categ_add_query'] = ' AND B_M_LKSTR = '.$plugin_exp[1].' ';
$plugin_store['query_add_query'] = ' AND B_M_LKSTR = '.$plugin_exp[1].' ';
}
break;
case 'coll':
// On récupère ici dans plugin l'identifiant d'une collection,
// il faut donc réduire à cette collection dans la requête
// cette option n'existe que pour le regroupement ARTICLE
if (BB_ARGUMENT_REGROUPEMENT == 'article') {
$plugin_store['count_add_table'] = ', '.$tbl['article'];
$plugin_store['count_add_query'] = ' AND B_A_CRAICOLL = "'.$plugin_exp[1].'" AND B_I_IDITEM = B_A_IDART ';
$plugin_store['categ_add_table'] = '';
$plugin_store['categ_add_query'] = ' AND B_C_CRAI = "'.$plugin_exp[1].'" ';
$plugin_store['query_add_query'] = ' AND B_C_CRAI = "'.$plugin_exp[1].'" ';
} else if (BB_ARGUMENT_REGROUPEMENT == 'media') {
// leurre pour finir proporement le script
$plugin_store['count_add_table'] = '';
$plugin_store['count_add_query'] = ' AND B_I_IDITEM = "aeiouy"';
$plugin_store['categ_add_table'] = '';
$plugin_store['categ_add_query'] = '';
$plugin_store['query_add_query'] = '';
}
break;
case 'aut':
// On récupère ici dans plugin des identifiants d'auteurs
// il faut donc réduire à ces auteurs dans la requête
// les noms d'auteurs sont séparés par des "!"
$plugin_auteurs = explode('@',$plugin_exp[1]);
$plugin_i = 0;
$plugin_action = ' AND (';
while ($plugin_i < count($plugin_auteurs)) {
if ($plugin_i != 0) {
$plugin_action .= ' OR ';
}
$plugin_action .= 'B_I_AUTEURSAISIE LIKE "%'.$plugin_auteurs[$plugin_i].'%" ';
$plugin_i++;
}
$plugin_action .= ') ';
$plugin_store['count_add_table'] = '';
$plugin_store['count_add_query'] = $plugin_action;
if (BB_ARGUMENT_REGROUPEMENT == 'article') {
$plugin_store['categ_add_table'] = ", ".$tbl['article'].", ".$tbl['fascicule'].", ".$tbl['item'];
$plugin_store['categ_add_query'] = ' '.$plugin_action.' '.
'AND B_C_CRAI = B_SER_CRAICOLL '.
'AND B_SER_CRAICOLL = B_F_CRAICOLL '.
'AND B_SER_IDSERIE = B_F_CRAISERIE '.
'AND B_F_CRAICOLL = B_A_CRAICOLL '.
'AND B_F_CRAISERIE = B_A_CRAISERIE '.
'AND B_F_NUMERO = B_A_CRAIFASC '.
'AND B_I_IDITEM = B_A_IDART ';
$plugin_store['query_add_query'] = ' '.$plugin_action.' ';
} else if (BB_ARGUMENT_REGROUPEMENT == 'media') {
$plugin_store['categ_add_table'] = '';
$plugin_store['categ_add_query'] = ' '.$plugin_action.' ';
$plugin_store['query_add_query'] = ' '.$plugin_action.' ';
}
break;
default:
die('Regroupement PLUGIN impossible... Méthode Plugin par défaut inexistante (méthodes disponibles : str, coll et aut).');
break;
}
} // Fin de gestion des services Web
 
// +------------------------------------------------------------------------------------------------------+
// Création de l'interface du moteur de recherche
require_once BBC_CHEMIN_BIBLIO.'bbc_moteur_'.BB_ARGUMENT_OBJET.'.fonct.php';
$sortie .= mkengine();
// Affichage des résultats d'une recherche
if ((isset($TabFinder)) && ($TabFinder['valid'] == 1)) {
global $nbr_total;
if ($nbr_total > 1) {
$pluriel_tot = 's';
}
// Création de la requête
include_once BBC_CHEMIN_BIBLIO.'bbc_requete_'.BB_ARGUMENT_OBJET.'.fonct.php';
$requete = mkquery();
// DEBOGAGE : pour voir la requete finale
//$GLOBALS['_DEBOGAGE_'] .= $requete.'<br>';
//Requete de calcul du nombre total d'enregistrements de la table
$result_local = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$nbr_local = mysql_num_rows($result_local);
mysql_free_result($result_local);
if ($nbr_local > 1) {
$pluriel_loc = 's';
}
// Requete de sélection sur la quantité de données demandées par l'utilisateur (avec bornes LIMIT)
if ($TabFinder['pstart'] == '') {
$TabFinder['pstart'] = 0;
}
$query_final = ' LIMIT '.$TabFinder['pstart'].', '.$TabFinder['step'];
global $result_final;
$result_final = mysql_query($requete.$query_final) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete.$query_final));
global $nbr_final;
$nbr_final = mysql_num_rows($result_final);
$sortie .= '<p class="insTitle1">';
$TabFinder['pend'] = $nbr_local;
$sortie .= FRAG_afficherTxtNbreResultat('', $TabFinder, $nbr_local, $nbr_total);
$sortie .= '</p>';
if (($nbr_local > 0) && ($TabFinder['step'] < $nbr_local)) {
$sortie .= '<p id="fragmenteur_tete" class="fragmenteur">';
$frag = new fragmenteur();
$sortie .= $frag->fragmente($TabFinder, $nbr_local);
$sortie .= '</p>';
}
include_once BBC_CHEMIN_BIBLIO.'bbc_affichage_'.BB_ARGUMENT_OBJET.'.fonct.php';
$sortie .= mkresu();
mysql_free_result($result_final);
if (($TabFinder['step'] >= 20) && ($nbr_local - $TabFinder['pstart'] >= (20 + $TabFinder['step']))) {
$sortie .= '<p id="fragmenteur_pied" class="fragmenteur">';
$sortie .= $frag->fragmente($TabFinder, $nbr_local);
$sortie .= '</p>'."\n\n";
}
}
 
// Création de l'aide
if ((!isset($TabFinder)) || ($TabFinder['valid'] != 1)) {
if (((!empty($no_help)) && ($no_help == 1))) {
$sortie .= '';
} else {
$sortie .= presa_mk_title('Élargir votre recherche : ', 3);
// Aide : liste complète
$sortie .= '<p>'."\n";
$sortie .= 'Si vous souhaitez élargir votre recherche à l\'ensemble des ressources documentaires de l\'enseignement supérieur et de la recherche de la région Languedoc-Roussillon, allez sur le <a href="http://www.bomlr.info/askonce.jsp?locale=FR" class="lien_ext">site de la Bibliothèque Ouverte Montpellier Languedoc-Roussillon </a> '."\n";
$sortie .= '</p>'."\n";
$sortie .= presa_mk_title('Aide à la recherche : ', 3);
$sortie .= '<p class="texte_tb">'."\n";
// Aide commune
$sortie .= '- Attention aux fautes de frappe : le moteur recherche EXACTEMENT les termes saisis.'."\n";
// Aide switchée sur chaine mot précis ou chaque terme
switch (BB_ARGUMENT_OBJET) {
case 'structure':
$exp_exacte = 'Tela Botanica';
$exp_separe = 'association botanique';
break;
case 'lien':
$exp_exacte = 'Société Botanique du Vaucluse';
$exp_separe = 'botanique Vaucluse';
break;
case 'media':
$exp_exacte = 'écologie végétale';
$exp_separe = 'écologie environnement';
break;
}
$sortie .= '<br /><br />'."\n";
$sortie .= '- Pour rechercher une <strong>chaine de mots précise</strong>, sélectionnez "<strong>Expression Exacte</strong>" ';
$sortie .= '(ex. : <i>'.$exp_exacte.'</i> recherchera la correspondance exacte). ';
$sortie .= 'Pour rechercher <strong>chacun des mots</strong> saisis, sélectionnez "<strong>Mots séparés</strong>" ';
$sortie .= '(ex. : <i>'.$exp_separe.'</i>). ';
$sortie .= 'Attention ! Le moteur ne comprend ni les symboles + ou -, ni les termes logiques ET, OU, AND, OR...'."\n";
// Aide sur les moteurs utilisant les index Full Text
if (BB_ARGUMENT_OBJET == 'media') {
$sortie .= '<br /><br />'."\n";
$sortie .= '- Recherche intelligente : si vous saisissez "ortie", le moteur vous retournera toutes les données contenant cette chaîne de caractères : '.
'"ortie, sortie, ...". Pour rechercher un terme <strong>exact</strong>, vous pouvez le mettre entre crochets : "[ortie]".'."\n";
}
$sortie .= '<br /><br />'."\n";
$sortie .= '- Seule la zone de saisie "Rechercher" peut contenir plusieurs termes ; les autres champs ne doivent contenir qu\'une seule information.'."\n";
// Aide sur les moteurs faisant appel à GEO
if ((BB_ARGUMENT_OBJET == 'structure') || (BB_ARGUMENT_OBJET == 'media')) {
$sortie .= '<br /><br />'."\n";
$sortie .= '- Zone géographique : précisez ici une zone géographique (Pays, nom de département, ville...), '.
'ou un code de département Français (34, 29...).'."\n";
}
// Aide : liste complète
$sortie .= '<br /><br />'."\n";
$sortie .= '- Pour obtenir la liste complète des données : n\'entrez aucune information dans les champs de saisie, '.
'choisissez "Tous" dans les listes déroulantes, puis cliquez sur "Chercher". Pour obtenir toutes les données d\'une '.
'catégorie spécifique, vous pouvez affiner la recherche en sélectionnant une catégorie.'."\n";
 
}
}
 
// Réalisation des statistiques sur la recherche effectuée
if ($TabFinder['valid'] == 1) {
spy_validated_finder(BB_ARGUMENT_APPLI, $nbr_total);
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/11/24 09:02:09 jp_milcent
* Modification du texte apparaissant sous le moteur de recherche.
*
* Revision 1.6 2005/02/24 18:32:40 jpm
* Mise en global d'une variable.
*
* Revision 1.5 2005/01/04 16:23:25 jpm
* Affichage de la requête sql.
*
* Revision 1.4 2004/09/16 12:06:39 jpm
* Décomposition du fichier information en plusieurs fichiers.
*
* Revision 1.3 2004/09/15 12:15:55 jpm
* Suppresion du code spécifique au moteur annuaire.
*
* Revision 1.2 2004/09/14 10:18:31 jpm
* Mise en forme et amélioration du code.
* Passage au XHTML strict.
*
* Revision 1.1 2004/09/10 18:41:48 jpm
* Transformations des ancien pop-up de Bilblio Bota en consultation avancée...
* Ajout d'un fichier fournissant les moteurs de recherche et d'un fichier gérant la consultation avancée.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bibliotheque/bbc_affichage_lien.fonct.php
New file
0,0 → 1,159
<?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_affichage_lien.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Fonctions de création de l'affichage des résultats d'un lien.
*
* Contient une fonction créant l'affichage des résultats pour le paramètre "lien".
*
*@package BiblioBota-Consultation
*@subpackage Fonctions
//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 |
// +------------------------------------------------------------------------------------------------------+
/*Mettre ici les inclusions de fichiers*/
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
/*Mettre ici la liste de fonctions.*/
 
/*
Fichier de traitement de requêtes de l'appli FINDER v. 3.00 - 21/06/2002 - 08h30
Valable pour le paramètre "link".
 
retourne une chaine de données
*/
function mkresu()
{
global $result_final;
global $nbr_final;
global $tbl;
global $TabFinder;
global $var_biblio;
$retour = '';
$retour .= '<ul id="bb_liste_resultat_lien">'."\n";
// Boucle qui affiche les résultats
$i = 1;
while ($row = mysql_fetch_object($result_final)) {
$get_idlink = $row->B_L_IDLINK;
$get_urllink = $row->B_L_URL;
$get_titrelink = $row->B_L_TITRE;
$get_lkstr = $row->B_L_LKSTR;
$get_nomstr = $row->B_S_NOM;
$get_resum = $row->B_L_RESUMCLE;
$get_date = $row->B_L_MAJFICHE;
$get_part = $row->B_L_PARTENAIRE;
$get_ref = $row->B_L_REFERENCE;
$retour .= '<li>';
$retour .= '<img class="'.BB_CLASS_IMG_WEB.'" src="'.BB_IMG_WEB.'" alt="'.'Lien Web'.'" />'."\n";
$retour .= '<a href="'.$get_urllink.'">';
if ($get_titrelink != '') {
$retour .= $get_titrelink;
} else {
$retour .= ColorizeFound($get_urllink, strtolower($TabFinder['chaine']));
}
$retour .= '</a>'."\n";
if ($get_resum != '') {
$retour .= ' - '. ColorizeFound($get_resum, stripslashes($TabFinder['chaine']));
}
if ($get_lkstr != 0) {
$retour .= ' - <b>' . ColorizeFound($get_nomstr, stripslashes($TabFinder['chaine'])).'</b>'."\n\n";
}
// Affichage du lien vers la consultation avancée correspondant à la structure si elle existe dans la base
if ($var_biblio['open_biblio_link'] == true && $get_lkstr != 0) {
// Cross Biblio est le module qui permet d'avoir accès au popup transversal BBPOPUP
$retour .= '<a href="'.BB_URL_COURANTE_CONSULTATION_AVANCEE.'&amp;str='.$get_lkstr.'&amp;arg_0=str%3D'.$get_lkstr.
'&amp;arg_1=coll%3D'.$get_lkstr.'&amp;arg_2=book%3D'.$get_lkstr.'&amp;arg_3=media%3D'.$get_lkstr.'">'.'Plus d\'infos...'.'</a>';
}
if ($get_ref == 1) {
$retour .= '<img class="'.BB_CLASS_IMG_REFERENCE.'" src="'.BB_IMG_REFERENCE.'" alt="'.'Site Référence'.'" /> '."\n";
}
if ($get_part == 1) {
$retour .= '<img class="'.BB_CLASS_IMG_PARTENAIRE.'" src="'.BB_IMG_PARTENAIRE.'" alt="'.'Site Partenaire de Tela Botanica'.'" /> '."\n";
}
// Affichage des infos et des liens pour édition
$retour .= ' <span class="texte_inactif">('.'n°'.$get_idlink;
if ((check_if_modif($tbl['modif'], $tbl['link'], $get_idlink) == 0) && ($var_biblio['open_proposer_link'] == true)) {
$retour .= ' - ';
$retour .= '<a class="texte_inactif" href="'.BB_URL_COURANTE_ADMIN.'&amp;action=edit&ensemble=link&amp;ref='.$get_idlink.'">'.'éditer'.'</a>';
$retour .= ' - ';
$retour .= '<a class="texte_inactif" href="'.BB_URL_COURANTE_ADMIN.'&amp;action=supp&ensemble=link&amp;ref='.$get_idlink.'">'.'supprimer'.'</a>';
}
$retour .= ')'.'</span>'."\n";
if ($i < $nbr_final) {
$retour .= '<br /><br />';
}
$retour .= '</li>'."\n";
$i++;
}
$retour .= '</ul>'."\n";
if ($var_biblio['open_proposer_link'] == true) {
$retour .= '<p align="center">'."\n".
'<hr size="1" />'."\n".
'<a href="'.BB_URL_COURANTE_ADMIN.'&amp;action=new&ensemble=link">'.'Proposer un nouveau lien'.'</a>'."\n".
'<hr size="1" />'."\n".
'</p>'."\n";
}
return $retour;
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.3 2004/09/15 15:47:36 jpm
* Ajout des images de site partenaire et référence.
*
* Revision 1.2 2004/09/14 11:49:52 jpm
* Ajout de l'entête au fichier.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bibliotheque/bbc_requete_media.fonct.php
New file
0,0 → 1,377
<?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_requete_media.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Fonctions de création de la requête sur un média.
*
* Contient une fonction créant la requête d'intérogation de la base de données.
* Valable pour le paramètre "media".
*
*@package BiblioBota-Consultation
*@subpackage Fonctions
//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 |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
/** Fonction mkquery() - Créé une requête intérogeant la base de donnée.
*
* Fonction créant la requête d'intérogation de la base de données pour le
* paramêtre "media".
*
* @return string la requête permettant de récupérer les média.
*/
function mkquery()
{
global $tbl;
global $TabFinder;
global $nbr_total;
global $var_biblio;
global $query_dom;
global $plugin_store;
// si limit_domain vaut 1, alors on réduit les recherches au seul domaine botanique
if ($var_biblio['limit_domain'] == 1) {
$add_from_dom = ', '.$tbl['domaine'].', '.$tbl['domaine_lk'];
// lien domaines -- table de jointure domaines
$add_limit_dom = ' AND ('.$tbl['domaine'].'.B_D_ID = '.$tbl['domaine_lk'].'.B_DL_IDDOM)';
// lien articles -- table de jointure domaines
$add_limit_dom .= ' AND ('.$tbl['item'].'.B_I_IDITEM = '.$tbl['domaine_lk'].'.B_DL_IDITEM)';
$add_limit_dom .= ' AND '.$tbl['domaine'].'.B_D_ID = 1';
} else {
$add_from_dom = ', '.$tbl['domaine'].', '.$tbl['domaine_lk'];
// lien domaines -- table de jointure domaines
$add_limit_dom = ' AND ('.$tbl['domaine'].'.B_D_ID = '.$tbl['domaine_lk'].'.B_DL_IDDOM)';
// lien articles -- table de jointure domaines
$add_limit_dom .= ' AND ('.$tbl['item'].'.B_I_IDITEM = '.$tbl['domaine_lk'].'.B_DL_IDITEM)';
}
/*
Pour une implémentation d'une recherche sur TOUTE LA TABLE ARTICLES
il faut une requête spéciale qui fasse une jointure à la fois avec les
tables structure-coll-serie-fasc-art et les tables str-art-media... gasp...
*/
/* si la variable de catégorie / type vaut 0, il n'y a pas affinage de la requête par catégorie */
if (BB_ARGUMENT_REGROUPEMENT == 'article') {
// On demande ici les articles : mise en place des réducteurs
$add_select = 'B_C_CRAI, '.$tbl['serie'].'.*, B_C_NOMCOMPLET, B_C_ABREGE, B_F_NUMERO, B_F_TITRE, B_F_DATE, B_A_PAGEDEBUT, B_A_PAGEFIN, ';
// $add_select = $tbl['collection'].".B_C_CRAI, ".$tbl['serie'].".*, ".$tbl['collection'].".B_C_NOMCOMPLET, ".$tbl['collection'].".B_C_ABREGE, ".$tbl['fascicule'].".B_F_TITRE, ".$tbl['fascicule'].".B_F_DATE, ".$tbl['article'].".B_A_PAGEDEBUT, ".$tbl['article'].".B_A_PAGEFIN, ";
$add_from = $tbl['collection'].' LEFT JOIN '.$tbl['str'].' ON B_C_LKSTR = B_S_IDSTR, '.$tbl['fascicule'].', '.$tbl['serie'].', '.$tbl['article'].',';
// jointure coll - serie
$special_join = ' AND ('.$tbl['collection'].'.B_C_CRAI = '.$tbl['serie'].'.B_SER_CRAICOLL)';
// jointure serie - fasc
$special_join .= ' AND ('.$tbl['serie'].'.B_SER_CRAICOLL = '.$tbl['fascicule'].'.B_F_CRAICOLL)';
$special_join .= ' AND ('.$tbl['serie'].'.B_SER_IDSERIE = '.$tbl['fascicule'].'.B_F_CRAISERIE)';
// jointure fasc - item
$special_join .= ' AND ('.$tbl['fascicule'].'.B_F_CRAICOLL = '.$tbl['article'].'.B_A_CRAICOLL)';
$special_join .= ' AND ('.$tbl['fascicule'].'.B_F_CRAISERIE = '.$tbl['article'].'.B_A_CRAISERIE)';
$special_join .= ' AND ('.$tbl['fascicule'].'.B_F_NUMERO = '.$tbl['article'].'.B_A_CRAIFASC)';
// jointure item - article
$special_join .= ' AND ('.$tbl['item'].'.B_I_IDITEM = '.$tbl['article'].'.B_A_IDART)';
// réducteur de catégorie (collections) categ
if ($TabFinder['categ'] != '') {
$add_to_query = ' AND ('.$tbl['article'].'.B_A_CRAICOLL like "'.$TabFinder['categ'].'%")';
} else {
$add_to_query = '';
}
} else {
// On demande ici les livres et médias
$add_select = $tbl['media'].'.*, '.$tbl['monnaie'].'.*, ';
// Ajout du FROM
$add_from = $tbl['media'].' LEFT JOIN '.$tbl['str'].' ON B_M_LKSTR = B_S_IDSTR, '.$tbl['monnaie'].', ';
// lien media -- article
$special_join = ' AND ('.$tbl['media'].'.B_M_IDMEDIA = '.$tbl['item'].'.B_I_IDITEM)';
// lien media -- monnaie
$special_join .= ' AND ('.$tbl['media'].'.B_M_LKMONNAIE = '.$tbl['monnaie'].'.GEN_MON_IDMONNAIE)';
//pas de réducteur de catégorie pour les livres
$add_to_query = '';
}
// Compte Total : comptage du nombre de données de la table
// d'abord, créer les critères de sélection physiques et logiques.
if (($TabFinder['categ_3'] == '') || (BB_ARGUMENT_REGROUPEMENT == 'article')) {
if ((!empty($query_dom['log']))) {
$create_log = $query_dom['log'];
} else {
$create_log = '';
}
} else {
$create_log = 'B_I_TYPLOG = '.$TabFinder['categ_3'];
}
if ($TabFinder['categ_2'] == '') {
if ((!empty($query_dom['phy']))) {
$create_phy = $query_dom['phy'];
} else {
$create_phy = '';
}
} else {
$create_phy = 'B_I_TYPPHY = '.$TabFinder['categ_2'];
}
if (($create_phy != "")&&($create_log != "")) {
$create_logphy = "$create_log AND $create_phy";
} else if (($create_phy != "")||($create_log != "")) {
$create_logphy = "$create_log$create_phy";
}
// Création du corps de la requête
// Création du SELECT général
$normal_query = "SELECT DISTINCT $add_select B_D_ID, B_D_LABEL, B_S_IDSTR, B_S_NOM, B_AS_LIBELLE, ".$tbl['item'].".*, ".$tbl['item_typlog'].".*, ".$tbl['item_typphy'].".* ";
// Création du FROM général
$normal_query .= " FROM $add_from ".$tbl['saisie'].", ".$tbl['item'].", ".$tbl['item_typlog'].", ".$tbl['item_typphy']."$add_from_dom";
// Création du WHERE
$normal_query .= " WHERE $create_logphy ";
$normal_query .= " AND B_I_CACHER = 0 ";
if (($TabFinder['typque'] == 0)&&($TabFinder['chaine'] != "")) {
// le mode de moteur demandé est : expression exacte
$normal_query .= " AND (";
// on vérifie si la chaine est entre crochets
$check_method = ereg("\[*\]",$TabFinder['chaine']);
if ($check_method == 1) {
// si oui, on utilise le FULL TEXT
$TabFinder['chaine'] = ereg_replace("\[","",$TabFinder['chaine']);
$TabFinder['chaine'] = ereg_replace("\]","",$TabFinder['chaine']);
$normal_query .= "MATCH(B_I_TITRE) against ('".$TabFinder['chaine']."')";
$normal_query .= " OR MATCH(B_I_RESUMCLE) against ('".$TabFinder['chaine']."')";
$normal_query .= " OR ".$tbl['item'].".B_I_COMMENT like '%".$TabFinder['chaine']."%'";
} else {
// si non, on utilise la methode classique
$normal_query .= $tbl['item'].".B_I_TITRE like '%".$TabFinder['chaine']."%'";
$normal_query .= " OR ".$tbl['item'].".B_I_RESUMCLE like '%".$TabFinder['chaine']."%'";
$normal_query .= " OR ".$tbl['item'].".B_I_COMMENT like '%".$TabFinder['chaine']."%'";
}
$normal_query .= ")";
} else if (($TabFinder['chaine'] != "")&&($TabFinder['typque'] == 1)) {
// le mode du moteur demandé est : chaque terme
$result_from_ex = explode (" ", $TabFinder['chaine']);
if (($result_from_ex != "")&&(count($result_from_ex)>=1)) {
$i_ex = 0;
$normal_query .= " AND (";
while ($i_ex < count($result_from_ex)) {
// on vérifie si la chaine est entre crochets
$check_method = ereg("\[*\]",$result_from_ex[$i_ex]);
if ($check_method == 1) {
$result_from_ex[$i_ex] = ereg_replace("\[","",$result_from_ex[$i_ex]);
$result_from_ex[$i_ex] = ereg_replace("\]","",$result_from_ex[$i_ex]);
// si oui, on utilise le FULL TEXT
$normal_query .= "MATCH(B_I_TITRE) against ('";
if ($result_from_ex[$i_ex] != "") $normal_query .= "$result_from_ex[$i_ex]";
$normal_query .= "') OR ";
$normal_query .= "MATCH(B_I_RESUMCLE) against ('";
if ($result_from_ex[$i_ex] != "") $normal_query .= "$result_from_ex[$i_ex]";
$normal_query .= "') OR ";
$normal_query .= "B_I_COMMENT like '%";
if ($result_from_ex[$i_ex] != "") $normal_query .= "$result_from_ex[$i_ex]";
$normal_query .= "%'";
if ($i_ex < (count($result_from_ex)-1)) $normal_query .= ") AND (";
} else {
// si non, on procède à une recherche classique
$normal_query .= $tbl['item'].".B_I_TITRE like '%";
if ($result_from_ex[$i_ex] != "") $normal_query .= "$result_from_ex[$i_ex]";
$normal_query .= "%' OR ";
$normal_query .= $tbl['item'].".B_I_RESUMCLE like '%";
if ($result_from_ex[$i_ex] != "") $normal_query .= "$result_from_ex[$i_ex]";
$normal_query .= "%' OR ";
$normal_query .= $tbl['item'].".B_I_COMMENT like '%";
if ($result_from_ex[$i_ex] != "") $normal_query .= "$result_from_ex[$i_ex]";
$normal_query .= "%'";
if ($i_ex < (count($result_from_ex)-1)) $normal_query .= ") AND (";
}
$i_ex++;
}
$normal_query .= ") ";
}
}
/* ajout, si nécessaire, de la contrainte categ */
if (($TabFinder['categ'] != '') && (BB_ARGUMENT_REGROUPEMENT == 'media')) {
if ($TabFinder['categ'] == 'VIDE') {
$normal_query .= ' AND (B_M_EDITEUR is null OR B_M_EDITEUR = "")';
} else {
$normal_query .= ' AND (B_M_EDITEUR like "%'.$TabFinder['categ'].'%")';
}
}
// Création des jointures
$normal_query .= " AND (".$tbl['saisie'].".B_AS_ID = ".$tbl['item'].".B_I_AUTEURSAISIE)"; // lien article -- type phy
$normal_query .= " AND (".$tbl['item'].".B_I_TYPPHY = ".$tbl['item_typphy'].".B_IP_ID)"; // lien article -- type phy
$normal_query .= " AND (".$tbl['item'].".B_I_TYPLOG = ".$tbl['item_typlog'].".B_IL_ID)"; // lien article -- type log
$normal_query .= " $add_limit_dom"; // si limitation au domaine principal
$normal_query.= $special_join;
// Si TabFinder['auteur'] est non vide : on ajoute le critère de sélection
if ($TabFinder['auteur'] != '') {
$tmp_auteur = explode(' ', $TabFinder['auteur']);
$normal_query .= ' AND (';
for ($tmp=0;$tmp<count($tmp_auteur);$tmp++) {
$normal_query .= $tbl['item'].'.B_I_AUTEURS like "%'.$tmp_auteur[$tmp].'%"';
if ( $tmp < (count($tmp_auteur) - 1) ) {
$normal_query .= ' AND ';
}
}
$normal_query .= ')';
}
// Si TabFinder['geo'] est non vide :
// 1- si TabFinder['chaine'] est vide on n'ajoute pas de AND
// 2- s'il n'est pas vide on ajoute AND
if ($TabFinder['geo'] != '') {
if ($TabFinder['geo'] == '1' || $TabFinder['geo'] == '2' || $TabFinder['geo'] == '3' || $TabFinder['geo'] == '4'
|| $TabFinder['geo'] == '5' || $TabFinder['geo'] == '6' || $TabFinder['geo'] == '7' || $TabFinder['geo'] == '8' || $TabFinder['geo'] == '9' ) {
$TabFinder['geo'] = '0'.$TabFinder['geo'];
$TabFinder['geo'] = ereg_replace('00', '0', $TabFinder['geo']);
}
$normal_query .= " AND (".$tbl['item'].".B_I_GEO like '%".$TabFinder['geo']."%' ";
/* ajout de la jointure dpt */
$comp_geo = "select * from ".$tbl['dpt']." where GFD_NAME like '%".$TabFinder['geo']."%'";
$comp_do = mysql_query($comp_geo) or die("<B>Erreur de requete GEO :</B> $comp_geo.");
$comp_num = mysql_num_rows($comp_do);
if ($comp_num > 0) {
$i = 1;
while ($row = mysql_fetch_object($comp_do)) {
$tmp_stock = $row->GFD_ID;
if ($tmp_stock != '') {
if ($tmp_stock == '1' || $tmp_stock == '2' || $tmp_stock == '3' || $tmp_stock == '4' ||
$tmp_stock == '5' || $tmp_stock == '6' || $tmp_stock == '7' || $tmp_stock == '8' || $tmp_stock == '9' ) {
$tmp_stock = '0'.$tmp_stock;
$tmp_stock = ereg_replace('00', '0', $tmp_stock);
}
if ($i == 1) {
$normal_query .= ' OR (';
}
$normal_query .= $tbl['item'].'.B_I_GEO like "%'.$tmp_stock.'%"';
if ($i < $comp_num) {
$normal_query .= ' OR ';
}
if ($i == $comp_num) {
$normal_query .= ') ';
}
$i++;
}
}
}
mysql_free_result($comp_do);
$normal_query .= ') ';
}
// traitement du réducteur SINCE (fonction de la date)
if ($TabFinder['since'] != '') {
$since_var = explode('/', $TabFinder['since']);
if (empty($since_var[0])) {
$since_var[0] = '';
}
if (empty($since_var[1])) {
$since_var[1] = '';
}
if (empty($since_var[2])) {
$since_var[2] = '';
}
$timestamp = mktime (NULL,NULL,NULL,$since_var[1],$since_var[0],$since_var[2]);
$normal_query .= ' AND B_I_MAJFICHE > '.$timestamp;
}
// Création de l'ordre de tri
$order_query = " ORDER BY ".$TabFinder['sort'];
// Affectation de la requête à la variable qui va l'envoyer au moteur
if (empty($plugin_store['query_add_query'])) {
$plugin_store['query_add_query'] = '';
}
$unreq = $normal_query.' '.$add_to_query.' '.$plugin_store['query_add_query'].' '.$order_query;
//echo "$unreq";
return $unreq;
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.3 2004/09/15 10:32:30 jpm
* Suppression d'une ligne après la balise de fermeture php.
*
* Revision 1.2 2004/09/14 10:18:17 jpm
* Mise en forme et amélioration du code.
* Passage au XHTML strict.
*
* Revision 1.1 2004/09/10 18:44:02 jpm
* Ajout des fichiers de gestion du moteur de recherche des médias.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bibliotheque/bbc_moteur_media.fonct.php
New file
0,0 → 1,461
<?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_moteur_media.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Fonctions de création du moteur de recherche des médias.
*
* Contient les fonctions permettant de retourner l'affichage du moteur de recherche des média.
* Valable pour le paramètre "media".
*
*@package BiblioBota-Consultation
*@subpackage Fonctions
//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 |
// +------------------------------------------------------------------------------------------------------+
 
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
/** Fonction mkengine() - Créé le moteur de recherche en XHTML pour les médias.
*
* Fonction créant le moteur de recherche en XHTML pour le
* paramêtre "media".
*
* @return string le XHTML du moteur de recherche permettant de récupérer les média.
*/
function mkengine()
{
// Initialisation des variables globales
global $label_bbota, $tbl, $TabFinder, $nbr_total, $query_dom, $var_biblio;
global $arg_0,$arg_1,$arg_2,$arg_3,$arg_4,$arg_5;
global $plugin_store;
// Initialisation des variables
$url_courante = BB_URL_COURANTE_CONSULTATION;
$retour = '';
$tmp_titre = eregi_replace('_', ' ', BB_ARGUMENT_TITRE);
// Comptage du nombre total de données dans la table (hors CACHER = 1)
if ($var_biblio['limit_domain'] == 1) {
$add_domain_fr = ', '.$tbl['domaine_lk'];
$add_domain_qu = ' AND B_I_IDITEM = B_DL_IDITEM AND B_DL_IDDOM = 1';
} else {
$add_domain_fr = '';
$add_domain_qu = '';
}
if (BB_ARGUMENT_REGROUPEMENT == 'article') {
$requete = 'SELECT DISTINCT COUNT(B_I_IDITEM) AS CPT '.
'FROM '.$tbl['item'].$add_domain_fr.$plugin_store['count_add_table'].' '.
'WHERE B_I_CACHER = 0 '.
'AND B_I_TYPLOG = 1 '.
'AND B_I_TYPPHY = 2 '.
$add_domain_qu.' '.
$plugin_store['count_add_query'];
} else if (BB_ARGUMENT_REGROUPEMENT == 'media') {
$requete = 'SELECT DISTINCT COUNT(B_I_IDITEM) AS CPT '.
'FROM '.$tbl['item'].$add_domain_fr.$plugin_store['count_add_table'].' '.
'WHERE B_I_CACHER = 0 '.
'AND B_I_TYPPHY <> 2 '.
$add_domain_qu.' '.
$plugin_store['count_add_query'];
}
// DEBOGAGE : pour voir la requete de comptage
//$GLOBALS['_DEBOGAGE_'] .= $requete.'<br>';
$resultat = $GLOBALS['db_bb']->query($requete);
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
if ($resultat->numRows() == 1) {
$tmp_nb = $resultat->fetchRow(DB_FETCHMODE_OBJECT);
$nbr_total = $tmp_nb->CPT;
if ($nbr_total > 0) {
$chaine = 'parmi '.$nbr_total;
} else {
$retour .= presa_mk_title('Rechercher '.$tmp_titre, 1);
$retour .= '<p class="information">'.'Ce moteur de recherche ne contient aucune donnée...'.'</p>';
// Cette variable sert à éviter l'affichage de l'aide
global $no_help;
$no_help = 1;
return $retour;
}
}
// Affichage du titre
$retour .= presa_mk_title('Rechercher '.$chaine.' '.$tmp_titre.' :', 1);
// Affichage du formulaire du moteur de recherche
$retour .= '<form id="bb_moteur_media" '.
'action="'.$url_courante."&amp;arg_0=$arg_0&amp;arg_1=$arg_1&amp;arg_2=$arg_2&amp;arg_3=$arg_3&amp;arg_4=$arg_4&amp;arg_5=$arg_5".'" '.
'method="post">'."\n";
$retour .= '<ul>'."\n";
$resultat->free();// Fin comptage
// Construction du moteur
// Ligne de recherche 1
$retour .= '<li id="bb_moteur_media_01">'."\n";
$retour .= form_mk_chaine(stripslashes($TabFinder['chaine'])).' '.form_mk_typque($TabFinder['typque']);
$retour .= '</li>'."\n";
// Ligne de recherche 2
$retour .= '<li id="bb_moteur_media_02">'."\n".form_mk_auteur(stripslashes($TabFinder['auteur'])).'</li>'."\n";
// Ligne de recherche 3
$retour .= '<li id="bb_moteur_media_03">'."\n".form_mk_categ($TabFinder['categ']).'</li>'."\n";
// Ligne de recherche 4
$retour .= '<li id="bb_moteur_media_04">'."\n";
$retour .= form_mk_geo(stripslashes($TabFinder['geo'])).' ';
if (BB_ARGUMENT_REGROUPEMENT == 'media') {
$retour .= form_mk_categ_3($TabFinder['categ_3']).' '.form_mk_categ_2($TabFinder['categ_2']);
}
$retour .= '</li>'."\n";
// Mode avancée
if ($TabFinder['finder_mode'] == 'advance') {
$retour .= '<li id="bb_moteur_media_05">'."\n".form_mk_since($TabFinder['since']).'</li>'."\n";
// Lignes de regroupement (frequente)
$retour .= '<li id="bb_moteur_media_06">'."\n".form_mk_step($TabFinder['step']).'</li>'."\n";
$retour .= '<li id="bb_moteur_media_07">'."\n".form_mk_sort($TabFinder['sort']).'</li>'."\n";
}
$retour .= '<li id="bb_moteur_media_08" class="bb_aligner_droite">'."\n";
$retour .= form_mk_plugin($TabFinder['plugin']).form_mk_advance().' '.form_mk_submit()."\n";
$retour .= '</li>'."\n";
$retour .= '</ul>'."\n";
$retour .= '</form>'."\n";
// Ajout de liens pour les moteurs de recherche
// Premier lien...
$retour .= '<p>'."\n";
$link = $url_courante.'&amp;TransTab=typque,1!valid,1!finder_mode,normal!sort,B_I_AUTEURS!';
$link .= 'pstart,0!step,20!pend,231!plugin,!geo,!chaine,!auteur,!categ,!categ_2,!categ_3,!since,!nom,!prenom,!ville,!dept,!pays,!cotisant,!mail,!';
$retour .= ' <a href="'.$link.'" style="visibility:hidden;">all</a>'."\n";
// Second lien...
$link = $url_courante.'&amp;TransTab=typque,1!valid,1!finder_mode,normal!sort,B_I_AUTEURS!';
$link .= 'pstart,0!step,20!pend,231!plugin,!geo,!chaine,!auteur,!categ,!categ_2,!categ_3,!since,!nom,!prenom,!ville,!dept,!pays,!cotisant,!mail,!';
$retour .= ' <a href="'.$link.'" style="visibility:hidden;">all</a>'."\n";
$retour .= '</p>'."\n";
return $retour;
}
 
 
// form_mk_sort($actualsort,$class) :
// fonction spécifique du moteur MEDIA
// créé une liste déroulante TabFinder[sort] pour ordonner les pages de résultats
// Entrée : $actualsort (valeur de TabFinder['sort']), $class (classe CSS) par défaut "insInputForm"
// Sortie (par retour) : string
function form_mk_sort($actualsort, $class = 'bb_champ')
{
global $TabFinder;
$retour = '';
$id = 'TabFinder[sort]';
$retour .= '<label for="'.$id.'">'.'Trier par : '.'</label>';
$retour .= '<select id="'.$id.'" name="'.$id.'" class="'.$class.'">'."\n";
$retour .= ' <option value="B_I_AUTEURS" ';
if ($actualsort == 'B_I_AUTEURS') {
$retour .= 'selected="selected"';
}
$retour .= '>'.'auteur(s)'.'</option>'."\n";
$retour .= ' <option value="B_I_TITRE" ';
if ($actualsort == 'B_I_TITRE') {
$retour .= 'selected="selected"';
}
$retour .= '>'.'titre'.'</option>'."\n";
if (BB_ARGUMENT_REGROUPEMENT == 'media') {
$retour .= ' <option value="B_I_TYPLOG" ';
if ($actualsort == 'B_I_TYPLOG') {
$retour .= 'selected="selected"';
}
$retour .= '>'.'type de contenu'.'</option>'."\n";
$retour .= ' <option value="B_I_TYPPHY" ';
if ($actualsort == 'B_I_TYPPHY') {
$retour .= 'selected="selected"';
}
$retour .= '>'.'type de support'.'</option>'."\n";
}
if (BB_ARGUMENT_REGROUPEMENT == 'article') {
$le_champ = 'B_F_DATE';
} else {
$le_champ = 'B_M_DATE';
}
$retour .= ' <option value="'.$le_champ.'" ';
if ($actualsort == $le_champ) {
$retour .= 'selected';
}
$retour .= '>'.'date'.'</option>'."\n";
$retour .= '</select>'."\n\n";
return $retour;
}
 
 
// form_mk_categ($actualsort,$class) :
// fonction spécifique du moteur LINK
// créé une liste déroulante TabFinder[categ] pour affiner les résultats
// Entrée : $actualcateg (valeur de TabFinder['categ']), $class (classe CSS) par défaut "insInputForm"
// Sortie (par retour) : string
function form_mk_categ($actualcateg, $class = 'bb_champ')
{
global $tbl, $TabFinder, $plugin_store;
$retour = '';
$id = 'TabFinder[categ]';
if (BB_ARGUMENT_REGROUPEMENT == 'article') {
// Affichage du réducteur - collections
$requete = 'SELECT B_C_CRAI, B_C_NOMCOMPLET, B_C_ABREGE '.
'FROM '.$tbl['collection'].', '.$tbl['serie'].$plugin_store['categ_add_table'].' '.
'WHERE B_C_CRAI = B_SER_CRAICOLL '.
'AND B_SER_INTOBIBLIO = 1 '.
$plugin_store['categ_add_query'].
'GROUP BY B_C_CRAI '.
'ORDER BY B_C_NOMCOMPLET';
$result_str = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$nb_results = mysql_num_rows($result_str);
$retour .= '<label for="'.$id.'">'.'Dans :'.'</label>';
$retour .= '<select name="'.$id.'" class="'.$class.'">'."\n";
if ($nb_results > 1) {
$retour .= ' <option value=""';
if ($actualcateg == '') {
$retour .= ' selected="selected"';
}
$retour .= '>Toutes les revues</option>'."\n";
}
while ($row = mysql_fetch_object($result_str)) {
$collection = $row->B_C_NOMCOMPLET;
$abrege = $row->B_C_ABREGE;
$crai = $row->B_C_CRAI;
$retour .= '<option value="'.$crai.'"';
if ($actualcateg == $crai) {
$retour .= ' selected="selected"';
}
$retour .= '>';
if ($abrege == '') {
$retour .= $collection;
} else {
$retour .= $abrege;
}
$retour .= '</option>'."\n";
}
$retour .= ' </select>'."\n\n";
mysql_free_result($result_str);
} else {
global $var_biblio;
// on recherche ici les éditeurs de médias
// si les médias sont autre chose que des livres, on affine
// la liste en ne proposant que les éditeurs publiant des médias.
$requete = 'SELECT B_M_EDITEUR '.
'FROM '.$tbl['media'].', '.$tbl['item'].$plugin_store['categ_add_table'].' '.
'WHERE B_I_IDITEM = B_M_IDMEDIA '.
$plugin_store['categ_add_query'].' '.
'GROUP BY B_M_EDITEUR '.
'ORDER BY B_M_EDITEUR';
$do_editeur_qu = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$nb_edresults = mysql_num_rows($do_editeur_qu);
if ($var_biblio['how_editeurs'] >= $nb_edresults) {
// nb de résultats < $how_editeurs
// on affiche une liste déroulante
$retour .= '<label for="'.$id.'">'.'Pour :'.'</label>';
$retour .= '<select name="'.$id.'" class="'.$class.'">'."\n";
if ($nb_edresults > 1) {
$retour .= '<option value=""';
if ($actualcateg == '') {
$retour .= ' selected="selected"';
}
$retour .= '>';
$retour .= 'tous éditeurs';
$retour .= '</option>'."\n";
}
while ($row_ed = mysql_fetch_object($do_editeur_qu)) {
$tmp_id = $row_ed->B_M_EDITEUR;
if ($tmp_id != '') {
$retour .= '<option value="'.stripslashes($tmp_id).'"';
if (stripslashes(stripslashes($actualcateg)) == $tmp_id) {
$retour .= ' selected="selected"';
}
$retour .= '>';
$retour .= stripslashes($tmp_id);
} else {
$retour .= '<option value="VIDE"';
if (($actualcateg == 'NULL') && ($actualcateg != '')) {
$retour .= ' selected="selected"';
}
$retour .= '>';
$retour .= 'éditeurs inconnus';
}
$retour .= '</option>'."\n";
}
$retour .= ' </select>';
} else {
// nb de résultats > $how_editeurs
// on affiche une zone de texte
$retour .= '<label for="'.$id.'">'.'Éditeur :'.'</label>';
$retour .= '<input type="text" id="'.$id.'" name="'.$id.'" class="'.$class.'" value="'.$TabFinder['categ'].'" />'."\n";
}
mysql_free_result($do_editeur_qu);
}
return $retour;
}
 
 
// form_mk_categ_2($actualcateg_2,$class) :
// fonction spécifique du moteur MEDIA
// créé une liste déroulante TabFinder[categ_2] pour affiner les résultats
// Entrée : $actualcateg_2 (valeur de TabFinder['categ_2']), $class (classe CSS) par défaut "insInputForm"
// Sortie (par retour) : string
 
function form_mk_categ_2($actualcateg_2, $class = 'bb_champ')
{
global $tbl;
$retour = '';
$requete = 'SELECT * '.
'FROM '.$tbl['item_typphy'].' '.
'WHERE B_IP_ID <> 2 '.
'ORDER BY B_IP_LABEL DESC';
$type_phy_do = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$retour .= '<select name="TabFinder[categ_2]" class="'.$class.'">'."\n";
$retour .= '<option value=""';
if ($actualcateg_2 == '') {
$retour .= ' selected="selected"';
}
$retour .= '>';
$retour .= 'tous supports';
$retour .= '</option>'."\n";
while ($row_phy = mysql_fetch_object($type_phy_do)) {
$tmp_label = $row_phy->B_IP_LABEL;
$tmp_id = $row_phy->B_IP_ID;
$this_number = (count_num_of_reductor('B_I_TYPPHY', $tmp_id));
if ($this_number > 0) {
$retour .= '<option value="'.$tmp_id.'"';
if ($actualcateg_2 == $tmp_id) {
$retour .= ' selected="selected"';
}
$retour .= '>';
$retour .= $tmp_label.' ('.$this_number.')';
$retour .= '</option>'."\n";
}
}
$retour .= ' </select>';
mysql_free_result($type_phy_do);
return $retour;
}
 
 
// form_mk_categ_2($actualcateg_2,$class) :
// fonction spécifique du moteur MEDIA
// créé une liste déroulante TabFinder[categ_2] pour affiner les résultats
// Entrée : $actualcateg_2 (valeur de TabFinder['categ_2']), $class (classe CSS) par défaut "insInputForm"
// Sortie (par retour) : string
function form_mk_categ_3($actualcateg_3, $class = 'bb_champ')
{
global $tbl;
$retour = '';
$requete = 'SELECT * '.
'FROM '.$tbl['item_typlog'].' '.
'ORDER BY B_IL_LABEL';
$type_log_do = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$retour .= '<select name="TabFinder[categ_3]" class="'.$class.'">'."\n";
$retour .= '<option value=""';
if ($actualcateg_3 == '') {
$retour .= ' selected="selected"';
}
$retour .= '>';
$retour .= 'tous contenus';
$retour .= '</option>'."\n";
while ($row_phy = mysql_fetch_object($type_log_do)) {
$tmp_label = $row_phy->B_IL_LABEL;
$tmp_id = $row_phy->B_IL_ID;
$this_number = (count_num_of_reductor('B_I_TYPLOG', $tmp_id));
if ($this_number > 0) {
$retour .= '<option value="'.$tmp_id.'"';
if ($actualcateg_3 == $tmp_id) {
$retour .= ' selected="selected"';
}
$retour .= '>';
$retour .= "$tmp_label ($this_number)";
$retour .= '</option>'."\n";
}
}
$retour .= ' </select>';
mysql_free_result($type_log_do);
return $retour;
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.5 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.4 2005/03/03 08:32:26 jpm
* Suppression de li vide.
*
* Revision 1.3 2004/09/14 11:49:28 jpm
* Ajout de l'info sur les logs cvs en bas de fichier.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bibliotheque/bbc_requete_structure.fonct.php
New file
0,0 → 1,258
<?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_requete_structure.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Fonctions de création de la requête sur une structure.
*
* Contient une fonction créant la requête d'intérogation de la base de données.
* Valable pour le paramètre "structure".
* Ajouts :
* - 27/06/02 : recherche aussi dans la table des collections + jointure coll/str
*
*@package BiblioBota-Consultation
*@subpackage Fonctions
//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 |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
/** Fonction mkquery() - Créé une requête intérogeant la base de donnée.
*
* Fonction créant la requête d'intérogation de la base de données pour le
* paramêtre "structure".
*
* @return string la requête permettant de récupérer les structures.
*/
function mkquery()
{
// Définition des variables globales
global $tbl;
global $TabFinder;
// Initialisation des variables
$normal_query = '';
$add_to_query = '';
$order_query = '';
// Si la variable de catégorie vaut 'tous', il n'y a pas affinage de la requête par catégorie
if ($TabFinder['categ'] != 'tous') {
$add_to_query = ' AND '.$tbl['str'].'.B_S_TYPESTR = '.$TabFinder['categ'].' ';
}
// Ccréation du corps de la requête
// Création du SELECT
$normal_query = 'SELECT DISTINCT '.$tbl['str'].'.*, '.$tbl['pays'].'.GC_NAME, '.$tbl['typestr'].'.B_TYPSTR_LABEL ';
// Création du FROM
$normal_query .= ' FROM '.$tbl['str'].' LEFT JOIN '.$tbl['collection'].' ON '.$tbl['collection'].'.B_C_LKSTR = '.$tbl['str'].'.B_S_IDSTR, '.$tbl['pays'].', '.$tbl['typestr'].' ';
// Création du WHERE
$normal_query .= 'WHERE B_S_IDSTR > 0 '.
'AND B_S_CACHER = 0 '.
'AND ';
if (($TabFinder['typque'] != 1) && ($TabFinder['chaine'] != '')) {
$normal_query .= ' (';
$normal_query .= $tbl['str'].'.B_S_NOM LIKE "%'.$TabFinder['chaine'].'%"';
$normal_query .= ' OR '.$tbl['str'].'.B_S_SIGLE LIKE "%'.$TabFinder['chaine'].'%"';
$normal_query .= ' OR '.$tbl['str'].'.B_S_VOCACTIV LIKE "%'.$TabFinder['chaine'].'%"';
$normal_query .= ' OR '.$tbl['str'].'.B_S_COMMENT LIKE "%'.$TabFinder['chaine'].'%"';
$normal_query .= ' OR '.$tbl['str'].'.B_S_SERVICE LIKE "%'.$TabFinder['chaine'].'%"';
$normal_query .= ' OR '.$tbl['collection'].'.B_C_NOMCOMPLET LIKE "%'.$TabFinder['chaine'].'%"';
$normal_query .= ' OR '.$tbl['collection'].'.B_C_ABREGE LIKE "%'.$TabFinder['chaine'].'%"';
$normal_query .= ' OR '.$tbl['collection'].'.B_C_COMMENT LIKE "%'.$TabFinder['chaine'].'%"';
$normal_query .= ')';
} else if ($TabFinder['chaine'] != '') {
$normal_query .= ' (';
$result_from_ex = explode(' ', $TabFinder['chaine']);
$i_ex = 0;
while ($i_ex < count($result_from_ex)) {
$normal_query .= $tbl['str'].'.B_S_NOM LIKE "%';
if ($result_from_ex[$i_ex] != '') {
$normal_query .= $result_from_ex[$i_ex];
}
$normal_query .= '%" OR ';
$normal_query .= $tbl['str'].'.B_S_VOCACTIV LIKE "%';
if ($result_from_ex[$i_ex] != '') {
$normal_query .= $result_from_ex[$i_ex];
}
$normal_query .= '%" OR ';
$normal_query .= $tbl['str'].'.B_S_SIGLE LIKE "%';
if ($result_from_ex[$i_ex] != '') {
$normal_query .= $result_from_ex[$i_ex];
}
$normal_query .= '%" OR ';
$normal_query .= $tbl['str'].'.B_S_COMMENT LIKE "%';
if ($result_from_ex[$i_ex] != '') {
$normal_query .= $result_from_ex[$i_ex];
}
$normal_query .= '%" OR ';
$normal_query .= $tbl['str'].'.B_S_SERVICE LIKE "%';
if ($result_from_ex[$i_ex] != '') {
$normal_query .= $result_from_ex[$i_ex];
}
$normal_query .= '%" OR ';
$normal_query .= $tbl['collection'].'.B_C_NOMCOMPLET LIKE "%';
if ($result_from_ex[$i_ex] != '') {
$normal_query .= $result_from_ex[$i_ex];
}
$normal_query .= '%" OR ';
$normal_query .= $tbl['collection'].'.B_C_ABREGE LIKE "%';
if ($result_from_ex[$i_ex] != '') {
$normal_query .= $result_from_ex[$i_ex];
}
$normal_query .= '%" OR ';
$normal_query .= $tbl['collection'].'.B_C_COMMENT LIKE "%';
if ($result_from_ex[$i_ex] != '') {
$normal_query .= $result_from_ex[$i_ex];
}
$normal_query .= '%"';
if ($i_ex < (count($result_from_ex) - 1)) {
$normal_query .= ') AND (';
}
$i_ex++;
}
$normal_query .= ')';
}
// Création de la jointure avec les pays et les types
if ($TabFinder['chaine'] != '') {
$normal_query .= ' AND ';
}
$normal_query .= ' B_S_PAYS = GC_ID ';
$normal_query .= ' AND GC_LOCALE = "fr" ';
$normal_query .= ' AND B_S_TYPESTR = B_TYPSTR_ID ';
// Si TabFinder['geo'] est non vide :
// 1- si TabFinder['chaine'] est vide on n'ajoute pas de AND
// 2- s'il n'est pas vide on ajoute AND
if ($TabFinder['geo'] != '') {
preg_replace('/^(\d)$/', "0$1", $TabFinder['geo']);
preg_replace('/^00$/', '0', $TabFinder['geo']);
$normal_query .= ' AND ('.$tbl['str'].'.B_S_CODEPOSTAL LIKE "'.$TabFinder['geo'].'%" '.
'OR '.$tbl['str'].'.B_S_VILLE LIKE "%'.$TabFinder['geo'].'%" '.
'OR '.$tbl['pays'].'.GC_NAME LIKE "%'.$TabFinder['geo'].'%" ';
// Ajout de la jointure dpt
$comp_geo = 'SELECT * '.
'FROM '.$tbl['dpt'].' '.
'WHERE GFD_NAME LIKE "%'.$TabFinder['geo'].'%"';
$comp_do = mysql_query($comp_geo) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $comp_geo));
$comp_num = mysql_num_rows($comp_do);
if ($comp_num > 0) {
$i = 1;
while ($row = mysql_fetch_object($comp_do)) {
$tmp_stock = $row->GFD_ID;
if ($tmp_stock != '') {
preg_replace('^(\d)$', "0$1", $tmp_stock);
preg_replace('^00$', '0', $tmp_stock);
if ($i == 1) {
$normal_query .= ' OR ';
}
$normal_query .= $tbl['str'].'.B_S_CODEPOSTAL LIKE "'.$tmp_stock.'%"';
if ($i < $comp_num) {
$normal_query .= ' OR ';
}
if ($i == $comp_num) {
$normal_query .= ' ';
}
$i++;
}
}
}
mysql_free_result($comp_do);
$normal_query .= ') ';
}
// Traitement du réducteur SINCE (fonction de la date)
if ($TabFinder['since'] != '') {
$since_var = explode('/', $TabFinder['since']);
if (empty($since_var[0])) {
$since_var[0] = '';
}
if (empty($since_var[1])) {
$since_var[1] = '';
}
if (empty($since_var[2])) {
$since_var[2] = '';
}
$timestamp = mktime(NULL, NULL, NULL, $since_var[1], $since_var[0], $since_var[2]);
$normal_query .= ' AND B_S_MAJFICHE > '.$timestamp;
}
// Création de l'ordre de tri
$order_query = 'ORDER BY '.$TabFinder['sort'];
// Affectation de la requête à la variable qui va l'envoyer au moteur
$queries = $normal_query.' '.$add_to_query.' '.$order_query;
return $queries;
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.3 2004/09/16 11:05:54 jpm
* Correction bogue mauvaise requete.
*
* Revision 1.2 2004/09/15 11:21:07 jpm
* Début mise en conformité avec la convention de codage et le standard XHTML Strict.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bibliotheque/bbc_moteur_structure.fonct.php
New file
0,0 → 1,208
<?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_moteur_structure.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Fonctions de création du moteur de recherche des structures.
*
* Contient les fonctions permettant de retourner l'affichage du moteur de recherche des structures.
* Valable pour le paramètre "structure".
*
*@package BiblioBota-Consultation
*@subpackage Fonctions
//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 |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
/** Fonction mkengine() - Créé le moteur de recherche en XHTML pour les structures.
*
* Fonction créant le moteur de recherche en XHTML pour le
* paramètre "structure".
*
* @return string le XHTML du moteur de recherche permettant de récupérer les structures.
*/
function mkengine()
{
global $label_bbota, $tbl, $TabFinder, $nbr_total;
$retour = '';
// Comptage du nombre total de données dans la table (hors CACHER = 1)
$requete = 'SELECT COUNT(*) AS cpt '.
'FROM '.$tbl['str'].' '.
'WHERE B_S_CACHER = 0';
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
if (mysql_num_rows($resultat) == 1) {
$tmp_nb = mysql_fetch_object($resultat);
$nbr_total = $tmp_nb->cpt;
if ($nbr_total > 0) {
$chaine = 'parmi '.$nbr_total.' adresses d\'organismes';
} else {
die('<b>'.'Erreur'.'</b>'.' lors du comptage des structures ('.$nbr_total.' trouvées) : '.$requete);
}
} else {
die('<b>'.'Erreur'.'</b>'.' lors du comptage des structures : '.$requete);
}
mysql_free_result($resultat);
// Affichage du titre de la page
$retour .= presa_mk_title('Chercher '.$chaine.' :', 1);
// Construction du moteur de str
$retour .= '<form id="bb_moteur_structure" action="'.BB_URL_COURANTE_CONSULTATION.'" method="post">'."\n";
$retour .= '<ul>'."\n";
// Ligne de recherche
$retour .= '<li>'."\n";
$retour .= form_mk_chaine(stripslashes($TabFinder['chaine'])).' '.
form_mk_typque($TabFinder['typque']).
form_mk_categ($TabFinder['categ']);
$retour .= '</li>'."\n";
// Ligne de géographie
$retour .= '<li>'."\n".form_mk_geo(stripslashes($TabFinder['geo'])).'</li>'."\n";
if ($TabFinder['finder_mode'] == 'advance') {
$retour .= '<li>'."\n".form_mk_since($TabFinder['since']).'</li>'."\n";
}
// Ligne de regroupement (frequente)
if ($TabFinder['finder_mode'] == 'advance') {
$retour .= '<li>'."\n".form_mk_step($TabFinder['step'])."\n".form_mk_sort($TabFinder['sort'])."\n".'</li>'."\n";
}
$retour .= '<li class="bb_aligner_droite">'."\n";
$retour .= form_mk_advance().' '.form_mk_submit()."\n";
$retour .= '</li>'."\n";
$retour .= '</ul>'."\n";
$retour .= '</form>'."\n\n";
// Ajout d'un lien pour les moteurs de recherche
$link = BB_URL_COURANTE_CONSULTATION.'&amp;TransTab=typque,1!valid,1!finder_mode,normal!sort,B_S_NOM!';
$link .= 'pstart,0!step,20!pend,231!plugin,!geo,!chaine,!auteur,!categ,!categ_2,!categ_3,!since,!nom,!prenom,!ville,!dept,!pays,!cotisant,!mail,!';
$retour .= '<a href="'.$link.'" style="visibility:hidden;">all</a>'."\n";
return $retour;
}
 
/** Fonction form_mk_sort() - Créé la liste déroulante XHTML de l'ordre de trie des structures.
*
* Fonction créant liste déroulante XHTML de l'ordre de trie des structures.
*
* @param string la type de trie sélectionné : valeur de TabFinder['sort'].
* @param string la classe à appliquer à la balise <select>.
*
* @return string la liste déroulante XHTML de l'ordre de trie des structures.
*/
function form_mk_sort($actualsort, $class = 'bb_champ')
{
$retour = '';
$id = 'TabFinder[sort]';
$retour .= '<label for="'.$id.'">'.'Trier par : '.'</label>';
$retour .= '<select id="'.$id.'" name="'.$id.'" class="'.$class.'">'."\n";
$retour .= ' <option value="B_S_NOM" ';
if ($actualsort == 'B_S_NOM') {
$retour .= 'selected="selected"';
}
$retour .= '>'.'nom'.'</option>'."\n";
$retour .= ' <option value="GC_NAME" ';
if ($actualsort == 'GC_NAME') {
$retour .= 'selected="selected"';
}
$retour .= '>'.'pays'.'</option>'."\n";
$retour .= '</select>'."\n\n";
return $retour;
}
 
/** Fonction form_mk_categ() - Créé la liste déroulante XHTML des types de structures.
*
* Fonction créant liste déroulante XHTML des types de structures.
*
* @param string l'identifiant du type de structure actuellement sélectionné : valeur de TabFinder['categ'].
* @param string la classe à appliquer à la balise <select>.
*
* @return string la liste déroulante XHTML des types de structures.
*/
function form_mk_categ($actualcateg, $class = 'bb_champ')
{
global $tbl, $label_bbota;
$retour = '';
$retour .= ' <select name="TabFinder[categ]" class="'.$class.'">'."\n";
$retour .= ' <option value="tous" ';
if ($actualcateg == 0) {
$retour .= 'selected="selected"';
}
$retour .= '>'.$label_bbota['all_typstr'].'</option>'."\n";
$requete = 'SELECT * '.
'FROM '.$tbl['typestr'].' '.
'ORDER BY B_TYPSTR_ID';
$result_str = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
while ($row = mysql_fetch_object($result_str)) {
$typstr_id = $row->B_TYPSTR_ID;
$typstr_nom = $row->B_TYPSTR_LABEL;
$retour .= '<option value="'.$typstr_id.'"';
if ($actualcateg == $typstr_id) {
$retour .= ' selected="selected"';
}
$retour .= '>'.$typstr_nom.'</option>'."\n";
}
mysql_free_result($result_str);
$retour .= '</select>'."\n\n";
return $retour;
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.2 2004/09/15 11:21:07 jpm
* Début mise en conformité avec la convention de codage et le standard XHTML Strict.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bibliotheque/bbc_affichage_media.fonct.php
New file
0,0 → 1,369
<?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_affichage_media.fonct.php,v 1.3 2006-09-20 14:16:32 jp_milcent Exp $
/**
* Fonctions de création de l'affichage des résultats d'un média.
*
* Contient une fonction créant l'affichage des résultats pour le paramètre "media".
*
*@package BiblioBota-Consultation
*@subpackage Fonctions
//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.3 $ $Date: 2006-09-20 14:16:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/*Mettre ici les inclusions de fichiers*/
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
/*Mettre ici la liste de fonctions.*/
 
/** Fonction mkresu() - Traitement des requêtes.
*
* Fonction traitant la requête d'intérogation de la base de données pour le
* paramêtre "media".
*
* @return string les résultats à afficher.
*/
function mkresu()
{
global $result_final;
global $nbr_final;
global $tbl;
global $TabFinder;
global $nbr_total;
global $var_biblio;
global $query_dom;
global $phy;
// Initialisation des variables
$retour = '';
$retour .= '<ul id="bb_liste_resultat_media">'."\n";
$j = 1;
while ($row = mysql_fetch_object($result_final)) {
$retour .= '<li>';
// Récupération des données
$get_idstr = $row->B_S_IDSTR;
$get_nomstr = $row->B_S_NOM;
$get_iditem = $row->B_I_IDITEM;
$get_titreitem = $row->B_I_TITRE;
$get_auteuritem = str_replace(' - ', '-', ucwords(strtolower(str_replace('-', ' - ', stripslashes($row->B_I_AUTEURS)))));
$get_geo = $row->B_I_GEO;
$get_langue = $row->B_I_LANGUE;
$get_resumcle = $row->B_I_RESUMCLE;
$get_image = $row->B_I_IMAGE;
$get_saisie = $row->B_AS_LIBELLE;
$get_comment = $row->B_I_COMMENT;
$get_domaine_id = $row->B_D_ID;
$get_domaine_nom = $row->B_D_LABEL;
if ($get_domaine_id != 1) {
$retour .= '<span class="texte_unactive">['.$get_domaine_nom.']</span>'."\n";
}
if (BB_ARGUMENT_REGROUPEMENT == 'article') {
$get_idcoll = $row->B_C_CRAI;
$get_seriecoll = $row->B_SER_IDSERIE;
$get_titreserie = $row->B_SER_SOUSTITRE;
$get_nomcoll = $row->B_C_NOMCOMPLET;
$get_abrege = $row->B_C_ABREGE;
$get_idfasc = $row->B_F_NUMERO;
$get_titrefasc = $row->B_F_TITRE;
$get_datefasc = $row->B_F_DATE;
$get_debut = $row->B_A_PAGEDEBUT;
$get_fin = $row->B_A_PAGEFIN;
} else {
$collection_book = $row->B_M_COLLECTION;
$numcoll_book = $row->B_M_NUMCOLL;
$isbn = $row->B_M_ISBN;
$editeur = $row->B_M_EDITEUR;
$get_datefasc = $row->B_M_DATE;
$prix = $row->B_M_PRIX;
$idmonnaie = $row->B_M_LKMONNAIE;
$monnaie = $row->GEN_MON_SYMBOLE;
$converter = $row->GEN_MON_VAL1EURO;
$volume = $row->B_M_VOLUME;
$edite = $row->B_M_EDITE;
$vendu = $row->B_M_VEND;
}
if ((BB_ARGUMENT_REGROUPEMENT == 'media') || (BB_ARGUMENT_REGROUPEMENT == 'mixte')) {
$id_phy = $row->B_IP_ID;
$item_phy = $row->B_IP_LABEL;
$icon_phy = $row->B_IP_IMAGE;
$id_log = $row->B_IL_ID;
$item_log = $row->B_IL_LABEL;
$icon_log = $row->B_IL_IMAGE;
$retour .= '<span class="texte_inactif">';
if ($icon_phy != '') {
$retour .= '<img class="bb_img_icone" src="'.BB_CHEMIN_IMAGES_TYPE_PHYSIQUE.$icon_phy.'" alt="'.$item_phy.'" /> ';
} else {
$retour .= '['.$item_phy.']';
}
if (($icon_phy == '') && ($icon_log)) {
$retour .= ' - ';
}
if ($icon_log != '') {
$retour .= ' <img class="bb_img_icone" src="'.BB_CHEMIN_IMAGES_TYPE_LOGIQUE.$icon_log.'" alt="'.$item_log.'" />';
} else {
$retour .= '['.$item_log.']';
}
$retour .= '</span> ';
}
// début de l'affichage
if ($get_auteuritem != '') {
$retour .= "\n".ColorizeFound($get_auteuritem, $TabFinder['auteur']);
} else {
$retour .= 'Anonyme';
}
$retour .= ' -'."\n".'<b>'.ColorizeFound($get_titreitem, stripslashes($TabFinder['chaine'])).'</b>'."\n";
if ($get_datefasc > 0) {
$retour .= ' - ' . DAT_formaterDateYYYYMMJJ($get_datefasc);
}
if (($get_resumcle != '') || ($get_comment != '')) {
$retour .= ' - <i>';
if ($get_resumcle != '') {
$retour .= ColorizeFound($get_resumcle, strtolower(stripslashes($TabFinder['chaine'])));
}
if (($get_resumcle != '') && ($get_comment != '')) {
$retour .= ' - ';
}
if ($get_comment != '') {
$retour .= ColorizeFound($get_comment, strtolower(stripslashes($TabFinder['chaine'])));
}
$retour .= '</i>';
}
if ((!empty($get_debut)) && (!empty($get_fin))) {
if (($get_debut > 0)||($get_fin > 0)) {
$retour .= ', p. ';
$retour .= $get_debut;
if (($get_debut > 0) && ($get_fin > 0)) {
$retour .= '-';
}
$retour .= $get_fin;
}
}
if ((!empty($volume))) {
$retour .= ' - '.$volume;
}
if (!empty($get_geo)) {
$retour .= ' - '.'Départ./Région : '.'<i>' . ColorizeFound($get_geo,ucFirst(stripslashes($TabFinder['geo']))).'</i>';
}
$retour .= ' - ';
if (BB_ARGUMENT_REGROUPEMENT == 'article') {
if (!empty($get_nomstr)) $retour .= "$get_nomstr, ";
if (empty($get_abrege)) {
$retour .= $get_nomcoll;
} else {
$retour .= $get_abrege;
}
if (!empty($get_titreserie)) {
$retour .= ', '.$get_titreserie;
}
if (($var_biblio['open_biblio_str'] == true) && ($get_nomstr != '')) {
$retour .= ', <a href="'.BB_URL_COURANTE_CONSULTATION_AVANCEE.'&amp;art='.$get_idcoll.'-'.$get_seriecoll.'-'.$get_idfasc.
'&amp;arg_0=str%3D'.$get_idstr.'&amp;arg_1=coll%3D'.$get_idstr.
'&amp;arg_2=book%3D'.$get_idstr.'&amp;arg_3=media%3D'.$get_idstr.'">'.
$get_titrefasc.
'</a>';
} else {
$retour .= ', '.$get_titrefasc;
}
} else if (BB_ARGUMENT_REGROUPEMENT == 'media') {
$retour .= 'Editeur : ';
if (($var_biblio['open_biblio_str'] == true) && ($editeur != '') && ($edite == 1) && ($get_idstr != '')) {
// sert à accéder à des pages différentes selon le type physique
// désactivé pour homogénéiser les accès au popup
if ($id_phy == $phy['perio']) {
$tmp_word = 'str';
$tmp_page = 0;
} else {
$tmp_word = 'str';
$tmp_page = 0;
}
$retour .= ' <a href="'.BB_URL_COURANTE_CONSULTATION_AVANCEE.'&amp;page='.$tmp_page.'&amp;'.
$tmp_word.'='.$get_idstr.'&amp;arg_0=str%3D'.$get_idstr.'&amp;arg_1=coll%3D'.$get_idstr.'&amp;arg_2=book%3D'.$get_idstr.
'&amp;arg_3=media%3D'.$get_idstr.'">'.$editeur.'</a>';
} else if (!empty($editeur)) {
$retour .= $editeur;
} else {
$retour .= 'inconnu';
}
} else {
if ($var_biblio['open_biblio_str'] == true) {
$retour .= '<a href="'.BB_URL_COURANTE_CONSULTATION_AVANCEE.'&amp;str='.$get_idstr.
'&amp;arg_0=str%3D'.$get_idstr.'&amp;arg_1=coll%3D'.$get_idstr.
'&amp;arg_2=book%3D'.$get_idstr.'&amp;arg_3=media%3D'.$get_idstr.'">
'.$get_nomstr.
'</a>';
} else {
$retour .= $get_nomstr;
}
}
if (((!empty($collection_book) && ($collection_book != ''))) || ((!empty($numcoll_book) && ($numcoll_book != '')))) {
$retour .= ' - '.'Collection : '.$collection_book.' '.$numcoll_book;
}
if ((!empty($isbn) && ($isbn != ''))) {
$retour .= ' - '.'ISBN : '.$isbn;
}
if ((!empty($prix) && ($prix > 0))) {
$retour .= ' - '.$prix.' '.$monnaie;
}
if ((!empty($vendu)&&($vendu == -1))) {
$retour .= ' - <img class="'.BB_CLASS_IMG_EPUISE.'" src="'.BB_IMG_EPUISE.'" alt="'.'Epuisé'.'" />';
}
if ((!empty($var_biblio['val_euro'])) && (!empty($idmonnaie)) && (!empty($converter))) {
if (($var_biblio['val_euro'] != $idmonnaie) && ($converter > 0) && ($prix > 0)) {
$retour .= ' ('.'env. '.round($prix/$converter,2).' &euro;)';
}
}
if ((!empty($get_langue) && ($get_langue != ''))) {
$retour .= ' - '.$get_langue;
}
if ($get_saisie != '') {
$get_saisie = 'Saisie : '.$get_saisie.' -';
} else if ($get_saisie == '') {
$get_saisie = 'Saisie : '.'? -';
}
/* correction du 28 nov 2002
if (($get_saisie != "")&&($get_saisie == $get_nomstr)) $get_saisie = "";
else if ($get_saisie != "") $get_saisie = "Saisie : $get_saisie -";
else if ($get_saisie == "") $get_saisie = "Saisie : ? -";
*/
// Là on affiche les Voir Aussi ... si y'en a
$UnVoirAussi = new VoirAussi($get_iditem, $tbl[BB_ARGUMENT_REGROUPEMENT]);
if ($UnVoirAussi->NbVA > 0) {
$liste_va = $UnVoirAussi->ListerVoirAussi();
$retour .= ' - '.'Consulter : ';
for ($i = 0; $i == (($UnVoirAussi->NbVA) - 1) ; $i++) {
$retour .= '<img class="'.BB_CLASS_IMG_ICONE.'" src="'.$liste_va[$i]['icon_src'].'" alt="'.$liste_va[$i]['icon_alt'].'"/> ';
$retour .= '<a '.$liste_va[$i]['target'].'>'.$liste_va[$i]['texte'].'</a>';
if ($liste_va[$i]['desc'] != '') {
$retour .= ' - <i>'.$liste_va[$i]['desc'].'</i>';
}
if (($i != 0) && ($i < ($UnVoirAussi->NbVA))) {
$retour .= '<br />'."\n";
}
}
}
// Fin des Voir Aussi
$retour .= ' - <span class="texte_inactif">';
if ((BB_ARGUMENT_REGROUPEMENT != 'article') && ($edite == 0)) {
$retour .= 'Donnée fournie par ';
if ($get_idstr != 0) {
$retour .= '<a href="'.BB_URL_COURANTE_CONSULTATION_AVANCEE.'&amp;str='.$get_idstr.'&amp;page=0&amp;arg_0=str%3D'.$get_idstr.'&amp;arg_1=coll%3D'.
$get_idstr.'&amp;arg_2=book%3D'.$get_idstr.'&amp;arg_3=media%3D'.$get_idstr.'">'.$get_nomstr.'</a>';
} else {
$retour .= $get_nomstr;
}
$retour .= ' - ';
}
$retour .= $get_saisie.' Art. n°'.$get_iditem.'.</span>';
$retour .= "\n";
if ($j < $nbr_final) {
$retour .= '<br /><br/>';
}
$retour .= '</li>'."\n";
$j++;
}
$retour .= '</ul>'."\n";
return $retour;
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2006/09/20 13:18:35 jp_milcent
* Amélioration de la mise ne majuscule des noms d'auteurs.
*
* Revision 1.1 2005/11/23 10:22:25 jp_milcent
* Ajout au dépot de l'application BiblioBota.
* Elle doit à terme migrer dans eFlore.
*
* Revision 1.6 2005/08/18 10:43:15 jpm
* Correction chemin.
*
* Revision 1.5 2005/05/31 13:03:51 jpm
* Correction affichage lien vers structure inconnue.
*
* Revision 1.4 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.3 2005/02/24 18:33:26 jpm
* Modification de la gestion des voir aussi.
*
* Revision 1.2 2004/09/14 10:18:17 jpm
* Mise en forme et amélioration du code.
* Passage au XHTML strict.
*
* Revision 1.1 2004/09/10 18:44:02 jpm
* Ajout des fichiers de gestion du moteur de recherche des médias.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bibliotheque/bbc_affichage.fonct.php
New file
0,0 → 1,490
<?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_affichage.fonct.php,v 1.2 2007-02-13 18:06:21 jp_milcent Exp $
/**
* Fonctions de l'interface de consultation de Biblio Bota.
*
* Contient les fonctions fournissant du XHTML pour l'affichage de l'interface de consultation de BibioBota.
*
*@package BiblioBota-Consultation
*@subpackage Fonctions
//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.2 $ $Date: 2007-02-13 18:06:21 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/*Mettre ici les inclusions de fichiers*/
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
/*Mettre ici la liste de fonctions.*/
 
// string ColorizeFound($tomod,$tofind)
// Colorie dans une chaine de texte $tomod la chaine $tofind.
// $tofind peut contenir des espaces, chaque terme sera quand même colorié.
// Retourne la chaine de caractères $tomod convertie.
function ColorizeFound($tomod, $tofind)
{
$words = explode(' ', $tofind);
// Liste de mots générant des problèmes vis à vis de la chaine $edited
$forbid_lst[0] = 'la';
$forbid_lst[1] = 'texte';
$forbid_lst[2] = 'found';
$forbid_lst[3] = 'un';
$forbid_lst[4] = 'fou';
$forbid_lst[5] = 'las';
$forbid_lst[6] = 'class';
$forbid_lst[7] = 'text';
$forbid_lst[8] = 'ou';
$forbid_lst[9] = 'ext';
$forbid_lst[10] = 'te';
$forbid_lst[11] = 'ex';
$forbid_lst[12] = 'und';
$forbid_lst[13] = 'a';
$forbid_lst[14] = 'c';
$forbid_lst[15] = 'd';
$forbid_lst[16] = 'e';
$forbid_lst[17] = 'f';
$forbid_lst[18] = 'l';
$forbid_lst[19] = 'n';
$forbid_lst[20] = 'o';
$forbid_lst[21] = 'p';
$forbid_lst[22] = 's';
$forbid_lst[23] = 't';
$forbid_lst[24] = 'u';
$forbid_lst[25] = 'x';
for ($i = 0; $i < count($words); $i++) {
$words[$i] = ereg_replace('\[', '', $words[$i]);
$words[$i] = ereg_replace('\]', '', $words[$i]);
$edited = '<span class="bb_txt_trouve">'.$words[$i].'</span>';
if (($words[$i] != '') && ($tomod != '') && (! in_array($words[$i], $forbid_lst))){
$tomod = eregi_replace($words[$i], $edited, $tomod);
}
}
return $tomod;
}
 
// form_mk_submit($value) :
// créé un bouton de validation de formulaire
// Entrée : string $value (facultatif), string $class
// Sortie (par retour) : string
function form_mk_submit($value = 'Chercher', $class = 'texte_tb')
{
$retour = '';
$retour .= '<input type="submit" name="valider" value="'.$value.'" class="'.$class.'" />';
$retour .= '<input type="hidden" name="TabFinder[valid]" value="1" />';
return $retour;
}
 
 
// form_mk_reset($value) :
// créé un bouton d'effacement de formulaire
// Entrée : string $value (facultatif)
// Sortie (par retour) : string
function form_mk_reset($value = 'Effacer', $class = 'texte_tb')
{
return '<input type="reset" value="'.$value.'" name="valider" class="'.$class.'" />';
}
 
 
// form_mk_chaine($value,$class) :
// créé un champ texte "chaine"
// Entrée : $value (valeur de TabFinder['chaine']), $class (classe CSS) par défaut "insInputForm"
// Sortie (par retour) : string
function form_mk_chaine($value = '', $class = 'insInputForm')
{
$id = 'TabFinder[chaine]';
$retour = '<label for="'.$id.'">'.'Rechercher : '.'</label>';
$retour .= '<input type="text" id="'.$id.'" name="'.$id.'" class="'.$class.'" value="'.$value.'" />'."\n";
return $retour;
}
 
 
// form_mk_geo($value,$class) :
// créé un champ texte "geo"
// Entrée : $value (valeur de TabFinder['geo']), $class (classe CSS) par défaut "insInputForm"
// Sortie (par retour) : string
function form_mk_geo($value = '', $class = 'insInputForm')
{
$id = 'TabFinder[geo]';
$retour = '<label for="'.$id.'">'.'Zone géo. : '.'</label>';
$retour .= '<input type="text" id="'.$id.'" name="'.$id.'" class="'.$class.'" value="'.$value.'" />'."\n";
return $retour;
}
 
 
// form_mk_auteur($value,$class) :
// créé un champ texte "auteur"
// Entrée : $value (valeur de TabFinder['auteur']), $class (classe CSS) par défaut "insInputForm"
// Sortie (par retour) : string
function form_mk_auteur($value = '', $class = 'insInputForm')
{
$id = 'TabFinder[auteur]';
$retour = '<label for="'.$id.'">'.'Auteur : '.'</label>';
$retour .= '<input type="text" id="'.$id.'" name="'.$id.'" class="'.$class.'" value="'.$value.'" />';
return $retour;
}
 
 
// form_mk_step($actualstep,$class) :
// créé une liste déroulante TabFinder[step] pour fragmenter les pages en x résultats
// Entrée : $actualstep (valeur de TabFinder['step']), $class (classe CSS) par défaut "insInputForm"
// Sortie (par retour) : string
function form_mk_step($actualstep, $class = 'insInputForm')
{
$retour = '';
$id = 'TabFinder[step]';
$retour .= '<label for="'.$id.'">'.'Grouper les résultats : '.'</label>';
$retour .= '<select id="'.$id.'" name="'.$id.'" class="'.$class.'">'."\n";
$retour .= ' <option value="10"';
if ($actualstep == 10) {
$retour .= 'selected="selected"';
}
$retour .= '>par 10</option>'."\n";
$retour .= ' <option value="20"';
if (($actualstep == 20) || ($actualstep == '')) {
$retour .= 'selected="selected"';
}
$retour .= '>par 20</option>'."\n";
$retour .= ' <option value="50"';
if ($actualstep == 50) {
$retour .= 'selected="selected"';
}
$retour .= '>par 50</option>'."\n";
$retour .= '</select>'."\n";
return $retour;
}
 
 
// form_mk_typque($actualstep,$class) :
// créé une liste déroulante TabFinder[step] pour fragmenter les pages en x résultats
// Entrée : $actualtypque (valeur de TabFinder['typque']), $class (classe CSS) par défaut "insInputForm"
// Sortie (par retour) : string
function form_mk_typque($actualtypque, $class = 'insInputForm')
{
global $label_bbota;
$retour = '';
$retour .= '<select name="TabFinder[typque]" size="1" class="'.$class.'">'."\n";
$retour .= ' <option value="1"';
if (($actualtypque == '') || ($actualtypque == 1)) {
$retour .= ' selected="selected"';
}
$retour .= '>'.$label_bbota['bool_separe'].'</option>'."\n";
$retour .= ' <option value="0"';
if (($actualtypque == 0) && ($actualtypque != '')) $retour .= ' selected';
$retour .= '>'.$label_bbota['bool_exacte'].'</option>'."\n";
$retour .= '</select>'."\n";
return $retour;
}
 
// form_mk_since($value,$class) :
// créé un champ texte "since"
// Entrée : $value (valeur de TabFinder['since']), $class (classe CSS) par défaut "insInputForm"
// Sortie (par retour) : string
function form_mk_since($value = '', $class = 'insInputForm')
{
$id = 'TabFinder[since]';
$retour = '<label for="'.$id.'">'.'Réduire aux données mises en ligne depuis le : '.'</label>';
$retour .= '<input type="text" id="'.$id.'" name="'.$id.'" class="'.$class.'" value="'.$value.'" maxlength="10" />';
$retour .= ' (au format jj/mm/aaaa)'."\n";
return $retour;
}
 
 
// form_mk_plugin($value) :
// créé un element de formulaire caché en fonction du contenu de Plugin
// Entrée : string $value
// Sortie (par retour) : string ou void
function form_mk_plugin($value)
{
if ($value != '') {
return '<input type="hidden" name="TabFinder[plugin]" value="'.$value.'" />'."\n";
} else {
return '';
}
}
 
// form_mk_advance() :
// créé un element/lien formulaire appelant la page elle-même pour avoir un formulaire en mode "avancé"
// Entrée :
// Sortie (par retour) : string
function form_mk_advance()
{
global $TabFinder, $arg_0, $arg_1, $arg_2, $arg_3, $arg_4, $arg_5;
if (empty($TabFinder)) {
$TabFinder = '';
}
$stockagevar = '';
foreach($TabFinder as $tmp_stock_i => $value) {
if ($tmp_stock_i != 'args' && $tmp_stock_i != 'finder_mode') {
$stockagevar .= $tmp_stock_i.','.$value.'!';
}
}
$stockagevar = ereg_replace(' ', '{', $stockagevar);
if ($TabFinder['finder_mode'] == 'normal') {
$chaine_url_middle = 'advance';
$chaine_labelle = 'Plus';
} else if ($TabFinder['finder_mode'] == 'advance') {
$chaine_url_middle = 'normal';
$chaine_labelle = 'Moins';
}
$chaine_url_end = '&amp;arg_0='.$arg_0.'&amp;arg_1='.$arg_1.'&amp;arg_2='.$arg_2.'&amp;arg_3='.$arg_3.'&amp;arg_4='.$arg_4.'&amp;arg_5='.$arg_5;
$chaine_url_start = "\n".'<input type="button" class="texte_tb" value="'.$chaine_labelle.' d\'options" '.
'onclick="javascript:window.location.href=\''.$GLOBALS['_GEN_commun']['url']->getURL().
'&amp;TransTab='.$stockagevar.'finder_mode,'.$chaine_url_middle.$chaine_url_end.'\';" />'."\n";
return $chaine_url_start;
}
 
// presa_mk_title($value,$colspan) :
// créé une ligne de titre dans un <tr>
// Entrée : string $value, int $colspan
// ($value : titre ; $colspan : nombre de colonnes fusionnées ; par défaut $colspan = 1)
// Sortie (par retour) : string
 
function presa_mk_title($value, $niveau = '2', $class = 'insTitle1')
{
return '<h'.$niveau.' class="'.$class.'">'.$value.'</h'.$niveau.'>'."\n";
}
 
 
// presa_mk_maxtitle($value,$colspan) :
// créé une ligne de titre dans un <tr>
// Entrée : string $value, int $colspan
// ($value : titre ; $colspan : nombre de colonnes fusionnées ; par défaut $colspan = 1)
// Sortie (par retour) : string
function presa_mk_maxtitle($value, $niveau = '1', $class = 'insMsg')
{
return '<h'.$niveau.' class="'.$class.'">'.$value.'</h'.$niveau.'>'."\n";
}
 
 
// presa_mk_blkline($colspan=1) :
// créé une ligne vide dans un <tr>
// Entrée : int $colspan
// ($colspan : nombre de colonnes fusionnées ; par défaut $colspan = 1)
// Sortie (par retour) : string
function presa_mk_blkline($colspan=1)
{
return '<tr><td class="texte_tb" colspan="'.$colspan.'">&nbsp;</td></tr>'."\n";
}
 
// count_num_of_reductor($table,$id)
// retourne le nombre d'items de la table $tbl['item'] ayant un
// type de réducteur $id dans le champ $champ
 
function count_num_of_reductor($champ, $id)
{
global $tbl;
global $retour_biblio;
global $plugin_store;
if ($retour_biblio['limit_domain'] == 1) {
$from_ajout = ', '.$tbl['domaine_lk'];
$requete_ajout = ' AND B_I_IDITEM = B_DL_IDITEM AND B_DL_IDDOM = 1';
} else {
$from_ajout = '';
$requete_ajout = '';
}
if ((BB_ARGUMENT_REGROUPEMENT == 'media') && ($champ == 'B_I_TYPLOG')) {
$requete_ajout .= ' AND '.$GLOBALS['query_dom']['phy'];
}
$requete = 'SELECT COUNT(B_I_IDITEM) AS CPT '.
'FROM '.$tbl['item'].$plugin_store['count_add_table'].$from_ajout.' '.
'WHERE '.$champ.' = '.$id.' '.
$requete_ajout.' '.
$plugin_store['count_add_query'];
$resultat = $GLOBALS['db_bb']->query($requete);
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
$nbre_ligne = $resultat->numRows();
if ($nbre_ligne != 1) {
die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete, 'Erreur : '.$nbre_ligne.' résultat(s) au lieu d\'1.'));
$resultat->free();
return -1;
} else {
$ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT);
$nombre = $ligne->CPT;
$resultat->free();
return $nombre;
}
}
 
/**Fonction CreateNavigBiblio() - construit l'interface de navigation de la consultation avancée.
*
* Créée des boutons pour accéder à certains services spécifiques de Biblio Bota
* (listes,modifications...).
* Cette fonction utilise les constantes :
* - BB_URL_COURANTE_CONSULTATION
* - BB_IMG_PRECEDENT
* - BB_CLASS_IMG_PRECEDENT
*
* @param string la destination du bouton (goback ou goto).
* @param string le sujet de destination du bouton (coll, fasc ou art).
* @param array un tableau contenant les arguments des liens des boutons.
* @param string le texte du bouton qui remplacera l'image.
* @param bool booléen indiquant si on doit afficher une image ou pas.
*
* @return array les infos des "voir aussi".
*/
function CreateNavigBiblio($destination, $sujet, $tableau, $texte = '', $image = 0)
{
if (!isset($tableau['pass'])) {
$tableau['pass'] = '';
}
if (!isset($tableau['locusfasc'])) {
$tableau['locusfasc'] = '';
}
$retour = '';
switch ($destination) {
// GoBack permet de créer des retours aux pages précédentes (fasc->coll, art->fasc)
case 'goback':
switch ($sujet) {
case 'coll':
// Permet de retourner des fascicules aux collections
$action = BB_URL_COURANTE_CONSULTATION.'&amp;consultation=avancee&amp;page=1&amp;coll='.$tableau['pass'].$tableau['args'];
$retour = '<p class="bb_navigation">';
$retour .= '<a href="'.$action.'">';
if ($image == 1) {
$retour .= '<img class="'.BB_CLASS_IMG_PRECEDENT.'" src="'.BB_IMG_PRECEDENT.'" alt="'.$texte.'..."/>';
$retour .= ' '.$texte;
} else {
$retour .= ' '.$texte;
}
$retour .= '</a></p>'."\n";
break;
case 'fasc':
// Permet de retourner des articles aux fascicules
$action = BB_URL_COURANTE_CONSULTATION.'&amp;consultation=avancee&amp;page=1&amp;fasc='.$tableau['back'].$tableau['args'].
'&amp;locusfasc='.$tableau['locusfasc'];
$retour = '<p class="bb_navigation">';
$retour .= '<a href="'.$action.'">';
if ($image == 1) {
$retour .= '<img class="'.BB_CLASS_IMG_PRECEDENT.'" src="'.BB_IMG_PRECEDENT.'" alt="'.$texte.'..."/>';
$retour .= ' '.$texte;
} else {
$retour .= ' '.$texte;
}
$retour .= '</a></p>'."\n";
break;
}
break;
// GoTo permet de descendre d'un niveau (coll->fasc->art)
case 'goto':
switch ($sujet) {
case 'fasc':
// Permet de descendre des coll aux fasc
$action = BB_URL_COURANTE_CONSULTATION.'&amp;consultation=avancee&amp;page=1&amp;fasc='.$tableau['pass'].$tableau['args'];
$retour = '<p class="bb_navigation">';
$retour .= '<a href="'.$action.'">';
if ($image == 1) {
$retour .= $texte.' ';
$retour .= '<img class="'.BB_CLASS_IMG_SUIVANT.'" src="'.BB_IMG_SUIVANT.'" alt="'.$texte.'..."/>';
} else {
$retour .= ' '.$texte;
}
$retour .= '</a></p>'."\n";
break;
case 'art':
// Permet de descendre des fasc aux art
$action = BB_URL_COURANTE_CONSULTATION.'&amp;consultation=avancee&amp;page=1&amp;art='.$tableau['pass'].$tableau['args'].
'&amp;locusfasc='.$tableau['locusfasc'];
$retour = ' - ';
$retour .= '<a href="'.$action.'">';
if ($image == 1) {
$retour .= $texte.' ';
$retour .= '<img class="'.BB_CLASS_IMG_SUIVANT.'" src="'.BB_IMG_SUIVANT.'" alt="'.$texte.'..."/>';
} else {
$retour .= ' '.$texte;
}
$retour .= '</a>'."\n";
break;
}
break;
}
return $retour;
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/11/23 10:22:25 jp_milcent
* Ajout au dépot de l'application BiblioBota.
* Elle doit à terme migrer dans eFlore.
*
* Revision 1.6 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.5 2005/01/04 16:23:47 jpm
* Amélioration de la forme.
*
* Revision 1.4 2004/09/16 12:07:30 jpm
* Changement de noms de constantes.
*
* Revision 1.3 2004/09/14 10:18:17 jpm
* Mise en forme et amélioration du code.
* Passage au XHTML strict.
*
* Revision 1.2 2004/09/10 18:44:25 jpm
* Ajout de fonction et mise en forme.
*
* Revision 1.1 2004/09/10 09:45:37 jpm
* Ajout des fichiers BiblioBota configurer pour Papyrus.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bibliotheque/bbc_affichage_structure.fonct.php
New file
0,0 → 1,165
<?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_affichage_structure.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Fonctions de création de l'affichage des résultats d'une structure.
*
* Contient une fonction créant l'affichage des résultats pour le paramètre "structure".
*
*@package BiblioBota-Consultation
*@subpackage Fonctions
//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 |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
/** Fonction mkresu() - Traitement des requêtes.
*
* Fonction traitant la requête d'intérogation de la base de données pour le
* paramêtre "structure".
*
* @return string les résultats à afficher.
*/
function mkresu()
{
global $result_final;
global $nbr_final;
global $tbl;
global $TabFinder;
global $var_biblio;
$ret = '';
$ret .= '<ul id="bb_liste_resultat_structure">'."\n";
$i = 1;
while ($ligne = mysql_fetch_object($result_final)) {
$get_idstr = $ligne->B_S_IDSTR;
$get_name = $ligne->B_S_NOM;
$get_cp = $ligne->B_S_CODEPOSTAL;
$get_ville = $ligne->B_S_VILLE;
$get_pays = $ligne->GC_NAME;
$get_date = $ligne->B_S_MAJFICHE;
$get_categ = $ligne->B_S_TYPESTR;
$get_categ_nom = $ligne->B_TYPSTR_LABEL;
$ret .= '<li>'."\n";
$ret .= '<b>';
$ret .= ColorizeFound($get_name, stripslashes($TabFinder['chaine']));
$ret .= '</b> ';
$ret .= '(';
$ret .= ColorizeFound($get_ville, strtoupper($TabFinder['geo']));
if (($get_ville != '') && ($get_pays != '')) {
$ret .= ' - ';
}
if (($get_pays == 'France') && ($get_cp != '')) {
// Calcul du code département pour la France
if ($get_cp < 97000) {
$calc_dpt = floor($get_cp / 1000);
} else {
$calc_dpt = floor($get_cp / 100);
}
$dpt_qu = 'SELECT GFD_NAME '.
'FROM '.$tbl['dpt'].' '.
'WHERE GFD_ID = '.$calc_dpt;
$do_dpt = mysql_query($dpt_qu) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $dpt_qu));
$nbr_dpt = mysql_num_rows($do_dpt);
if ($nbr_dpt == 1) {
$resu_dpt = mysql_fetch_object($do_dpt);
$nom_dpt = $resu_dpt->GFD_NAME;
} else {
return '<b>Erreur lors de la recherche du département :</b> '.$nbr_dpt.' départements trouvés.';
}
$ret .= ColorizeFound($nom_dpt, ucFirst($TabFinder['geo'])) . ' - ';
}
if ($get_pays != '') {
if ($TabFinder['geo'] != '') {
$ret .= ColorizeFound($get_pays, ucFirst($TabFinder['geo']));
} else {
$ret .= $get_pays;
}
}
$ret .= ') - '."\n";
if ($get_categ != '') {
$ret .= $get_categ_nom;
}
// Vérification de l'accès à la consultation avancée transversale de Bilblio Bota.
if ($var_biblio['open_biblio_str'] == true) {
$ret .= ' - <a href="'.BB_URL_COURANTE_CONSULTATION_AVANCEE.'&amp;str='.$get_idstr.'&amp;arg_0=str%3D'.$get_idstr.'&amp;arg_1=coll%3D'.
$get_idstr.'&amp;arg_2=book%3D'.$get_idstr.'&amp;arg_3=media%3D'.$get_idstr.'">'.
'Plus d\'infos'.
'</a>';
}
if ($i < $nbr_final) {
$ret .= '<br /><br />';
}
$i++;
$ret .= '</li>'."\n";
}
$ret .= '</ul>'."\n";
// Vérification de l'accès à la proposition de nouvelles structures.
if ($var_biblio['open_proposer_str'] == true) {
$ret .= '<p class="bb_txt_centre">'.
'<hr size="1" />'.
'<a href="'.BB_URL_COURANTE_ADMIN.'&amp;action=new&ensemble=str">'.'Proposer un nouvel organisme'.'</a>'.
'<hr size="1" />'.
'</p>'."\n";
}
return $ret;
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.2 2004/09/15 11:21:07 jpm
* Début mise en conformité avec la convention de codage et le standard XHTML Strict.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bibliotheque/bbc_statistique.fonct.php
New file
0,0 → 1,137
<?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_statistique.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Fonctions de statistique de Biblio Bota.
*
* Contient les fonctions permettant de faire les statistiques de Biblio Bota.
*
*@package BiblioBota-Consultation
*@subpackage Fonctions
//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 |
// +------------------------------------------------------------------------------------------------------+
 
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
/** Fonction spy_validated_finder() - Enregistrement des statistiques.
*
* Fonction insèrant dans la table biblio_spy des données concernant les requêtes
* faites par les utilisateurs de Biblio Botanica.
*
* @param string les arguments d'appel de la page de Biblio Bota.
* @return void les données sont enregistrées dans la base de données.
*/
function spy_validated_finder($page_arg, $nbres)
{
global $doc, $REMOTE_ADDR, $TabFinder, $TransTab;
if (isset($TransTab)) {
$TabFinder = FRAG_decoupageChaine($TransTab);
}
$moment = time();
if (!isset($TabFinder['plugin'])) {
$TabFinder['plugin'] = '';
}
if (!isset($TabFinder['geo'])) {
$TabFinder['geo'] = '';
}
if (!isset($TabFinder['chaine'])) {
$TabFinder['chaine'] = '';
}
if (!isset($TabFinder['sort'])) {
$TabFinder['sort'] = '';
}
if (!isset($TabFinder['auteur'])) {
$TabFinder['auteur'] = '';
}
if (!isset($TabFinder['categ'])) {
$TabFinder['categ'] = '';
}
if (!isset($TabFinder['pstart'])) {
$TabFinder['pstart'] = '';
}
if (!isset($TabFinder['pend'])) {
$TabFinder['pend'] = '';
}
if (!isset($TabFinder['step'])) {
$TabFinder['step'] = '';
}
if (!isset($TabFinder['valid'])) {
$TabFinder['valid'] = '';
}
if (!isset($TabFinder['typque'])) {
$TabFinder['typque'] = '';
}
if (!isset($TabFinder['categ_2'])) {
$TabFinder['categ_2'] = '';
}
if (!isset($TabFinder['categ_3'])) {
$TabFinder['categ_3'] = '';
}
if (!isset($TabFinder['since'])) {
$TabFinder['since'] = '';
}
if ($nbres > 0) {
$calc_pages = 'De '.$TabFinder['pstart'].' à '.$TabFinder['pend'].' sur '.$nbres;
} else {
$calc_pages = 'Pas de résultats';
}
$requete = 'INSERT INTO biblio_spy VALUES ("", "'.$doc.'.'.$TabFinder['plugin'].'", '.
'"'.$page_arg.'", "'.$REMOTE_ADDR.'", "'.$TabFinder['chaine'].'", '.
'"'.$TabFinder['geo'].'", "'.$TabFinder['auteur'].'", "'.$TabFinder['categ'].'", '.
'"'.$TabFinder['categ_2'].'", "'.$TabFinder['categ_3'].'", "'.$TabFinder['typque'].'", '.
'"'.$TabFinder['step'].'", "'.$TabFinder['sort'].'", "'.$TabFinder['since'].'", '.
'"'.$calc_pages.'", "'.$moment.'")';
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.1 2004/09/10 18:43:31 jpm
* Ajout d'une bibliothèque de gestion de fonction de statistique de Biblio Bota.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bibliotheque/bbc_requete_lien.fonct.php
New file
0,0 → 1,183
<?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_requete_lien.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Fonctions de création de la requête sur un lien.
*
* Contient une fonction créant la requête d'intérogation de la base de données.
* Valable pour le paramètre "lien".
*
*@package BiblioBota-Consultation
*@subpackage Fonctions
//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 |
// +------------------------------------------------------------------------------------------------------+
/*Mettre ici les inclusions de fichiers*/
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
/*Mettre ici la liste de fonctions.*/
 
function mkquery()
{
global $TabFinder, $tbl;
// Initialisation
$order_query = '';
// Si la variable de catégorie vaut 0, il n'y a pas affinage de la requête par catégorie. Sinon, on affine.
if ($TabFinder['categ'] != 0) {
$add_to_from = $tbl['cat'].', '.$tbl['categlien'].', ';
$add_to_query = ' AND ('.$tbl['cat'].'.B_CAT_IDCAT = '.$TabFinder['categ'].')';
if ($TabFinder['chaine'] != '') {
$join_categ = ' AND ';
} else {
$join_categ = '';
}
$join_categ .= ' AND ('.$tbl['link'].'.B_L_IDLINK = '.$tbl['categlien'].'.B_LC_IDLINK) AND ('.$tbl['cat'].'.B_CAT_IDCAT = '.$tbl['categlien'].'.B_LC_IDCAT)';
} else {
$add_to_from = '';
$add_to_query = '';
$join_categ = '';
}
// Création du SELECT
$normal_query = 'SELECT '.$tbl['link'].'.*, '.$tbl['str'].'.B_S_NOM ';
// si le raffinement de catégorie vaut autre chose que 0, il faut ajouter les tables de catégories
if ($TabFinder['categ'] != 0) {
$normal_query .= ', '.$tbl['categlien'].'.*, '.$tbl['cat'].'.B_CAT_LABEL, '.$tbl['cat'].'.B_CAT_IDCAT ';
}
// Création du FROM
$normal_query .= 'FROM '.$add_to_from.$tbl['link'].' LEFT JOIN '.$tbl['str'].' ON '.$tbl['link'].'.B_L_LKSTR = '.$tbl['str'].'.B_S_IDSTR ';
// Création du WHERE
$normal_query .= 'WHERE B_L_CACHER = 0 ';
if (($TabFinder['typque'] == 0) && ($TabFinder['chaine'] != '')) {
$normal_query .= ' AND (';
$normal_query .= $tbl['link'].'.B_L_TITRE like "%'.$TabFinder['chaine'].'%" '.
'OR '.$tbl['link'].'.B_L_URL like "%'.$TabFinder['chaine'].'%" '.
'OR '.$tbl['link'].'.B_L_RESUMCLE like "%'.$TabFinder['chaine'].'%" ';
$normal_query .= ') ';
} else if ($TabFinder['chaine'] != '') {
$normal_query .= ' AND (';
// Si la variable de type de recherche vaut 1, il faut que le moteur recherche chaque motif
if ($TabFinder['typque'] == 1) {
$result_from_ex = explode (' ', $TabFinder['chaine']);
}
$i_ex = 0;
while ($i_ex < count($result_from_ex)) {
$normal_query .= $tbl['link'].'.B_L_TITRE LIKE "%';
if ($result_from_ex[$i_ex] != '') {
$normal_query .= $result_from_ex[$i_ex];
}
$normal_query .= '%" OR ';
$normal_query .= $tbl['link'].'.B_L_URL LIKE "%';
if ($result_from_ex[$i_ex] != '') {
$normal_query .= $result_from_ex[$i_ex];
}
$normal_query .= '%" OR ';
$normal_query .= $tbl['link'].'.B_L_RESUMCLE LIKE "%';
if ($result_from_ex[$i_ex] != '') {
$normal_query .= $result_from_ex[$i_ex];
}
$normal_query .= '%"';
if ($i_ex < (count($result_from_ex) - 1)) {
$normal_query .= ') AND (';
}
$i_ex++;
}
$normal_query .= ')';
}
// traitement du réducteur SINCE (fonction de la date)
if ($TabFinder['since'] != '') {
$since_var = explode('/', $TabFinder['since']);
if (empty($since_var[0])) {
$since_var[0] = '';
}
if (empty($since_var[1])) {
$since_var[1] = '';
}
if (empty($since_var[2])) {
$since_var[2] = '';
}
$timestamp = mktime(NULL, NULL, NULL, $since_var[1], $since_var[0], $since_var[2]);
if (!ereg('WHERE', $normal_query)) {
$normal_query .= ' WHERE ';
} else {
$normal_query .= ' AND ';
}
$normal_query .= 'B_L_MAJFICHE > '.$timestamp;
}
// Création de l'ordre de tri
$order_query = ' ORDER BY '.$TabFinder['sort'];
// Affectation de la requête à la variable qui va l'envoyer au moteur
$unreq = $normal_query.' '.$join_categ.' '.$add_to_query.' '.$order_query;
return $unreq;
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2005/06/20 17:32:14 jpm
* Correction erreur de construction de la requête sql.
*
* Revision 1.3 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.2 2004/09/14 11:49:52 jpm
* Ajout de l'entête au fichier.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bibliotheque/bbc_moteur_lien.fonct.php
New file
0,0 → 1,203
<?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_moteur_lien.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Fonctions de création du moteur de recherche des liens.
*
* Contient les fonctions permettant de retourner l'affichage du moteur de recherche des liens.
* Valable pour le paramètre "lien".
*
*@package BiblioBota-Consultation
*@subpackage Fonctions
//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 |
// +------------------------------------------------------------------------------------------------------+
 
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
// mkengine() :
// fonction spécifique du moteur LINK
// créé le bloc de recherche pour le paramètre LINK de Finder
// Entrée : -
// Sortie (par retour) : string
function mkengine()
{
global $label_bbota, $tbl, $TabFinder, $nbr_total;
$retour = '';
// Comptage du nombre total de données dans la table (hors CACHER = 1)
$requete = 'SELECT COUNT(*) AS CPT '.
'FROM '.$tbl['link'].' '.
'WHERE B_L_CACHER = 0';
$result = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
if (mysql_num_rows($result) == 1) {
$tmp_nb = mysql_fetch_object($result);
$nbr_total = $tmp_nb->CPT;
if ($nbr_total > 0) {
$chaine = 'parmi '.$nbr_total.' sites web';
}
}
mysql_free_result($result);
// Titre de la page
$retour .= presa_mk_title('Chercher '.$chaine.' :', 1);
// Construction du moteur de liens
$retour .= '<form id="bb_moteur_lien" action="'.BB_URL_COURANTE_CONSULTATION.'" method="post">'."\n";
$retour .= '<ul>'."\n";
// Ligne de recherche
$retour .= '<li>'."\n";
$retour .= form_mk_chaine(stripslashes($TabFinder['chaine'])).' ';
$retour .= form_mk_typque($TabFinder['typque']);
$retour .= form_mk_categ($TabFinder['categ']);
$retour .= '</li>'."\n";
if ($TabFinder['finder_mode'] == 'advance') {
$retour .= '<li>'."\n";
$retour .= form_mk_since($TabFinder['since']);
$retour .= '</li>'."\n";
}
// Ligne de regroupement (frequente)
if ($TabFinder['finder_mode'] == 'advance') {
$retour .= '<li>'."\n".form_mk_step($TabFinder['step']).'</li>'."\n";
$retour .= '<li>'."\n".form_mk_sort($TabFinder['sort']).'</li>'."\n";
}
$retour .= '<li class="bb_aligner_droite">'."\n";
$retour .= form_mk_advance().' '.form_mk_submit();
$retour .= '</li>'."\n";
$retour .= '</ul>'."\n";
$retour .= '</form>'."\n";
// Ajout d'un lien pour les moteurs de recherche
$link = BB_URL_COURANTE_CONSULTATION.'&amp;TransTab=typque,1!valid,1!finder_mode,normal!sort,B_L_TITRE!'.
'pstart,0!step,20!pend,231!plugin,!geo,!chaine,!auteur,!categ,!categ_2,!categ_3,!since,!nom,!prenom,!ville,!dept,!pays,!cotisant,!mail,!';
$retour .= '<p><a href="'.$link.'" style="visibility:hidden;">'.'tout'.'</a></p>'."\n";
return $retour;
}
 
 
// form_mk_sort($actualsort,$class) :
// fonction spécifique du moteur LINK
// créé une liste déroulante TabFinder[sort] pour ordonner les pages de résultats
// Entrée : $actualsort (valeur de TabFinder['sort']), $class (classe CSS) par défaut "insInputForm"
// Sortie (par retour) : string
function form_mk_sort($actualsort, $class = 'bb_champ')
{
$retour = '';
$id = 'TabFinder[sort]';
$retour .= '<label for="'.$id.'">'.'Trier par : '.'</label>';
$retour .= '<select id="'.$id.'" name="'.$id.'" class="'.$class.'">'."\n";
$retour .= ' <option value="B_L_TITRE" ';
if ($actualsort == 'B_L_TITRE') {
$retour .= 'selected="selected"';
}
$retour .= '>'.'titre'.'</option>'."\n";
$retour .= ' <option value="B_L_MAJFICHE" ';
if ($actualsort == 'B_L_MAJFICHE') {
$retour .= 'selected="selected"';
}
$retour .= '>'.'date'.'</option>'."\n";
$retour .= ' <option value="B_L_URL" ';
if ($actualsort == 'B_L_URL') {
$retour .= 'selected="selected"';
}
$retour .= '>'.'adresse'.'</option>'."\n";
$retour .= '</select>'."\n\n";
return $retour;
}
 
 
// form_mk_categ($actualsort,$class) :
// fonction spécifique du moteur LINK
// créé une liste déroulante TabFinder[categ] pour affiner les résultats
// Entrée : $actualcateg (valeur de TabFinder['categ']), $class (classe CSS) par défaut "insInputForm"
// Sortie (par retour) : string
function form_mk_categ($actualcateg, $class = 'bb_champ')
{
global $tbl;
$retour = '';
$retour .= '<select name="TabFinder[categ]" class="'.$class.'">'."\n";
$retour .= ' <option value="0"';
if ($actualcateg == 0) {
$retour .= ' selected="selected"';
}
$retour .= '>'.'Toutes catégories'.'</option>'."\n";
$requete = 'SELECT * '.
'FROM '.$tbl['cat'].' '.
'ORDER BY B_CAT_IDCAT';
$result_cat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
while ($row = mysql_fetch_object($result_cat)) {
$cat_id = $row->B_CAT_IDCAT;
$cat_nom = $row->B_CAT_LABEL;
$retour .= ' <option value="'.$cat_id.'"';
if ($actualcateg == $cat_id) {
$retour .= ' selected="selected"';
}
$retour .= '>'.$cat_nom.'</option>'."\n";
}
mysql_free_result($result_cat);
$retour .= '</select>'."\n\n";
return $retour;
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.3 2005/03/03 08:25:38 jpm
* Remplacement d'un & par &amp;
*
* Revision 1.2 2004/09/14 11:49:52 jpm
* Ajout de l'entête au fichier.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bbc_info_fascicule.inc.php
New file
0,0 → 1,234
<?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_fascicule.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Appli bb_consultation : gestion des informations avancées "fascicule" de Biblio Bota
*
* Ce fichier permet d'afficher les informations concernant les "fascicules" 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 |
// +------------------------------------------------------------------------------------------------------+
 
global $locusfasc;
// DEBUT FASCICULE
 
// $unex est composé de :
// - [0] nom de collection
// - [1] point de départ de la requete
 
$unex = explode('-', $tableau['fasc']);
 
$tableau['locusfasc'] = $locusfasc;
if ($tableau['locusfasc'] == '') {
$tableau['locusfasc'] = 0;
}
$requete = 'SELECT '.$tbl['str'].'.B_S_IDSTR,'.$tbl['str'].'.B_S_NOM, '.$tbl['collection'].'.B_C_NOMCOMPLET '.
'FROM '.$tbl['str'].', '.$tbl['collection'].' '.
'WHERE '.$tbl['str'].'.B_S_IDSTR = '.$tbl['collection'].'.B_C_LKSTR '.
'AND B_C_CRAI = "'.$unex[0].'"';
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$nb_titre = mysql_num_rows($resultat);
 
if ($nb_titre != 1) {
$sortie .= '<p class="erreur"><strong>'.'Erreur de récupération des noms (str et coll)'.'</stong>'.' : '.
$requete.' '.'donne'.' '.$nb_titre.' '.'résultats'.'</p>'."\n";
} else {
$ligne = mysql_fetch_object($resultat);
$le_numero = $ligne->B_S_IDSTR;
$le_nom = $ligne->B_S_NOM;
$la_coll = $ligne->B_C_NOMCOMPLET;
mysql_free_result($resultat);
$tableau['args'] = '&amp;arg_0=str%3D'.$le_numero.'&amp;arg_1=coll%3D'.$le_numero.
'&amp;arg_2=book%3D'.$le_numero.'&amp;arg_3=media%3D'.$le_numero;
$tableau['pass'] = $le_numero;
 
if ($tableau['locusfasc'] > 0) {
$tableau['pstart'] = $tableau['locusfasc'];
$depart = $tableau['locusfasc'];
} else {
$depart = $tableau['pstart'];
}
if ($depart == '') {
$depart = 0;
}
// Affichage de la navigation avancée : retour aux collections
$sortie .= CreateNavigBiblio('goback', 'coll', $tableau, 'Retour aux périodiques', 1);
// Affichage du titre de la page
$sortie .= '<h1>'.$le_nom.' '.':'.' '.'fascicules'.'</h1>'."\n";
$sortie .= '<h2>'.'du périodique'.' '.$la_coll.'</h2>'."\n";
// Comptage du nombre total de données
$requete = 'SELECT COUNT(*) AS COMPTE '.
'FROM '.$tbl['serie'].', '.$tbl['fascicule'].' '.
'WHERE B_SER_CRAICOLL = B_F_CRAICOLL '.
'AND B_SER_IDSERIE = B_F_CRAISERIE '.
'AND B_F_CRAICOLL = "'.$unex[0].'" '.
'AND B_F_CACHER = 0';
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$ligne = mysql_fetch_object($resultat);
$num_c = $ligne->COMPTE;
mysql_free_result($resultat);
$requete = 'SELECT '.$tbl['serie'].'.*, '.$tbl['fascicule'].'.*, '.$tbl['collection'].'.* '.
'FROM '.$tbl['serie'].', '.$tbl['fascicule'].', '.$tbl['collection'].' '.
'WHERE B_C_CRAI = B_SER_CRAICOLL '.
'AND B_SER_CRAICOLL = B_F_CRAICOLL '.
'AND B_SER_IDSERIE = B_F_CRAISERIE '.
'AND B_F_CRAICOLL = "'.$unex[0].'" '.
'ORDER BY B_F_NUMERO DESC '.
'LIMIT '.$depart.', '.$var_biblio['how_bloc'];
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$num = mysql_num_rows($resultat);
// Affichage du nombre de résultat trouvé
$tableau['step'] = $var_biblio['how_bloc'];
$tableau['pend'] = $num_c;
$tableau['libelle'] = 'fascicule';
$tableau['feminin'] = 0;
$tableau['locusfasc'] = $tableau['pstart'];
$sortie .= '<p id="frag_nbre_resultat">';
$sortie .= FRAG_afficherTxtNbreResultat('bbpopup', $tableau, $num, $num_c);
$sortie .= '</p>'."\n";
// Fragmenteur de pages, pour une navigation plus facile
$frag = new fragmenteur(' - ', 10, BB_URL_COURANTE_CONSULTATION_AVANCEE.'&amp;fasc='.$tableau['fasc']);
$frag_txt = $frag->fragmente($tableau, $num_c);
if (($frag->nb_pages)>1) {
$sortie .= '<p class="frag_navigation">'.$frag_txt.'</p>'."\n";
}
$sortie .= '<ul id="bb_liste_fascicule">'."\n";
while ($ligne = mysql_fetch_object($resultat)) {
$nom = $ligne->B_C_NOMCOMPLET;
$crai = $ligne->B_F_CRAICOLL;
$serie = $ligne->B_F_CRAISERIE;
$titreserie = $ligne->B_SER_SOUSTITRE;
$fasc = $ligne->B_F_NUMERO;
$titre = $ligne->B_F_TITRE;
$nbpages = $ligne->B_F_NBPAGES;
$date = $ligne->B_F_DATE;
$image = $ligne->B_F_IMAGE;
$comment = $ligne->B_F_COMMENT;
$datemaj = $ligne->B_F_MAJFICHE;
$tableau['pass'] = $crai.'-'.$serie.'-'.$fasc;
$sortie .= '<li>'."\n";
// Affichage de l'image du fascicule
if ($image != '') {
$sortie .= '<img class="bb_img_fascicule" src="'.BB_CHEMIN_IMAGES_ILLUSTRATION.$image.'" alt="'.'Image de la couverture du fascicule'.'" />'."\n";
}
// Affichage des informations sur le fascicule
$sortie .= '<b>'.$nom.'</b>';
if ($titreserie != '') {
$sortie .= ', <b>'.$titreserie.'</b>';
}
$sortie .= ', '.$titre."\n";
 
if ($date > 0) {
$sortie .= ' - '.FormateDateYYYYMMJJ($date);
}
if ($nbpages > 0) {
$sortie .= ' - '.$nbpages.' p.';
}
if ($comment != '') {
$sortie .= ' - '.$comment;
}
// Comptage du nombre d'articles indexés pour le fascicule
$query_ser = 'SELECT COUNT(*) AS CPT '.
'FROM '.$tbl['article'].', '.$tbl['item'].' '.
'WHERE B_A_CRAICOLL = "'.$crai.'" '.
'AND B_A_CRAISERIE = '.$serie.' '.
'AND B_A_CRAIFASC = "'.$fasc.'" '.
'AND B_I_IDITEM = B_A_IDART '.
'AND B_I_CACHER = 0';
$result_ser = mysql_query($query_ser) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_ser));
$nb_ser = mysql_num_rows($result_ser);
if($nb_ser != 1) {
die ('<p><b>'.'Echec du programme'.' '.':'.' '.'</b> '.'Nombre de comptages incohérent'.' '.'('.$nb_ser.')'.'</p>'."\n");
}
$row_ser = mysql_fetch_object($result_ser);
$intobiblio = $row_ser->CPT;
mysql_free_result($result_ser);
// Affichage de la consultation des articles
if ($intobiblio > 1) {
$pluriel_art = 's';
} else {
$pluriel_art = '';
}
if ($intobiblio > 0) {
$sortie .= CreateNavigBiblio('goto', 'art', $tableau, $intobiblio.' article'.$pluriel_art.' '.'indexé'.$pluriel_art, 0);
}
// Affichage des Voir Aussi Fascicules ... s'il y'en a
$UnVoirAussi = new VoirAussi($crai.'-'.$serie.'-'.$fasc, $tbl['fascicule']);
if ($UnVoirAussi->NbVA > 0) {
$sortie .= ' '.'-'.' '.'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 ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bbc_info_media.inc.php
New file
0,0 → 1,290
<?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'] = '&amp;arg_0=str%3D'.$tableau['media'].'&amp;arg_1=coll%3D'.$tableau['media'].'&amp;arg_2=book%3D'.$tableau['media'].'&amp;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 .= '&nbsp;';
}
$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'informations
if (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édias
if ($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).' &euro;)';
}
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 ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bbc_info_structure.inc.php
New file
0,0 → 1,318
<?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_structure.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Appli bb_consultation : gestion des informations avancées "structure" de Biblio Bota
*
* Ce fichier permet d'afficher les informations sur les organismes liés à 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 ($var_biblio['open_proposer_str'] == 1) {
// Si Open Moderation est ouvert, alors proposer la modification des données
$the_url_edit = BB_URL_COURANTE_ADMIN.'&amp;action=edit&ensemble=str&amp;ref='.$tableau['str'];
$sortie .= '<p>'."\n";
$sortie .= '<a href="'.$the_url_edit.'">'."\n".
'<img class="'.BB_CLASS_IMG_MODIFIER.'" src="'.BB_IMG_MODIFIER.'" alt="'.'Modifier la fiche structure'.'" />'."\n".
'</a>'."\n";
$sortie .= '<a class="texte_tb2" href="'.$the_url_edit.'">'.'Corriger la fiche...'.'</a>'."\n";
$sortie .= '</p>'."\n";
}
 
$query = 'SELECT * '.
'FROM '.$tbl['str'].', '.$tbl['pays'].', '.$tbl['typestr'].' '.
'WHERE ('.$tbl['str'].'.B_S_IDSTR = '.$tableau['str'].') '.
'AND ('.$tbl['str'].'.B_S_TYPESTR = '.$tbl['typestr'].'.B_TYPSTR_ID) '.
'AND ('.$tbl['str'].'.B_S_PAYS = '.$tbl['pays'].'.GC_ID) '.
'AND ('.$tbl['pays'].'.GC_LOCALE = "'.$GLOBALS['_GEN_commun']['i18n'].'")';
$do_query = mysql_query($query) or die('<b>Erreur de requête (choix de structure)</b> : '.$query);
$nb = mysql_num_rows($do_query);
 
if ($nb == 0) {
$sortie .= '<p class="erreur">'.
'<b>Erreur !</b> :<br /><br/>aucune structure ne correspond à l\'identifiant str='.$tableau['str'].'.'.
'</p>'."\n";
} else if ($nb > 1) {
$sortie .= '<p class="erreur">'.
'<b>Erreur !</b> :<br /><br />le moteur bbc_information a trouvé plusieurs données pour l\'identifiant str='.$tableau['str'].'.'.
'</p>'."\n";
} else {
$row = mysql_fetch_object($do_query);
$get_nom = $row->B_S_NOM;
$get_sigle = $row->B_S_SIGLE;
$get_service = $row->B_S_SERVICE;
$get_typestr = $row->B_TYPSTR_LABEL;
$get_numtypestr = $row->B_S_TYPESTR;
$get_datecreation = $row->B_S_DATECREATION;
$get_nbrperso = $row->B_S_NBRPERSO;
$get_vocactiv = $row->B_S_VOCACTIV;
$get_adresse1 = $row->B_S_ADRESSE1;
$get_adresse2 = $row->B_S_ADRESSE2;
$get_cp = $row->B_S_CODEPOSTAL;
$get_ville = $row->B_S_VILLE;
$get_pays = $row->GC_NAME;
$get_tel = $row->B_S_TEL;
$get_fax = $row->B_S_FAX;
$get_mail = $row->B_S_MAIL;
$get_image = $row->B_S_IMAGE;
$get_comment = $row->B_S_COMMENT;
$get_majfiche = $row->B_S_MAJFICHE;
mysql_free_result($do_query);
// Titre de la structure
$sortie .= '<h1 class="titlePage">';
$sortie .= $get_nom;
if ($get_sigle != '') {
$sortie .= ' ('.$get_sigle.')';
}
$sortie .= '</h1>'."\n";
// Type de structure et vocation
$sortie .= '<h2 class="insTitle1">'.'Type de structure, vocation'.'</h2>'."\n";
$sortie .= '<p>'."\n";
if ($get_typestr != '') {
$sortie .= '<span class="champ_cle">'.'Type de structure :'.'</span> <span class="champ_valeur">'.$get_typestr.'</span>'."\n";
}
if ($get_vocactiv != '') {
if ($get_typestr != '') {
$sortie .= '<br />'."\n";
}
$sortie .= '<span class="champ_cle">'.'Vocation / Activité :'.'</span> <span class="champ_valeur">'.$get_vocactiv.'</span>'."\n";
}
$sortie .= '</p>'."\n";
// Bloc d'adresse
$sortie .= '<h2 class="insTitle1">'.'Adresse'.'</h2>'."\n";
$sortie .= '<p>'."\n";
if ($get_service != '') {
$sortie .= $get_service."\n";
}
if ($get_adresse1 != '') {
if ($get_service != '') {
$sortie .= '<br />'."\n";
}
$sortie .= $get_adresse1."\n";
}
if ($get_adresse2 != '') {
if (($get_service != '') || ($get_adresse1 != '')) {
$sortie .= '<br />'."\n";
}
$sortie .= $get_adresse2."\n";
}
if ($get_cp != '') {
if (($get_service != '') || ($get_adresse1 != '') || ($get_adresse2 != '')) {
$sortie .= '<br />'."\n";
}
$sortie .= $get_cp."\n";
}
if ($get_ville != '') {
$sortie .= ' '.$get_ville."\n";
}
if ($get_pays != '') {
if (($get_service != '') || ($get_adresse1 != '') || ($get_ville != '') || ($get_cp != '')) {
$sortie .= '<br />'."\n";
}
$sortie .= $get_pays."\n";
}
// Bloc contact
$sortie .= '<br /><br />'."\n";
if ($get_tel != '') {
$sortie .= '<span class="champ_cle">'.'Téléphone :'.'</span> <span class="champ_valeur">'.$get_tel.'</span>'."\n";
}
if ($get_fax != '') {
if ($get_tel != '') {
$sortie .= '<br />'."\n";
}
$sortie .= '<span class="champ_cle">'.'Fax :'.'</span> <span class="champ_valeur">'.$get_fax.'</span>'."\n";
}
if ($get_mail != '') {
if (($get_fax != '') || ($get_tel != '')) {
$sortie .= '<br />'."\n";
}
$sortie .= '<span class="champ_cle">'.'Courriel :'.'</span> '.
'<span class="champ_valeur"> '.
'<a href="mailto:'.$get_mail.'">'.$get_mail.'</a>'.
'</span>'."\n";
}
// Logo ou image de la structure
if ($get_image != '') {
$sortie .= '<img class="bb_img_structure" src="'.BB_CHEMIN_IMAGES_ILLUSTRATION.$get_image.'" '.
'alt="'.'Illustration de la structure : '.$get_nom.'" />';
}
$sortie .= '</p>'."\n";
// Bloc info supplémentaires
if ($get_nbrperso > 0 OR $get_datecreation > 0 OR $get_comment != '') {
$sortie .= '<h2 class="insTitle1">'.'Informations supplémentaires'.'</h2>'."\n";
$sortie .= '<p>'."\n";
// Calcul de la date de création
if ($get_datecreation > 0) {
$sortie .= '<span class="champ_cle">'.'Date de création :'.'</span> '.
'<span class="champ_valeur">'.FormateDateYYYYMMJJ($get_datecreation).'</span>'."\n";
}
// Nbre de salariés ou de membres
if ($get_nbrperso > 0) {
if ($get_datecreation > 0) {
$sortie .= '<br />'."\n";
}
if ($get_numtypestr == 3) {
$sticker = 'salariés';
} else {
$sticker = 'membres';
}
$sortie .= '<span class="champ_cle">'.'Nombre de '.$sticker.' :'.'</span> '.
'<span class="champ_valeur">'.$get_nbrperso.'</span>'."\n";
}
// Info - commentaires
if ($get_comment != '') {
if (($get_datecreation > 0) || ($get_nbrperso > 0)) {
$sortie .= '<br />'."\n";
}
$sortie .= '<span class="champ_cle">'.'Informations complémentaires :'.'</span> '.
'<span class="champ_valeur">'.$get_comment.'</span>'."\n";
}
$sortie .= '</p>'."\n";
}
// A partir d'ici on affiche les liens de la structure
$sortie .= '<h2 class="insTitle1">'.'Liens web'.'</h2>'."\n";
$sortie .= '<p>'."\n";
$query_lk = 'SELECT '.$tbl['link'].'.* '.
'FROM '.$tbl['link'].' '.
'WHERE '.$tbl['link'].'.B_L_LKSTR = '.$tableau['str'].' '.
'AND B_L_CACHER = 0 '.
'ORDER BY B_L_TITRE';
$do_query_lk = mysql_query($query_lk) or die('<b>Erreur de requête (liens web)</b> : '.$query_lk);
$nb_lk = mysql_num_rows($do_query_lk);
if ($nb_lk == 0) {
$sortie .= 'Pas de lien web référencé.';
} else {
$o = 1;
while ($row = mysql_fetch_object($do_query_lk)) {
$idlink = $row->B_L_IDLINK;
$titrelink = $row->B_L_TITRE;
$urllink = $row->B_L_URL;
$resumlink = $row->B_L_RESUMCLE;
$comlink = $row->B_L_COMMENT;
$datelink = $row->B_L_MAJFICHE;
$get_part = $row->B_L_PARTENAIRE;
$get_ref = $row->B_L_REFERENCE;
$sortie .= '<img class="'.BB_CLASS_IMG_WEB.'" src="'.BB_IMG_WEB.'" alt="'.'Lien Web'.'" /> '."\n";
$sortie .= '<a href="'.$urllink.'" target="_blank">';
if ($titrelink != '') {
$sortie .= $titrelink;
} else {
$sortie .= $urllink;
}
$sortie .= '</a>'."\n";
if ($resumlink != '') {
$sortie .= ' - '.$resumlink;
}
if ($comlink != '') {
$sortie .= ' - '.$comlink;
}
// if ($datelink > 0) $sortie .= " [".date('d/m/Y',$datelink)."]";
if (($nb_lk - $o) > 0) {
$sortie .= '<br />'."\n";
}
if ($get_ref == 1) {
$sortie .= ' <img class="'.BB_CLASS_IMG_REFERENCE.'" src="'.BB_IMG_REFERENCE.'" alt="'.'Site Référence'.'" /> '."\n";
}
if ($get_part == 1) {
$sortie .= ' <img class="'.BB_CLASS_IMG_PARTENAIRE.'" src="'.BB_IMG_PARTENAIRE.'" alt="'.'Site Partenaire de Tela Botanica'.'" /> '."\n";
}
$o++;
}
}
$sortie .= '</p>'."\n";
mysql_free_result($do_query_lk);
// Là on affiche les Voir Aussi Structures ... si y'en a
$UnVoirAussi = new VoirAussi($tableau['str'],$tbl['str']);
if ($UnVoirAussi->NbVA > 0) {
$liste_va = $UnVoirAussi->ListerVoirAussi();
$sortie .= '<h2 class="insTitle1">'.'Voir Aussi'.'</h2>'."\n";
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'] != '') {
$sortie .= ' - '.'<i>'.$liste_va[$i]['desc'].'</i>';
}
if (($i != 0) && ($i < ($UnVoirAussi->NbVA))) {
$sortie .= '<br />'."\n";
}
}
$sortie .= '<br />'."\n";
}
// Affichage des méta données
$sortie .= '<p class="bb_txt_centre texte_inactif">'.
'Dernière mise à jour de la fiche : '.date('d/m/Y',$get_majfiche).' - fiche '.$tableau['str'].
'</p>'."\n\n";
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.1 2004/09/16 12:06:31 jpm
* Décomposition du fichier information en plusieurs fichiers.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bbc_info_livre.inc.php
New file
0,0 → 1,277
<?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_livre.inc.php,v 1.2 2005-12-03 19:44:11 jp_milcent Exp $
/**
* Appli bb_consultation : gestion des informations avancées "livre" de Biblio Bota
*
* Ce fichier permet d'afficher les informations concernant les "livres" 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.2 $ $Date: 2005-12-03 19:44:11 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
if ($tableau['pstart']== '') {
$tableau['pstart'] = 0;
}
 
// Ligne de proposition d'édition
if ($var_biblio['open_proposer_media'] == 1) {
$sortie .= CreateNavigBiblio('add', 'book', 'Proposer un nouveau livre', $tableau['book'], 1, $tableau);
} else {
$sortie .= '&nbsp;';
}
 
// Ligne de titre
$requete = 'SELECT B_S_NOM '.
'FROM '.$tbl['str'].' '.
'WHERE B_S_IDSTR = '.$tableau['book'];
$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 LIVRE !'.'</strong>'.
' nombre de résultats (= '.$num_s.') incohérent pour la requête : '.'<br />'.$requete.'</p>';
} else {
// Récupération des infos sur la structure
$ligne = mysql_fetch_object($resultat);
$la_structure = $ligne->B_S_NOM;
mysql_free_result($resultat);
$tableau['args'] = '&amp;book='.$tableau['book'];
// Comptage du nombre de livres
$requete = 'SELECT COUNT(*) AS COMPTAGE '.
'FROM '.$tbl['item'].', '.$tbl['media'].' '.
'WHERE '.$tbl['media'].'.B_M_LKSTR = '.$tableau['book'].' '.
'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));
$ligne = mysql_fetch_object($resultat);
$num_c = $ligne->COMPTAGE;
mysql_free_result($resultat);
global $def_livre;
$requete = 'select '.$tbl['item'].'.*, '.$tbl['media'].'.*, GEN_MON_SYMBOLE, B_AS_LIBELLE, GEN_MON_VAL1EURO, '.$tbl['domaine'].'.* '.
'FROM '.$tbl['item'].', '.$tbl['media'].', '.$tbl['monnaie'].', '.$tbl['saisie'].', '.$tbl['domaine'].', '.$tbl['domaine_lk'].' '.
'WHERE B_M_LKSTR = '.$tableau['book'].' '.
'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_IDITEM = B_DL_IDITEM '.
'AND B_DL_IDDOM = B_D_ID '.
'ORDER BY 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);
// Titre de la page
$sortie .= '<h1>'.$la_structure.' : livres'.'</h1>'."\n";
// Récupération d'informations
if (empty($tableau['step'])) {
$tableau['step'] = $var_biblio['how_book'];
}
if (empty($tableau['how_bloc'])) {
$tableau['step'] = $var_biblio['how_book'];
}
if (empty($tableau['pend'])) {
$tableau['pend'] = $num_c;
}
if (empty($tableau['libelle'])) {
$tableau['libelle'] = 'livre';
}
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 livres
if ($num_c == 0) {
$sortie .= '<p class="information">'.'Aucun livre indexé.'.'</p>';
} else {
$sortie .= '<ul id="bb_liste_livre">'."\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;
$sortie .= '<li>'."\n";
if ($image != '') {
$sortie .= '<img class="bb_img_livre" src="'.BB_CHEMIN_IMAGES_ILLUSTRATION.$image.'" '.
'alt="'.'Illustration du livre : '.$titre.'" />';
}
if ($get_domaine_id != 1) {
$sortie .= '<span class="texte_inactif">'.'['.$get_domaine_nom.']'.'</span>'."\n";
}
if (($auteurs == '') || ($auteurs == 'ANONYME')) {
$sortie .= 'Inconnu ou Anonyme'.' - ';
} else {
$sortie .= $auteurs.' - ';
}
$sortie .= '<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).' &euro;)';
}
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 Livres ... 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 $
* Revision 1.1 2005/11/23 10:22:25 jp_milcent
* Ajout au dépot de l'application BiblioBota.
* Elle doit à terme migrer dans eFlore.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_consultation/bbc_info_article.inc.php
New file
0,0 → 1,252
<?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_article.inc.php,v 1.2 2006-05-29 17:21:17 jp_milcent Exp $
/**
* Appli bb_consultation : gestion des informations avancées "article" de Biblio Bota
*
* Ce fichier permet d'afficher les informations concernant les "articles" 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.2 $ $Date: 2006-05-29 17:21:17 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
global $locusfasc;
if (!empty($locusfasc)) {
$tableau['locusfasc'] = $locusfasc;
} else {
$tableau['locusfasc'] = 0;
}
 
/*
$unex est composé de :
- [0] collection
- [1] serie
- [2] fascicule
- [3] point de départ de la requete
*/
$unex = explode ('-', $tableau['art']);
 
$requete = 'SELECT B_S_IDSTR, B_S_NOM, B_C_NOMCOMPLET, B_SER_SOUSTITRE, B_F_TITRE, B_F_DATE '.
'FROM '.$tbl['str'].', '.$tbl['collection'].', '.$tbl['serie'].', '.$tbl['fascicule'].' '.
'WHERE B_S_IDSTR = B_C_LKSTR '.
'AND B_C_CRAI = B_SER_CRAICOLL '.
'AND B_SER_CRAICOLL = B_F_CRAICOLL '.
'AND B_SER_IDSERIE = B_F_CRAISERIE '.
'AND B_F_CRAICOLL = "'.$unex[0].'" '.
'AND B_F_CRAISERIE = "'.$unex[1].'" '.
'AND B_F_NUMERO = "'.$unex[2].'"';
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$num = mysql_num_rows($resultat);
 
if ($num != 1) {
$sortie .= '<p class="erreur"><strong>'.'Erreur de requête de sélection l\'en-tête articles :'.'</strong>'.
' nombre de résultats (= '.$num.') incohérent pour la requête : '.'<br />'.$requete.'</p>';
} else {
$ligne = mysql_fetch_object($resultat);
$le_numero = $ligne->B_S_IDSTR;
$le_nom = $ligne->B_S_NOM;
$la_coll = $ligne->B_C_NOMCOMPLET;
$le_titre = $ligne->B_F_TITRE;
$la_date = $ligne->B_F_DATE;
mysql_free_result($resultat);
$tableau['args'] = '&amp;art='.$tableau['art'].'&amp;arg_0=str%3D'.$le_numero.'&amp;arg_1=coll%3D'.$le_numero.'&amp;arg_2=book%3D'.$le_numero.'&amp;arg_3=media%3D'.$le_numero;
$tableau['back'] = $unex[0].'-'.$unex[1];
// Affichage de la navigation avancée : retour aux fascicules
$sortie .= CreateNavigBiblio('goback', 'fasc', $tableau, 'Retour aux fascicules', 1);
// Affichage du titre
$sortie .= '<h1>'.$le_nom.' : articles'.'</h1>'."\n";
$sortie .= '<h2>'.'du '.$le_titre.' du périodique '.$la_coll.'</h2>'."\n";
// Comptage du total d'article
$requete = 'SELECT COUNT(*) AS COMPTAGE '.
'FROM '.$tbl['article'].', '.$tbl['item'].' '.
'WHERE B_A_CRAICOLL = "'.$unex[0].'" '.
'AND B_A_CRAISERIE = "'.$unex[1].'" '.
'AND B_A_CRAIFASC = "'.$unex[2].'" '.
'AND B_I_IDITEM = B_A_IDART '.
'AND B_I_TYPLOG = 1 '.
'AND B_I_TYPPHY = 2 '.
'AND B_I_CACHER = 0';
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$ligne = mysql_fetch_object($resultat);
$num_c = $ligne->COMPTAGE;
mysql_free_result($resultat);
// Liste des articles
if (($tableau['locusfasc'] > 0) && ($tableau['locusfasc'] <= $num_c)) {
$depart = $tableau['locusfasc'];
} else {
$depart = $tableau['pstart'];
}
if ($depart == '') {
$depart = 0;
}
$requete = 'SELECT * '.
'FROM '.$tbl['article'].', '.$tbl['item'].', '.$tbl['saisie'].', '.$tbl['domaine'].', '.$tbl['domaine_lk'].' '.
'WHERE B_A_CRAICOLL = "'.$unex[0].'" '.
'AND B_A_CRAISERIE = "'.$unex[1].'" '.
'AND B_A_CRAIFASC = "'.$unex[2].'" '.
'AND B_I_IDITEM = B_A_IDART '.
'AND B_I_TYPLOG = 1 '.
'AND B_I_TYPPHY = 2 '.
'AND B_I_CACHER = 0 '.
'AND B_I_AUTEURSAISIE = B_AS_ID '.
'AND B_I_IDITEM = B_DL_IDITEM '.
'AND B_DL_IDDOM = B_D_ID '.
'ORDER BY B_A_PAGEDEBUT, B_I_AUTEURS '.
'LIMIT '.$depart.', '.$var_biblio['how_bloc'];
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$num_a = mysql_num_rows($resultat);
// Récupération d'informations
if ($tableau['pstart'] == '') {
$tableau['pstart'] = 0;
}
$tableau['step'] = $var_biblio['how_bloc'];
$tableau['pend'] = $num_c;
$tableau['libelle'] = 'article';
$tableau['feminin'] = 0;
// Affichage du nbre de résultats
$sortie .= '<p id="frag_nbre_resultat">';
$sortie .= FRAG_afficherTxtNbreResultat('bbpopup', $tableau, $num_a, $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 articles
$sortie .= '<ul id="bb_liste_article">'."\n";
while ($row_a = mysql_fetch_object($resultat)) {
$id_a = $row_a->B_I_IDITEM;
$titre = $row_a->B_I_TITRE;
$aut = $row_a->B_I_AUTEURS;
$paged = $row_a->B_A_PAGEDEBUT;
$pagef = $row_a->B_A_PAGEFIN;
$geo = $row_a->B_I_GEO;
$langue = $row_a->B_I_LANGUE;
$resum = $row_a->B_I_RESUMCLE;
$image = $row_a->B_I_IMAGE;
$aut_s = $row_a->B_AS_LIBELLE;
$domaine_id = $row_a->B_D_ID;
$domaine_nom = $row_a->B_D_LABEL;
$comment = $row_a->B_I_COMMENT;
$maj = $row_a->B_I_MAJFICHE;
$sortie .= '<li>'."\n";
if (!empty($image)) {
$sortie .= '<img class="bb_img_article" src="'.BB_CHEMIN_IMAGES_ILLUSTRATION.$image.'" '.
'alt="'.'Illustration de l\'article : '.$titre.'" />';
}
if ($domaine_id != 1) {
$sortie .= '<span class="texte_inactif">'.'['.$domaine_nom.']'.'</span>'."\n";
}
if (($aut == '') || ($aut == 'ANONYME')) {
$sortie .= 'Inconnu ou Anonyme';
} else {
$sortie .= $aut;
}
$sortie .= ' - <strong>'.$titre.'</strong>'.' - '.FormateDateYYYYMMJJ($la_date);
if (($paged > 0) && ($pagef > 0)) {
$sortie .= ', p. '.$paged;
}
if ($pagef > $paged) {
$sortie .= ' à '.$pagef;
}
if ($resum != '') {
$sortie .= ' - '.'<em>'.$resum.'</em> ';
}
if ($comment != '') {
$sortie .= ' - '.'<em>'.$comment.'</em>'."\n";
}
if ($geo != '') {
$sortie .= ' - '.'Départ./Région : '.'<em>'.$geo.'</em>'."\n";
}
if ($langue != '') {
$sortie .= ' - '.'Langue : '.$langue."\n";
}
if ($aut_s != '') {
$sortie .= '<span class="texte_inactif">'.' - '.'Saisie : '.$aut_s.' Art. n°'.$id_a.'.</span>';
}
// Là on affiche les Voir Aussi Articles ... si y'en a
$UnVoirAussi = new VoirAussi($id_a,$tbl['article']);
if ($UnVoirAussi->NbVA > 0) {
$sortie .= ' '.'-'.' '.'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";
if ($num_a > 0) {
mysql_free_result($resultat);
}
}
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/11/23 10:22:25 jp_milcent
* Ajout au dépot de l'application BiblioBota.
* Elle doit à terme migrer dans eFlore.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>