Subversion Repositories eFlore/Applications.bibliobota

Rev

Rev 8 | Rev 18 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8 Rev 9
1
<?php
1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
3
// +------------------------------------------------------------------------------------------------------+
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 5.1.1                                                                                    |
4
// | PHP version 5.1.1                                                                                    |
5
// +------------------------------------------------------------------------------------------------------+
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org)                                         |
6
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
7
// +------------------------------------------------------------------------------------------------------+
8
// | This file is part of eFlore.                                                                         |
8
// | This file is part of eFlore.                                                                         |
9
// |                                                                                                      |
9
// |                                                                                                      |
10
// | Foobar is free software; you can redistribute it and/or modify                                       |
10
// | Foobar is free software; you can redistribute it and/or modify                                       |
11
// | it under the terms of the GNU General Public License as published by                                 |
11
// | it under the terms of the GNU General Public License as published by                                 |
12
// | the Free Software Foundation; either version 2 of the License, or                                    |
12
// | the Free Software Foundation; either version 2 of the License, or                                    |
13
// | (at your option) any later version.                                                                  |
13
// | (at your option) any later version.                                                                  |
14
// |                                                                                                      |
14
// |                                                                                                      |
15
// | Foobar is distributed in the hope that it will be useful,                                            |
15
// | Foobar is distributed in the hope that it will be useful,                                            |
16
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
16
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
17
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
17
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
18
// | GNU General Public License for more details.                                                         |
18
// | GNU General Public License for more details.                                                         |
19
// |                                                                                                      |
19
// |                                                                                                      |
20
// | You should have received a copy of the GNU General Public License                                    |
20
// | You should have received a copy of the GNU General Public License                                    |
21
// | along with Foobar; if not, write to the Free Software                                                |
21
// | along with Foobar; if not, write to the Free Software                                                |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
23
// +------------------------------------------------------------------------------------------------------+
23
// +------------------------------------------------------------------------------------------------------+
24
// CVS : $Id$
24
// CVS : $Id$
25
/**
25
/**
26
* Titre
26
* Titre
27
*
27
*
28
* Description
28
* Description
29
*
29
*
30
*@package eFlore
30
*@package eFlore
31
*@subpackage ef_fiche
31
*@subpackage ef_fiche
32
//Auteur original :
32
//Auteur original :
33
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
33
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
34
//Autres auteurs :
34
//Autres auteurs :
35
*@author        aucun
35
*@author        aucun
36
*@copyright     Tela-Botanica 2000-2006
36
*@copyright     Tela-Botanica 2000-2006
37
*@version       $Revision$ $Date$
37
*@version       $Revision$ $Date$
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
*/
39
*/
40
 
40
 
41
// +------------------------------------------------------------------------------------------------------+
41
// +------------------------------------------------------------------------------------------------------+
42
// |                                            ENTETE du PROGRAMME                                       |
42
// |                                            ENTETE du PROGRAMME                                       |
43
// +------------------------------------------------------------------------------------------------------+
43
// +------------------------------------------------------------------------------------------------------+
44
/** Inclusion du fichier de configuration de l'application Revue. */
44
/** Inclusion du fichier de configuration de l'application Revue. */
45
//require_once BB_CHEMIN_APPLI.'bb_revue/configuration/bbre_config.inc.php';
45
//require_once BB_CHEMIN_APPLI.'bb_revue/configuration/bbre_config.inc.php';
46
 
46
 
47
// +------------------------------------------------------------------------------------------------------+
47
// +------------------------------------------------------------------------------------------------------+
48
// |                                            CORPS du PROGRAMME                                        |
48
// |                                            CORPS du PROGRAMME                                        |
49
// +------------------------------------------------------------------------------------------------------+
49
// +------------------------------------------------------------------------------------------------------+
50
// Initialisation de la variable à retourner
50
// Initialisation de la variable à retourner
51
$retour = '';
51
$retour = '';
52
$retour .= '<!-- BiblioBota - Revue : DEBUT -->'."\n";
52
$retour .= '<!-- BiblioBota - Revue : DEBUT -->'."\n";
53
$retour .= '<div id="biblio_revue">';
53
$retour .= '<div id="biblio_revue">';
54
// Titre de la page
54
// Titre de la page
55
$retour .= '<h1>'.'Liste des revues indexées dans la base de données du projet BiblioBota.'.'</h1>';
55
$retour .= '<h1>'.'Liste des revues indexées dans la base de données du projet BiblioBota.'.'</h1>';
56
 
56
 
57
$query_tot =	'SELECT COUNT(*) AS cpt '.
57
$query_tot =	'SELECT COUNT(*) AS cpt '.
58
				'FROM '.$GLOBALS['tbl']['collection'].' '.
58
				'FROM '.$GLOBALS['tbl']['collection'].' '.
59
				'WHERE B_C_CACHER = 0';
59
				'WHERE B_C_CACHER = 0';
60
$do_query_tot = mysql_query($query_tot) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_tot));
60
$do_query_tot = mysql_query($query_tot) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_tot));
61
$tmp_total = mysql_fetch_object($do_query_tot);
61
$tmp_total = mysql_fetch_object($do_query_tot);
62
$nb_total = $tmp_total->cpt;
62
$nb_total = $tmp_total->cpt;
63
mysql_free_result($do_query_tot);
63
mysql_free_result($do_query_tot);
64
 
64
 
65
if ($nb_total == 0) {
65
if ($nb_total == 0) {
66
	$retour .= '<p>'.'Pas encore de revues indexées...'.'</p>'."\n";
66
	$retour .= '<p>'.'Pas encore de revues indexées...'.'</p>'."\n";
67
} else {
67
} else {
68
    $query =    'SELECT '.$GLOBALS['tbl']['collection'].'.* '.
68
    $query =    'SELECT '.$GLOBALS['tbl']['collection'].'.* '.
69
                'FROM '.$GLOBALS['tbl']['collection'].' '.
69
                'FROM '.$GLOBALS['tbl']['collection'].' '.
70
                'WHERE B_C_CACHER = 0 '.
70
                'WHERE B_C_CACHER = 0 '.
71
                'ORDER BY B_C_NOMCOMPLET ';
71
                'ORDER BY B_C_NOMCOMPLET ';
72
	$do_query = mysql_query($query) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query));
72
	$do_query = mysql_query($query) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query));
73
	$nb_results = mysql_num_rows($do_query);
73
	$nb_results = mysql_num_rows($do_query);
74
	
74
	
75
	$o = 1;
75
	$o = 1;
76
	$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";
76
	$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";
77
	$retour .= '<thead><tr>'.
77
	$retour .= '<thead><tr>'.
78
			'<th>Collection</th>'.
78
			'<th>Collection</th>'.
79
			'<th>Abreviation</th>'.
-
 
80
			'<th>Date début</th>'.
79
			'<th>Date début</th>'.
81
			'<th>Date fin</th>'.
80
			'<th>Date fin</th>'.
-
 
81
			'<th title="Nombre de fascicules pour la collection, toutes séries confondues">Nombre fascicules</th>'.
82
			'<th>Périodicité</th>'.
82
			'<th>Périodicité</th>'.
83
			'<th>Contact</th>'.
83
			'<th>Contact</th>'.
84
			'<th title="Nom du dernier fascicule dans la dernière série">Dernier fascicule</th>'.
84
			'<th title="Nom du dernier fascicule dans la dernière série">Dernier fascicule</th>'.
85
			'<th title="Nombre de fascicules dans la dernière série">Nombre fascicule</th>'.
-
 
86
			'<th title="Date de mise à jour du dernier fascicule dans la dernière série">Date dernier fascicule</th>'.
85
			'<th title="Date de mise à jour du dernier fascicule dans la dernière série">Date dernier fascicule</th>'.
87
			'</tr></thead>'."\n";
86
			'</tr></thead>'."\n";
88
	while ($row = mysql_fetch_object($do_query)) {
87
	while ($row = mysql_fetch_object($do_query)) {
89
		$query_fasc =	'SELECT B_SER_SOUSTITRE, '.$GLOBALS['tbl']['fascicule'].'.* '.
88
		$query_fasc =	'SELECT '.$GLOBALS['tbl']['fascicule'].'.* '.
90
                		'FROM '.$GLOBALS['tbl']['fascicule'].' INNER JOIN '.$GLOBALS['tbl']['serie'].' ON B_F_CRAISERIE = B_SER_IDSERIE AND B_F_CRAICOLL = B_SER_CRAICOLL '.                		
89
                		'FROM '.$GLOBALS['tbl']['fascicule'].' '.                		
91
                		'WHERE  B_F_CRAICOLL = "'.$row->B_C_CRAI.'" '.
90
						'WHERE  B_F_CRAICOLL = "'.$row->B_C_CRAI.'" '.
92
                		'AND B_F_CACHER = 0 '.
91
						'AND B_F_CACHER = 0 '.
93
                		'ORDER BY B_F_CRAISERIE, B_F_NUMERO DESC';
92
						'ORDER BY B_F_CRAISERIE, B_F_NUMERO DESC';
94
		//echo $query_fasc;
93
		//echo $query_fasc;
95
		$do_query_fasc = mysql_query($query_fasc) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_fasc));
94
		$do_query_fasc = mysql_query($query_fasc) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_fasc));
96
		$aso_fasc_serie = array();
95
		$aso_fasc_serie = array();
-
 
96
		$aso_fasc = array();
97
		while ($row_fasc = mysql_fetch_object($do_query_fasc)) {
97
		while ($row_fasc = mysql_fetch_object($do_query_fasc)) {
98
			if (!isset($aso_fasc_serie[$row_fasc->B_F_CRAISERIE])) {
98
			if (!isset($aso_fasc_serie[$row_fasc->B_F_CRAISERIE])) {
99
				$aso_fasc_serie[$row_fasc->B_F_CRAISERIE]['nbre_fasc'] = 1;
99
				$aso_fasc_serie[$row_fasc->B_F_CRAISERIE] = $row_fasc->B_F_CRAISERIE;
-
 
100
				$aso_fasc['nbre_fasc'] = 1;
100
				$aso_fasc_serie[$row_fasc->B_F_CRAISERIE]['nom_fin_serie'] = $row_fasc->B_SER_SOUSTITRE;
101
				$aso_fasc['nom_fin_serie'] = $row_fasc->B_SER_SOUSTITRE;
101
				$aso_fasc_serie[$row_fasc->B_F_CRAISERIE]['nom_fin_fasc'] = $row_fasc->B_F_TITRE;
102
				$aso_fasc['nom_fin_fasc'] = $row_fasc->B_F_TITRE;
102
				$aso_fasc_serie[$row_fasc->B_F_CRAISERIE]['date_fin_fasc'] = date('d/m/Y', $row_fasc->B_F_MAJFICHE);
103
				$aso_fasc['date_fin_fasc'] = date('d/m/Y', $row_fasc->B_F_MAJFICHE);
103
			} else {
104
			} else {
104
				$aso_fasc_serie[$row_fasc->B_F_CRAISERIE]['nbre_fasc']++;
105
				$aso_fasc['nbre_fasc']++;
105
			}
106
			}
106
		}
107
		}
107
		ksort($aso_fasc_serie, SORT_DESC);
108
		ksort($aso_fasc_serie, SORT_DESC);
108
        $id = $row->B_C_CRAI;
109
        $id = $row->B_C_CRAI;
109
        $idlink = $row->B_C_IDLINK;
110
        $idlink = $row->B_C_IDLINK;
110
        $nom_complet = $row->B_C_NOMCOMPLET;
111
        $nom_complet = $row->B_C_NOMCOMPLET;
111
        $abreviation = $row->B_C_ABREGE;
112
        $abreviation = $row->B_C_ABREGE;
112
        $date_debut = $row->B_C_DATECREATION;
113
        $date_debut = $row->B_C_DATECREATION;
113
        $suite_de = $row->B_C_FAISUITE;
114
        $suite_de = $row->B_C_FAISUITE;
114
        $date_fin = $row->B_C_DATEFIN;
115
        $date_fin = $row->B_C_DATEFIN;
115
        $periodicite = $row->B_C_PERIODICITE;
116
        $periodicite = $row->B_C_PERIODICITE;
116
        $contact_nom = $row->B_C_CONTACTNOM;
117
        $contact_nom = $row->B_C_CONTACTNOM;
117
        $contact_mail = $row->B_C_CONTACTMAIL;
118
        $contact_mail = $row->B_C_CONTACTMAIL;
118
        $logo = $row->B_C_IMAGE;
119
        $logo = $row->B_C_IMAGE;
119
        $commentaires = $row->B_C_COMMENT;
120
        $commentaires = $row->B_C_COMMENT;
120
        $date_maj = $row->B_C_MAJFICHE;
121
        $date_maj = $row->B_C_MAJFICHE;
121
		$retour .= '<tbody><tr>';
122
		$retour .= '<tbody><tr>';
122
		$retour .= '<th>';
123
		$retour .= '<th>';
123
        if ($nom_complet != '') {
124
        if ($nom_complet != '') {
124
            $retour .= '<h5 class="bbre_titre">'.$nom_complet.'</h5>';
125
            $retour .= '<h5 class="bbre_titre">'.$nom_complet.'</h5>';
125
            if ($suite_de != '') {
126
            if ($suite_de != '') {
126
				$retour .= '<p><span class="bb_intitule">Fait suite à :</span> '.$suite_de.'</p>';
127
				$retour .= '<p><span class="bb_intitule">Fait suite à : </span>'.$suite_de.'</p>';
-
 
128
			}
-
 
129
			if ($abreviation != '') {
-
 
130
				$retour .= '<p><span class="bb_intitule">Abréviation : </span>'.$abreviation.'</p>';
127
			}
131
			}
128
            if ($commentaires != '') {
132
            if ($commentaires != '') {
129
            	$retour .= '<p>'.$commentaires.'</p>';
133
            	$retour .= '<p>'.$commentaires.'</p>';
130
        	}
134
        	}
131
            if ($logo != '') {
135
            if ($logo != '') {
132
            	$retour .= '<img class="bbre_couverture" src="'.BB_CHEMIN_IMAGES_ILLUSTRATION.$logo.'" alt="Couverture de la revue '.$nom_complet.'"/>';
136
            	$retour .= '<img class="bbre_couverture" src="'.BB_CHEMIN_IMAGES_ILLUSTRATION.$logo.'" alt="Couverture de la revue '.$nom_complet.'"/>';
133
        	}
137
        	}
134
        	$retour .= '<p class="texte_inactif">Id. coll. : '.$id.' - Mise à jour : '.date('d/m/Y', $date_maj).'</p>';
138
        	$retour .= '<p class="texte_inactif">Id. coll. : '.$id.' - Mise à jour : '.date('d/m/Y', $date_maj).'</p>';
135
        	
139
        	
136
        }
140
        }
137
        $retour .= '</th>';
141
        $retour .= '</th>';
138
		$retour .= '<td>';
142
		$retour .= '<td>';
139
		if ($abreviation != '') {
-
 
140
			$retour .= $abreviation;
-
 
141
		}
-
 
142
		$retour .= '</td>';
-
 
143
		$retour .= '<td>';
-
 
144
		if ($date_debut != '') {
143
		if ($date_debut != '') {
145
			$retour .= $date_debut;
144
			$retour .= $date_debut;
146
		}
145
		}
147
		$retour .= '</td>';
146
		$retour .= '</td>';
148
		$retour .= '<td>';
147
		$retour .= '<td>';
149
		if ($date_fin != '') {
148
		if ($date_fin != '') {
150
			$retour .= $date_fin;
149
			$retour .= $date_fin;
151
		}
150
		}
152
		$retour .= '</td>';
151
		$retour .= '</td>';
153
		$retour .= '<td>';
152
		$retour .= '<td>';
-
 
153
		$retour .= $aso_fasc['nbre_fasc'];
-
 
154
		$retour .= '</td>';
-
 
155
		$retour .= '<td>';
154
		if ($periodicite != '') {
156
		if ($periodicite != '') {
155
			$retour .= $periodicite;
157
			$retour .= $periodicite;
156
		}
158
		}
157
		$retour .= '</td>';
159
		$retour .= '</td>';
158
		$retour .= '<td>';
160
		$retour .= '<td>';
159
		if ($contact_nom != '') {
161
		if ($contact_nom != '') {
160
			if ($contact_mail != '') {
162
			if ($contact_mail != '') {
161
				$retour .= '<a href="mailto:'.$contact_mail.'">'.$contact_nom.'</a>';
163
				$retour .= '<a href="mailto:'.$contact_mail.'">'.$contact_nom.'</a>';
162
			} else {
164
			} else {
163
				$retour .= $contact_nom;
165
				$retour .= $contact_nom;
164
			}
166
			}
165
		}
167
		}
166
		$retour .= '</td>';
168
		$retour .= '</td>';
167
		$retour .= '<td>';
169
		$retour .= '<td>';
168
		$aso_fasc = current($aso_fasc_serie);
-
 
169
		$retour .= $aso_fasc['nom_fin_fasc'];
170
		$retour .= $aso_fasc['nom_fin_fasc'];
170
		$retour .= '</td>';
171
		$retour .= '</td>';
171
		$retour .= '<td>';
172
		$retour .= '<td>';
172
		$retour .= $aso_fasc['nbre_fasc'];
-
 
173
		$retour .= '</td>';
-
 
174
		$retour .= '<td>';
-
 
175
		$retour .= $aso_fasc['date_fin_fasc'];
173
		$retour .= $aso_fasc['date_fin_fasc'];
176
		$retour .= '</td>';
174
		$retour .= '</td>';
177
		$retour .= '</tr></tbody>'."\n";
175
		$retour .= '</tr></tbody>'."\n";
178
        $o++;
176
        $o++;
179
    }
177
    }
180
    $retour .= '</table>'."\n";
178
    $retour .= '</table>'."\n";
181
    mysql_free_result($do_query);
179
    mysql_free_result($do_query);
182
}
180
}
183
$retour .= '</div>';
181
$retour .= '</div>';
184
$retour .= '<!-- BiblioBota - Revue : FIN -->'."\n";
182
$retour .= '<!-- BiblioBota - Revue : FIN -->'."\n";
185
$sortie .= $retour;
183
$sortie .= $retour;
186
 
184
 
187
/* +--Fin du code ----------------------------------------------------------------------------------------+
185
/* +--Fin du code ----------------------------------------------------------------------------------------+
188
*
186
*
189
* $Log$
187
* $Log$
-
 
188
* Revision 1.3  2006/07/28 12:46:47  jp_milcent
-
 
189
* Début modification de l'interface de l'appli revue.
-
 
190
*
190
* Revision 1.2  2006/05/29 14:19:07  jp_milcent
191
* Revision 1.2  2006/05/29 14:19:07  jp_milcent
191
* Ajout d'une classe css à l'image de la couverture de la revue.
192
* Ajout d'une classe css à l'image de la couverture de la revue.
192
* Correction du chemin d'accés à l'image.
193
* Correction du chemin d'accés à l'image.
193
*
194
*
194
* Revision 1.1  2006/05/23 16:20:50  jp_milcent
195
* Revision 1.1  2006/05/23 16:20:50  jp_milcent
195
* Ajout de l'application affichant la liste des revues disponibles dans la base de données de BiblioBota.
196
* Ajout de l'application affichant la liste des revues disponibles dans la base de données de BiblioBota.
196
*
197
*
197
*
198
*
198
* +-- Fin du code ----------------------------------------------------------------------------------------+
199
* +-- Fin du code ----------------------------------------------------------------------------------------+
199
*/
200
*/
200
?>
201
?>