Subversion Repositories eFlore/Applications.bibliobota

Compare Revisions

No changes between revisions

Ignore whitespace Rev 1 → Rev 29

/tags/2015_03_02/applications/bb_lien_favoris/configuration/bblf_config.inc.php
New file
0,0 → 1,82
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BiblioBota - Lien Favoris. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bblf_config.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Configuration de l'application Lien Favoris.
*
* Fichier de configuration de l'application Lien Favoris.
*
*@package BiblioBota-Partenaire
//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 |
// +------------------------------------------------------------------------------------------------------+
/** Constante stockant le chemin du dossier contenant l'application Lien Favoris de Biblio Bota.*/
define('BBLF_CHEMIN_RACINE', BB_CHEMIN_APPLI.'bb_lien_favoris/');
/** Constante stockant le chemin du dossier contenant les traductions.*/
define('BBLF_CHEMIN_LANGUES', BBLF_CHEMIN_RACINE.'langues/');
 
// +------------------------------------------------------------------------------------------------------+
// Paramétrage d'origine de l'application
/* Permettre la moderation (0/1) ? */
$open_moderation = 0;
/* Nombre d'éditeurs max à afficher dans une liste déroulante avant que le moteur ne bascule en mode zone de saisie */
$how_editeurs = 20;
/* Nbre de données par page */
$how_bloc = 20;
/* Nbre de livres par page */
$how_bloc_book = 10;
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/02/28 14:34:08 jpm
* Changement du nom de l'appli en Lien Favoris.
*
* Revision 1.1 2005/02/28 14:23:51 jpm
* Ajout des fichiers de l'application Lien Favoris.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_lien_favoris/bb_lien_favoris.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 file is part of BiblioBota - Lien Favoris. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bb_lien_favoris.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Application affichant des listes des sites web
*
* Fournit la liste des sites web favoris de Tela Botanica.
* Il est possible d'afficher une liste de sites web :
* - partenaires
* - références
*
*@package BiblioBota-LienFavoris
//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 de l'application Lien Favoris. */
require_once BB_CHEMIN_APPLI.'bb_lien_favoris/configuration/bblf_config.inc.php';
 
// Appel du fichier de traduction des textes de l'application Lien Favoris de Biblio Bota
if (file_exists(BBLF_CHEMIN_LANGUES.'bblf_langue_'.BB_URL_I18N.'.inc.php')) {
/** Inclusion du fichier de traduction de l'application Lien Favoris. */
include_once BBLF_CHEMIN_LANGUES.'bblf_langue_'.BB_URL_I18N.'.inc.php';
} else {
/** Inclusion du fichier de traduction fr par défaut. */
include_once BBLF_CHEMIN_LANGUES.'bblf_langue_fr.inc.php';
}
 
// Initialisation de la variable à retourner
$var_to_ret = '';
$var_to_ret .= '<!-- BiblioBota - Partenaire : DEBUT -->'."\n";
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
global $GS_GLOBAL, $TransTab;
 
if ((isset($TransTab)) && ($TransTab != '')) {
$tableau = FRAG_decoupageChaine($TransTab);
}
if (empty($tableau['pstart'])) {
$tableau['pstart'] = 0;
}
if (empty($tableau['step'])) {
$tableau['step'] = $how_bloc;
}
$tableau['libelle'] = 'lien';
$tableau['feminin'] = 0;
 
// Récupèration des arguments de l'application pour la page donnée
$tableau['selecteur'] = $GLOBALS['_GEN_commun']['info_application']->selecteur;
 
// +------------------------------------------------------------------------------------------------------+
// Création du contenu
if ($tableau['selecteur'] == 'ref') {
$add_to_query = 'B_L_REFERENCE';
$le_titre = ' de référence';
$le_texte = '&nbsp;';
} else if ($tableau['selecteur'] == 'part') {
$add_to_query = 'B_L_PARTENAIRE';
$le_titre = ' des partenaires de Tela Botanica';
$le_texte = '&nbsp;';
} else {
$le_titre = '';
$le_texte = '';
}
 
// Titre de la page
$var_to_ret .= '<h1>'.'Sites '.$le_titre.'</h1>';
// Petit descriptif
$var_to_ret .= '<p>'.$le_texte.'</p>'."\n";
 
if (($tableau['selecteur'] == 'ref') || ($tableau['selecteur'] == 'part')) {
$query_tot = 'SELECT COUNT(*) AS cpt '.
'FROM '.$GLOBALS['tbl']['link'].' '.
'WHERE '.$add_to_query.' = 1 '.
'AND B_L_CACHER = 0';
$do_query_tot = mysql_query($query_tot) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_tot));
$tmp_total = mysql_fetch_object($do_query_tot);
$nb_total = $tmp_total->cpt;
mysql_free_result($do_query_tot);
if ($nb_total == 0) {
$var_to_ret .= '<p>'.'Pas encore de liens indexés...'.'</p>'."\n";
} else {
$query = 'SELECT '.$GLOBALS['tbl']['link'].'.* '.
'FROM '.$GLOBALS['tbl']['link'].' '.
'WHERE '.$add_to_query.' = 1 '.
'AND B_L_CACHER = 0 '.
'ORDER BY B_L_TITRE '.
'LIMIT '.$tableau['pstart'].', '.$tableau['step'];
$do_query = mysql_query($query) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query));
$nb_results = mysql_num_rows($do_query);
if (empty($tableau['pend'])) {
$tableau['pend'] = $nb_total;
}
$var_to_ret .= '<p id="frag_nbre_resultat">'.FRAG_afficherTxtNbreResultat('synth', $tableau, $nb_results, $nb_total).'</p>'."\n";
// Ici on fragmente en pages, pour une navigation plus facile
$frag = new fragmenteur();
$frag_txt = $frag->fragmente($tableau, $nb_total);
if (($frag->nb_pages) > 1) {
$var_to_ret .= '<p id="frag_navigation">';
$var_to_ret .= $frag_txt;
$var_to_ret .= '</p>'."\n";
}
// Fin fragmentation
$o = 1;
while ($row = mysql_fetch_object($do_query)) {
$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;
$get_part = $row->B_L_PARTENAIRE;
$get_ref = $row->B_L_REFERENCE;
$var_to_ret .= '<img class="'.BB_CLASS_IMG_WEB.'" src="'.BB_IMG_WEB.'" alt="'.'Lien Web'.'"/>'."\n";
$var_to_ret .= '<a href="'.$urllink.'">';
if ($titrelink != '') {
$var_to_ret .= $titrelink;
} else {
$var_to_ret .= $urllink;
}
$var_to_ret .= '</a>'."\n";
if ($resumlink != '') {
$var_to_ret .= ' - '.$resumlink;
}
if ($comlink != '') {
$var_to_ret .= ' - '.$comlink;
}
if (($get_ref == 1) && ($tableau['selecteur'] == 'part')) {
$var_to_ret .= ' <img class="'.BB_CLASS_IMG_REFERENCE.'" src="'.BB_IMG_REFERENCE.'" alt="'.'Site Référence'.'" /> '."\n";
}
if (($get_part == 1) && ($tableau['selecteur'] == 'ref')) {
$var_to_ret .= ' <img class="'.BB_CLASS_IMG_PARTENAIRE.'" src="'.BB_IMG_PARTENAIRE.'" alt="'.'Site Partenaire de Tela Botanica'.'" /> '."\n";
}
if ($comlink != '') {
$var_to_ret .= ' - '.$comlink;
}
if ($o < $nb_results) {
$var_to_ret .= '<br /><br />';
}
$o++;
}
mysql_free_result($do_query);
}
} else {
$var_to_ret .= '<p>'.'Echec d\'exécution du script : pas de paramètre valide [réf|part].'.'</p>'."\n";
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
$var_to_ret .= '<!-- BiblioBota - Partenaire : FIN -->'."\n";
$sortie .= $var_to_ret;
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2005/03/01 15:18:37 jpm
* Ajout de commentaire html de début et fin d'appli.
*
* Revision 1.2 2005/02/28 14:34:10 jpm
* Changement du nom de l'appli en Lien Favoris.
*
* Revision 1.1 2005/02/28 14:23:51 jpm
* Ajout des fichiers de l'application Lien Favoris.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_lien_favoris/langues/bblf_langue_fr.inc.php
New file
0,0 → 1,64
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BiblioBota - Lien Favoris. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bblf_langue_fr.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Fichier de traduction en français de l'application Lien Favoris.
*
* Traduction en langue française.
*
*@package BiblioBota-Partenaire
//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 |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/02/28 14:23:51 jpm
* Ajout des fichiers de l'application Lien Favoris.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/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_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/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/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 ----------------------------------------------------------------------------------------+
*/
?>
/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_synthese/langues/bbsy_langue_fr.inc.php
New file
0,0 → 1,98
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BB-Synthèse. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bbsy_langue_fr.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Fichier de traduction en français de l'application Synthèse.
*
* Traduction en langue française.
*
*@package BiblioBota-Synthese
//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 |
// +------------------------------------------------------------------------------------------------------+
/** Titre de la page.*/
define('BBSY_LG_PAGE_TITRE', 'Synthèses des discussions des forums Tela Botanica');
 
/** Titre de la présentation des synthèses.*/
define('BBSY_LG_PRESENTATION_TITRE', 'Le projet synthèses des discussions');
/** Descriptif paragraphe 1. */
define('BBSY_LG_PARA_01', 'Les échanges sur des thèmes botaniques variés qui ont lieu sur les listes de discussion '.
'Tela Botanica depuis le mois de mai 1999 sont riches en contenu.');
/** Descriptif paragraphe 2. */
define('BBSY_LG_PARA_02', 'Un groupe de travail constitué de quelques membres de ces listes a décidé de prendre en '.
'main la réalisation de synthèses des échanges sur des sujets jugés intéressants.'.
' Ces synthèses permettent de garder en mémoire des échanges très spécialisés et de '.
's\'y reporter très facilement.');
/** Descriptif paragraphe 3. */
define('BBSY_LG_PARA_03', 'Les 3 niveaux de synthèses');
/** Texte alternatif de l'image des synthèses. */
define('BBSY_LG_SYNTH_IMG_ALT', '+');
/** Titre synthèse niveau non évalué. */
define('BBSY_LG_SYNTH_NIV_00_TITRE', 'Niveau non évalué');
/** Titre synthèse niveau 1. */
define('BBSY_LG_SYNTH_NIV_01_TITRE', 'Niveau 1 - collecte des messages :');
/** Info synthèse niveau 1. */
define('BBSY_LG_SYNTH_NIV_01_INFO', 'Redonne la totalité des échanges (pas de traitement autre que de rassembler tous '.
'les messages dans l\'ordre et de faire un nettoyage de forme) sur un sujet.');
/** Titre synthèse niveau 2. */
define('BBSY_LG_SYNTH_NIV_02_TITRE', 'Niveau 2 - collecte et mise en forme :');
/** Info synthèse niveau 2. */
define('BBSY_LG_SYNTH_NIV_02_INFO', 'Synthèse intermédiaire avec un peu de mise en forme.');
/** Titre synthèse niveau 3. */
define('BBSY_LG_SYNTH_NIV_03_TITRE', 'Niveau 3 - synthèse :');
/** Info synthèse niveau 3. */
define('BBSY_LG_SYNTH_NIV_03_INFO', 'Synthèse enrichie (avec additions et contrôles des références).');
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/04/25 13:57:32 jpm
* Mise en forme.
*
* Revision 1.1 2005/02/24 18:35:03 jpm
* Ajout du fichier de traduction de l'application synthèse.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_synthese/presentations/images/bbsy_synthese.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/applications/bb_synthese/presentations/images/bbsy_synthese.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/applications/bb_synthese/configuration/bbsy_config.inc.php
New file
0,0 → 1,94
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BB-Synthèse. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bbsy_config.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Configuration de l'application Synthèse.
*
* Fichier de configuration de l'application Synthèse.
*
*@package BiblioBota-Synthese
//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 |
// +------------------------------------------------------------------------------------------------------+
/** Constante stockant le chemin du dossier contenant l'application Synthèse de Biblio Bota.*/
define('BBSY_CHEMIN_RACINE', BB_CHEMIN_APPLI.'bb_synthese/');
/** Constante stockant le chemin du dossier contenant les traductions.*/
define('BBSY_CHEMIN_LANGUES', BBSY_CHEMIN_RACINE.'langues/');
/** Constante stockant le chemin du dossier contenant la présentation (images, styles, scripts...).*/
define('BBSY_CHEMIN_PRESENTATION', BBSY_CHEMIN_RACINE.'presentations/');
/** Constante stockant le chemin du dossier contenant les images.*/
define('BBSY_CHEMIN_IMAGES', BBSY_CHEMIN_PRESENTATION.'images/');
 
// +------------------------------------------------------------------------------------------------------+
// Définition des chemins d'accès aux images.
/** Constante stockant le chemin d'accès au fichier bb_precedent.png de Biblio Bota.*/
define('BBSY_IMG_SYNTHESE', BBSY_CHEMIN_IMAGES.'bbsy_synthese.png');
/** Constante stockant le nom de la classe du fichier bb_precedent.png de Biblio Bota.*/
define('BBSY_CLASS_IMG_SYNTHESE', 'bbsy_img_synthese');
 
// +------------------------------------------------------------------------------------------------------+
// Définition des classes css
/** Constante stockant le nom de la classe du paragraphe affichant le nombre de résultat.*/
define('BBSY_CLASS_IMG_SYNTHESE', 'bbsy_img_synthese');
 
// +------------------------------------------------------------------------------------------------------+
// Paramétrage d'origine de l'application
 
// Nbre de synthèses par page
$var_biblio['how_bloc'] = 10;
 
// nom de la collection à rechercher pour ajouter un terme : ajouter une ligne
// $var_biblio['seak_string'][x] = "chaine";
// où x est un incrément de 1 de la valeur précedente (ex : $var_biblio['seak_string'][1])
$var_biblio['seek_string'][0] = 'TELABOTANICA';
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/02/24 18:34:55 jpm
* Ajout du fichier de config de l'application synthèse.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_synthese/bb_synthese.php
New file
0,0 → 1,286
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BB-Synthèse. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bb_synthese.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Application affichant la liste des synthèses de Tela Botanica.
*
* Fournit la liste des synthèses de Tela Botanica.
*
*@package BiblioBota-Synthese
//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 de l'application Synthèse. */
require_once BB_CHEMIN_APPLI.'bb_synthese/configuration/bbsy_config.inc.php';
 
// Appel du fichier de traduction des textes de l'application Synthèse de Biblio Bota
if (file_exists(BBSY_CHEMIN_LANGUES.'bbsy_langue_'.BB_URL_I18N.'.inc.php')) {
/** Inclusion du fichier de traduction de l'application Synthèse. */
include_once BBSY_CHEMIN_LANGUES.'bbsy_langue_'.BB_URL_I18N.'.inc.php';
} else {
/** Inclusion du fichier de traduction fr par défaut. */
include_once BBSY_CHEMIN_LANGUES.'bbsy_langue_fr.inc.php';
}
 
// +------------------------------------------------------------------------------------------------------+
// Initialisation des variables
global $TransTab, $tbl;
$ret = '';
$ret .= '<!-- BiblioBota - Synthèse : DEBUT -->'."\n";
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
if ((isset($TransTab)) && ($TransTab != '')) {
$tableau = FRAG_decoupageChaine($TransTab);
}
 
if (empty($tableau['pstart'])) {
$tableau['pstart'] = 0;
}
 
// Début de l'applicatif
$ret .= '<h1>'.BBSY_LG_PAGE_TITRE.'</h1>'."\n";
$ret .= '<h2>'.BBSY_LG_PRESENTATION_TITRE.'</h2>'."\n";
$ret .= '<p>'.BBSY_LG_PARA_01.'</p>'."\n";
$ret .= '<p>'.BBSY_LG_PARA_02.'</p>'."\n";
$ret .= '<h2>'.BBSY_LG_PARA_03.'</h2>'."\n";
$ret .= '<h3>'.'<img src="'.BBSY_IMG_SYNTHESE.'" alt="'.BBSY_LG_SYNTH_IMG_ALT.'" /> '.BBSY_LG_SYNTH_NIV_01_TITRE.'</h3>'."\n";
$ret .= '<p>'.BBSY_LG_SYNTH_NIV_01_INFO.'</p>'."\n";
$ret .= '<h3>'.str_repeat('<img src="'.BBSY_IMG_SYNTHESE.'" alt="'.BBSY_LG_SYNTH_IMG_ALT.'" /> ', 2).BBSY_LG_SYNTH_NIV_02_TITRE.'</h3>'."\n";
$ret .= '<p>'.BBSY_LG_SYNTH_NIV_02_INFO.'</p>'."\n";
$ret .= '<h3>'.str_repeat('<img src="'.BBSY_IMG_SYNTHESE.'" alt="'.BBSY_LG_SYNTH_IMG_ALT.'" /> ', 3).BBSY_LG_SYNTH_NIV_03_TITRE.'</h3>'."\n";
$ret .= '<p>'.BBSY_LG_SYNTH_NIV_03_INFO.'</p>'."\n";
 
 
// (1) récupération des chaines id des synthèses
$seeker = '';
foreach ($var_biblio['seek_string'] as $key => $values) {
if ($key != 0) {
$seeker .= ' OR ';
}
$seeker .= ' B_A_CRAICOLL = "'.$values.'" ';
}
 
// (2) comptage du nombre de synthèses
$requete = 'SELECT COUNT(*) AS comptage '.
'FROM '.$tbl['article'].', '.$tbl['item'].' '.
'WHERE '.$seeker.' '.
'AND B_I_CACHER = 0 '.
'AND B_I_IDITEM = B_A_IDART';
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$tmp_nb = mysql_fetch_object($resultat);
$nb = $tmp_nb->comptage;
mysql_free_result($resultat);
 
// Affichage du nombre de synthèses requis
if ($nb == 0) {
$ret .= '<p>'.'Pas de synthèses référencées.'.'</p>'."\n";
}
 
$requete = 'SELECT '.$tbl['article'].'.*, '.$tbl['item'].'.*, '.$tbl['item_typlog'].'.B_IL_LABEL, '.$tbl['item_typphy'].'.B_IP_LABEL '.
'FROM '.$tbl['article'].', '.$tbl['item'].', '.$tbl['item_typlog'].', '.$tbl['item_typphy'].' '.
'WHERE '.$seeker.' '.
'AND B_I_CACHER = 0 '.
'AND B_I_TYPLOG = B_IL_ID '.
'AND B_I_TYPPHY = B_IP_ID '.
'AND B_I_IDITEM = B_A_IDART '.
'ORDER BY B_I_REM DESC '.
'LIMIT '.$tableau['pstart'].', '.$var_biblio['how_bloc'];
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$nb_s = mysql_num_rows($resultat);
 
if (empty($tableau['pend'])) {
$tableau['pend'] = $nb;
}
if (empty($tableau['pstep'])) {
$tableau['step'] = $var_biblio['how_bloc'];
}
 
// Informations sur le nombre de synthèse.
$ret .= '<p id="frag_nbre_resultat">'.FRAG_afficherTxtNbreResultat('synth', $tableau, $nb_s, $nb).'</p>'."\n";
 
// Ici on fragmente en pages, pour une navigation plus facile
$frag = new fragmenteur();
$frag_txt = $frag->fragmente($tableau, $nb);
if (($frag->nb_pages) > 1) {
$ret .= '<p class="frag_navigation">'.$frag_txt.'</p>'."\n";
}
// Fin fragmentation
 
// Affichage des résultats
// 1- listing des synthèses
// 2- dedans : listing des voir aussi
$n = 1;
$ret .= '<ul>'."\n";
while ($ligne = mysql_fetch_object($resultat)) {
$id_a = $ligne->B_A_IDART;
$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;
$comment = $ligne->B_I_COMMENT;
$rem = $ligne->B_I_REM;
$exp_rem = explode('+', $rem);
$ret .= '<li>'."\n";
if ($image != '') {
$ret .= '<img src="'.BB_CHEMIN_IMAGES.$image.'" alt="" />';
}
// Récupération des données spécifiques stockées dans le champ REM
// $exp_rem[0] : date aaaa.mm.jj
// $exp_rem[1] : niveau de synthèse
// $exp_rem[++] : adresses mails des auteurs
// $exp_rem[2] : 1er auteur
// $exp_rem[3] : 2ème auteur etc. ...
if ($exp_rem[1] == '') {
$exp_rem[1] = 0;
}
switch ($exp_rem[1]) {
case 0 :
$alt = BBSY_LG_SYNTH_NIV_00_TITRE;
break;
case 1 :
$alt = BBSY_LG_SYNTH_NIV_01_TITRE;
break;
case 2 :
$alt = BBSY_LG_SYNTH_NIV_02_TITRE;
break;
case 3 :
$alt = BBSY_LG_SYNTH_NIV_03_TITRE;
break;
}
$ret .= str_repeat('<img class="'.BBSY_CLASS_IMG_SYNTHESE.'" src="'.BBSY_IMG_SYNTHESE.'" alt="'.BBSY_LG_SYNTH_IMG_ALT.'" /> ', $exp_rem[1]);
// Désactivation des de ma mise en tag des mails des auteurs.
/*// comptage du nombre d'auteurs
$exp_auteurs = explode (", ",$auteurs);
$tmp_count = count($exp_auteurs);
// affichage des auteurs et de leur mail s'il est précisé
$ct = 0; // variable de controle du nom de l'auteur
$tc = 2; // variable de controle du mail de l'auteur (début du listing des auteurs)
while ($ct <= $tmp_count) {
if ($exp_rem[$tc] != '') {
$ret .= "<zup href=\"mailto:$exp_rem[$tc]?subject=Synthèse $titre\">$exp_auteurs[$ct]</zup>";
} else {
$ret .= "$exp_auteurs[$ct]";
}
if ($ct < $tmp_count-1) {
$ret .= ", ";
}
$ct++;
$tc++;
}*/
$ret .= $auteurs;
$ret .= ' - '.'<b>'.$titre.'</b>';
if ($exp_rem[0] > 0) {
$ret .= ' - '.FormateDateYYYYMMJJ($exp_rem[0]);
}
if ($resum != '') {
$ret .= ' - '.'<i>'.$resum.'</i>';
}
if ($comment != '') {
$ret .= ' - '.'<i>'.$comment.'</i>';
}
if ($geo != '') {
$ret .= ' - '.'Départ./Région : '.'<i>'.$geo.'</i>';
}
if ($langue != '') {
$ret .= ' - '.$langue;
}
// Recherche des liens vers la synthèse
// Là on affiche les Voir Aussi Fascicules ... si y'en a
$UnVoirAussi = new VoirAussi($id_a, $tbl['article']);
if ($UnVoirAussi->NbVA > 0) {
$liste_va = $UnVoirAussi->ListerVoirAussi();
$ret .= ' - '.'Consulter : ';
for ($i = 0; $i == (($UnVoirAussi->NbVA) - 1); $i++) {
$ret .= '<img class="'.BB_CLASS_IMG_ICONE.'" src="'.$liste_va[$i]['icon_src'].'" alt="'.$liste_va[$i]['icon_alt'].'" /> ';
$ret .= '<a '.$liste_va[$i]['target'].'>'.$liste_va[$i]['texte'].'</a>';
if ($liste_va[$i]['desc'] != '') {
$ret .= ' - '.'<i>'.$liste_va[$i]['desc'].'</i>';
}
}
}
// fin des Voir Aussi Fascicule
if ($n < $nb_s) {
$ret .= '<br /><br />';
}
$ret .= "\n\n";
$n++;
$ret .= '</li>'."\n";
}
$ret .= '</ul>'."\n";
mysql_free_result($resultat);
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
$ret .= '<!-- BiblioBota - Synthèse : FIN -->'."\n";
$sortie = $ret;
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2005/04/25 13:58:15 jpm
* Résolution de problèmes liés à la base de données et simplification de l'affichage des images représentant le niveau des synthèses.
*
* Revision 1.2 2005/03/01 15:18:48 jpm
* Ajout de commentaire html de début et fin d'appli.
*
* Revision 1.1 2005/02/24 18:34:41 jpm
* Ajout de l'application synthèse.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_revue/bb_revue.php
New file
0,0 → 1,411
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 5.1.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of eFlore. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id$
/**
* Titre
*
* Description
*
*@package eFlore
*@subpackage ef_fiche
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author aucun
*@copyright Tela-Botanica 2000-2006
*@version $Revision$ $Date$
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier de configuration de l'application Revue. */
//require_once BB_CHEMIN_APPLI.'bb_revue/configuration/bbre_config.inc.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Initialisation de la variable à retourner
$retour = '';
$retour .= '<!-- BiblioBota - Revue : DEBUT -->'."\n";
$retour .= '<div id="biblio_revue">';
 
$aso_revues = array();
$query = 'SELECT '.$GLOBALS['tbl']['collection'].'.* '.
'FROM '.$GLOBALS['tbl']['collection'].' '.
'WHERE B_C_CACHER = 0 '.
'ORDER BY B_C_NOMCOMPLET ';
$do_query = mysql_query($query) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query));
$nbre_revues_total = mysql_num_rows($do_query);
$nbre_revues_avec_article = 0;
 
if ($nbre_revues_total == 0) {
// Titre de la page
$retour .= '<h1>'.'Revues indexées dans la base de données du projet BiblioBota.'.'</h1>';
$retour .= '<p>'.'Pas encore de revues indexées...'.'</p>'."\n";
} else {
while ($row = mysql_fetch_object($do_query)) {
$aso_revue = array();
$aso_revue['id'] = $row->B_C_CRAI;
$aso_revue['idlink'] = $row->B_C_LKSTR;
$aso_revue['nom_complet'] = $row->B_C_NOMCOMPLET;
$aso_revue['abreviation'] = $row->B_C_ABREGE;
$aso_revue['date_debut'] = $row->B_C_DATECREATION;
$aso_revue['suite_de'] = $row->B_C_FAISUITE;
$aso_revue['date_fin'] = $row->B_C_DATEFIN;
$aso_revue['periodicite'] = $row->B_C_PERIODICITE;
$aso_revue['contact_nom'] = $row->B_C_CONTACTNOM;
$aso_revue['contact_mail'] = $row->B_C_CONTACTMAIL;
$aso_revue['logo'] = $row->B_C_IMAGE;
$aso_revue['commentaires'] = $row->B_C_COMMENT;
$aso_revue['date_maj'] = $row->B_C_MAJFICHE;
$aso_revue['fasc_nbre'] = 0;
$aso_revue['fasc_date_premier'] = '';
$aso_revue['fasc_date_dernier'] = '';
$aso_revue['fasc_maj_dernier'] = '';
$aso_revue['fasc_nom_dernier'] = '';
// Construction de l'url de la page contenant les info sur l'organisme:
$Url = clone $GLOBALS['_BIBLIOBOTA_']['url'];
$Url->setId(BB_URL_APPLI_ORGA_ID);
$Url->addQueryString('appli', 'bb_consultation');
$Url->addQueryString('consultation', 'avancee');
$Url->addQueryString('coll', $aso_revue['idlink']);
$aso_revue['url'] = $Url->getUrl();
$aso_fasc_serie = array();
$query_fasc = 'SELECT '.$GLOBALS['tbl']['fascicule'].'.* '.
'FROM '.$GLOBALS['tbl']['fascicule'].' '.
'WHERE B_F_CRAICOLL = "'.$row->B_C_CRAI.'" '.
'AND B_F_CACHER = 0 '.
'ORDER BY B_F_CRAISERIE, B_F_NUMERO DESC';
$do_query_fasc = mysql_query($query_fasc) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_fasc));
// Initialisation de la date
$initialiser = true;
while ($row_fasc = mysql_fetch_object($do_query_fasc)) {
if (!isset($aso_fasc_serie[$row_fasc->B_F_CRAISERIE])) {
$aso_fasc = array();
$aso_fasc['nbre_fasc'] = 1;
$aso_fasc['nom_serie'] = $row_fasc->B_F_CRAISERIE;
$aso_fasc['nom_fin_serie'] = $row_fasc->B_SER_SOUSTITRE;
$aso_fasc['nom_fin_fasc'] = $row_fasc->B_F_TITRE;
$aso_fasc_serie[$row_fasc->B_F_CRAISERIE] = $aso_fasc;
} else {
$aso_fasc_serie[$row_fasc->B_F_CRAISERIE]['nbre_fasc']++;
}
// Nombre de fascicule dans la collection
$aso_revue['fasc_nbre']++;
// Calcule de la date du premier fascicule et de la date du dernier
if (preg_match('/^(\d{4})(?:\.(\d{2})|)$/', $row_fasc->B_F_DATE, $match)) {
if (isset($match[1]) && $match[1] != '') {
$annee = $match[1];
$mois = '00';
if (isset($match[2]) && $match[2] != '') {
$mois = $match[2];
}
$date = $annee.'-'.$mois;
// Initialisation avec une date pour la série courrante
if ($aso_fasc_serie[$row_fasc->B_F_CRAISERIE]['nbre_fasc'] == 1) {
$aso_fasc['date_debut'] = $date;
$aso_fasc['date_fin'] = $date;
}
// Initialisation avec une date pour la collection toute série confondue
if ($initialiser) {
$initialiser = false;
$aso_revue['fasc_date_premier'] = $date;
$aso_revue['fasc_date_dernier'] = $date;
}
// Date premier fascicule dans la série
if (strcasecmp($date, $aso_fasc_serie[$row_fasc->B_F_CRAISERIE]['date_debut']) < 0) {
$aso_fasc_serie[$row_fasc->B_F_CRAISERIE]['date_debut'] = $date;
}
// Date premier fascicule dans la collection
//echo $date.'<'.$aso_revue['fasc_date_premier'].'/'.strcasecmp($date, $aso_revue['fasc_date_premier']).'<br>';
if (strcasecmp($date, $aso_revue['fasc_date_premier']) < 0) {
//echo $aso_revue['fasc_date_premier'].'<'.$date.'<br>';
$aso_revue['fasc_date_premier'] = $date;
}
// Date dernier fascicule dans la série
if (strcasecmp($date, $aso_fasc_serie[$row_fasc->B_F_CRAISERIE]['date_fin']) > 0) {
$aso_fasc_serie[$row_fasc->B_F_CRAISERIE]['date_fin'] = $date;
$aso_revue['fasc_nom_dernier'] = $row_fasc->B_F_TITRE;
$aso_revue['fasc_maj_dernier'] = $row_fasc->B_F_MAJFICHE;
}
// Date dernier fascicule dans la collection
if (strcasecmp($date, $aso_revue['fasc_date_dernier']) > 0) {
$aso_revue['fasc_date_dernier'] = $date;
}
}
}
}
mysql_free_result($do_query_fasc);
ksort($aso_fasc_serie, SORT_DESC);
$aso_revue['aso_fasc_serie'] = $aso_fasc_serie;
$query_art = 'SELECT COUNT('.$GLOBALS['tbl']['article'].'.B_A_IDART) AS nbre_article '.
'FROM '.$GLOBALS['tbl']['article'].' '.
'WHERE B_A_CRAICOLL = "'.$row->B_C_CRAI.'" '.
'GROUP BY B_A_CRAICOLL';
//echo $query_art.'<br/>';
$resultat_art = mysql_query($query_art) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_art));
$ligne_article = mysql_fetch_assoc($resultat_art);
//echo '<pre>'.print_r($ligne_article, true).'</pre>';
$aso_revue['nbre_article'] = $ligne_article['nbre_article'];
if ($aso_revue['nbre_article'] != 0) {
$nbre_revues_avec_article++;
}
$aso_revues[] = $aso_revue;
}
mysql_free_result($do_query);
if ($GLOBALS['_GEN_commun']['info_application']->affichage_type == 'tableau') {
// Titre de la page
$retour .= '<h1>'.$nbre_revues_total.' revues indexées'.'</h1>';
$retour .= '<p>'.
'Liste de toutes les revues indexées dans la base de données du projet BiblioBota. '.'<br />'.
'Les revues ne possédant pas d\'articles indexés figurent dans ce tableau.'.
'</p>';
$o = 1;
$retour .= '<table id="liste_biblio_revue" class="table_bordure" summary="Tableau résumant les informations sur les revues indexées dans la base de données du projet BiblioBota.">'."\n";
$retour .= '<thead><tr>'.
'<th>Collection</th>'.
'<th>Date début (collection)</th>'.
'<th>Date début (indexation)</th>'.
'<th>Date fin (collection)</th>'.
'<th>Date fin (indexation)</th>'.
'<th title="Nombre de fascicules pour la collection, toutes séries confondues">Nombre fascicules</th>'.
'<th title="Nombre d\'articles pour la collection, toutes séries et fascicules confondues">Nombre d\'articles</th>'.
'<th>Périodicité</th>'.
'<th>Contact</th>'.
'<th title="Nom du dernier fascicule indexée dans la dernière série">Dernier fascicule</th>'.
'<th title="Date de publication du dernier fascicule indexée dans la dernière série">Date dernier fascicule</th>'.
'</tr></thead>'."\n";
$retour .= '<tbody>';
foreach ($aso_revues as $revue) {
$retour .= '<tr>';
$retour .= '<th>';
if ($revue['nom_complet'] != '') {
$retour .= '<h5 class="bbre_titre">'.
'<a href="'.$revue['url'].'">'.
$revue['nom_complet'].
'</a>'.
'</h5>';
if ($revue['suite_de'] != '') {
$retour .= '<p><span class="bb_intitule">Fait suite à : </span>'.$revue['suite_de'].'</p>';
}
if ($revue['abreviation'] != '') {
$retour .= '<p><span class="bb_intitule">Abréviation : </span>'.$revue['abreviation'].'</p>';
}
if ($revue['commentaires'] != '') {
$retour .= '<p>'.$revue['commentaires'].'</p>';
}
if ($revue['logo'] != '') {
$retour .= '<img class="bbre_couverture" src="'.BB_CHEMIN_IMAGES_ILLUSTRATION.$revue['logo'].'" alt="Couverture de la revue '.$revue['nom_complet'].'"/>';
}
$retour .= '<p class="texte_inactif">Id. coll. : '.$revue['id'].' - Mise à jour : '.date('d/m/Y', $revue['date_maj']).'</p>';
} else {
$retour .= '?';
}
$retour .= '</th>';
$retour .= '<td>';
if ($revue['date_debut'] != '') {
$retour .= $revue['date_debut'];
} else {
$retour .= '?';
}
$retour .= '</td>';
$retour .= '<td>';
if ($revue['fasc_date_premier'] != '') {
$retour .= donnerDateConviviale($revue['fasc_date_premier']);
} else {
$retour .= '?';
}
$retour .= '</td>';
$retour .= '<td>';
if ($revue['date_fin'] != '') {
$retour .= $revue['date_fin'];
} else {
$retour .= '?';
}
$retour .= '</td>';
$retour .= '<td>';
if ($revue['fasc_date_dernier'] != '') {
$retour .= donnerDateConviviale($revue['fasc_date_dernier']);
} else {
$retour .= '?';
}
$retour .= '</td>';
$retour .= '<td>';
if ($revue['fasc_nbre'] != '') {
$retour .= $revue['fasc_nbre'];
} else {
$retour .= 0;
}
$retour .= '</td>';
$retour .= '<td>';
if ($revue['nbre_article'] != '') {
$retour .= $revue['nbre_article'];
} else {
$retour .= 0;
}
$retour .= '</td>';
$retour .= '<td>';
if ($revue['periodicite'] != '') {
$retour .= $revue['periodicite'];
} else {
$retour .= '?';
}
$retour .= '</td>';
$retour .= '<td>';
if ($revue['contact_nom'] != '') {
if ($contact_mail != '') {
$retour .= '<a href="mailto:'.$revue['contact_mail'].'">'.$revue['contact_nom'].'</a>';
} else {
$retour .= $revue['contact_nom'];
}
} else {
$retour .= '?';
}
$retour .= '</td>';
$retour .= '<td>';
if ($revue['fasc_nom_dernier'] != '') {
$retour .= $revue['fasc_nom_dernier'];
} else {
$retour .= '?';
}
$retour .= '</td>';
$retour .= '<td>';
if ($revue['fasc_date_dernier'] != '') {
$retour .= '<p>'.donnerDateConviviale($revue['fasc_date_dernier']).'</p>';
$retour .= '<p class="texte_inactif">Mise à jour : '.date('d/m/Y', $revue['fasc_maj_dernier']).'</p>';
} else {
$retour .= '?';
}
$retour .= '</td>';
$retour .= '</tr>'."\n";
$o++;
}
$retour .= '</tbody>'."\n";
$retour .= '</table>'."\n";
} else {
// Titre de la page
$retour .= '<h1>'.$nbre_revues_avec_article.' revues indexées'.'</h1>';
$retour .= '<p>'.'Liste des revues possédant des articles indexés dans la base de données du projet BiblioBota.'.'</p>';
$o = 1;
$retour .= '<ul id="liste_biblio_revue">'."\n";
$nbre_revue_sans_article = 0;
foreach ($aso_revues as $revue) {
if ($revue['nbre_article'] != '' && $revue['nbre_article'] > 0) {
$retour .= '<li>';
if ($revue['nom_complet'] != '') {
$retour .= '<h5 class="bbre_titre">'.
'<a href="'.$revue['url'].'">'.
$revue['nom_complet'].
'</a>'.
'.</h5>';
}
if ($revue['periodicite'] != '') {
$retour .= ' '.$revue['periodicite'].'.';
} else {
$retour .= ' Périodicité inconnue';
}
$retour .= ' Indexation des fascicules de ';
if ($revue['fasc_date_premier'] != '') {
$retour .= donnerDateConviviale($revue['fasc_date_premier']);
} else {
$retour .= '?';
}
$retour .= ' à ';
if ($revue['fasc_date_dernier'] != '') {
$retour .= donnerDateConviviale($revue['fasc_date_dernier']).'. ';
} else {
$retour .= '?. ';
}
if ($revue['fasc_nbre'] != '') {
$retour .= $revue['fasc_nbre'];
} else {
$retour .= 0;
}
$retour .= ' fascicules et ';
if ($revue['nbre_article'] != '') {
$retour .= $revue['nbre_article'];
} else {
$retour .= 0;
}
$retour .= ' articles.';
$o++;
$retour .= '</li>'."\n";
} else {
$nbre_revue_sans_article++;
}
}
$retour .= '<li>';
$retour .= 'Nombre de revue dont aucun article n\'est indexé dans la base : '.$nbre_revue_sans_article;
$retour .= '</li>'."\n";
$retour .= '</ul>'."\n";
}
}
$retour .= '</div>';
$retour .= '<!-- BiblioBota - Revue : FIN -->'."\n";
$sortie .= $retour;
 
 
function fomaterDate($date) {
}
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log$
* Revision 1.7 2007/02/13 18:33:23 jp_milcent
* Modification des titres.
*
* Revision 1.6 2007/02/13 17:41:06 jp_milcent
* Amélioration et corrections de bogues.
*
* Revision 1.5 2007/01/02 17:45:16 jp_milcent
* Ajout d'un affichage simplifié.
*
* Revision 1.4 2006/09/12 16:13:05 jp_milcent
* Ajout de nouvelles informations à la liste des revues.
*
* Revision 1.3 2006/07/28 12:46:47 jp_milcent
* Début modification de l'interface de l'appli revue.
*
* Revision 1.2 2006/05/29 14:19:07 jp_milcent
* Ajout d'une classe css à l'image de la couverture de la revue.
* Correction du chemin d'accés à l'image.
*
* Revision 1.1 2006/05/23 16:20:50 jp_milcent
* Ajout de l'application affichant la liste des revues disponibles dans la base de données de BiblioBota.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_admin/bibliotheque/bba_droit_mail.fonct.php
New file
0,0 → 1,267
<?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: bba_droit_mail.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Fonctions de gestion des mails et des droits de l'application administration de Biblio Bota.
*
* Contient des fonctions de gestion des mails et des droits d'accès.
*
*@package BiblioBota-Administration
*@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.*/
/* ***********************************
boolean create_mail($from,$to,$to_cc="",$to_bcc="",$subject="",$body,$head="",$format="plain")
permet de générer un mail correctement formaté
 
ENTREE :
- string array $from : adresse de l'expéditeur ; tableau texte à deux entrées $from['name'] et $from['address']
- string array $to : adresses des destinataires ; tableau texte à deux entrées $to[$i]['name'] et $to[$i]['address']
- string array $to_cc : adresses mises en copies conformes ; tableau texte à deux entrées $to_cc[$i]['name'] et $to_cc[$i]['address']
- string array $to_bcc : adresses mises en copies conformes cachées ; tableau texte à deux entrées $to_bcc[$i]['name'] et $to_bcc[$i]['address']
- string $subject : sujet du mail
- string $body : contenu du mail
- string array $head : ajouter des lignes d'en-têtes au mail ; tableau texte à deux entrées $head[$i]['title'] et $head[$i]['value']. Exemple : $head[0]['title']="Reply-To" et $head[0]['value']="\"Tela Botanica\"<accueil@tela-botanica.org>\n"
- string $format : format du mail (valeurs possibles : plain [défaut], html)
 
SORTIE : void
*********************************** */
function create_mail($from,$to,$to_cc="",$to_bcc="",$subject="",$body,$head="",$format="plain")
{
// on initialise $head avec en un tableau avec une valeur bidon
// s'il est vide, afin de pouvoir utiliser in_array plus loin
if ($head == ""){
$head['novalue'] = "";
}
 
// on formate correctement le champ from
if (empty($from['name'])){
$from['name'] = $from['address'];
}
$from_string = "\"".$from['name']."\" <".$from['address'].">";
 
// on créé une chaine contenant les adresses To
 
$to_string = "";
if ($to != ""){
$to_string = "";
$nb_to = count($to);
$i = 0;
while ($i <= ($nb_to-1)){
if (!empty($to[$i]['name'])){
$le_nom = $to[$i]['name'];
}
else{
$le_nom = $to[$i]['address'];
}
$le_mail = $to[$i]['address'];
if ($le_mail != ""){
$to_string .= "\"$le_nom\" <$le_mail>";
if ($i < ($nb_to-1)){
$to_string .= ",\n";
}
else{
$to_string .= "\n";
}
}
$i++;
}
}
 
// on créé une chaine contenant les adresses CC
 
$cc_string = "";
if ($to_cc != ""){
$cc_string = "Cc: ";
$nb_cc = count($to_cc);
$i = 0;
while ($i <= ($nb_cc-1)){
if (!empty($to_cc[$i]['name'])){
$le_nom = $to_cc[$i]['name'];
}
else{
$le_nom = $to_cc[$i]['address'];
}
$le_mail = $to_cc[$i]['address'];
if ($le_mail != ""){
$cc_string .= "\"$le_nom\" <$le_mail>";
if ($i < ($nb_cc-1)){
$cc_string .= ",\n";
}
else{
$cc_string .= "\n";
}
}
$i++;
}
}
// on créé une chaine contenant les adresses BCC
$bcc_string = "";
if ($to_bcc != ""){
$bcc_string = "Bcc: ";
$nb_bcc = count($to_bcc);
$i = 0;
while ($i <= ($nb_bcc-1)){
if (!empty($to_bcc[$i]['name'])){
$le_nom = $to_bcc[$i]['name'];
}
else{
$le_nom = $to_bcc[$i]['address'];
}
$le_mail = $to_bcc[$i]['address'];
if ($le_mail != ""){
$bcc_string .= "\"$le_nom\" <$le_mail>";
if ($i < ($nb_bcc-1)){
$bcc_string .= ",\n";
}
else{
$bcc_string .= "\n";
}
}
$i++;
}
}
// on créé une chaine contenant le format
$format_string = "Content-Type: text/$format;\n charset=\"iso-8859-1\"";
// on créé une chaine contenant l'en-tête
// définition de l'en-tête par defaut
$head_def['Return-Path'] = "accueil@tela-botanica.org";
$head_def['Organization'] = "Tela Botanica";
$head_def['MIME-Version'] = "1.0";
$head_def['X-Priority'] = "3";
$head_def['X-Mailer'] = "Tela Botanica / PHP";
$head_def['Reply-To'] = $from_string;
$head_string = "";
// on construit l'entete à partir de l'entete par defaut, sauf si une valeur existe dans $head
$head_string .= $format_string."\n";
foreach($head_def as $key => $value){
if ((!isset($head[$key])) && ($value != "")){
$head_string .= "$key: $value\n";
}
}
// on ajoute l'entete supplémentaire
if ($head != ""){
foreach($head as $key => $value){
if ($value != ""){
$head_string .= "$key: $value\n";
}
}
}
$head_string .= $cc_string;
$head_string .= $bcc_string;
// fin de l'entete
// envoi du mail
//echo "De : ".$from_string."<BR><BR>".$to_string."<BR><BR>".$cc_string."<BR><BR>".$bcc_string."<BR><BR>Message: ".$body."<BR><BR>".$head_string;
return mail($to_string,$subject,$body,$head_string);
}
/* ***********************************
array get_his_rights($table,$appli,$user)
récupère les droits d'un utilisateur sur un appli
Entrée :
- string $table : nom de la table où sont les données d'autorisations
- string $appli : nom de l'appli recherché
- int $user : id de la personne pour qui on veut récupérer les droits
 
Sortie : ARRAY de la forme :
$table['nom_du_droit'] = "level pour ce droit (un entier)"
Dans le programme appelant, il suffit de faire if (isser($table['nom_du_droit']))
pour savoir un un utilisateur dispose d'un droit particulier
*********************************** */
 
function get_his_rights($table,$appli,$user)
{
$query = "select GEN_AUT_DROIT, GEN_AUT_LVL, GEN_AUT_PARAM from $table where GEN_AUT_USER = $user AND GEN_AUT_APPLI = '$appli'";
$resu = mysql_query($query) or die("<B>ERREUR !!</B>. Echec de la récupéreration des droits de l'utilisateur : $query");
$droits[0] = "";
while ($row = mysql_fetch_object($resu)){
$nom_droit = $row->GEN_AUT_DROIT;
$lvl_droit = $row->GEN_AUT_LVL;
$param_droit = $row->GEN_AUT_PARAM;
if (($nom_droit != "")&&($lvl_droit >= 0)){
$droits[$nom_droit]['lvl'] = $lvl_droit;
$droits[$nom_droit]['param'] = $param_droit;
}
}
mysql_free_result($resu);
return $droits;
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2004/09/14 11:12:27 jpm
* Ajout des fonctions de gestion des mails et des droits d'accès de BiblioBota admin.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_organisme_carto/bboc_organisme_liste.inc.php
New file
0,0 → 1,258
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BiblioBota - Organisme Carto. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bboc_organisme_liste.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Liste des organismes d'une zone géographique.
*
* Fichier fournissant la liste des organismes présents dans une zone géographique donnée.
*
*@package BiblioBota-OrganismeCarto
//Auteur original :
*@author Jean-Charles GRANGER <tela@vecteur.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
$res .= '<!-- BiblioBota - Organisme Carto Liste : DEBUT -->'."\n";
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
$tabmonde = explode ('*', $monde->historique);
// +------------------------------------------------------------------------------------------------------+
// Nous avons à faire à un pays.
if (count($tabmonde) == 3) {
$argument = $tabmonde[2];
$query = 'SELECT * '.
'FROM gen_COUNTRY '.
'WHERE GC_ID = "'.$argument.'"';
$result = mysql_query($query);
$row = mysql_fetch_object($result) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query));
$capitale = $row->GC_CAPITAL;
$pays = $row->GC_NAME;
$monde->nom = $monde->nom.'*'.$pays;
// Titre de la page
$query2 = 'SELECT COUNT(B_S_IDSTR) AS nbr '.
'FROM biblio_str '.
'WHERE B_S_PAYS = "'.$argument.'"';
$result2 = mysql_query($query2);
$row2 = mysql_fetch_object($result2) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query2));
$res .= '<h1 class="titre1_cartographie">';
if ($row2->nbr == 0) {
$res .= $pays.' ('.$capitale.') : aucun organisme répertorié.';
} else if ($row2->nbr==1) {
$res .= $pays.' ('.$capitale.') : '.$row2->nbr.' organisme répertorié';
} else {
$res .= $pays.' ('.$capitale.') : '.$row2->nbr.' organismes répertoriés';
}
$res .= '</h1>'."\n";
// Chemin historique navigation dans les cartes
$tabonglet = explode('*', $monde->historique);
$tabnom = explode('*', $monde->nom);
$res .= '<p><strong>'."\n";
foreach ($tabonglet as $key => $value) {
if ($key == 0) {
$chemin = $value;
$value = 'monde';
$res .= '<a class="lien_non_souligne" href="'.$monde->url.'&amp;historique_cartes='.$chemin.'">'.
'&nbsp;&gt;&nbsp;'.$tabnom[$key].
'</a>';
} else if ($key == (count($tabonglet) - 1)) {
$res .= '<a class="lien_non_souligne">'.
'&nbsp;&gt;&nbsp;'.$pays.
'</a>';
} else {
$chemin .= '*'.$value;
$res .= '<a class="lien_non_souligne" href="'.$monde->url.'&amp;historique_cartes='.$chemin.'">'.
'&nbsp;&gt;&nbsp;'.$tabnom[$key].
'</a>';
}
}
$res .= '</strong></p>'."\n";
// Création de la liste des organismes de la zone géographique.
$query = 'SELECT * '.
'FROM biblio_str, biblio_str_type '.
'WHERE B_S_PAYS = "'.$argument.'" '.
'AND B_S_CACHER = 0 '.
'AND B_S_TYPESTR = B_TYPSTR_ID '.
'ORDER BY B_S_NOM';
$result = mysql_query($query);
$nbr_final = mysql_num_rows($result) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query));
$res .= '<h1 class="titre1_cartographie">'.'Liste des organismes :'.'</h1>'."\n";
$res .= '<ul>'."\n";
$i = 0;
while ($row = mysql_fetch_object($result)) {
$get_idstr = $row->B_S_IDSTR;
$get_name = $row->B_S_NOM;
$get_cp = $row->B_S_CODEPOSTAL;
$get_ville = $row->B_S_VILLE;
$get_date = $row->B_S_MAJFICHE;
$get_categ = $row->B_S_TYPESTR;
$get_categ_nom = $row->B_TYPSTR_LABEL;
$res .= '<li>';
$res .= '<strong>'.$get_name.'</strong> ';
if ($get_ville != '') {
$res .= '('.$get_ville.')';
}
$res .= ' - ';
if ($get_categ > 0) {
$res .= $get_categ_nom;
}
/* Cross Biblio est le module qui permet d'avoir accès au popup transversal BBPOPUP */
if ($GLOBALS['var_biblio']['open_biblio_str'] == true) {
$res .= ' - <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>';
}
$res .= '</li>'."\n";
$i++;
}
$res .= '</ul>'."\n";
// +------------------------------------------------------------------------------------------------------+
// Nous avons à faire à un département français.
} else if (count($tabmonde) == 4) {
$argument = $tabmonde[3];
$query = 'SELECT *'.
' FROM gen_FRENCH_DPT'.
' WHERE GFD_ID = "'.$argument.'"';
$result = mysql_query($query);
$row = mysql_fetch_object($result) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query));
$nom = $row->GFD_NAME;
// Titre de la page
$query2 = ' SELECT count(B_S_IDSTR) as nbr'.
' FROM biblio_str'.
' WHERE if (substring(B_S_CODEPOSTAL,1,2)<>"97", substring(B_S_CODEPOSTAL, 1,2), substring(B_S_CODEPOSTAL,1,3)) = '.$argument.
' AND B_S_PAYS="fr"';
$result2 = mysql_query($query2);
$row2 = mysql_fetch_object($result2) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query2));
$res .= '<h1 class="titre1_cartographie">';
if ($row2->nbr == 0) {
$res .= $nom.' : aucun organisme répertoriée';
} else if ($row2->nbr == 1) {
$res .= $nom.' : '.$row2->nbr.' organisme répertorié';
} else {
$res .= $nom.' : '.$row2->nbr.' organismes répertoriés';
}
$res .= '</h1>'."\n";
// Chemin historique navigation dans les cartes
$tabonglet = explode ('*', $monde->historique);
$tabnom = explode ('*', $monde->nom);
$res .= '<p><strong>'."\n";
foreach ($tabonglet as $key => $value) {
if ($key == 0) {
$chemin = $value;
$value = 'monde';
$res .= '<a class="lien_non_souligne" href="'.$monde->url.'&amp;historique_cartes='.$chemin.'">'.
'&nbsp;&gt;&nbsp;'.$tabnom[$key].
'</a>';
} else if ($key == (count($tabonglet) - 1)) {
$res .= '<a class="lien_non_souligne">'.
'&nbsp;&gt;&nbsp;'.$nom.
'</a>';
} else {
$chemin .= '*'.$value;
$res .= '<a class="lien_non_souligne" href="'.$monde->url.'&amp;historique_cartes='.$chemin.'">'.
'&nbsp;&gt;&nbsp;'.$tabnom[$key].
'</a>';
}
}
$res .= '</strong></p>'."\n";
// Création de la liste des organismes de la zone géographique.
$query = 'SELECT *'.
' FROM biblio_str, biblio_str_type'.
' WHERE B_S_PAYS="fr"'.
' AND if (substring(B_S_CODEPOSTAL,1,2) <> "97", substring(B_S_CODEPOSTAL, 1,2), substring(B_S_CODEPOSTAL,1,3)) = '.$argument.
' AND B_S_CACHER = 0'.
' AND B_S_TYPESTR = B_TYPSTR_ID'.
' ORDER BY B_S_NOM';
$result = mysql_query($query);
$nbr_final = mysql_num_rows($result) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query));
$res .= '<h1 class="titre1_cartographie">'.'Liste des organismes :'.'</h1>'."\n";
$res .= '<ul>'."\n";
$i = 0;
while ($row = mysql_fetch_object($result)) {
$get_idstr = $row->B_S_IDSTR;
$get_name = $row->B_S_NOM;
$get_cp = $row->B_S_CODEPOSTAL;
$get_ville = $row->B_S_VILLE;
$get_date = $row->B_S_MAJFICHE;
$get_categ = $row->B_S_TYPESTR;
$get_categ_nom = $row->B_TYPSTR_LABEL;
$res .= '<li>';
$res .= '<strong>'.$get_name.'</strong> ';
if ($get_ville != '') {
$res .= '('.$get_ville.')';
}
$res .= ' - ';
if ($get_categ > 0) {
$res .= $get_categ_nom;
}
/* Cross Biblio est le module qui permet d'avoir accès au popup transversal BBPOPUP */
if ($GLOBALS['var_biblio']['open_biblio_str'] == true) {
$res .= ' - <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>';
}
$res .= '</li>'."\n";
$i++;
}
$res .= '</ul>'."\n";
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
$res .= '<!-- BiblioBota - Organisme Carto Liste : FIN -->'."\n";
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/05/30 09:14:04 jpm
* Ajout de class aux titres!
*
* Revision 1.1 2005/03/01 15:19:17 jpm
* Ajout des fichiers principaux de l'application Organisme Carto de Biblio Bota.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_organisme_carto/configuration/bboc_config.inc.php
New file
0,0 → 1,79
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BiblioBota - Organisme Carto. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bboc_config.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Configuration de l'application Organisme Carto.
*
* Fichier de configuration de l'application Organisme Carto.
*
*@package BiblioBota-OrganismeCarto
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
//Autres auteurs :
*@author Jean-Charles GRANGER <tela@vecteur.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// +------------------------------------------------------------------------------------------------------+
// Définition des chemins d'accès
/** Constante stockant le chemin du dossier contenant l'application Organisme Carto de Biblio Bota.*/
define('BBOC_CHEMIN_RACINE', BB_CHEMIN_APPLI.'bb_organisme_carto/');
/** Constante stockant le chemin du dossier contenant les traductions.*/
define('BBOC_CHEMIN_LANGUES', BBOC_CHEMIN_RACINE.'langues/');
/** Constante stockant le chemin du dossier bibliothèque.*/
define('BBOC_CHEMIN_BIBLIO', BBOC_CHEMIN_RACINE.'bibliotheque/');
/** Constante stockant le chemin du dossier de la bibliothèque cartographique.*/
define('BBOC_CHEMIN_BIBLIO_CARTO', BB_CHEMIN_BIBLIO_CARTO);
/** Constante stockant le chemin vers le dossier des images png de la bibliothèque cartographique.*/
define('BBOC_CHEMIN_CARTE', BB_CHEMIN_CARTE);
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/03/01 16:01:05 jpm
* Transfère de la bibliothèque cartographique dans le dossier bibliothèque général de Biblio Bota.
*
* Revision 1.1 2005/03/01 15:20:00 jpm
* Ajout du fichier de config de l'application Organisme Carto de Biblio Bota.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_organisme_carto/bibliotheque/bboc_information.fonct.php
New file
0,0 → 1,115
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BiblioBota - Organisme Carto. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bboc_information.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Fonctions de l'application Organisme Carto.
*
* Fichier de fonctions fournissant des informations de l'application Organisme Carto.
*
*@package BiblioBota-OrganismeCarto
//Auteur original :
*@author Jean-Charles GRANGER <tela@vecteur.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
/**
* Fonction bboc_consulterNbreStructure() - Donne le nombre de structure.
*
* La fonction bboc_consulterNbreStructure() renvoit une phrase complete
* indiquant le nombre de structure dans la carte passée en argument
*
* @param int l'identifiant de la carte.
* @param int l'identifiant du type de zones contenues dans la carte.
* @param int l'identifiant de la zone géo de la carte.
* @return string une chaine XHTML donnant le nombre de structure.
*/
function bboc_consulterNbreStructure($id_carte, $type_zone_carte, $id_zone_geo_carte)
{
switch ($type_zone_carte){
case '0' :
$requete =
'SELECT count(B_S_IDSTR) as nbr '.
'FROM '.BB_BDD_NOM.'.biblio_str '.
'WHERE B_S_CACHER = 0';
break;
case '1' :
$requete =
'SELECT count(CP_ID_Continent) as nbr '.
'FROM '.BB_BDD_NOM.'.biblio_str, '.BB_BDD_NOM_CARTO.'.carto_PAYS '.
'WHERE B_S_CACHER = 0 '.
'AND B_S_PAYS = CP_ID_Pays '.
'AND CP_ID_Continent <> 0 '.
'AND CP_ID_Continent = "'.$id_zone_geo_carte.'"';
break;
case '2' :
$requete =
'SELECT count(B_S_IDSTR) as nbr '.
'FROM '.BB_BDD_NOM.'.biblio_str '.
'WHERE B_S_CACHER = 0 '.
'AND B_S_PAYS = "fr"';
break;
}
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$ligne = mysql_fetch_object($resultat);
return $ligne->nbr;
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--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 2005/04/13 10:12:34 jpm
* Ajout de la constante indiquant la bdd des tables de la carto.
*
* Revision 1.1 2005/03/01 15:19:44 jpm
* Ajout du fichier contenant les fonctions permettant de fournir des informations.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_organisme_carto/langues/bboc_langue_fr.inc.php
New file
0,0 → 1,64
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BiblioBota - Organisme Carto. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bboc_langue_fr.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Traduction de l'application Organisme Carto : fr.
*
* Fichier de traduction en français de l'application Organisme Carto.
*
*@package BiblioBota-OrganismeCarto
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
//Autres auteurs :
*@author Jean-Charles GRANGER <tela@vecteur.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/01 15:20:07 jpm
* Ajout du fichier de traduction de l'application Organisme Carto de Biblio Bota.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/applications/bb_organisme_carto/bb_organisme_carto.php
New file
0,0 → 1,252
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BiblioBota - Organisme Carto. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bb_organisme_carto.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Application affichant une cartographie des organismes
*
* Fournit une carte des organimes liés à la botanique stockés dans la base Biblio Bota.
*
*@package BiblioBota-OrganismeCarto
//Auteur original :
*@author Jean-Charles GRANGER <tela@vecteur.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier de configuration de l'application Organisme Carto. */
require_once BB_CHEMIN_APPLI.'bb_organisme_carto/configuration/bboc_config.inc.php';
 
// Appel du fichier de traduction des textes de l'application Organisme Carto de Biblio Bota
if (file_exists(BBOC_CHEMIN_LANGUES.'bboc_langue_'.BB_URL_I18N.'.inc.php')) {
/** Inclusion du fichier de traduction de l'application Organisme Carto. */
include_once BBOC_CHEMIN_LANGUES.'bboc_langue_'.BB_URL_I18N.'.inc.php';
} else {
/** Inclusion du fichier de traduction fr par défaut. */
include_once BBOC_CHEMIN_LANGUES.'bboc_langue_fr.inc.php';
}
 
/** Inclusion du fichier comportant des fonctions fournissant des informations pour l'application Organisme Carto.*/
include_once BBOC_CHEMIN_BIBLIO.'bboc_information.fonct.php';
 
/** Inclusion de la bibliothèque Cartographie. */
require_once BBOC_CHEMIN_BIBLIO_CARTO.'carto_carte.class.php';
 
// +------------------------------------------------------------------------------------------------------+
// Initialisation des variables
$res = '';
$res .= '<!-- BiblioBota - Organisme Carto : DEBUT -->'."\n";
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// +------------------------------------------------------------------------------------------------------+
// Instanciation du tableau contenant les champs de la table action
$info_table_action['nom_table_action'] = BB_BDD_NOM_CARTO.'.carto_ACTION';
$info_table_action['nom_chp_id_carte'] = 'CA_ID_Carte';
$info_table_action['nom_chp_id_zg_action'] = 'CA_ID_Zone_geo';
$info_table_action['nom_chp_type_zg'] = 'CA_Type_zone';
$info_table_action['nom_chp_action'] = 'CA_Action';
$info_table_action['nom_chp_id_carte_destination'] = 'CA_ID_Carte_destination';
 
// +------------------------------------------------------------------------------------------------------+
$requete_01 = 'SELECT DISTINCT CP_ID_Continent, count(CP_ID_Continent) as nbr '.
'FROM '.BB_BDD_NOM.'.biblio_str, '.BB_BDD_NOM_CARTO.'.carto_PAYS '.
'WHERE B_S_PAYS = CP_ID_Pays '.
'AND CP_ID_Continent <> 0 '.
'GROUP BY CP_ID_Continent';
 
$resultat_01 = mysql_query($requete_01) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_01));
 
$tableau_asso_continent = array();
 
while ($ligne_01 = mysql_fetch_object($resultat_01)) {
$tableau_asso_continent[$ligne_01->CP_ID_Continent] = $ligne_01->nbr;
}
 
$info_continent['nom_table_zone'] = BB_BDD_NOM_CARTO.'.carto_CONTINENT';
$info_continent['nom_chp_id_zone'] = 'CC_ID_Continent';
$info_continent['nom_chp_nom_zone'] = 'CC_Intitule_continent';
$info_continent['nom_chp_rouge'] = 'CC_Couleur_R';
$info_continent['nom_chp_vert'] = 'CC_Couleur_V';
$info_continent['nom_chp_bleu'] = 'CC_Couleur_B';
$info_continent['nom_chp_zone_sup'] = '';
$info_continent['tableau_valeurs_zone'] = $tableau_asso_continent;
 
// +------------------------------------------------------------------------------------------------------+
$requete_02 = 'SELECT CC_ID_Continent '.
'FROM '.BB_BDD_NOM_CARTO.'.carto_CONTINENT';
 
$resultat_02 = mysql_query ($requete_02) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_02));
 
while ($ligne_02 = mysql_fetch_object($resultat_02)) {
$requete_03 = 'SELECT CP_ID_Pays, count(B_S_PAYS) as nbr '.
'FROM '.BB_BDD_NOM.'.biblio_str, '.BB_BDD_NOM_CARTO.'.carto_PAYS '.
'WHERE B_S_PAYS = CP_ID_Pays '.
'AND CP_ID_Continent = "'.$ligne_02->CC_ID_Continent.'" '.
'GROUP BY B_S_PAYS';
$resultat_03 = mysql_query($requete_03) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_03));
$tableau_asso_pays = array();
while ($ligne_03 = mysql_fetch_object($resultat_03)) {
$tableau_asso_pays[$ligne_03->CP_ID_Pays] = $ligne_03->nbr;
}
$info_pays[$ligne_02->CC_ID_Continent]['nom_table_zone'] = BB_BDD_NOM_CARTO.'.carto_PAYS';
$info_pays[$ligne_02->CC_ID_Continent]['nom_chp_id_zone'] = 'CP_ID_Pays';
$info_pays[$ligne_02->CC_ID_Continent]['nom_chp_nom_zone'] = 'CP_Intitule_pays';
$info_pays[$ligne_02->CC_ID_Continent]['nom_chp_rouge'] = 'CP_Couleur_R';
$info_pays[$ligne_02->CC_ID_Continent]['nom_chp_vert'] = 'CP_Couleur_V';
$info_pays[$ligne_02->CC_ID_Continent]['nom_chp_bleu'] = 'CP_Couleur_B';
$info_pays[$ligne_02->CC_ID_Continent]['nom_chp_zone_sup'] = 'CP_ID_Continent';
$info_pays[$ligne_02->CC_ID_Continent]['tableau_valeurs_zone'] = $tableau_asso_pays;
}
 
// +------------------------------------------------------------------------------------------------------+
$requete_04 = 'SELECT CD_ID_Departement, COUNT(CD_ID_Departement) AS nbr '.
'FROM '.BB_BDD_NOM.'.biblio_str, '.BB_BDD_NOM_CARTO.'.carto_DEPARTEMENT '.
'WHERE B_S_PAYS = "fr" '.
'AND CD_ID_Departement = IF (SUBSTRING(B_S_CODEPOSTAL,1,2)<>"97", SUBSTRING(B_S_CODEPOSTAL, 1,2), SUBSTRING(B_S_CODEPOSTAL,1,3)) '.
'GROUP BY CD_ID_Departement';
$resultat_04 = mysql_query($requete_04) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_04));
 
$tableau_asso_dpt_france = array();
 
while ($ligne_04 = mysql_fetch_object($resultat_04)) {
$tableau_asso_dpt_france[$ligne_04->CD_ID_Departement] = $ligne_04->nbr;
}
 
$info_dpt_france['nom_table_zone'] = BB_BDD_NOM_CARTO.'.carto_DEPARTEMENT';
$info_dpt_france['nom_chp_id_zone'] = 'CD_ID_Departement';
$info_dpt_france['nom_chp_nom_zone'] = 'CD_Intitule_departement';
$info_dpt_france['nom_chp_rouge'] = 'CD_Couleur_R';
$info_dpt_france['nom_chp_vert'] = 'CD_Couleur_V';
$info_dpt_france['nom_chp_bleu'] = 'CD_Couleur_B';
$info_dpt_france['nom_chp_zone_sup'] = 'CD_ID_Pays';
$info_dpt_france['tableau_valeurs_zone'] = $tableau_asso_dpt_france;
 
// On cree tout d'abords l'arborescence
$monde = new Carto_Carte('continent', '', 'Monde', 'monde_masque5c.png', 'monde5c.png', BBOC_CHEMIN_CARTE, $info_continent, $info_table_action);
 
$monde->historique_cartes = isset($GLOBALS['historique_cartes']) ? $GLOBALS['historique_cartes'] : '';
$monde->image_x = isset($GLOBALS['image_x']) ? $GLOBALS['image_x'] : '';
$monde->image_y = isset($GLOBALS['image_y']) ? $GLOBALS['image_y'] : '';
$monde->liste_zone_carte = isset($GLOBALS['liste_zone_carte']) ? $GLOBALS['liste_zone_carte'] : '';
$monde->url = $GLOBALS['_BIBLIO_']['url']->getURL();
 
foreach ($info_pays as $cle => $valeur) {
$requete_05 = 'SELECT CDC_Titre_carte, CDC_ID_Carte, CDC_Carte_fond, CDC_Carte_masque, CDC_ID_Zone_geo_carte '.
'FROM '.BB_BDD_NOM_CARTO.'.carto_DESCRIPTION_CARTE, '.BB_BDD_NOM_CARTO.'.carto_ACTION '.
'WHERE CA_ID_Zone_geo = "'.$cle.'" '.
'AND CA_Type_zone = 1 '.
'AND CA_ID_Carte_destination = CDC_ID_Carte';
$resultat_05 = mysql_query($requete_05) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_05));
$resultat_05_nbre = mysql_num_rows($resultat_05);
 
if ($resultat_05_nbre > 0) {
$ligne_05 = mysql_fetch_object($resultat_05);
$monde->ajouterFils( $ligne_05->CDC_ID_Carte, $ligne_05->CDC_ID_Zone_geo_carte, $ligne_05->CDC_Titre_carte,
$ligne_05->CDC_Carte_masque, $ligne_05->CDC_Carte_fond, $valeur, $info_table_action);
}
}
 
$monde->fils['europe']->ajouterFils('france', 'fr', 'France' ,'france_masque.png', 'france.png', $info_dpt_france, $info_table_action);
 
// Une fois l'arborescence créée on lance la méthode donnerFormulaireImage() pour récuperer le formulaire de la carte
// (dans $img). S'il n'y a pas de carte à afficher donnerFormulaireImage() renvoi false. On peut alors récupérer
// le niveau ou on en est grâce à $monde->historique (du type continent*namerique*ca).
$img = $monde->donnerFormulaireImage();
 
// Test d'img
if (!$img ) {
/** Inclusion du fichier d'affichage des infos sur les organismes d'une zone. */
include_once BBOC_CHEMIN_RACINE.'bboc_organisme_liste.inc.php';
} else {
// Construction du titre de la carte et de l'historique de navigation dans les cartes
$historique_carte = new Carto_Historique($monde, '&gt;', 'lien_non_souligne');
$tab = explode('*',$monde->historique);
$id_carte = $tab[(count($tab)-1)];
$requete_06 = 'SELECT CDC_Titre_carte, CDC_Type_zone_carte, CDC_ID_Zone_geo_carte '.
'FROM '.BB_BDD_NOM_CARTO.'.carto_DESCRIPTION_CARTE '.
'WHERE CDC_ID_Carte = "'.$id_carte.'"';
$resultat_06 = mysql_query($requete_06) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_06));
$ligne_06 = mysql_fetch_object($resultat_06);
$structure_nbre = bboc_consulterNbreStructure($id_carte, $ligne_06->CDC_Type_zone_carte, $ligne_06->CDC_ID_Zone_geo_carte);
$titre = '';
if ($structure_nbre == 0) {
$titre .= $ligne_06->CDC_Titre_carte.' : aucun organisme répertorié';
} else if ($structure_nbre == 1) {
$titre .= $ligne_06->CDC_Titre_carte.' : '.$structure_nbre.' organisme répertorié';
} else {
$titre .= $ligne_06->CDC_Titre_carte.' : '.$structure_nbre.' organismes répertoriés';
}
// Sortie XHTML
$res .= '<h1 class="titre1_cartographie">'.$titre.'</h1>'."\n";
$res .= '<p><strong>'.$historique_carte->afficherHistoriqueCarte().'</strong></p>'."\n";
$res .= '<h2 class="titre2_cartographie">Cliquez sur une zone de la carte pour zoomer.</h2>'."\n";
$res .= '<p>La couleur est proportionnelle au nombre d\'organisations.'."\n";
$res .= $img;
$res .= '<h2 class="titre2_cartographie">'.'Avertissement et déni de responsabilité : '.'</h2>'."\n";
$res .= '<p>'.'La représentation et l\'utilisation des frontières, des noms géographiques et autres données employés '."\n".
'sur les cartes et utilisés dans les listes, les tableaux, les documents et les bases de données de ce site '."\n".
'ne sont pas garanties sans erreurs, de même qu\'elles n\'engagent pas la responsabilité de l\'association '."\n".
'ni n\'impliquent de reconnaissance officielle de sa part.'.'</p>'."\n";
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
$res .= '<!-- BiblioBota - Organisme Carto : FIN -->'."\n";
$sortie = $res;
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2005/05/30 09:10:26 jpm
* Ajout de class aux titres!
*
* Revision 1.3 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.2 2005/04/13 10:12:29 jpm
* Ajout de la constante indiquant la bdd des tables de la carto.
*
* Revision 1.1 2005/03/01 15:19:17 jpm
* Ajout des fichiers principaux de l'application Organisme Carto de Biblio Bota.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/biblio_bota_organisme_carto.php
New file
0,0 → 1,71
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BiblioBota - Organisme Carto. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: biblio_bota_organisme_carto.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Redirection vers BiblioBota - Organisme Carto.
*
* Fichier permettant d'ajouter l'application Organisme Carto dans le gestionnaire
* d'application de Papyrus.
* L'utilisation de ce fichier évite de devoir passer des arguments à l'application Biblio Bota dans le gestionnaire
* de menu de Papyrus.
*
*@package BiblioBota-OrganismeCarto
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Nous spécifions l'application à appeler.
if (!isset($_REQUEST['appli'])) {
$_REQUEST['appli'] = 'bb_organisme_carto';
}
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier principal de Biblio Bota.*/
require_once 'biblio_bota.php';
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/01 15:17:36 jpm
* Ajout des fichiers de parametrage rapide des application Organismes.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/configuration/bb_config_bdd.inc.php
New file
0,0 → 1,91
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Biblio-Bota. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bb_config_bdd.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Configuration de la base de données
*
* Fichier contenant les constantes permettant de se connecter à la base de données de Biblio Bota.
*
*@package BiblioBota
*@subpackage configuration
//Auteur original :
*@author Jean-Pascal MILENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// +------------------------------------------------------------------------------------------------------+
// Paramétrage de la base de données.
/** Constante stockant le protocole de la base de données.*/
define('BB_BDD_PROTOCOLE', 'mysql');
/** Constante stockant le nom du serveur de bases de données.*/
define('BB_BDD_SERVEUR', 'localhost');
/** Constante stockant le nom de l'utilisateur de la base de données de Biblio Bota.*/
define('BB_BDD_UTILISATEUR', '');
/** Constante stockant le mot de passse de l'utilisateur de la base de données de Biblio Bota.*/
define('BB_BDD_MOT_DE_PASSE', '');
/** Constante stockant le nom de la base de données par défaut de Biblio Bota.*/
define('BB_BDD_NOM', '');
/** Constante stockant le nom de la base de données où se trouvent les tables pour la Cartographie.*/
define('BB_BDD_NOM_CARTO', '');
 
// +------------------------------------------------------------------------------------------------------+
// Paramétrage de la valeur du DSN pour Pear DB.
/** Constante stockant le DSN permetant de se connecter à la base de données de Biblio Bota.*/
define('BB_DSN', BB_BDD_PROTOCOLE.'://'.BB_BDD_UTILISATEUR.':'.BB_BDD_MOT_DE_PASSE.'@'.BB_BDD_SERVEUR.'/'.BB_BDD_NOM);
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2005/05/19 07:36:54 jpm
* Modif
*
* Revision 1.3 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.2 2005/02/28 16:56:07 jpm
* Ajout d'une constante de définition du nom d'une base de données.
*
* Revision 1.1 2005/02/24 11:14:37 jpm
* Ajout du fichier de configuration de la base de données.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/configuration/bb_config.inc.php
New file
0,0 → 1,384
<?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_config.inc.php,v 1.4 2007-02-13 18:06:59 jp_milcent Exp $
/**
* Configuration générale des applications de Biblio Bota
*
* Ce fichier permet de stocker les valeurs de configuration communes aux différentes applications
* constituant Biblio Bota.
*
*@package BiblioBota
*@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.4 $ $Date: 2007-02-13 18:06:59 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// +------------------------------------------------------------------------------------------------------+
/** Definition de la variable globale de Biblio Bota.*/
$GLOBALS['_BIBLIO_'] = array();
/** Variable globale stockant une URL de base de l'application recherche de plante sous forme d'objet Pear URL.*/
$GLOBALS['_BIBLIO_']['url'] = $GLOBALS['_GEN_commun']['url'];
/** Variable globale stockant la valeur i18n courante pour l'application.*/
$GLOBALS['_BIBLIO_']['i18n'] = $GLOBALS['_GEN_commun']['i18n'];
// Paramêtres indiquant que l'on est en français pour permettre la mise en majuscule des caractères accentués
setlocale(LC_CTYPE, $GLOBALS['_GEN_commun']['i18n']);
 
// +------------------------------------------------------------------------------------------------------+
// Définition des arguments de l'appel de l'application
/** Constante stockant la demande d'authentification pour accéder au moteur de recherche.*/
define('BB_ARGUMENT_AUTH', 0);
if (!isset($GLOBALS['_GEN_commun']['info_application']->application)) {
$GLOBALS['_GEN_commun']['info_application']->application = $_REQUEST['appli'];
}
define('BB_ARGUMENT_APPLI', $GLOBALS['_GEN_commun']['info_application']->application);
 
$GLOBALS['_GEN_commun']['info_application']->objet = isset($GLOBALS['_GEN_commun']['info_application']->objet) ? $GLOBALS['_GEN_commun']['info_application']->objet : '' ;
define('BB_ARGUMENT_OBJET', $GLOBALS['_GEN_commun']['info_application']->objet);
 
$GLOBALS['_GEN_commun']['info_application']->regroupement = isset($GLOBALS['_GEN_commun']['info_application']->regroupement) ? $GLOBALS['_GEN_commun']['info_application']->regroupement : '' ;
define('BB_ARGUMENT_REGROUPEMENT', $GLOBALS['_GEN_commun']['info_application']->regroupement);
 
$GLOBALS['_GEN_commun']['info_application']->titre = isset($GLOBALS['_GEN_commun']['info_application']->titre) ? $GLOBALS['_GEN_commun']['info_application']->titre : '' ;
define('BB_ARGUMENT_TITRE', $GLOBALS['_GEN_commun']['info_application']->titre);
 
$GLOBALS['_GEN_commun']['info_application']->service = isset($GLOBALS['_GEN_commun']['info_application']->service) ? $GLOBALS['_GEN_commun']['info_application']->service : '' ;
define('BB_ARGUMENT_SERVICE', $GLOBALS['_GEN_commun']['info_application']->service);
 
$GLOBALS['_GEN_commun']['info_application']->domaine = isset($GLOBALS['_GEN_commun']['info_application']->domaine) ? $GLOBALS['_GEN_commun']['info_application']->domaine : '' ;
define('BB_ARGUMENT_DOMAINE', $GLOBALS['_GEN_commun']['info_application']->domaine);
 
// +------------------------------------------------------------------------------------------------------+
// Définition des chemins de fichiers.
/** Constante stockant le chemin du dossier contenant l'API partagée.*/
define('BB_CHEMIN_API', GEN_CHEMIN_API);
/** Constante stockant le chemin du dossier contenant l'API JPGraph.*/
define('BB_CHEMIN_API_JPGRAPH', BB_CHEMIN_API.'jpgraph_1.12.2'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant l'API JPGraph.*/
define('BB_CHEMIN_API_PEAR', PAP_CHEMIN_API_PEAR);
/** Constante stockant le chemin du dossier contenant l'API Débogage.*/
define('BB_CHEMIN_API_DEBOGAGE', BB_CHEMIN_API.'debogage'.GEN_SEP);
/** Constante stockant le chemin du dossier racine de Biblio Bota.*/
define('BB_CHEMIN_RACINE', GEN_CHEMIN_CLIENT.'biblio_bota'.GEN_SEP);
/** Constante stockant le chemin du dossier configuration de Biblio Bota.*/
define('BB_CHEMIN_CONFIG', BB_CHEMIN_RACINE.'configuration'.GEN_SEP);
/** Constante stockant le chemin absolu du dossier racine de Biblio Bota.*/
define('BB_CHEMIN_ABSO_RACINE', PAP_CHEMIN_RACINE.GEN_CHEMIN_CLIENT.'biblio_bota'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant les applications spécifiques de Biblio Bota.*/
define('BB_CHEMIN_APPLI', BB_CHEMIN_RACINE.'applications'.GEN_SEP);
/** Constante stockant le chemin absolu du dossier contenant les applications spécifiques de Biblio Bota.*/
define('BB_CHEMIN_ABSO_APPLI', PAP_CHEMIN_RACINE.GEN_CHEMIN_CLIENT.'biblio_bota/applications'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant les traductions de Biblio Bota.*/
define('BB_CHEMIN_LANGUES', BB_CHEMIN_RACINE.'langues'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant la présentation de Biblio Bota.*/
define('BB_CHEMIN_PRESENTATION', BB_CHEMIN_RACINE.'presentations'.GEN_SEP);
/** Constante stockant le chemin absolu du dossier contenant la présentation de Biblio Bota.*/
define('BB_CHEMIN_ABSO_PRESENTATION', BB_CHEMIN_ABSO_RACINE.'presentations'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant les images de Biblio Bota.*/
define('BB_CHEMIN_IMAGES', BB_CHEMIN_PRESENTATION.'images'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant les images de document de type physique de Biblio Bota.*/
define('BB_CHEMIN_IMAGES_TYPE_PHYSIQUE', BB_CHEMIN_IMAGES.'type_physique'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant les images de document de type logique de Biblio Bota.*/
define('BB_CHEMIN_IMAGES_TYPE_LOGIQUE', BB_CHEMIN_IMAGES.'type_logique'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant les images illustrant les articles.*/
define('BB_CHEMIN_IMAGES_ILLUSTRATION', GEN_CHEMIN_SITES.'biblio'.GEN_SEP.'generique'.GEN_SEP.'images'.GEN_SEP.'biblio_bota'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant les styles de Biblio Bota.*/
define('BB_CHEMIN_STYLES', BB_CHEMIN_PRESENTATION.'styles'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant la bibliothèque de code de Biblio Bota.*/
define('BB_CHEMIN_BIBLIO', BB_CHEMIN_RACINE.'bibliotheque'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant les documents de Biblio Bota.*/
define('BB_CHEMIN_DOC', BB_CHEMIN_PRESENTATION.'documents'.GEN_SEP);
/** Constante stockant le chemin absolu du dossier contenant les documents de Biblio Bota.*/
define('BB_CHEMIN_ABSO_DOC', BB_CHEMIN_ABSO_PRESENTATION.'documents'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant la bibliothèque de Cartographie.*/
define('BB_CHEMIN_BIBLIO_CARTO', BB_CHEMIN_BIBLIO.'cartographie'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant les cartes de la bibliothèque de Cartographie.*/
define('BB_CHEMIN_CARTE', BB_CHEMIN_BIBLIO_CARTO.'cartes'.GEN_SEP);
 
// +------------------------------------------------------------------------------------------------------+
// Définition des chemins d'accès aux images.
/** Constante stockant le chemin d'accès au fichier bb_precedent.png de Biblio Bota.*/
define('BB_IMG_PRECEDENT', BB_CHEMIN_IMAGES.'navigation'.GEN_SEP.'bb_precedent.png');
/** Constante stockant le chemin d'accès au fichier bb_precedent.png de Biblio Bota.*/
define('BB_IMG_SUIVANT', BB_CHEMIN_IMAGES.'navigation'.GEN_SEP.'bb_suivant.png');
/** Constante stockant le nom de la classe générique des icones de Biblio Bota.*/
define('BB_CLASS_IMG_ICONE', 'bb_img_icone');
/** Constante stockant le nom de la classe du fichier bb_precedent.png de Biblio Bota.*/
define('BB_CLASS_IMG_PRECEDENT', 'bb_img_precedent');
/** Constante stockant le nom de la classe du fichier bb_suivant.png de Biblio Bota.*/
define('BB_CLASS_IMG_SUIVANT', 'bb_img_suivant');
/** Constante stockant le chemin d'accès au fichier bb_modifier.png de Biblio Bota.*/
define('BB_IMG_MODIFIER', BB_CHEMIN_IMAGES.'bb_modifier.png');
/** Constante stockant le nom de la classe du fichier bb_modifier.png de Biblio Bota.*/
define('BB_CLASS_IMG_MODIFIER', 'bb_img_icone_large');
/** Constante stockant le chemin d'accès au fichier icone web de Biblio Bota.*/
define('BB_IMG_WEB', GEN_CHEMIN_COMMUN.'generique'.GEN_SEP.'images'.GEN_SEP.'icones'.GEN_SEP.'fichier_htm.png');
/** Constante stockant le nom de la classe du fichier bb_retour.png de Biblio Bota.*/
define('BB_CLASS_IMG_WEB', 'bb_img_web');
/** Constante stockant le chemin d'accès au fichier bb_partenaire.png de Biblio Bota.*/
define('BB_IMG_PARTENAIRE', BB_CHEMIN_IMAGES.'bb_partenaire.png');
/** Constante stockant le nom de la classe du fichier bb_partenaire.png de Biblio Bota.*/
define('BB_CLASS_IMG_PARTENAIRE', 'bb_img_partenaire');
/** Constante stockant le chemin d'accès au fichier bb_reference.png de Biblio Bota.*/
define('BB_IMG_REFERENCE', BB_CHEMIN_IMAGES.'bb_reference.png');
/** Constante stockant le nom de la classe du fichier bb_reference.png de Biblio Bota.*/
define('BB_CLASS_IMG_REFERENCE', 'bb_img_reference');
/** Constante stockant le chemin d'accès au fichier bb_epuise.png de Biblio Bota.*/
define('BB_IMG_EPUISE', BB_CHEMIN_IMAGES.'bb_epuise.png');
/** Constante stockant le nom de la classe du fichier bb_epuise.png de Biblio Bota.*/
define('BB_CLASS_IMG_EPUISE', 'bb_img_epuise');
 
// +------------------------------------------------------------------------------------------------------+
// Définition de chemin d'accès et de nom de fichier pour la Cartographie
/** Constante stockant le chemin d'accès et le nom du fichier récupérant l'image de la carte et la renvoyant au client.*/
define('CAR_CHEMIN_CARTE', BB_CHEMIN_BIBLIO_CARTO.'carto.php?session='.session_name());
/** Constante stockant le chemin d'accès au dossier stockant les cartes temporaires générées par la carto.*/
define('CAR_CHEMIN_TMP', BB_CHEMIN_ABSO_DOC.'cartes_tmp'.GEN_SEP);
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// ATTENTION : reprise directe des variables de conf de BiblioBota version 0.0
// +------------------------------------------------------------------------------------------------------+
// Définition des libertés d'accès aux moteurs, popup... + paramètres divers
/** nombre d'éditeurs max à afficher dans une liste déroulante avant que le moteur ne bascule en mode zne de saisie */
$var_biblio['how_editeurs'] = 20;
/** réduire les recherches au domaine principal ? (0/1) */
$var_biblio['limit_domain'] = 1;
/** réduire les recherches au domaine principal ? (0/1) */
$var_biblio['val_euro'] = 1;
/** nombre d'éditeurs max à afficher dans une liste déroulante avant que le moteur ne bascule en mode zone de saisie. */
$var_biblio['how_bloc'] = 20;
/** nombre d'éditeurs max à afficher dans une liste déroulante avant que le moteur ne bascule en mode zone de saisie. */
$var_biblio['how_book'] = 10;
 
// +------------------------------------------------------------------------------------------------------+
// Définition des libertés d'accès à la consultation avancée par structure
/** A true la consultation avancée est possible à partir du moteur des structures de Biblio Bota. */
$var_biblio['open_biblio_str'] = true;
/** A true la consultation avancée est possible à partir du moteur des liens de Biblio Bota. */
$var_biblio['open_biblio_link'] = true;
 
// +------------------------------------------------------------------------------------------------------+
// Définition des libertés d'accès à la soumission de nouvelles fiches
/** permettre la proposition de structure ? */
$var_biblio['open_proposer_str'] = false;
/** permettre la proposition de liens ? */
$var_biblio['open_proposer_link'] = false;
/** permettre la proposition de collections ? */
$var_biblio['open_proposer_collection'] = false;
/** permettre la proposition de fascicules ? */
$var_biblio['open_proposer_fasc'] = false;
/** permettre la proposition d'articles ? */
$var_biblio['open_proposer_article'] = false;
/** permettre la proposition de medias ? */
$var_biblio['open_proposer_media'] = false;
 
// +------------------------------------------------------------------------------------------------------+
// Définition des libertés d'accès à la correction de fiches existantes
/** permettre la correction de structure ? */
$var_biblio['open_corriger_str'] = false;
/** permettre la correction de liens ? */
$var_biblio['open_corriger_link'] = false;
/** permettre la correction de collections ? */
$var_biblio['open_corriger_collection'] = false;
/** permettre la correction de fascicules ? */
$var_biblio['open_corriger_fasc'] = false;
/** permettre la correction d'articles ? */
$var_biblio['open_corriger_article'] = false;
/** permettre la correction de medias ? */
$var_biblio['open_corriger_media'] = false;
 
// +------------------------------------------------------------------------------------------------------+
// Définition des noms des tables de la base de données de Biblio Bota
/** nom de la table où sont les données structures. */
$tbl['str'] = 'biblio_str';
/** nom de la table où sont les données collections. */
$tbl['collection'] = 'biblio_collection';
/** nom de la table où sont les données de séries. */
$tbl['serie'] = 'biblio_serie';
/** nom de la table où sont les données fascicules. */
$tbl['fascicule'] = 'biblio_fasc';
/** nom de la table où sont les items. */
$tbl['item'] = 'biblio_item';
/** nom de la table où sont les données articles. */
$tbl['article'] = 'biblio_article';
/** nom de la table où sont les données liens. */
$tbl['link'] = 'biblio_link';
/** nom de la table où sont les données médias. */
$tbl['media'] = 'biblio_media';
/** nom de la table où sont les auteurs des saisies. */
$tbl['saisie'] = 'biblio_aut_saisie';
/** nom de la table où sont les données modifiées. */
$tbl['modif'] = 'biblio_modif';
/** nom de la table où sont les domaines d'article. */
$tbl['domaine'] = 'biblio_domaine';
/** nom de la table où sont les jointures entre articles et domaines. */
$tbl['domaine_lk'] = 'biblio_domaine_lier';
/** nom de la table où sont les catégories. */
$tbl['cat'] = 'biblio_link_categ';
/** nom de la table où sont les types de structures. */
$tbl['typestr'] = 'biblio_str_type';
/** nom de la table où sont les types physiques de médias. */
$tbl['item_typphy'] = 'biblio_item_typphy';
/** nom de la table où sont les types logiques de médias. */
$tbl['item_typlog'] = 'biblio_item_typlog';
/** nom de la table de jointure liens - catégories. */
$tbl['categlien'] = 'biblio_link_categoriser';
/** nom de la table où sont les données Types de Fichiers. */
$tbl['typefile'] = 'gen_typefile';
/** nom de la table où sont les données de jointure Voir Aussi. */
$tbl['allervoir'] = 'gen_allervoir';
/** nom de la table où sont les données Voir Aussi. */
$tbl['voiraussi'] = 'gen_voiraussi';
/** nom de la table où sont les données départements. */
$tbl['dpt'] = 'gen_FRENCH_DPT';
/** nom de la table où sont les données pays. */
$tbl['pays'] = 'gen_COUNTRY';
/** nom de la table où sont les données continents. */
$tbl['continent'] = 'gen_continent';
/** nom de la table où sont les données départements. */
$tbl['monnaie'] = 'gen_monnaie';
/** nom de la table où sont les données de logs. */
$tbl['logs'] = 'biblio_logs';
/** nom de la table où sont enregsitrées les requêtes effectuées. */
$tbl['spy'] = 'biblio_spy';
/** table où sont enregistrées les applis. */
$tbl['applicatifs'] = 'APPLICATION';
/** table où sont enregistrées les liens entre applications et droits. */
$tbl['app_droit'] = 'gen_app_droit';
/** table où sont enregistrées les droits des utilisateurs sur une appli. */
$tbl['autoriser'] = 'gen_autoriser';
//$tbl['annuaire'] = 'annuaire_tela' ; // nom de la table de l'annuaire
//$tbl['annu_info'] = 'ins_INFO' ; // nom de la table contenant
 
// +------------------------------------------------------------------------------------------------------+
// Définition d'identifiant de certaines valeurs de table de la base de données
// Quel est l'identifiant d'un livre dans la table des types physiques ?
$def_livre = 1;
// Quel est l'identifiant de l'euro dans la table des monnaies ?
$def_euro = 1;
 
// +------------------------------------------------------------------------------------------------------+
// Définition des valeurs des types logiques.
$log['txt'] = 1;
$log['log'] = 2;
$log['bank'] = 3;
$log['multi'] = 4;
$log['video'] = 5;
$log['son'] = 6;
 
// +------------------------------------------------------------------------------------------------------+
// Définition des valeurs des types physiques.
$phy['livre'] = 1;
$phy['perio'] = 2;
$phy['cd'] = 3;
$phy['k7'] = 4;
$phy['dvd'] = 5;
$phy['disk'] = 6;
 
// +------------------------------------------------------------------------------------------------------+
// Création des listes de définition des domaines phy et log pour les regroupements
if (defined('BB_ARGUMENT_REGROUPEMENT')) {
if (BB_ARGUMENT_REGROUPEMENT == 'article') {
// Physique
$dom_phy[0] = $phy['perio'];
// Logique
$dom_log[0] = $log['txt'];
// Définition des compléments de requêtes
$GLOBALS['query_dom']['phy'] = ' (B_I_TYPPHY = '.$phy['perio'].')';
$GLOBALS['query_dom']['log'] = ' (B_I_TYPLOG = '.$log['txt'].')';
} else if (BB_ARGUMENT_REGROUPEMENT == 'media') {
// Physique
$dom_phy[0] = $phy['livre'];
$dom_phy[1] = $phy['cd'];
$dom_phy[2] = $phy['k7'];
$dom_phy[3] = $phy['dvd'];
$dom_phy[4] = $phy['disk'];
// Logique
$dom_log[0] = $log['txt'];
$dom_log[1] = $log['log'];
$dom_log[2] = $log['bank'];
$dom_log[3] = $log['multi'];
$dom_log[4] = $log['video'];
$dom_log[5] = $log['son'];
// Définition des compléments de requêtes
$GLOBALS['query_dom']['phy'] = ' (B_I_TYPPHY <> '.$phy['perio'].')';
$GLOBALS['query_dom']['log'] = '';
}
}
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2006/09/22 08:35:01 jp_milcent
* Ajout de constantes de chemin.
*
* Revision 1.2 2006/09/22 08:31:49 jp_milcent
* Utilisation de setlocale pour permettre un meilleur fonctionnement des fonctions strtoupper...
*
* 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.10 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.9 2005/03/01 17:43:44 jpm
* Ajout de constante pour gérer les API.
*
* Revision 1.8 2005/03/01 16:01:37 jpm
* Ajout de constante pour gérer la bibliothèque cartographique.
*
* Revision 1.7 2005/02/24 18:33:53 jpm
* Ajout de constante pour les css.
*
* Revision 1.6 2005/02/24 11:16:11 jpm
* Suppression des constantes de configuration de la base de données.
*
* Revision 1.5 2004/09/16 12:09:09 jpm
* Ajout de constantes et poursuite de la mise en forme.
*
* Revision 1.4 2004/09/15 15:44:28 jpm
* Début mise en forme des valeurs de config d'origine.
*
* Revision 1.3 2004/09/14 10:19:06 jpm
* Ajout de nouvelles constantes
*
* Revision 1.2 2004/09/10 18:46:10 jpm
* Ajout de fonction et mise en forme.
*
* Revision 1.1 2004/09/10 09:46:02 jpm
* Ajout des fichiers BiblioBota configurer pour Papyrus.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/configuration/bb_config_url.inc.php
New file
0,0 → 1,88
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Biblio Bota. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bb_config_url.inc.php,v 1.3 2007-02-13 17:40:49 jp_milcent Exp $
/**
* Configuration générale des url des applications de Biblio Bota
*
* Ce fichier permet de stocker les valeurs concernant les url communes aux différentes applications
* constituant Biblio Bota.
*
*@package BiblioBota
*@subpackage Configuration
//Auteur original :
*@author Jean-Pascal MILENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.3 $ $Date: 2007-02-13 17:40:49 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// +------------------------------------------------------------------------------------------------------+
// Définition des URL
$GLOBALS['_BIBLIOBOTA_']['url'] = $GLOBALS['_GEN_commun']['url'];
 
// Redéfini le séparateur utilisé lorsque PHP génère des URLs pour séparer les arguments.
//ini_set('arg_separator.output', '&amp;');// Déjà défini dans Papyrus
/** Constante stockant l'url de base de l'application.*/
define('BB_URL_COURANTE', $GLOBALS['_GEN_commun']['url']->getUrl());
$GLOBALS['_GEN_commun']['url']->addQueryString('appli', 'bb_admin');
/** Constante stockant l'url de base et un argument appelant l'application bb_admin de Biblio Bota.*/
define('BB_URL_COURANTE_ADMIN', $GLOBALS['_GEN_commun']['url']->getUrl());
$GLOBALS['_GEN_commun']['url']->removeQueryString('appli');
$GLOBALS['_GEN_commun']['url']->addQueryString('appli', 'bb_consultation');
/** Constante stockant l'url de base et un argument appelant l'application bb_consultation de Biblio Bota.*/
define('BB_URL_COURANTE_CONSULTATION', $GLOBALS['_GEN_commun']['url']->getUrl());
$GLOBALS['_GEN_commun']['url']->addQueryString('consultation', 'avancee');
/** Constante stockant l'url de base et un argument appelant l'application bb_consultation en mode avancé de Biblio Bota.*/
define('BB_URL_COURANTE_CONSULTATION_AVANCEE', $GLOBALS['_GEN_commun']['url']->getUrl());
$GLOBALS['_GEN_commun']['url']->removeQueryString('consultation');
$GLOBALS['_GEN_commun']['url']->removeQueryString('appli');
/** Constante stockant la valeur i18n fournie par Papyrus et pouvant être passée dans l'url.*/
define('BB_URL_I18N', $GLOBALS['_GEN_commun']['i18n']);
 
/** Constante stockant l'id de l'url de la page Papyrus contenant l'appli Organisme de BiblioBota.*/
define('BB_URL_APPLI_ORGA_ID', 245);
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2006/09/22 08:30:26 jp_milcent
* Utilisation de l'objet Pear Net_URL pour construire les url.
*
* 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.1 2005/03/01 16:25:57 jpm
* Mise dans un fichier distinct des constantes d'url utilisant Net_URL de Pear.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/biblio_bota_reference.php
New file
0,0 → 1,77
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BiblioBota - Lien Favoris. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: biblio_bota_reference.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Redirection vers BiblioBota - Lien Favoris variante : Référence.
*
* Fichier permettant d'ajouter la variante Référence de l'application Lien Favoris dans le gestionnaire d'application
* de Papyrus.
* L'utilisation de ce fichier évite de devoir passer des arguments à l'application Biblio Bota dans
* le gestionnaire de menu de Papyrus.
*
*@package BiblioBota-Partenaire
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Nous spécifions l'application à appeler.
if (!isset($_REQUEST['appli'])) {
$_REQUEST['appli'] = 'bb_lien_favoris';
}
/** Nous spécifions le paramêtre selecteur de l'application.*/
$GLOBALS['_GEN_commun']['info_application']->selecteur = 'ref';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier principal de Biblio Bota.*/
require_once 'biblio_bota.php';
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/03/01 15:17:55 jpm
* Ajout d'un test sur la variable $_REQUEST.
*
* Revision 1.1 2005/02/28 14:27:56 jpm
* Changement du nom de l'appli en Lien Favoris.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/biblio_bota.php
New file
0,0 → 1,273
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Biblio Bota. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: biblio_bota.php,v 1.3 2006-09-22 09:18:56 jp_milcent Exp $
/**
* Appli Biblio Bota
*
* Cette application permet de consulter et d'administrer 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
* Ce fichier permet d'appeler les fichiers partagés par l'ensemble des applications de BiblioBota.
* Il permet aussi d'appeler les fichiers de chaque application spécifique et de vérifier s'il y a besoin
* que l'utilisateur soit identifié ou pas.
* Il joue le role de controlleur.
*
*@package BiblioBota
//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-22 09:18:56 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier de configuration de la base de données de BiblioBota.*/
require_once GEN_CHEMIN_CLIENT.'biblio_bota/configuration/bb_config_bdd.inc.php';
/** Inclusion du fichier de configuration général de BiblioBota.*/
require_once GEN_CHEMIN_CLIENT.'biblio_bota/configuration/bb_config.inc.php';
 
/** Inclusion de l'API Fragmenteur */
require_once BB_CHEMIN_API.'fragmenteur/FRAG_fragmenteur.fonct.php';
/** Inclusion de l'API Date */
require_once BB_CHEMIN_API.'date/DAT_date.fonct.php';
/** Inclusion de l'API VoirAussi */
require_once BB_CHEMIN_API.'voiraussi/VA_VoirAussi.class.php';
/** Inclusion de l'API Débogage */
require_once BB_CHEMIN_API.'debogage/BOG_sql.fonct.php';
/** Inclusion de la bibliothèque de fonctions communes aux applications de BiblioBota */
require_once BB_CHEMIN_BIBLIO.'bb_commun.fonct.php';
/** Inclusion de la classe PEAR d'abstraction de base de donnée. */
require_once BB_CHEMIN_API_PEAR.'DB.php';
/** Inclusion de la classe PEAR de gestion des URL. */
require_once BB_CHEMIN_API_PEAR.'Net/URL.php';
/** Inclusion du fichier de configuration des url de BiblioBota.*/
require_once BB_CHEMIN_CONFIG.'bb_config_url.inc.php';
 
/** Definition de la variable globale stokant la connexion à la base de données. */
$GLOBALS['db_bb']= DB::connect(BB_DSN);
 
// Stockage des styles de l'application
GEN_stockerStyleExterne('biblio_bota_consultation', BB_CHEMIN_STYLES.'bb_standard.css');
 
// Appel du fichier de traduction des textes de l'application Biblio Bota
if (file_exists(BB_CHEMIN_LANGUES.'bb_langue_'.BB_URL_I18N.'.inc.php')) {
/** Inclusion du fichier de traduction de l'application Biblio Bota. */
include_once BB_CHEMIN_LANGUES.'bb_langue_'.BB_URL_I18N.'.inc.php';
} else {
/** Inclusion du fichier de traduction fr par défaut. */
include_once BB_CHEMIN_LANGUES.'bb_langue_fr.inc.php';
}
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Fonction afficherContenuNavigation() - Fonction appelé par le gestionnaire Papyrus.
*
* Elle retourne les onglets de l'application Biblio Bota.
* Todo : Il serait nécessaire de revoir les arguments passés dans les liens. Il y a
* surement moyen de simplifier les choses.
*
* @return string du code XHTML correspondant à la zone de navigation de l'application.
*/
function afficherContenuNavigation()
{
$sortie = '';
// Dans le cas où nous sommes passé en consultation avancée...
if (isset($_GET['consultation']) && $_GET['consultation'] == 'avancee') {
global $str, $art, $fasc, $coll, $book, $media;
global $arg_0, $arg_1, $arg_2, $arg_3;
$morceau_url_commun = '&amp;consultation=avancee&amp;arg_0='.$arg_0.'&amp;arg_1='.$arg_1.'&amp;arg_2='.$arg_2.'&amp;arg_3='.$arg_3;
$class_onglet_str = 'onglet_inactif';
$class_onglet_coll = 'onglet_inactif';
$class_onglet_livre = 'onglet_inactif';
$class_onglet_media = 'onglet_inactif';
$class_onglet_retour = 'onglet_inactif';
if ($str != '') {
$structure = $str;
$class_onglet_str = 'onglet_actif';
} else if ($coll != '') {
$structure = $coll;
$class_onglet_coll = 'onglet_actif';
}else if ($book != '') {
$structure = $book;
$class_onglet_livre = 'onglet_actif';
} else if ($media != '') {
$structure = $media;
$class_onglet_media = 'onglet_actif';
} else {
$decoupage_arg = explode('=', $arg_0);
$structure = $decoupage_arg[1];
if (!empty($art) || !empty($fasc) ) {
$class_onglet_coll = 'onglet_actif';
}
}
$sortie = '<ul>'."\n";
$sortie .= ' <li class="'.$class_onglet_str.'">'.
'<a href="'.BB_URL_COURANTE_CONSULTATION.'&amp;str='.$structure.$morceau_url_commun.'">'.
'Organisme'.
'</a>'."\n".
' </li>'."\n";
$sortie .= ' <li class="'.$class_onglet_coll.'">'.
'<a href="'.BB_URL_COURANTE_CONSULTATION.'&amp;coll='.$structure.$morceau_url_commun.'">'.
'Périodique'.
'</a>'."\n".
' </li>'."\n";
$sortie .= ' <li class="'.$class_onglet_livre.'">'.
'<a href="'.BB_URL_COURANTE_CONSULTATION.'&amp;book='.$structure.$morceau_url_commun.'">'.
'Livres'.
'</a>'."\n".
' </li>'."\n";
$sortie .= ' <li class="'.$class_onglet_media.'">'.
'<a href="'.BB_URL_COURANTE_CONSULTATION.'&amp;media='.$structure.$morceau_url_commun.'">'.
'Média'.
'</a>'."\n".
' </li>'."\n";
$sortie .= ' <li class="'.$class_onglet_retour.'"><a href="'.BB_URL_COURANTE.'">'.'Retour à la recherche'.'</a></li>'."\n";
$sortie .= '</ul>'."\n";
}
return $sortie;
}
 
/** Fonction afficherContenuCorps() - Fonction appelé par le gestionnaire Papyrus.
*
* Elle retourne le contenu de l'application.
*
* @return string du code XHTML correspondant au contenu renvoyé par l'application.
*/
function afficherContenuCorps()
{
// +------------------------------------------------------------------------------------------------------+
// Initialisation de la base de données
$bdd_id = mysql_connect(BB_BDD_SERVEUR, BB_BDD_UTILISATEUR, BB_BDD_MOT_DE_PASSE, true) or die("Impossible de se connecter à la base de données: " . mysql_error());
mysql_select_db(BB_BDD_NOM, $bdd_id);
// +------------------------------------------------------------------------------------------------------+
// Initialisation des variables
global $_GEN_commun;
$sortie = '';
if (!defined('BB_ARGUMENT_AUTH') || BB_ARGUMENT_AUTH == 0 || (BB_ARGUMENT_AUTH == 1 && $GLOBALS['_GEN_commun']['pear_auth']->getAuth())) {
// Nous recherchons quelle type d'objet le moteur BiblioBota doit rechercher:
switch (BB_ARGUMENT_OBJET) {
case 'lien':
// Liens de sites web
$GLOBALS['moteur_biblio']['id_field'] = 'B_L_IDLINK';
$GLOBALS['moteur_biblio']['defaut_sort'] = 'B_L_TITRE';
break;
case 'structure':
// Organismes ou structures botaniques
$GLOBALS['moteur_biblio']['id_field'] = 'B_S_IDSTR';
$GLOBALS['moteur_biblio']['defaut_sort'] = 'B_S_NOM';
break;
case 'media':
// Articles, livres et média
$GLOBALS['moteur_biblio']['id_field'] = 'B_I_IDITEM';
$GLOBALS['moteur_biblio']['defaut_sort'] = 'B_I_AUTEURS';
break;
default:
// Par défaut : Articles, livres et média
$GLOBALS['moteur_biblio']['id_field'] = 'B_I_IDITEM';
$GLOBALS['moteur_biblio']['defaut_sort'] = 'B_I_AUTEURS';
}
// Nous incluons l'application demandée :
$chemin_application = BB_CHEMIN_APPLI.BB_ARGUMENT_APPLI.GEN_SEP.BB_ARGUMENT_APPLI.'.php';
if (file_exists($chemin_application)) {
include_once $chemin_application;
} else {
$sortie = '<p class="pap_erreur">'.'Application inexistantes!'.'</p>';
}
} elseif (BB_ARGUMENT_AUTH == 1) {
return GEN_afficherInfoIdentification($baseURL);
} else {
$sortie = '<p class="pap_erreur">'.
'ERREUR : problème!'.'<br />'.
'LIGNE : '.__LINE__.'<br />'.
'FICHIER : '.__FILE__.
'</p>';
}
 
// +------------------------------------------------------------------------------------------------------+
// Fermeture de la connection à la base de données
mysql_close($bdd_id);
return remplaceEntiteHTLM($sortie);
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2006/09/22 08:36:12 jp_milcent
* Utilisation de mysql_connect et mysql_select_db suite à disfonctionnement.
* Amélioration de la gestion des chemins des fichiers inclus.
*
* 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.9 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.8 2005/03/02 17:48:48 jpm
* Changement d'un commentaire.
*
* Revision 1.7 2005/03/02 10:32:12 jpm
* Modification commentaires et inclusion fichier config url.
*
* Revision 1.6 2005/03/01 15:18:10 jpm
* Modification de l'utilisation d'une variable globale.
*
* Revision 1.5 2004/09/16 12:09:44 jpm
* Modification de l'affichage des onglets.
*
* Revision 1.4 2004/09/15 12:16:02 jpm
* Suppresion du code spécifique au moteur annuaire.
*
* Revision 1.3 2004/09/11 11:59:18 jpm
* Transfert du contenu du fichierbb_aiguillage.inc.php directement dans ce fichier.
*
* Revision 1.2 2004/09/10 18:39:44 jpm
* Gestion des onglets.
*
* Revision 1.1 2004/09/10 09:45:09 jpm
* Ajout des fichiers BiblioBota configurer pour Papyrus.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/bibliotheque/cartographie/carto.php
New file
0,0 → 1,89
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Cartographie. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: carto.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Fournie une image cartographique.
*
* Fichier permettant de récupérer l'image d'une carte créer par la bibliothèque cartographique
* et de la faire passer dans les entête HTTP.
*
*@package Cartographie
//Auteur original :
*@author Nicolas MATHIEU
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
session_name($_GET['session']);
session_start();
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
$image = imagecreatefrompng($_SESSION['chemin'].$_SESSION['fichier'].'.png');
if (!$image) {
echo session_name();
echo session_id();
trigger_error($image);
} else {
header("Expires: Wen, 01 Dec 1999 01:00:00 GMT");// Date du passé
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");// toujours modifié
header("Cache-Control: no-cache, must-revalidate");// HTTP/1.1
header("Pragma: no-cache"); // HTTP/1.0
header ("content-type:image/png");
chmod($_SESSION['chemin'].$_SESSION['fichier'].'.png', 755);
imagepng($image);
unlink($_SESSION['chemin'].$_SESSION['fichier'].'.png');
//Nous nettoyons le dossier tmp des fichiers qu'il contient:
$poignet_de_dossier = opendir($_SESSION['chemin']);
while ($fichier_dechet = readdir($poignet_de_dossier)) {
if ($fichier_dechet != '.' && $fichier_dechet != '..') {
unlink($_SESSION['chemin'].$fichier_dechet);
}
}
closedir($poignet_de_dossier);
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
exit();
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/02/28 15:03:49 jpm
* Ajout des fichiers de la bibliothèque cartographique.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/bibliotheque/cartographie/carto_historique.class.php
New file
0,0 → 1,132
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Cartographie. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: carto_historique.class.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Classe Carto_Historique.
*
* Classe permettant de réaliser des cartes.
*
*@package Cartographie
//Auteur original :
*@author Nicolas MATHIEU
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
/**
* Classe Carto_Historique() - Affiche les liens avec les carte précédentes.
*
* La classe Carto_Historique sert à pouvoir afficher les liens avec les carte précédentes
* On accède à cette fonctionnalité grâce à la méthode afficherHistoriqueCarte()
* L'objet Carto_HistoriqueCarte recoit en parametres :
* - la généalogie du niveau ou on en est (du type monde*europe*france )
* - l'url du document
* - en option : - le caractere de separation (par defaut c'est >)
* - la classe css des liens
*/
class Carto_Historique
{
// +--------------------------------------------------------------------------------------------------+
// LES ATTRIBUTS DE LA CLASSE
var $historique;
var $url;
var $caractere_separation;
var $class_css;
var $nom;
// +--------------------------------------------------------------------------------------------------+
// LE CONSTRUCTEUR DE LA CLASSE
/**
* Constructeur Carto_Historique()
*
* Constructeur initialisant les attributs de la classe Carto_Historique().
*/
function Carto_Historique($objet_carte, $caractere = '&gt;', $class = '')
{
$this->historique = $objet_carte->historique;
$this->url = $objet_carte->url;
$this->nom = $objet_carte->nom;
unset ($objet_carte);
$this->caractere_separation = $caractere;
$this->class_css = $class;
}//Fin du constructeur Carto_Historique().
// +--------------------------------------------------------------------------------------------------+
// LES METHODES PUBLIQUES
function afficherHistoriqueCarte()
{
$res='';
$tabonglet = explode ('*', $this->historique);
$tabnom = explode ('*', $this->nom);
foreach ($tabonglet as $key=>$value) {
if ($key == 0) {
$chemin = $value;
}
else {
$chemin .= '*'.$value;
}
$res.= '<a ';
if (!empty($this->class_css)) {
$res.='class="'.$this->class_css.'" ';
}
$res.='href="'.$this->url.'&amp;historique_cartes='.$chemin.'">&nbsp;'.$this->caractere_separation.'&nbsp;'.$tabnom[$key].'</a>';
}
return $res;
}//Fin de la méthode afficherHistoriqueCarte().
 
}//Fin de la classe Carto_Historique.
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/02/28 15:03:49 jpm
* Ajout des fichiers de la bibliothèque cartographique.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/bibliotheque/cartographie/carto_action.class.php
New file
0,0 → 1,218
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Cartographie. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: carto_action.class.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Classe ActionCarte.
*
* Calsse permettant de connaître les actions à réaliser sur une carte.
*
*@package Cartographie
//Auteur original :
*@author Nicolas MATHIEU
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
/**
* Classe Carto_Action() - Recueille les infos sur l'action à réaliser pour une zone géo donnée.
*
* La classe Carto_Action sert a definir les paramètres nécessaires pour recueillir l'action a réaliser en
* fonction des coordonnées du point, du masque et du niveau.
* Elle remplace la fonction get_cartoAction() que l'on peut trouver dans le fichier carto_commun.php
* des différentes application utilisant la carto.
* Les champs a renseigner sont les suivants :
* -le nom de la table ($nom_table_carto_action) où sont stokée les actions à réalisées
* en fonction des couleurs
* -les 5 champs principaux de la table :
* -l'identifiant de la zone géographique (un nom, un numéro ou une abréviation) -> $nom_champ_cle
* -les couleurs -> $nom_champ_rouge, $nom_champ_vert, $nom_champ_bleu
* -l'action -> $nom_champ_action
* Elle possède une seule méthode : get_cartoAction().
*/
class Carto_Action
{
// +--------------------------------------------------------------------------------------------------+
// LES ATTRIBUTS DE LA CLASSE
var $_table_zone_geo;
var $_id_zone_geo_zone;
var $_rouge;
var $_vert;
var $_bleu;
var $_table_action;
var $_id_carte_action;
var $_id_zone_geo_action;
var $_type_zone_geo_action;
var $_action;
var $_id_carte_destination;
// +--------------------------------------------------------------------------------------------------+
// LE CONSTRUCTEUR DE LA CLASSE
/**
* Constructeur Carto_Action()
*
* Constructeur initialisant les attributs de la classe Carto_Action().
*/
function Carto_Action($info_table_zone_geo, $info_table_action)
{
$this->_table_zone_geo = $info_table_zone_geo['nom_table_zone'];
$this->_id_zone_geo_zone = $info_table_zone_geo['nom_chp_id_zone'];
$this->_rouge = $info_table_zone_geo['nom_chp_rouge'];
$this->_vert = $info_table_zone_geo['nom_chp_vert'];
$this->_bleu = $info_table_zone_geo['nom_chp_bleu'];
$this->_table_action = $info_table_action['nom_table_action'];
$this->_id_carte_action = $info_table_action['nom_chp_id_carte'];
$this->_id_zone_geo_action = $info_table_action['nom_chp_id_zg_action'];
$this->_type_zone_geo_action = $info_table_action['nom_chp_type_zg'];
$this->_action = $info_table_action['nom_chp_action'];
$this->_id_carte_destination = $info_table_action['nom_chp_id_carte_destination'];
}
// +--------------------------------------------------------------------------------------------------+
// LES METHODES PRIVÉES
/**
* Méthode _consulterActionImage($imageX, $imageY, $masque, $id_carte)
*
* Elle renvoit l'action a réaliser.
* Nous passons les paramètres suivant :
* -les coordonnees du point ($imageX et $imageY)
* -le masque pour recuperer la couleur ($masque)
* -l'identifiant de la carte où nous nous trouvons ($id_carte)
*/
function _consulterActionImage($imageX, $imageY, $masque, $id_carte)
{
// Nous récuperons les valeurs RVB de la couleur sur laquelle l'utilisateur a cliqué.
// Les valeurs RVB sont stockées dans le tableau associatif $valeurs_RVB.
$masque_courant = imagecreatefrompng($masque);
$index_couleur = imagecolorat($masque_courant, $imageX, $imageY);
$valeurs_RVB = imagecolorsforindex($masque_courant, $index_couleur);
// Nous effectuons une requete dans la table carto_ACTION pour récupérer la valeur
// du champ "action", afin de savoir quoi faire.
$requete =
'SELECT '.$this->_action.', '.$this->_id_carte_destination.', '.$this->_id_zone_geo_action.
' FROM '.$this->_table_action.', '.$this->_table_zone_geo.
' WHERE '.$this->_table_zone_geo.'.'.$this->_rouge.' = '.$valeurs_RVB['red'].
' AND '.$this->_table_zone_geo.'.'.$this->_vert.' = '.$valeurs_RVB['green'].
' AND '.$this->_table_zone_geo.'.'.$this->_bleu.' = '.$valeurs_RVB['blue'].
' AND '.$this->_table_action.'.'.$this->_id_zone_geo_action.' = '.$this->_table_zone_geo.'.'.$this->_id_zone_geo_zone.
' AND '.$this->_table_action.'.'.$this->_id_carte_action.' = "'.$id_carte.'"';
$resultat=mysql_query($requete) or die('
<h2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</h2>'.
'<b>Fichier : </b>'.__FILE__.'<br />'.
'<b>Ligne : </b>'.__LINE__.'<br />'.
'<b>Requete : </b>'.$requete.'<br />'.
'<b>Erreur : </b>'.mysql_error());
$ligne = mysql_fetch_object ($resultat);
if (mysql_num_rows ($resultat) != 0) {
$chp_id_zone_geo = $this->_id_zone_geo_action;
$chp_action = $this->_action;
$chp_id_carte_destination = $this->_id_carte_destination;
$action['id_zone_geo'] = $ligne->$chp_id_zone_geo;
$action['type_action'] = $ligne->$chp_action;
$action['id_carte_destination'] = $ligne->$chp_id_carte_destination;
return $action;
}
}//Fin de la méthode _consulterActionImage().
/**
* Méthode _consulterActionListe($id_zone_carte, $id_carte)
*
* Elle renvoit l'action a réaliser.
* Nous passons les paramètres suivant :
* -l'identifiant de la zone que l'on veut afficher
* -l'identifiant de la carte où nous nous trouvons ($id_carte)
*/
function _consulterActionListe($id_zone_carte, $id_carte)
{
// Nous effectuons une requete dans la table carto_ACTION pour récupérer la valeur
// du champ "action", afin de savoir quoi faire.
$requete =
'SELECT '.$this->_action.', '.$this->_id_carte_destination.', '.$this->_id_zone_geo_action.
' FROM '.$this->_table_action.', '.$this->_table_zone_geo.
' WHERE '.$this->_table_action.'.'.$this->_id_zone_geo_action.' = '.$this->_table_zone_geo.'.'.$this->_id_zone_geo_zone.
' AND '.$this->_table_zone_geo.'.'.$this->_id_zone_geo_zone.' = "'.$id_zone_carte.'"'.
' AND '.$this->_table_action.'.'.$this->_id_carte_action.' = "'.$id_carte.'"';
$resultat=mysql_query($requete) or die('
<h2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</h2>'.
'<b>Fichier : </b>'.__FILE__.'<br />'.
'<b>Ligne : </b>'.__LINE__.'<br />'.
'<b>Requete : </b>'.$requete.'<br />'.
'<b>Erreur : </b>'.mysql_error());
$ligne = mysql_fetch_object ($resultat);
if (mysql_num_rows ($resultat) != 0) {
$chp_id_zone_geo = $this->_id_zone_geo_action;
$chp_action = $this->_action;
$chp_id_carte_destination = $this->_id_carte_destination;
$action['id_zone_geo'] = $ligne->$chp_id_zone_geo;
$action['type_action'] = $ligne->$chp_action;
$action['id_carte_destination'] = $ligne->$chp_id_carte_destination;
return $action;
}
}//Fin de la méthode get_cartoAction().
}//Fin de la classe Carto_Action.
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/03/01 15:20:34 jpm
* Modification des fichiers au niveau des infos d'erreur de requete sql.
*
* Revision 1.1 2005/02/28 15:03:49 jpm
* Ajout des fichiers de la bibliothèque cartographique.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/bibliotheque/cartographie/carto_carte.class.php
New file
0,0 → 1,825
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Cartographie. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: carto_carte.class.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Classe Carto_Carte.
*
* Calsse permettant de réaliser des cartes.
*
*@package Cartographie
//Auteur original :
*@author Nicolas MATHIEU
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
require 'carto_action.class.php';
require 'carto_couleur.class.php';
require 'carto_historique.class.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/**
* Classe Carto_Carte() - Classe principale de la cartographie.
*
* La classe Carto_Carte permet de travailler les fichiers images des cartes.
*/
class Carto_Carte
{
// +--------------------------------------------------------------------------------------------------+
// LES ATTRIBUTS DE LA CLASSE
var $id;
var $_id_zone_geo_carte;
var $nom;
var $masque;
var $fond;
var $chemin;
var $image;
var $fils;
var $url;
var $_info_table_zg;
var $filiation;
var $image_x;
var $image_y;
var $historique_cartes;
var $liste_zone_carte;
var $historique;
// La couleur dominante ( $maxiRVB ), la couleur la plus claire ($miniRVB) et la couleur
// intermédiaire précédant le maximum ( $mediumRVB ) au cas ou il y aurait un trop grand
//ecart entre les deux plus grandes valeurs.
var $_zeroR;
var $_zeroV;
var $_zeroB;
var $_miniR;
var $_miniV;
var $_miniB;
var $_mediumR;
var $_mediumV;
var $_mediumB;
var $_maxiR;
var $_maxiV;
var $_maxiB;
//Le type de formule mathématique permettant de colorier la carte
var $_formule_coloriage;
//L'action à réaliser
var $_action;
// +--------------------------------------------------------------------------------------------------+
// LE CONSTRUCTEUR DE LA CLASSE
function Carto_Carte($id, $id_zone_geo_carte, $nom, $masque, $fond, $chemin, $info_table_zg, $info_table_action)
{
$this->id = $id;
$this->_id_zone_geo_carte = $id_zone_geo_carte;
$this->nom = $nom;
$this->masque = $chemin.$masque;
$this->fond = $chemin.$fond;
$this->chemin = $chemin;
$this->_info_table_zg = $info_table_zg;
$this->_action = new Carto_Action($info_table_zg, $info_table_action);
$this->fils = array();
$this->filiation = $id;
$this->historique_cartes = '';
$this->liste_zone_carte = '';
$this->definirCouleurs();
$this->definirFormuleColoriage();
}
// +--------------------------------------------------------------------------------------------------+
// LES METHODES PUBLIQUES
function definirCouleurs (
$couleur_zero_R = '255', $couleur_zero_V = '255', $couleur_zero_B = '255',
$couleur_mini_R = '210', $couleur_mini_V = '230', $couleur_mini_B = '210',
$couleur_medium_R = '92', $couleur_medium_V = '181', $couleur_medium_B = '92',
$couleur_maxi_R = '0', $couleur_maxi_V = '127', $couleur_maxi_B = '0')
{
$this->_zeroR = $couleur_zero_R;
$this->_zeroV = $couleur_zero_V;
$this->_zeroB = $couleur_zero_B;
$this->_miniR = $couleur_mini_R;
$this->_miniV = $couleur_mini_V;
$this->_miniB = $couleur_mini_B;
$this->_mediumR = $couleur_medium_R;
$this->_mediumV = $couleur_medium_V;
$this->_mediumB = $couleur_medium_B;
$this->_maxiR = $couleur_maxi_R;
$this->_maxiV = $couleur_maxi_V;
$this->_maxiB = $couleur_maxi_B;
}
function definirFormuleColoriage ($nomFormuleColoriage = 'defaut')
{
$this->_formule_coloriage = $nomFormuleColoriage;
}
/**
* Méthode donnerImageSimple() - Fournit image non cliquable.
*
* La méthode donnerImageSimple ($objet) permet de récupérer une image non cliquable.
*
*@param object un objet carto.
*@return string le code XHTML de l'image non cliquable.
*/
function donnerImageSimple($objet)
{
$nom_fichier_image = $this->_donnerIdUnique();
$objet->_lancerColoriage('', $nom_fichier_image);
$retour = '<img src="cartographie/bibliotheque/lib.carto.extractimg.php?fichier='.$nom_fichier_image.'" alt="Carte" />';
return $retour;
}
/**
* Méthode ajouterFils() - Ajoute une sous-carte.
*
* La methode ajouterFils() est essentielle. Elle permet d'ajouter toutes les sous cartes voulues.
* Il faut lui indiquer, comme a la carte du niveau du dessus, son nom, le masque, le fond et info_table_couleur.
* On a ainsi une inclusion d'objets les uns dans les autres.
*
*@return null l'objet carte fils est ajouté.;
*/
function ajouterFils($id, $id_zone_geo_carte, $nom, $masque, $fond, $info_table_zg, $info_table_action)
{
$this->fils[$id] = new Carto_Carte($id, $id_zone_geo_carte, $nom, $masque, $fond, $this->chemin, $info_table_zg, $info_table_action);
//Si on ajoute à la carte du monde comme fils celle de l'europe, alors
//on aura comme valeur pour $this->filiation de la carte d'europe : monde*europe
$this->fils[$id]->filiation = $this->filiation.'*'.$id;
$this->fils[$id]->url = $this->url;
//Si on ajoute à la carte du monde dont le nom est 'Monde' comme fils celle de l'europe,
//dont le nom est 'Europe', alors on aura comme valeur pour $this->nom de la carte d'europe : Monde*Europe
$this->fils[$id]->nom = $this->nom.'*'.$nom;
$this->fils[$id]->historique_cartes = $this->historique_cartes;
}
//*********************************************************************************************************
// La methode donnerFormulaireImage() est la methode principale de la carto. C'est elle qui gere ce qu'il y a faire en
// fonction de l'action de l'utilisateur.
// Trois cas se distinguent :
// -soit l'utilisateur a clique sur un point de la carte.
// -soit il a clique sur un des liens que l'on a afficher avec la méthode afficherHistoriqueCarte de l'objet Carto_HistoriqueCarte.
// -soit il a sélectionné une zone géographique dans la liste déroulante.
// Elle renvoit a la fin:
// -soit une nouvelle carte coloriée
// -soit false.
//**********************************************************************************************************
function donnerFormulaireImage ()
{
//global $GS_GLOBAL;
$res = '';
// Nous commençons par tester tout d'abords si nous venons d'une autre carte. Pour cela nous vérifions,
// si les attributs $this->image_x et $this->image_y de la classe Carte existe ou ne sont pas null.
// La carte est une image appelée par une balise <input type="image"> et non par une balise classique <img>.
// Ansi, lorsqu'on clique sur la carte le formulaire appelle (via l'url du formulaire) l'application
// utilisant la classe carte et lui renvoit deux variables contenant les coordonnées x et y du clic.
// L'application instancie à nouveau les objets cartes mais cette fois ci la carte affichée dépendra des
// informations founit par une table de la base de données.
// La classe carto_action instanciée dans l'application utilisant la classe carte fournit les noms
// des champs et celui de la table contenant les valeur RVB de chaque zone des cartes, l'identifiant
// de la zone et l'action à entreprendre pour la zone conssidérée.
// La méthode imgform() utilise la méthode get_cartoAction() de l'objet Carto_Action pour connaître
// en fonction des coordonnées du clic l'action à entreprendre.
// Quoi qu'il arrive, on ouvre la balise formulaire
$res = '<form id="cartographie" action="'.$this->url.'" method="post">'."\n";
$res .= '<p>';
if (isset ($this->image_x) && ($this->image_x != '') && isset ($this->image_y) && ($this->image_y != '')) {
// on regarde ici si l'on a pas un objet de plus bas niveau présent dans la variable de session carte
//a charger a la place de l'objet de plus haut niveau
$var_session_retour = $_SESSION['carte'];
if ($var_session_retour) {
$image_x = $this->image_x;
$image_y = $this->image_y;
$liste_zone_carte = $this->liste_zone_carte;
// Nous chargons alors l'ojet approprié en descendant grâce a la généalogie
 
$historique_cartes = explode('*',$this->historique_cartes);
foreach ($historique_cartes as $key => $value) {
if ($key != 0) {
//$this = $this->fils[$value];
foreach (get_object_vars($this->fils[$value]) as $key => $value) {
$this->$key = $value;
}
}
}
$this->image_x = $image_x;
$this->image_y = $image_y;
$this->liste_zone_carte = $liste_zone_carte;
unset($_SESSION['carte']) ;
}
// on regarde qu'est-ce qu'on doit faire grace a la methode _consulterAction() de l'objet Carto_Action
$action = $this->_action->_consulterActionImage($this->image_x, $this->image_y, $this->masque, $this->id);
// Nous distinguons 2 cas :
//le cas ou il faut afficher une nouvelle carte ... :
if ($action['type_action'] == 'Aller_a') {
$id_carte_destination = $action['id_carte_destination'] ;
$this->fils[$id_carte_destination]->liste_zone_carte = $this->liste_zone_carte;
$res .= ''.$this->fils[$id_carte_destination]->_donnerListeZoneCarte()."<br />\n";
$res .= '<input type="image" src="';
$id_image = $this->_donnerIdUnique();
$this->fils[$id_carte_destination]->_lancerColoriage($id_image);
$obj = serialize($this->fils[$id_carte_destination]);
$_SESSION['carte'] = $obj;
$this->historique = $this->fils[$id_carte_destination]->filiation;
$this->id = $this->fils[$id_carte_destination]->id;
$this->nom = $this->fils[$id_carte_destination]->nom;
}
//Dans le cas où l'on veut rappeler une nouvelle carte, il se peut que la nouvelle carte à rappeler
//soit la même que précédement.
//Cette possibilité peut se présenter quand on clique sur un zone blanche d'une carte (càd dans la mer)
//Là, on recharge la carte précédente :
elseif ($action['type_action'] == 'Recharger') {
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n";
$res .= '<input type="image" src="';
$id_image = $this->_donnerIdUnique();
$this->_lancerColoriage($id_image);
$obj = serialize($this);
$_SESSION['carte'] = $obj ;
$this->historique = $this->filiation;
}
// ... et le cas ou il faut lancer le dernier niveau
else if ($action['type_action'] == 'Stop') {
unset ($_SESSION['carte']) ;
$this->historique = $this->filiation.'*'.$action['id_zone_geo'];
$obj = serialize($this);
$_SESSION['carte'] = $obj ;
return false;
}
}
elseif ($this->liste_zone_carte != '') {
$liste_zone_carte = $this->liste_zone_carte;
$historique_cartes = explode('*',$this->historique_cartes);
foreach ($historique_cartes as $key => $value) {
if ($key != 0) {
//$this = $this->fils[$value];
foreach (get_object_vars($this->fils[$value]) as $key => $value) {
$this->$key = $value;
}
}
}
$this->liste_zone_carte = $liste_zone_carte;
$res .= ''.$this->_donnerListeZoneCarte($this->liste_zone_carte)."<br />\n";
$res .= '<input type="image" src="';
$id_image = $this->_donnerIdUnique();
$this->_lancerColoriage($id_image, '', $this->liste_zone_carte);
$this->historique = $this->historique_cartes;
$obj = serialize($this);
$_SESSION['carte'] = $obj ;
}
// On teste maintenant si l'on vient d'un lien. Si c'est le cas on a recu un argument
// qui nous donne la "genealogie" de la carte que l'on doit afficher
else if ($this->historique_cartes) {
// Nous chargons alors l'ojet approprié en descendant grâce a la généalogie
$historique_cartes = explode('*',$this->historique_cartes);
foreach ($historique_cartes as $key => $value) {
if ($key != 0) {
//$this = $this->fils[$value];
foreach (get_object_vars($this->fils[$value]) as $key => $value) {
$this->$key = $value;
}
}
}
// une foit que l'on a charge le bon objet nous le colorions
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n";
$res .= '<input type="image" src="';
$id_image = $this->_donnerIdUnique();
$this->_lancerColoriage($id_image);
$this->historique = $this->historique_cartes;
$obj = serialize($this);
$_SESSION['carte'] = $obj ;
}
// Enfin si on ne vient pas d'une carte ou d'un lien c'est que l'on vient de l'onglet carto du menu
// et on affiche alors la premiere carte
else {
unset ($_SESSION['carte']) ;
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n";
$res .= '<input type="image" src="';
$id_image = $this->_donnerIdUnique();
$this->_lancerColoriage($id_image);
$this->historique = $this->id;
$obj = serialize($this);
$_SESSION['carte'] = $obj;
}
$_SESSION['chemin'] = CAR_CHEMIN_TMP;
$_SESSION['fichier'] = $this->id.$id_image;
$res .= CAR_CHEMIN_CARTE.'"';
$res .= ' name="image" onmouseover="javascript:show(\'d\');" onmouseout="javascript:show(\'d\');" />'."\n";
$res .= '<input type="hidden" name="historique_cartes" value="'.$this->historique.'" />'."\n";
$res .= '</p>'."\n";
$res .= '</form>'."\n";
return $res;
}
// +--------------------------------------------------------------------------------------------------+
// LES METHODES PRIVÉES
function _donnerListeZoneCarte($zone_par_defaut = '')
{
$retour = '';
$requete = 'SELECT '.$this->_info_table_zg['nom_chp_id_zone'].', '.$this->_info_table_zg['nom_chp_nom_zone'].' '.
'FROM '.$this->_info_table_zg['nom_table_zone'].' ';
// Nous éliminons la zone blanche ne correspondant à rien
if (ereg('[a-z]+', $this->_info_table_zg['nom_chp_id_zone'])) {
$requete .= 'WHERE '.$this->_info_table_zg['nom_chp_id_zone'].' != "0" ';
} else {
$requete .= 'WHERE '.$this->_info_table_zg['nom_chp_id_zone'].' != 0 ';
}
// Nous sélectionnons en fonction de la zone géo supérieure.
if ($this->_info_table_zg['nom_chp_zone_sup'] != '') {
if (ereg('[a-z]+', $this->_id_zone_geo_carte)) {
$requete .= 'AND '.$this->_info_table_zg['nom_chp_zone_sup'].' = "'.$this->_id_zone_geo_carte.'" ';
} else{
$requete .= 'AND '.$this->_info_table_zg['nom_chp_zone_sup'].' = '.$this->_id_zone_geo_carte.' ';
}
}
// Nous trions par ordre alphabétique
$requete .= 'ORDER BY '.$this->_info_table_zg['nom_chp_nom_zone'].' ASC';
$resultat = mysql_query ($requete) or die('
<h2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</h2>'.
'<b>Fichier : </b>'. __FILE__ .
'<b>Ligne : </b>'. __LINE__ .
'<b>Requete : </b>'.$requete.
'<br/><br/><b>Erreur : </b>'.mysql_error());
$i=0;
$retour = '<select id="liste_zone_carte" name="liste_zone_carte" onchange="javascript:this.form.submit();">'."\n";
$retour .= '<option value="">Visualiser une zone :</option>'."\n";
$nom_chp_nom_zone = $this->_info_table_zg['nom_chp_nom_zone'];
$nom_chp_id_zone = $this->_info_table_zg['nom_chp_id_zone'];
while ($ligne = mysql_fetch_object ($resultat)) {
if ($zone_par_defaut == $ligne->$nom_chp_id_zone) {
$retour .= '<option value="'.$ligne->$nom_chp_id_zone.'" selected="selected">'.$ligne->$nom_chp_nom_zone.'</option>'."\n";
} else {
$retour .= '<option value="'.$ligne->$nom_chp_id_zone.'">'.$ligne->$nom_chp_nom_zone.'</option>'."\n";
}
$i++;
}
$retour .= '</select>'."\n";
return $retour;
}
//==============================================================================
// METHODE _lancerColoriage()
//
// Elle lance le coloriage de l'image.
// Elle est lancée toute seule par la méthode donnerFormulaireImage().
// Les informations qui lui sont necessaires sont déjà données à l'objet carte (fond, info_table_couleur).
//==============================================================================
function _lancerColoriage($id_image = '_00', $nom_fichier = '', $id_zone_a_reperer = '')
{
$this->image = imagecreatefrompng($this->fond);
$this->_colorierImage ($this->image, $this->_info_table_zg['nom_table_zone'], $this->_info_table_zg['nom_chp_id_zone'], $this->_info_table_zg['nom_chp_rouge'],
$this->_info_table_zg['nom_chp_vert'], $this->_info_table_zg['nom_chp_bleu'], $this->_info_table_zg['nom_chp_zone_sup'],
$this->_info_table_zg['tableau_valeurs_zone'], $id_zone_a_reperer) ;
if ($nom_fichier != '') {
imagepng(&$this->image, CAR_CHEMIN_TMP.$nom_fichier.'.png');
//$this->image = imagepng(&$this->image);
}
else {
imagepng(&$this->image, CAR_CHEMIN_TMP.$this->id.$id_image.'.png');
//imagepng(&$this->image);
}
}
//==============================================================================
// METHODE _colorierImage()
//
// Elle réalise le coloriage de l'image.
//==============================================================================
function _colorierImage(&$image_fond, $table_zone_geo, $chp_id_zone_couleur, $chp_rouge, $chp_vert, $chp_bleu, $chp_zone_sup, $tableau_valeurs_zone, $id_zone_a_reperer)
{
//----------------------------------------------------------------------------
// Cherche les valeurs RVB de la couleur de chaque zone géographique et les rentre dans
//un tableau d'objets Carto_InformationCouleur (voir la description de la classe ci-dessus.
$requete_01 =
'SELECT *'.
' FROM '.$table_zone_geo;
if ($chp_zone_sup != ''){
if(ereg("[a-z]+",$this->_id_zone_geo_carte)){
$requete_01 .=
' WHERE '.$chp_zone_sup.' = "'.$this->_id_zone_geo_carte.'"';
}
else{
$requete_01 .=
' WHERE '.$chp_zone_sup.' = '.$this->_id_zone_geo_carte;
}
}
$resultat_01 = mysql_query ($requete_01) or die('
<H2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</H2>'.
'<b>Fichier : </b>'.__FILE__.
'<b>Ligne : </b>'.__LINE__.
'<b>Requete : </b>'.$requete_01.
'<br/><br/><b>Erreur : </b>'.mysql_error());
$i=0;
$attachments = array();
while ($ligne_01 = mysql_fetch_object($resultat_01)) {
$attachments[$i] = new Carto_Couleur($ligne_01->$chp_id_zone_couleur, $ligne_01->$chp_rouge, $ligne_01->$chp_vert, $ligne_01->$chp_bleu);
$i++;
}
//Nous libérons toute la mémoire associée à l'identifiant de résultat.
mysql_free_result ($resultat_01);
//----------------------------------------------------------------------------
// On realide l'association entre l'index des couleurs et la zone de meme couleur
$attachments = $this->_construireAssociationIndexZone ($image_fond, $attachments);
//----------------------------------------------------------------------------
//Dans l'application qui utilise la classe carte, nous avons instancié un tableau
//associatif qui contient en clé l'identifiant d'une zone géographique et en valeur
//un nombre (qui peut-être un nombre d'inscrit, d'institutions, de taxons...).
// Nous récupérons ci-dessous la valeur minimum autre que 0 présente dans ce tableau
//puis une valeur conscidérée comme maximum
if (!is_array($tableau_valeurs_zone)) {
$mini = 0;
$medium = 0;
$maxi = 0;
$nbre_valeurs = 0;
}
else {
if (count($tableau_valeurs_zone) == 0) {
$mini=0;
$medium = 0;
$maxi=0;
}
else {
$i=0;
foreach ($tableau_valeurs_zone as $cle => $valeur) {
//Nous recherchons le minimum, le maximum et le la valeur médium juste au dessous du maximum.
if ($valeur != 0) {
$tablo_valeurs[$i] = $valeur;
$i++;
}
}
//Nombre d'entrées dans le tableau de valeurs non nulles :
$nbre_valeurs = count($tablo_valeurs);
$somme_valeurs = array_sum($tablo_valeurs);
$tablo_frequences = array_count_values($tablo_valeurs);
$nbre_frequences = count($tablo_frequences);
if ($nbre_valeurs > 0){
//Nous trions le tableau dans l'ordre croissant :
sort($tablo_valeurs);
//Nous récupérons la valeur la plus petite :
$mini = $tablo_valeurs[0];
$maxi = $tablo_valeurs[$nbre_valeurs-1];
isset($tablo_valeurs[$nbre_valeurs-2]) ? $medium = $tablo_valeurs[$nbre_valeurs-2] : $medium = 0;
$moyenne = $somme_valeurs/$nbre_valeurs;
$ecart_au_carre_moyen = 0;
for ($i = 0; $i < $nbre_valeurs; $i++) {
$ecart_au_carre_moyen += pow(($tablo_valeurs[$i] - $moyenne), 2);
}
$variance = $ecart_au_carre_moyen/$nbre_valeurs;
$ecart_type = sqrt($variance);
$moyenne = round($moyenne, 0);
$variance = round($variance, 0);
$ecart_type = round($ecart_type, 0);
/*echo 'Nombre de valeurs : '.$nbre_valeurs.'<br>';
echo 'Nombre de frequences : '.$nbre_frequences.'<br>';
echo 'Moyenne : '.$moyenne.'<br>';
echo 'Variance : '.$variance.'<br>';
echo 'Ecart-type : '.$ecart_type.'<br>';
echo 'Formule de coloriage : '.$this->_formule_coloriage.'<br>';
echo "mini : $mini medium : $medium maxi : $maxi<br/>";
*/
}
}
}
 
//----------------------------------------------------------------------------
// Nous réalisons le coloriage de toutes les zones :
$requete_03 = 'SELECT '.$chp_id_zone_couleur.' '.
'FROM '.$table_zone_geo;
$resultat_03 = mysql_query ($requete_03) or die('
<h2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</h2>'.
'<b>Fichier : </b>'.__FILE__.
'<b>Ligne : </b>'.__LINE__.
'<b>Requete : </b>'.$requete_03.
'<br/><br/><b>Erreur : </b>'.mysql_error());
while ($ligne_03 = mysql_fetch_object ($resultat_03)) {
$id_zone_geo = $ligne_03->$chp_id_zone_couleur;
if (!isset ($tableau_valeurs_zone[$id_zone_geo])) {
$tableau_valeurs_zone[$id_zone_geo] = 0;
}
//Nous cherchons la couleur a afficher pour chaque zone.
if ($tableau_valeurs_zone[$id_zone_geo] != 0) {
//echo 'ZONE:'.$id_zone_geo."<br/>";
//echo $tableau_valeurs_zone[$id_zone_geo]."<br/>";
$theColor = $this->_donnerCouleur (
$this->_miniR, $this->_miniV, $this->_miniB,
$this->_mediumR , $this->_mediumV , $this->_mediumB ,
$this->_maxiR , $this->_maxiV , $this->_maxiB ,
$mini, $medium, $maxi, $nbre_valeurs, $ecart_type, $moyenne, $tablo_valeurs,
$tablo_frequences, $nbre_frequences,
$tableau_valeurs_zone[$id_zone_geo],
$this->_formule_coloriage);
//echo $theColor['R'].'<br>';
//echo $theColor['V'].'<br>';
//echo $theColor['B'].'<br>';
}
else {
$theColor['R'] = $this->_zeroR;
$theColor['V'] = $this->_zeroV;
$theColor['B'] = $this->_zeroB;
}
//Nous réalisons le coloriage de toutes les zones de l'image avec la couleur obtenue.
$this->_remplacerCouleur ($image_fond, $attachments, $id_zone_geo, $theColor['R'], $theColor['V'], $theColor['B'], $id_zone_a_reperer);
}
//Nous libérons toute la mémoire associée à l'identifiant de résultat de la requête.
mysql_free_result ($resultat_03);
}
//==============================================================================
// METHODE _construireAssociationIndexZone ($image, &$att)
//
// Le tableau $att est passé par référence. La méthode modifie donc directement
// le tableau et ne renvoit donc rien.
// Attache dans un tableau $att, contenant sous forme d'objet (Carto_ColorInfo)
// les valeurs RVB des zones d'une image, la valeur de l'index correspondant
// à la couleur de la zone.
// Note : les images en question sont constituées de zones distincte possédant
// chacune une couleur unique et unie.
//==============================================================================
function _construireAssociationIndexZone(&$image_fond, &$att)
{
// Nous récupérons le nombre de couleur différentes contenues dans l'image.
//echo $this->fond.'<BR>';
$image_fond = imagecreatefrompng($this->fond);
$taille_palette = imagecolorstotal ($image_fond);
//echo $taille_palette.'<br>';
// Pour chaque couleur contenue dans l'image, nous cherchons l'objet correspondant
// dans le tableau $att, qui contient des informations sur chaque zone de l'image,
// et nous attribuons à l'objet la valeur de l'index de sa couleur dans l'image.
for ($i = 0; $i < $taille_palette; $i++) {
$valeurs_RVB = array();
$valeurs_RVB = imagecolorsforindex ($image_fond, $i);
for ($j = 0; $j < count ($att); $j++) {
if (($att[$j]->rouge == $valeurs_RVB['red']) && ($att[$j]->vert == $valeurs_RVB['green']) && ($att[$j]->bleu == $valeurs_RVB['blue'])) {
$att[$j]->index = $i;
//echo 'ICI'.$att[$j]->id_zone.$att[$j]->index.'<br>';
break;
}
}
}
return $att;
}//Fin méthode _construireAssociationIndexZone()
 
//==============================================================================
// METHODE _donnerCouleur()
//------------------------------------------------------------------------------
// Renvoie pour une valeur donnee la couleur a mettre
//------------------------------------------------------------------------------
// ENTREE
// $miniR : valeur rouge du minimum
// $miniV : valeur vert du minimum
// $miniB : valeur blue du minimum
// $maxiR : valeur rouge du maximum
// $maxiV : valeur vert du maximum
// $maxiB : valeur bleu du maximum
// $mediumR : valeur rouge du deuxieme maximum
// $mediumV : valeur vert du deuxieme maximum
// $mediumB : valeur bleu du deuxieme maximum
// $mini : valeur mini sur l'echelle
// $medium : valeur juste au dessous du maximum sur l'echelle
// $maxi : valeur maxi sur l'echelle
// $val : valeur dont on cherche la couleur
//------------------------------------------------------------------------------
// SORTIE
// $couleur array donne la couleur pour la valeur demande ($val)
//------------------------------------------------------------------------------
function _donnerCouleur($miniR, $miniV, $miniB, $mediumR, $mediumV, $mediumB, $maxiR,
$maxiV, $maxiB, $mini, $medium, $maxi, $nbre_valeurs, $ecart_type, $moyenne, $tablo_valeurs, $tablo_frequences, $nbre_frequences, $val, $formuleColoriage)
{
if ($formuleColoriage == 'defaut'){
if ($val == $maxi) {
$couleur['R'] = $maxiR;
$couleur['V'] = $maxiV;
$couleur['B'] = $maxiB;
}
if ($val == $mini && $val != $maxi) {
$couleur['R'] = $miniR;
$couleur['V'] = $miniV;
$couleur['B'] = $miniB;
}
if ($maxi/10 > $medium && $maxi/40 < $medium) {
$diff = $medium - $mini;
if ($diff > 0 && $val != $medium && $val != $maxi) {
$diffR = $mediumR - $miniR;
$diffV = $mediumV - $miniV;
$diffB = $mediumB - $miniB;
$variationR = round ( ($diffR/$diff ), 0 );
$variationV = round ( ($diffV/$diff ), 0 );
$variationB = round ( ($diffB/$diff ), 0 );
$couleur['R'] = Carto_Couleur::couleur_bornerNbre(($miniR + ($val * $variationR)), 0, 255);
$couleur['V'] = Carto_Couleur::couleur_bornerNbre(($miniV + ($val * $variationV)), 0, 255);
$couleur['B'] = Carto_Couleur::couleur_bornerNbre(($miniB + ($val * $variationB)), 0, 255);
}
else if ($val == $medium) {
$couleur['R'] = $mediumR;
$couleur['V'] = $mediumV;
$couleur['B'] = $mediumB;
}
}
else {
$diff = $maxi - $mini;
if ($diff > 0 && $val != $maxi && $val != $mini) {
$diffR = $maxiR - $miniR;
$diffV = $maxiV - $miniV;
$diffB = $maxiB - $miniB;
$variationR = round ( ($diffR/$diff ), 0 );
$variationV = round ( ($diffV/$diff ), 0 );
$variationB = round ( ($diffB/$diff ), 0 );
$couleur['R'] = Carto_Couleur::couleur_bornerNbre(($miniR + ($val * $variationR)), 0, 255);
$couleur['V'] = Carto_Couleur::couleur_bornerNbre(($miniV + ($val * $variationV)), 0, 255);
$couleur['B'] = Carto_Couleur::couleur_bornerNbre(($miniB + ($val * $variationB)), 0, 255);
}
else if ($diff == 0){
$couleur['R'] = $mediumR;
$couleur['V'] = $mediumV;
$couleur['B'] = $mediumB;
}
}
}
elseif ($formuleColoriage == 'ecart_type') {
if ($ecart_type == 0) {
$couleur['R'] = $maxiR;
$couleur['V'] = $maxiV;
$couleur['B'] = $maxiB;
}
elseif ($ecart_type >= 1 && $ecart_type <= 15) {
if ($val == $mini) {
$couleur['R'] = $miniR;
$couleur['V'] = $miniV;
$couleur['B'] = $miniB;
}
elseif ($val == $medium) {
$couleur['R'] = $mediumR;
$couleur['V'] = $mediumV;
$couleur['B'] = $mediumB;
}
elseif ($val == $maxi) {
$couleur['R'] = $maxiR;
$couleur['V'] = $maxiV;
$couleur['B'] = $maxiB;
}
else {
$dif_valeur_maxi_mini = $maxi - $mini;
$diffR = $maxiR - $miniR;
$diffV = $maxiV - $miniV;
$diffB = $maxiB - $miniB;
$variationR = round ( ($diffR/$dif_valeur_maxi_mini ), 0 );
$variationV = round ( ($diffV/$dif_valeur_maxi_mini ), 0 );
$variationB = round ( ($diffB/$dif_valeur_maxi_mini ), 0 );
$couleur['R']=$miniR + ($val * $variationR);
$couleur['V']=$miniV + ($val * $variationV);
$couleur['B']=$miniB + ($val * $variationB);
}
}
elseif ($ecart_type > 15) {
//Le tableau est trié de la plus petite à la plus grande clé.
ksort($tablo_frequences);
$i = 0;
foreach ($tablo_frequences as $cle => $valeur){
//Nous cherchons la correspondance entre la valeur et la clé.
if ($cle == $val) {
//Pour faire le Rouge, Vert, Bleu
$couleur['R'] = $miniR + ($i/$nbre_frequences) * ($maxiR - $miniR);
$couleur['V'] = $miniV + ($i/$nbre_frequences) * ($maxiV - $miniV);
$couleur['B'] = $miniB + ($i/$nbre_frequences) * ($maxiB - $miniB);
}
$i++;
}
}
}
return $couleur;
}//Fin méthode _donnerCouleur()
 
//==============================================================================
// METHODE _remplacerCouleur ($img, $att, $id_zone_geo, $r, $g, $b)
//
// $img is the image, $att an array of carto_colorinfo objects, $id_zone_geo the name
// of an object of $att, ($r, $g, $b) the new color.
//
// In the palette of $img, the color matching with $id_zone_geo is modified.
//==============================================================================
function _remplacerCouleur (&$image, &$atta, $id_zone_geo, $rouge, $vert, $bleu, $id_zone_a_reperer)
{
// Nous recherchons la valeur de l'index.
$index = -1;
for ($i = 0; $i < count ($atta); $i++) {
if ($atta[$i]->id_zone == $id_zone_geo) {
$index = $atta[$i]->index;
//Dans le cas où nous voulons repérer une zone sur la carte :
if($id_zone_geo == $id_zone_a_reperer) {
$rouge = 255;
$vert = 0;
$bleu = 0;
}
break;
}
}
// Nous mettons à jour l'image de la carte avec la valeur de l'index.
if ($index >= 0) {
imagecolorset (&$image, $index, $rouge, $vert, $bleu);
}
}//Fin de la méthode _remplacerCouleur
//==============================================================================
// METHODE _donnerIdUnique ()
//
// Cette méthode privée retourne un identifiant de 32 caractères unique.
//
//==============================================================================
function _donnerIdUnique ()
{
$id = '';
$id = md5 (uniqid (rand()));
return $id;
}//Fin de la méthode _donnerIdUnique()
 
 
}//Fin de la classe Carto_Carte()
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2005/03/03 08:58:11 jpm
* Correction erreur dans requête sélection des zones de la carte.
*
* Revision 1.2 2005/03/01 15:20:34 jpm
* Modification des fichiers au niveau des infos d'erreur de requete sql.
*
* Revision 1.1 2005/02/28 15:03:49 jpm
* Ajout des fichiers de la bibliothèque cartographique.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/bibliotheque/cartographie/carto_couleur.class.php
New file
0,0 → 1,190
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Cartographie. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: carto_couleur.class.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Classe Carto_Couleur.
*
* Classe permettant de réaliser des cartes.
*
*@package Cartographie
//Auteur original :
*@author Nicolas MATHIEU
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
/**
* Classe Carto_Couleur() - Info sur les couleurs.
*
* La classe Carto_Couleur n'est utilisée que par la classe carte.
* C'est une classe privée.
* Elle sert à stocker les informations (RVB et index) sur la couleur d'une
* zone d'une image.
*/
class Carto_Couleur
{
// +--------------------------------------------------------------------------------------------------+
// LES ATTRIBUTS DE LA CLASSE
var $id_zone;
var $rouge;
var $vert;
var $bleu;
var $index;
// +--------------------------------------------------------------------------------------------------+
// LE CONSTRUCTEUR DE LA CLASSE
/**
* Constructeur Carto_Couleur()
*
* Constructeur initialisant les attributs de la classe Carto_Couleur().
*/
function Carto_Couleur($id_zone, $rouge, $vert, $bleu)
{
$this->id_zone = $id_zone;
$this->rouge = $rouge;
$this->vert = $vert;
$this->bleu = $bleu;
$this->index = -1;
}
// +--------------------------------------------------------------------------------------------------+
// LES METHODES PUBLIQUES
/**
* La fonction array couleur_hexadecimalAuRgb(string color) renvoie des valeurs de couleur en RGB.
*
*Cette fonction prend une valeur de couleur codée en hexadécimal et retourne
*les valeurs RGB correspondantes sous forme de tableau.
*Exemple d'utilisation:
*$rgb = couleur_hexadecimalAuRgb("fffc49");
*echo "<br>couleur_hexadecimalAuRgb de 'fffc49' : ".$rgb['R']." ".$rgb['V']." ".$rgb['B'];
*
*@author iubito <sylvain_machefert@yahoo.fr>
*@copyright iubito - http://iubito.free.fr/ - 2003
*
*@param string $couleur représente une couleur codée en héxadécimal.
*
*@return array tableau associatif contenant les 3 valeurs RGB, avec clé du rouge 'R',
* du vert 'V' et enfin du bleu 'B'.
*/
function couleur_hexadecimalAuRgb($couleur_html)
{
//gestion du #...
if (substr($couleur_html, 0, 1) == "#") {
$couleur_html = substr($couleur_html, 1, 6);
}
$tablo_rgb['R'] = hexdec(substr($couleur_html, 0, 2));
$tablo_rgb['V'] = hexdec(substr($couleur_html, 2, 2));
$tablo_rgb['B'] = hexdec(substr($couleur_html, 4, 2));
return $tablo_rgb;
}
/**
* La fonction string couleur_rgbAuHexadecimal(array tablo) renvoie la valeur d'une
*couleur en héxadécimal.
*
*Cette fonction prend un tableau de valeurs d'une couleur codées en RGB et retourne
*la valeur hexadécimal correspondante sous forme de chaîne.
*C'est la réciproque exacte de la fonction couleur_hexadecimalAuRgb.
*
*@author iubito <sylvain_machefert@yahoo.fr>
*@copyright iubito - http://iubito.free.fr/ - 2003
*
*@param array $tablo_RGB représente un tableau associatif avec les valeurs RGB
*d'une couleur.Les trois clés du tableau sont : R pour rouge, V pour vert et B pour bleu.
*
*@return string chaîne contenant la valeur de la couleur sous forme héxadécimale.
*/
function couleur_rgbAuHexadecimal($tablo_rgb)
{
//Vérification des bornes...
foreach($tablo_rgb as $cle => $valeur) {
$tablo_rgb[$cle] = bornes($tablo_rgb[$cle],0,255);
}
//Le str_pad permet de remplir avec des 0
//parce que sinon couleur_rgbAuHexadecimal(array(0,255,255)) retournerai #0ffff<=manque un 0 !
return "#".str_pad(dechex(($tablo_rgb['R']<<16)|($tablo_rgb['V']<<8)|$tablo_rgb['B']),6,"0",STR_PAD_LEFT);
}
/**
* La fonction int couleur_bornerNbre(int nb, int min, int max) borne des nombres.
*
*Cette fonction permet de borner la valeur d'un nombre entre un minimum $mini et
*un maximum $maxi.
*
*@author iubito <sylvain_machefert@yahoo.fr>
*@copyright iubito - http://iubito.free.fr/ - 2003
*
*@param integer $nbre le nombre à borner.
*@param integer $mini la borne minimum.
*@param integer $maxi la borne maximum.
*
*@return integer le nombre limité aux bornes si nécessaire.
*/
function couleur_bornerNbre($nbre, $mini, $maxi)
{
if ($nbre < $mini) {
$nbre = $mini;
}
if ($nbre > $maxi) {
$nbre = $maxi;
}
return $nbre;
}
}//Fin de la classe Carto_Couleur
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/02/28 15:03:49 jpm
* Ajout des fichiers de la bibliothèque cartographique.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/bibliotheque/cartographie/cartes/namerique.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/namerique.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/monde5c.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/monde5c.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/samerique.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/samerique.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/afrique.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/afrique.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/asie_masque.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/asie_masque.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/france.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/france.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/europe.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/europe.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/namerique_masque.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/namerique_masque.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/oceanie.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/oceanie.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/monde_masque5c.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/monde_masque5c.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/samerique_masque.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/samerique_masque.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/afrique_masque.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/afrique_masque.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/moyenorient.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/moyenorient.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/france_masque.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/france_masque.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/europe_masque.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/europe_masque.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/oceanie_masque.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/oceanie_masque.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/asie.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/asie.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/cartographie/cartes/moyenorient_masque.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/bibliotheque/cartographie/cartes/moyenorient_masque.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/bibliotheque/bb_commun.fonct.php
New file
0,0 → 1,171
<?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_commun.fonct.php,v 1.3 2007-02-14 11:37:50 jp_milcent Exp $
/**
* Fonctions communes aux applications de Biblio Bota.
*
* Contient des fonctions communes aux applications de Biblio Bota.
*
*@package BiblioBota
*@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: 2007-02-14 11:37:50 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
// string check_if_modif($table)
// vérifie dans la table des modifications si une donnée
// est sujette à modifications
// entrées :
// - string $table : nom de la table des modifs
// - string $field_src : nom du champ source
// - string $fiche_id : identifiant de la fiche
// sortie :
function check_if_modif($table, $tbl_src, $fiche_id)
{
$query = 'SELECT * '.
'FROM '.$table.' '.
'WHERE B_MOD_TABLESRC = "'.$tbl_src.'" '.
'AND B_MOD_FICHESRC = "'.$fiche_id.'"';
$resu = mysql_query($query) or die ("<B>Erreur !!!</B> : la vérification des modifications a échoué... $query");
$nb_resu = mysql_num_rows($resu);
mysql_free_result($resu);
return $nb_resu;
}
/**
* La fonction remplaceEntiteHTLM() remplace des caractères par les entités html.
*
* Cette fonction retourne un texte dans lequel touts les caractères correspondant
* à des entités html sont remplacés par la valeur de l'entité, à l'exception
* des caractères <, >, & et ".
* Cela permet de remplacer toutes les entités dans une chaine contenant du html.
*
*@param string la chaîne html à parsser.
*@return string contient la chaîne html avec les entités intégrées.
*/
function remplaceEntiteHTLM($texte)
{
$texte_retour = '';
$tab_entites = get_html_translation_table(HTML_ENTITIES);
unset($tab_entites['"']);
unset($tab_entites['<']);
unset($tab_entites['>']);
unset($tab_entites['&']);
$tab_entites[' & '] = ' &amp; ';
return strtr($texte, $tab_entites);
}
 
/**
* Fonction fournissant une date au format français depuis une date Mysql
*
* @param string la date au format Mysql
* @return string la date au format français
*/
function donnerDateConviviale($chaine)
{
if (preg_match('/^(\d{4})-(\d{2})$/',$chaine, $match)) {
$annee = $match[1];
$mois = $match[2];
switch ($mois) {
case '00' :
$mois_sortie = '';
break;
case '01' :
$mois_sortie = 'janvier';
break;
case '02' :
$mois_sortie = 'février';
break;
case '03' :
$mois_sortie = 'mars';
break;
case '04' :
$mois_sortie = 'avril';
break;
case '05' :
$mois_sortie = 'mai';
break;
case '06' :
$mois_sortie = 'juin';
break;
case '07' :
$mois_sortie = 'juillet';
break;
case '08' :
$mois_sortie = 'août';
break;
case '09' :
$mois_sortie = 'septembre';
break;
case '10' :
$mois_sortie = 'octobre';
break;
case '11' :
$mois_sortie = 'novembre';
break;
case '12' :
$mois_sortie = 'décembre';
break;
}
if ($mois_sortie != '') {
return $mois_sortie.' '.$annee;
} else {
return $annee;
}
} else {
return '?';
}
}
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2007/02/13 17:40:22 jp_milcent
* Ajout d'une fonction pour formater de manière conviviale les dates Mysql.
*
* 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.2 2005/05/17 10:10:08 jpm
* Correction des bogues avant mise en ligne du site v4.
*
* Revision 1.1 2004/09/14 11:12:50 jpm
* Ajout des fonctions communes aux applications de BiblioBota.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/biblio_bota_synthese.php
New file
0,0 → 1,74
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BB-Synthèse. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: biblio_bota_synthese.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Redirection vers BiblioBota - Synthèse.
*
* Fichier permettant d'ajouter l'application Synthèse dans le gestionnaire d'application de Papyrus.
* L'utilisation de ce fichier évite de devoir passer des arguments à l'application Biblio Bota dans le gestionnaire
* de menu de Papyrus.
*
*@package BiblioBota-Synthese
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Nous spécifions l'application à appeler.
if (!isset($_REQUEST['appli'])) {
$_REQUEST['appli'] = 'bb_synthese';
}
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier principal de Biblio Bota.*/
require_once 'biblio_bota.php';
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/03/01 15:17:55 jpm
* Ajout d'un test sur la variable $_REQUEST.
*
* Revision 1.1 2005/02/24 19:47:29 jpm
* Ajout de fichier de redirection vers les sous-applications.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/biblio_bota_article.php
New file
0,0 → 1,75
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BiblioBota - Consultation. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: biblio_bota_article.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Redirection vers BiblioBota - Consultation variante : article.
*
* Fichier permettant d'ajouter la variante article de l'application Consultation dans le gestionnaire
* d'application de Papyrus.
* L'utilisation de ce fichier évite de devoir passer des arguments à l'application Biblio Bota dans le gestionnaire
* de menu de Papyrus.
*
*@package BiblioBota-Consultation
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Nous spécifions l'application à appeler.
if (!isset($_REQUEST['appli'])) {
$_REQUEST['appli'] = 'bb_consultation';
}
$GLOBALS['_GEN_commun']['info_application']->objet = 'media';
$GLOBALS['_GEN_commun']['info_application']->regroupement = 'article';
$GLOBALS['_GEN_commun']['info_application']->titre = 'articles';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier principal de Biblio Bota.*/
require_once 'biblio_bota.php';
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/01 17:36:53 jpm
* Ajout des fichiers de parametrage rapide d'application pour Papyrus.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/langues/bb_langue_fr.inc.php
New file
0,0 → 1,62
<?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_langue_fr.inc.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Définition des valeurs des constantes contenant les textes de l'application.
*
* Ce fichier permet de stocker les traductions en français de textes communs à plusieurs applications de
* Biblio Bota.
*
*@package BiblioBota
*@subpackage Langues
//Auteur original :
*@author Jean-Pascal MILENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// +------------------------------------------------------------------------------------------------------+
// Définition des Labels Moteurs Biblio Botanica : à transformer en constante !
$label_bbota['bool_separe'] = 'mots séparés'; /* terme label des moteurs de recherche */
$label_bbota['bool_exacte'] = 'expression exacte'; /* terme label des moteurs de recherche */
$label_bbota['all_typstr'] = 'tous'; /* terme label des moteurs de recherche */
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/02/24 18:34:15 jpm
* Modification des commentaires.
*
* Revision 1.1 2004/09/16 12:08:22 jpm
* Ajout d'un fichier devant contenir les traductions des textes de l'application.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/presentations/styles/bb_standard.css
New file
0,0 → 1,147
/* Positionnement du contenu de l'application Biblio Bota*/
 
/* ------------------------------------------------------------------------------------------------------------ */
/* Décoration générale devant être intégré dans Papyrus */
 
/* Styles du fragmenteur */
#frag_nbre_resultat, #frag_navigation {
text-align: center;
}
/* Message d'erreur */
.erreur {
color: red;
}
/* Texte d'un champ d'une fichie */
.champ_cle {
font-weight: bold;
}
/* Texte d'une valeur d'un champ d'une fichie*/
.champ_valeur {
font-weight: normal;
}
/* Le texte moins voyant */
.texte_inactif {
font-family: Arial;
font-size: 10px;
text-decoration: none;
color: gray;
}
/* ------------------------------------------------------------------------------------------------------------ */
/* Nouveaux styles de Biblio Bota */
 
/* L'image precedent de la navigation avancée */
.bb_img_precedent {
border: 0px;
width: 18px;
height: 15px;
}
/* L'image représentant un icone pour les liens web */
.bb_img_web {
border: 0px;
width: 16px;
height: 16px;
}
/* Les images représentant un icone de 16px par 16px */
.bb_img_icone {
border: 0px;
width: 16px;
height: 16px;
vertical-align: top;
}
/* Les images représentant un icone de 18px par 15px */
.bb_img_icone_large {
border: 0px;
width: 18px;
height: 15px;
vertical-align: top;
}
/* L'image représentant un site partenaire */
.bb_img_partenaire {
border: 0px;
width: 84px;
height: 12px;
vertical-align: middle;
}
/* L'image représentant un site reference */
.bb_img_reference {
border: 0px;
width: 84px;
height: 12px;
vertical-align: middle;
}
/* L'image représentant un document epuisé */
.bb_img_epuise {
border: 0px;
width: 40px;
height: 12px;
vertical-align: middle;
}
 
/* Image illustrant les structures, périodiques... */
.bb_img_structure, .bb_img_periodique, .bb_img_fascicule, .bb_img_article, .bb_img_livre, .bb_img_media {
border: 0px;
margin: 1em;
float: right;
}
#bb_liste_article li, #bb_liste_livre li, #bb_liste_media li {
clear:both;
}
/* Contient la navigation avancée */
.bb_navigation {
padding:5px;
text-align: left;
vertical-align: middle;
}
.bb_navigation, .bb_navigation a {
background-color: #E0DC37;}
#bb_liste_periodique .bb_navigation,#bb_liste_periodique .bb_navigation a {
background-color: transparent;}
/* Texte normal */
.bb_txt_normal {
font-weight: normal;
}
/* Texte centré */
.bb_txt_centre {
text-align: center;
}
/* Texte trouvé par le moteur de recherche */
.bb_txt_trouve {
background-color: yellow;
}
 
/* Pour aligner à droite un contenu */
.bb_aligner_droite {
text-align: right;
width: 65%;
}
/* Suppression des puces devant les listes des moteurs de recherche */
#bb_moteur_media ul, #bb_moteur_lien ul, #bb_moteur_structure ul {
list-style-type: none;
}
 
/* Identifiant du moteur de recherche des médias (livres et articles)*/
#bb_moteur_media ul li {
padding: 3px;
}
/* Identifiant du moteur de recherche des liens (sites web)*/
#bb_moteur_lien ul li {
padding: 3px;
}
/* Identifiant du moteur de recherche des structures (organismes)*/
#bb_moteur_structure ul li {
padding: 3px;
}
/* Affichage de la navigation avancée à côté du titre du périodique dans la liste des périodiques en consultation avancée */
#bb_liste_periodique h3 {
display: inline;
}
#bb_liste_periodique .bb_navigation {
display: inline;
}
 
/* Séparateur horizontal */
.bb_separateur_horizontal {
height: 1px;
width: 100%;
color: gray;
}
/tags/2015_03_02/presentations/images/bb_supprimer.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/bb_supprimer.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/bb_ajouter.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/bb_ajouter.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/navigation/bb_premier.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/navigation/bb_premier.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/navigation/bb_dernier.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/navigation/bb_dernier.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/navigation/bb_precedent.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/navigation/bb_precedent.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/navigation/bb_suivant.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/navigation/bb_suivant.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/statistique/graph_biblio_article.php
New file
0,0 → 1,192
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Biblio Bota. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: graph_biblio_article.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Image créée en php sur les statistiques de BiblioBota.
*
* Réalise un graphique correspondant au nombre d'intérogation d'articles.
*
*@package BiblioBota
*@package Statistique
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier de configuration spécifique à l'installation de Papyrus.*/
require_once '../../../../../papyrus/configuration/pap_config_avancee.inc.php';
/** Inclusion du fichier de configuration de Papyrus.*/
require_once '../../../../../papyrus/configuration/pap_config.inc.php';
/** Inclusion du fichier de configuration de la base de données de BiblioBota.*/
require_once '../../../configuration/bb_config_bdd.inc.php';
/** Inclusion du fichier de configuration général de BiblioBota.*/
require_once '../../../configuration/bb_config.inc.php';
 
/** Inclusion d'un fichier de l'API JPGraph. */
include_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_JPGRAPH.'jpgraph.php';
/** Inclusion d'un fichier de l'API JPGraph. */
include_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_JPGRAPH.'jpgraph_line.php';
/** Inclusion d'un fichier de l'API JPGraph. */
include_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_JPGRAPH.'jpgraph_bar.php';
/** Inclusion de la classe PEAR d'abstraction de base de donnée. */
include_once 'DB.php';
/** Inclusion de l'API Débogage du sql */
require_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_DEBOGAGE.'BOG_sql.fonct.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
$tab_mois_fr = array('Jan','Fev','Mar','Avr','Mai','Juin','Juil','Aout','Sep','Oct','Nov','Déc');
 
// +------------------------------------------------------------------------------------------------------+
// Connexion à la base de données.
$GLOBALS['db'] = DB::connect(BB_DSN) ;
if (DB::isError($GLOBALS['db'])) {
$msg_erreur_connection = 'Impossible de se connecter à la base de données.';
die(BOG_afficherErreurSql(__FILE__, __LINE__, $GLOBALS['db']->getMessage(), 'connexion à la base de données',$msg_erreur_connection));
}
 
$graph_donnees_article = array();
$graph_donnees_total = array();
$graph_etiquette_axeX = array();
 
$requete = 'SELECT min(B_SPY_DATE) as min, max(B_SPY_DATE) as max '.
'FROM biblio_spy';
$resultat =& $GLOBALS['db']->query($requete);
if (DB::isError($resultat)) {
die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete));
}
while ($ligne =& $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
$tps_unix_fin = $ligne->max;
$tps_unix_debut = $ligne->min;
}
$resultat->free();
 
$i = 0;
 
//Recherche du nombre d'intérogation par mois
while ($tps_unix_debut <= $tps_unix_fin) {
$nbre_recherche_article = 0;
$nbre_recherche_article_plugin = 0;
$nbre_recherche_total = 0;
$annee_debut = date('Y', $tps_unix_debut);
//echo $annee_debut;
$mois_debut = date('n', $tps_unix_debut);
//echo $mois_debut;
if($mois_debut == 12) {
$annee_fin_mois = $annee_debut+1;
$mois_fin_mois = 1;
} else {
$annee_fin_mois = $annee_debut;
$mois_fin_mois = $mois_debut+1;
}
$tps_unix_fin_mois = mktime(0, 0, 0, $mois_fin_mois, 0, $annee_fin_mois);
$requete = 'SELECT b_spy_doc, b_spy_moteur '.
'FROM biblio_spy '.
'WHERE b_spy_date >= "'.$tps_unix_debut.'" '.
'AND b_spy_date <= "'.$tps_unix_fin_mois.'"';
$resultat =& $GLOBALS['db']->query($requete);
//echo $requete;
if (DB::isError($resultat)) {
die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete));
}
while ($ligne =& $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
if ($ligne->b_spy_moteur == 'media' && $ligne->b_spy_doc == 'bibliographie_article') {
$nbre_recherche_article++;
} elseif ($ligne->b_spy_moteur == 'media' && strstr($ligne->b_spy_doc, 'biblio-plug')) {
$nbre_recherche_article_plugin++;
}
else {
$nbre_recherche_total++;
}
}
$nbre_recherche_total = $nbre_recherche_article + $nbre_recherche_article_plugin + $nbre_recherche_total;
$graph_donnees_total[$i] = $nbre_recherche_total;
$graph_donnees_article[$i] = $nbre_recherche_article + $nbre_recherche_article_plugin;
$graph_etiquette_axeX[$i] = $tab_mois_fr[($mois_debut-1)].' '.$annee_debut;
$i++;
$resultat->free();
$tps_unix_debut = mktime(0, 0, 0, $mois_fin_mois, 1, $annee_fin_mois);
}
 
$donnees_article = array_values($graph_donnees_article);
$donnees_total = array_values($graph_donnees_total);
 
// Création de la structure du graph
$graph = new Graph(500,400,'auto');
$graph->SetMarginColor('white');
$graph->img->SetMargin(50,30,30,70);
$graph->SetScale('textint');
$graph->SetShadow();//Ombre du graph
 
// Définition du titre du graph
$graph->title->Set('Evolution du nombre de recherche d\'articles');
$graph->title->SetFont(FF_FONT1,FS_BOLD);
 
// Définition de l'axe X
// Un angle autre que 0 ou 90° ne marche pas car les polices TTF ne sont pas supportée par Sequoia
$graph->xaxis->SetTickLabels($graph_etiquette_axeX);
$graph->xaxis->SetFont(FF_FONT1,FS_NORMAL,11);
$graph->xaxis->SetLabelAngle(90);
 
// Affichage du tracé numéro 1 : organisme
$trace_01 = new LinePlot($donnees_article);
$trace_01->SetColor('brown');
//$trace_01->mark->SetType(MARK_DIAMOND);
//$trace_01->mark->SetColor('brown');
//$trace_01->value->Show();
//$trace_01->value->SetFormat('%u');
$graph->Add($trace_01);
 
// Définition de la légende
$trace_01->SetLegend ('nombre recherches articles');
$graph ->legend->Pos(0.15, 0.15, 'left', 'center');
 
// Envoi du graph au navigateur sous forme d'image.
$graph->Stroke();
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/01 17:43:05 jpm
* Ajout des fichiers fournissant des graphiques sur les statistiques de consultation de Biblio Bota.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/presentations/images/statistique/graph_biblio_organisme.php
New file
0,0 → 1,187
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Biblio Bota. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: graph_biblio_organisme.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Image créée en php sur les statistiques de BiblioBota.
*
* Réalise un graphique correspondant au nombre d'intérogation d'organismes.
*
*@package BiblioBota
*@package statistique
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier de configuration spécifique à l'installation de Papyrus.*/
require_once '../../../../../papyrus/configuration/pap_config_avancee.inc.php';
/** Inclusion du fichier de configuration de Papyrus.*/
require_once '../../../../../papyrus/configuration/pap_config.inc.php';
/** Inclusion du fichier de configuration de la base de données de BiblioBota.*/
require_once '../../../configuration/bb_config_bdd.inc.php';
/** Inclusion du fichier de configuration général de BiblioBota.*/
require_once '../../../configuration/bb_config.inc.php';
 
/** Inclusion d'un fichier de l'API JPGraph. */
include_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_JPGRAPH.'jpgraph.php';
/** Inclusion d'un fichier de l'API JPGraph. */
include_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_JPGRAPH.'jpgraph_line.php';
/** Inclusion d'un fichier de l'API JPGraph. */
include_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_JPGRAPH.'jpgraph_bar.php';
/** Inclusion de la classe PEAR d'abstraction de base de donnée. */
include_once 'DB.php';
/** Inclusion de l'API Débogage du sql */
require_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_DEBOGAGE.'BOG_sql.fonct.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
$tab_mois_fr = array('Jan','Fev','Mar','Avr','Mai','Juin','Juil','Aout','Sep','Oct','Nov','Déc');
 
// +------------------------------------------------------------------------------------------------------+
// Connexion à la base de données.
$GLOBALS['db'] = DB::connect(BB_DSN) ;
if (DB::isError($GLOBALS['db'])) {
$msg_erreur_connection = 'Impossible de se connecter à la base de données.';
die(BOG_afficherErreurSql(__FILE__, __LINE__, $GLOBALS['db']->getMessage(), 'connexion à la base de données',$msg_erreur_connection));
}
 
$graph_donnees_organisme = array();
$graph_donnees_total = array();
$graph_etiquette_axeX = array();
 
$requete = 'SELECT min(B_SPY_DATE) as min, max(B_SPY_DATE) as max '.
'FROM biblio_spy';
$resultat =& $GLOBALS['db']->query($requete);
if (DB::isError($resultat)) {
die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete));
}
while ($ligne =& $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
$tps_unix_fin = $ligne->max;
$tps_unix_debut = $ligne->min;
}
$resultat->free();
 
$i = 0;
 
//Recherche du nombre d'intérogation par mois
while ($tps_unix_debut <= $tps_unix_fin) {
$nbre_recherche_organisme = 0;
$nbre_recherche_total = 0;
$annee_debut = date('Y', $tps_unix_debut);
//echo $annee_debut;
$mois_debut = date('n', $tps_unix_debut);
//echo $mois_debut;
if($mois_debut == 12) {
$annee_fin_mois = $annee_debut+1;
$mois_fin_mois = 1;
} else {
$annee_fin_mois = $annee_debut;
$mois_fin_mois = $mois_debut+1;
}
$tps_unix_fin_mois = mktime(0, 0, 0, $mois_fin_mois, 0, $annee_fin_mois);
$requete = 'SELECT b_spy_moteur '.
'FROM biblio_spy '.
'WHERE b_spy_date >= "'.$tps_unix_debut.'" '.
'AND b_spy_date <= "'.$tps_unix_fin_mois.'"';
$resultat =& $GLOBALS['db']->query($requete);
//echo $requete;
if (DB::isError($resultat)) {
die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete));
}
while ($ligne =& $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
if ($ligne->b_spy_moteur == 'str') {
$nbre_recherche_organisme++;
} else {
$nbre_recherche_total++;
}
}
$nbre_recherche_total = $nbre_recherche_organisme + $nbre_recherche_total;
$graph_donnees_total[$i] = $nbre_recherche_total;
$graph_donnees_organisme[$i] = $nbre_recherche_organisme;
$graph_etiquette_axeX[$i] = $tab_mois_fr[($mois_debut-1)].' '.$annee_debut;
$i++;
$resultat->free();
$tps_unix_debut = mktime(0, 0, 0, $mois_fin_mois, 1, $annee_fin_mois);
}
 
$donnees_organisme = array_values($graph_donnees_organisme);
$donnees_total = array_values($graph_donnees_total);
 
// Création de la structure du graph
$graph = new Graph(500,400,'auto');
$graph->SetMarginColor('white');
$graph->img->SetMargin(50,30,30,70);
$graph->SetScale('textint');
$graph->SetShadow();//Ombre du graph
 
// Définition du titre du graph
$graph->title->Set('Evolution du nombre de recherche d\'organisme');
$graph->title->SetFont(FF_FONT1,FS_BOLD);
 
// Définition de l'axe X
// Un angle autre que 0 ou 90° ne marche pas car les polices TTF ne sont pas supportée par Sequoia
$graph->xaxis->SetTickLabels($graph_etiquette_axeX);
$graph->xaxis->SetFont(FF_FONT1,FS_NORMAL,11);
$graph->xaxis->SetLabelAngle(90);
 
// Affichage du tracé numéro 1 : organisme
$trace_01 = new LinePlot($donnees_organisme);
$trace_01->SetColor('brown');
//$trace_01->mark->SetType(MARK_DIAMOND);
//$trace_01->mark->SetColor('brown');
//$trace_01->value->Show();
//$trace_01->value->SetFormat('%u');
$graph->Add($trace_01);
 
// Définition de la légende
$trace_01->SetLegend ('nombre recherches organismes');
$graph ->legend->Pos(0.15, 0.15, 'left', 'center');
 
// Envoi du graph au navigateur sous forme d'image.
$graph->Stroke();
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/01 17:43:05 jpm
* Ajout des fichiers fournissant des graphiques sur les statistiques de consultation de Biblio Bota.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/presentations/images/statistique/graph_biblio_site.php
New file
0,0 → 1,186
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Biblio Bota. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: graph_biblio_site.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Image créée en php sur les statistiques de BiblioBota.
*
* Réalise un graphique correspondant au nombre d'intérogation de livres.
*
*@package BiblioBota
*@package Statistique
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier de configuration spécifique à l'installation de Papyrus.*/
require_once '../../../../../papyrus/configuration/pap_config_avancee.inc.php';
/** Inclusion du fichier de configuration de Papyrus.*/
require_once '../../../../../papyrus/configuration/pap_config.inc.php';
/** Inclusion du fichier de configuration de la base de données de BiblioBota.*/
require_once '../../../configuration/bb_config_bdd.inc.php';
/** Inclusion du fichier de configuration général de BiblioBota.*/
require_once '../../../configuration/bb_config.inc.php';
 
/** Inclusion d'un fichier de l'API JPGraph. */
include_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_JPGRAPH.'jpgraph.php';
/** Inclusion d'un fichier de l'API JPGraph. */
include_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_JPGRAPH.'jpgraph_line.php';
/** Inclusion d'un fichier de l'API JPGraph. */
include_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_JPGRAPH.'jpgraph_bar.php';
/** Inclusion de la classe PEAR d'abstraction de base de donnée. */
include_once 'DB.php';
/** Inclusion de l'API Débogage du sql */
require_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_DEBOGAGE.'BOG_sql.fonct.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
$tab_mois_fr = array('Jan','Fev','Mar','Avr','Mai','Juin','Juil','Aout','Sep','Oct','Nov','Déc');
 
// +------------------------------------------------------------------------------------------------------+
// Connexion à la base de données.
$GLOBALS['db'] = DB::connect(BB_DSN) ;
if (DB::isError($GLOBALS['db'])) {
$msg_erreur_connection = 'Impossible de se connecter à la base de données.';
die(BOG_afficherErreurSql(__FILE__, __LINE__, $GLOBALS['db']->getMessage(), 'connexion à la base de données',$msg_erreur_connection));
}
 
$graph_donnees_livre = array();
$graph_donnees_total = array();
$graph_etiquette_axeX = array();
 
$requete = 'SELECT min(B_SPY_DATE) as min, max(B_SPY_DATE) as max '.
'FROM biblio_spy';
$resultat =& $GLOBALS['db']->query($requete);
if (DB::isError($resultat)) {
die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete));
}
while ($ligne =& $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
$tps_unix_fin = $ligne->max;
$tps_unix_debut = $ligne->min;
}
$resultat->free();
 
$i = 0;
 
//Recherche du nombre d'intérogation par mois
while ($tps_unix_debut <= $tps_unix_fin) {
$nbre_recherche_site = 0;
$nbre_recherche_autre = 0;
$annee_debut = date('Y', $tps_unix_debut);
//echo $annee_debut;
$mois_debut = date('n', $tps_unix_debut);
//echo $mois_debut;
if($mois_debut == 12) {
$annee_fin_mois = $annee_debut+1;
$mois_fin_mois = 1;
} else {
$annee_fin_mois = $annee_debut;
$mois_fin_mois = $mois_debut+1;
}
$tps_unix_fin_mois = mktime(0, 0, 0, $mois_fin_mois, 0, $annee_fin_mois);
$requete = 'SELECT b_spy_moteur '.
'FROM biblio_spy '.
'WHERE b_spy_date >= "'.$tps_unix_debut.'" '.
'AND b_spy_date <= "'.$tps_unix_fin_mois.'"';
$resultat =& $GLOBALS['db']->query($requete);
//echo $requete;
if (DB::isError($resultat)) {
die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete));
}
while ($ligne =& $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
if ($ligne->b_spy_moteur == 'link') {
$nbre_recherche_site++;
} else {
$nbre_recherche_autre++;
}
}
$graph_donnees_total[$i] = $nbre_recherche_site + $nbre_recherche_autre;
$graph_donnees_site[$i] = $nbre_recherche_site;
$graph_etiquette_axeX[$i] = $tab_mois_fr[($mois_debut-1)].' '.$annee_debut;
$i++;
$resultat->free();
$tps_unix_debut = mktime(0, 0, 0, $mois_fin_mois, 1, $annee_fin_mois);
}
 
$donnees_site = array_values($graph_donnees_site);
$donnees_total = array_values($graph_donnees_total);
 
// Création de la structure du graph
$graph = new Graph(500,400,'auto');
$graph->SetMarginColor('white');
$graph->img->SetMargin(50,30,30,70);
$graph->SetScale('textint');
$graph->SetShadow();//Ombre du graph
 
// Définition du titre du graph
$graph->title->Set('Evolution du nombre de recherche de sites web');
$graph->title->SetFont(FF_FONT1,FS_BOLD);
 
// Définition de l'axe X
// Un angle autre que 0 ou 90° ne marche pas car les polices TTF ne sont pas supportée par Sequoia
$graph->xaxis->SetTickLabels($graph_etiquette_axeX);
$graph->xaxis->SetFont(FF_FONT1,FS_NORMAL,11);
$graph->xaxis->SetLabelAngle(90);
 
// Affichage du tracé numéro 1 : organisme
$trace_01 = new LinePlot($donnees_site);
$trace_01->SetColor('brown');
//$trace_01->mark->SetType(MARK_DIAMOND);
//$trace_01->mark->SetColor('brown');
//$trace_01->value->Show();
//$trace_01->value->SetFormat('%u');
$graph->Add($trace_01);
 
// Définition de la légende
$trace_01->SetLegend ('nombre recherches sites');
$graph ->legend->Pos(0.15, 0.15, 'left', 'center');
 
// Envoi du graph au navigateur sous forme d'image.
$graph->Stroke();
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/01 17:43:05 jpm
* Ajout des fichiers fournissant des graphiques sur les statistiques de consultation de Biblio Bota.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/presentations/images/statistique/graph_biblio_ouvrage.php
New file
0,0 → 1,186
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Biblio Bota. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: graph_biblio_ouvrage.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Image créée en php sur les statistiques de BiblioBota.
*
* Réalise un graphique correspondant au nombre d'intérogation de livres.
*
*@package BiblioBota
*@package Statistique
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier de configuration spécifique à l'installation de Papyrus.*/
require_once '../../../../../papyrus/configuration/pap_config_avancee.inc.php';
/** Inclusion du fichier de configuration de Papyrus.*/
require_once '../../../../../papyrus/configuration/pap_config.inc.php';
/** Inclusion du fichier de configuration de la base de données de BiblioBota.*/
require_once '../../../configuration/bb_config_bdd.inc.php';
/** Inclusion du fichier de configuration général de BiblioBota.*/
require_once '../../../configuration/bb_config.inc.php';
 
/** Inclusion d'un fichier de l'API JPGraph. */
include_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_JPGRAPH.'jpgraph.php';
/** Inclusion d'un fichier de l'API JPGraph. */
include_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_JPGRAPH.'jpgraph_line.php';
/** Inclusion d'un fichier de l'API JPGraph. */
include_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_JPGRAPH.'jpgraph_bar.php';
/** Inclusion de la classe PEAR d'abstraction de base de donnée. */
include_once 'DB.php';
/** Inclusion de l'API Débogage du sql */
require_once PAP_CHEMIN_RACINE.BB_CHEMIN_API_DEBOGAGE.'BOG_sql.fonct.php';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
$tab_mois_fr = array('Jan','Fev','Mar','Avr','Mai','Juin','Juil','Aout','Sep','Oct','Nov','Déc');
 
// +------------------------------------------------------------------------------------------------------+
// Connexion à la base de données.
$GLOBALS['db'] = DB::connect(BB_DSN) ;
if (DB::isError($GLOBALS['db'])) {
$msg_erreur_connection = 'Impossible de se connecter à la base de données.';
die(BOG_afficherErreurSql(__FILE__, __LINE__, $GLOBALS['db']->getMessage(), 'connexion à la base de données',$msg_erreur_connection));
}
 
$graph_donnees_livre = array();
$graph_donnees_total = array();
$graph_etiquette_axeX = array();
 
$requete = 'SELECT min(B_SPY_DATE) as min, max(B_SPY_DATE) as max '.
'FROM biblio_spy';
$resultat =& $GLOBALS['db']->query($requete);
if (DB::isError($resultat)) {
die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete));
}
while ($ligne =& $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
$tps_unix_fin = $ligne->max;
$tps_unix_debut = $ligne->min;
}
$resultat->free();
 
$i = 0;
 
//Recherche du nombre d'intérogation par mois
while ($tps_unix_debut <= $tps_unix_fin) {
$nbre_recherche_livre = 0;
$nbre_recherche_autre = 0;
$annee_debut = date('Y', $tps_unix_debut);
//echo $annee_debut;
$mois_debut = date('n', $tps_unix_debut);
//echo $mois_debut;
if($mois_debut == 12) {
$annee_fin_mois = $annee_debut+1;
$mois_fin_mois = 1;
} else {
$annee_fin_mois = $annee_debut;
$mois_fin_mois = $mois_debut+1;
}
$tps_unix_fin_mois = mktime(0, 0, 0, $mois_fin_mois, 0, $annee_fin_mois);
$requete = 'SELECT b_spy_doc, b_spy_moteur '.
'FROM biblio_spy '.
'WHERE b_spy_date >= "'.$tps_unix_debut.'" '.
'AND b_spy_date <= "'.$tps_unix_fin_mois.'"';
$resultat =& $GLOBALS['db']->query($requete);
//echo $requete;
if (DB::isError($resultat)) {
die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete));
}
while ($ligne =& $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
if ($ligne->b_spy_moteur == 'media' && $ligne->b_spy_doc == 'bibliographie_livres') {
$nbre_recherche_livre++;
} else {
$nbre_recherche_autre++;
}
}
$graph_donnees_total[$i] = $nbre_recherche_livre + $nbre_recherche_autre;
$graph_donnees_livre[$i] = $nbre_recherche_livre;
$graph_etiquette_axeX[$i] = $tab_mois_fr[($mois_debut-1)].' '.$annee_debut;
$i++;
$resultat->free();
$tps_unix_debut = mktime(0, 0, 0, $mois_fin_mois, 1, $annee_fin_mois);
}
 
$donnees_livre = array_values($graph_donnees_livre);
$donnees_total = array_values($graph_donnees_total);
 
// Création de la structure du graph
$graph = new Graph(500,400,'auto');
$graph->SetMarginColor('white');
$graph->img->SetMargin(50,30,30,70);
$graph->SetScale('textint');
$graph->SetShadow();//Ombre du graph
 
// Définition du titre du graph
$graph->title->Set('Evolution du nombre de recherche de livres');
$graph->title->SetFont(FF_FONT1,FS_BOLD);
 
// Définition de l'axe X
// Un angle autre que 0 ou 90° ne marche pas car les polices TTF ne sont pas supportée par Sequoia
$graph->xaxis->SetTickLabels($graph_etiquette_axeX);
$graph->xaxis->SetFont(FF_FONT1,FS_NORMAL,11);
$graph->xaxis->SetLabelAngle(90);
 
// Affichage du tracé numéro 1 : organisme
$trace_01 = new LinePlot($donnees_livre);
$trace_01->SetColor('brown');
//$trace_01->mark->SetType(MARK_DIAMOND);
//$trace_01->mark->SetColor('brown');
//$trace_01->value->Show();
//$trace_01->value->SetFormat('%u');
$graph->Add($trace_01);
 
// Définition de la légende
$trace_01->SetLegend ('nombre recherches livres');
$graph ->legend->Pos(0.15, 0.15, 'left', 'center');
 
// Envoi du graph au navigateur sous forme d'image.
$graph->Stroke();
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/01 17:43:05 jpm
* Ajout des fichiers fournissant des graphiques sur les statistiques de consultation de Biblio Bota.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/presentations/images/bb_epuise.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/bb_epuise.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/bb_partenaire.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/bb_partenaire.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/bb_fascicule.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/bb_fascicule.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/bb_modifier.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/bb_modifier.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/bb_reference.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/bb_reference.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/type_logique/bb_logiciel.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/type_logique/bb_logiciel.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/type_logique/bb_texte.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/type_logique/bb_texte.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/type_logique/bb_multimedia.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/type_logique/bb_multimedia.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/type_logique/bb_sgbd.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/type_logique/bb_sgbd.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/type_logique/bb_son.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/type_logique/bb_son.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/type_physique/bb_disquette.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/type_physique/bb_disquette.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/type_physique/bb_livre.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/type_physique/bb_livre.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/type_physique/bb_cd.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/type_physique/bb_cd.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/presentations/images/type_physique/bb_periodique.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/2015_03_02/presentations/images/type_physique/bb_periodique.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/2015_03_02/biblio_bota_organisme.php
New file
0,0 → 1,74
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BiblioBota - Consultation. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: biblio_bota_organisme.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Redirection vers BiblioBota - Consultatuib variante : organisme.
*
* Fichier permettant d'ajouter la variante organisme de l'application Consultation dans le gestionnaire
* d'application de Papyrus.
* L'utilisation de ce fichier évite de devoir passer des arguments à l'application Biblio Bota dans le gestionnaire
* de menu de Papyrus.
*
*@package BiblioBota-Consultation
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Nous spécifions l'application à appeler.
if (!isset($_REQUEST['appli'])) {
$_REQUEST['appli'] = 'bb_consultation';
}
$GLOBALS['_GEN_commun']['info_application']->objet = 'structure';
$GLOBALS['_GEN_commun']['info_application']->titre = 'des_structures';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier principal de Biblio Bota.*/
require_once 'biblio_bota.php';
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/01 15:17:36 jpm
* Ajout des fichiers de parametrage rapide des application Organismes.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/biblio_bota_site.php
New file
0,0 → 1,74
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BiblioBota - Consultation. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: biblio_bota_site.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Redirection vers BiblioBota - Consultation variante : site.
*
* Fichier permettant d'ajouter la variante site de l'application Consultation dans le gestionnaire
* d'application de Papyrus.
* L'utilisation de ce fichier évite de devoir passer des arguments à l'application Biblio Bota dans le gestionnaire
* de menu de Papyrus.
*
*@package BiblioBota-Consultation
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Nous spécifions l'application à appeler.
if (!isset($_REQUEST['appli'])) {
$_REQUEST['appli'] = 'bb_consultation';
}
$GLOBALS['_GEN_commun']['info_application']->objet = 'lien';
$GLOBALS['_GEN_commun']['info_application']->titre = 'des_sites_web';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier principal de Biblio Bota.*/
require_once 'biblio_bota.php';
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/01 17:36:53 jpm
* Ajout des fichiers de parametrage rapide d'application pour Papyrus.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/biblio_bota_revue.php
New file
0,0 → 1,62
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 5.1.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of eFlore. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id$
/**
* Titre
*
* Description
*
*@package eFlore
*@subpackage ef_fiche
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author aucun
*@copyright Tela-Botanica 2000-2006
*@version $Revision$ $Date$
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Nous spécifions l'application à appeler.
if (!isset($_REQUEST['appli'])) {
$_REQUEST['appli'] = 'bb_revue';
}
$GLOBALS['_GEN_commun']['info_application']->objet = 'revue';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier principal de Biblio Bota.*/
require_once 'biblio_bota.php';
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log$
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/biblio_bota_ouvrage.php
New file
0,0 → 1,75
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BiblioBota - Consultation. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: biblio_bota_ouvrage.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Redirection vers BiblioBota - Consultation variante : ouvrage.
*
* Fichier permettant d'ajouter la variante ouvrage de l'application Consultation dans le gestionnaire
* d'application de Papyrus.
* L'utilisation de ce fichier évite de devoir passer des arguments à l'application Biblio Bota dans le gestionnaire
* de menu de Papyrus.
*
*@package BiblioBota-Consultation
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Nous spécifions l'application à appeler.
if (!isset($_REQUEST['appli'])) {
$_REQUEST['appli'] = 'bb_consultation';
}
$GLOBALS['_GEN_commun']['info_application']->objet = 'media';
$GLOBALS['_GEN_commun']['info_application']->regroupement = 'media';
$GLOBALS['_GEN_commun']['info_application']->titre = 'ouvrages';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier principal de Biblio Bota.*/
require_once 'biblio_bota.php';
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/01 17:36:53 jpm
* Ajout des fichiers de parametrage rapide d'application pour Papyrus.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02/biblio_bota_partenaire.php
New file
0,0 → 1,82
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of BiblioBota - Lien Favoris. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: biblio_bota_partenaire.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
/**
* Redirection vers BiblioBota - Lien Favoris variante : Partenaire.
*
* Fichier permettant d'ajouter la variante Partenaire l'application Lien Favoris dans le gestionnaire d'application de Papyrus.
* L'utilisation de ce fichier évite de devoir passer des arguments à l'application Biblio Bota dans le gestionnaire
* de menu de Papyrus.
*
*@package BiblioBota-Partenaire
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Nous spécifions l'application à appeler.
if (!isset($_REQUEST['appli'])) {
$_REQUEST['appli'] = 'bb_lien_favoris';
}
/** Nous spécifions le paramêtre selecteur de l'application.*/
$GLOBALS['_GEN_commun']['info_application']->selecteur = 'part';
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier principal de Biblio Bota.*/
require_once 'biblio_bota.php';
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2005/03/01 15:17:55 jpm
* Ajout d'un test sur la variable $_REQUEST.
*
* Revision 1.3 2005/02/28 14:27:56 jpm
* Changement du nom de l'appli en Lien Favoris.
*
* Revision 1.2 2005/02/28 14:24:49 jpm
* Correction erreur.
*
* Revision 1.1 2005/02/24 19:47:29 jpm
* Ajout de fichier de redirection vers les sous-applications.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/2015_03_02
New file
Property changes:
Added: svn:ignore
+.buildpath
+.project