Subversion Repositories eFlore/Applications.bibliobota

Rev

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

Rev 6 Rev 8
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
// Titre de la page
54
// Titre de la page
54
$retour .= '<h1>'.'Revues'.'</h1>';
-
 
55
// Petit descriptif
-
 
56
$retour .= '<p>'.'Liste des revues indexées dans la base de données du projet BiblioBota.'.'</p>'."\n";
55
$retour .= '<h1>'.'Liste des revues indexées dans la base de données du projet BiblioBota.'.'</h1>';
57
 
56
 
58
$query_tot =	'SELECT COUNT(*) AS cpt '.
57
$query_tot =	'SELECT COUNT(*) AS cpt '.
59
				'FROM '.$GLOBALS['tbl']['collection'].' '.
58
				'FROM '.$GLOBALS['tbl']['collection'].' '.
60
				'WHERE B_C_CACHER = 0';
59
				'WHERE B_C_CACHER = 0';
61
$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));
62
$tmp_total = mysql_fetch_object($do_query_tot);
61
$tmp_total = mysql_fetch_object($do_query_tot);
63
$nb_total = $tmp_total->cpt;
62
$nb_total = $tmp_total->cpt;
64
mysql_free_result($do_query_tot);
63
mysql_free_result($do_query_tot);
65
 
64
 
66
if ($nb_total == 0) {
65
if ($nb_total == 0) {
67
	$retour .= '<p>'.'Pas encore de revues indexées...'.'</p>'."\n";
66
	$retour .= '<p>'.'Pas encore de revues indexées...'.'</p>'."\n";
68
} else {
67
} else {
69
    $query =    'SELECT '.$GLOBALS['tbl']['collection'].'.* '.
68
    $query =    'SELECT '.$GLOBALS['tbl']['collection'].'.* '.
70
                'FROM '.$GLOBALS['tbl']['collection'].' '.
69
                'FROM '.$GLOBALS['tbl']['collection'].' '.
71
                'WHERE B_C_CACHER = 0 '.
70
                'WHERE B_C_CACHER = 0 '.
72
                'ORDER BY B_C_NOMCOMPLET ';
71
                'ORDER BY B_C_NOMCOMPLET ';
73
	$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));
74
	$nb_results = mysql_num_rows($do_query);
73
	$nb_results = mysql_num_rows($do_query);
75
	
74
	
76
	$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";
77
	$retour .= '<ul>'."\n";
77
	$retour .= '<thead><tr>'.
-
 
78
			'<th>Collection</th>'.
-
 
79
			'<th>Abreviation</th>'.
-
 
80
			'<th>Date début</th>'.
-
 
81
			'<th>Date fin</th>'.
-
 
82
			'<th>Périodicité</th>'.
-
 
83
			'<th>Contact</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>'.
-
 
87
			'</tr></thead>'."\n";
78
	while ($row = mysql_fetch_object($do_query)) {
88
	while ($row = mysql_fetch_object($do_query)) {
-
 
89
		$query_fasc =	'SELECT B_SER_SOUSTITRE, '.$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 '.                		
-
 
91
                		'WHERE  B_F_CRAICOLL = "'.$row->B_C_CRAI.'" '.
-
 
92
                		'AND B_F_CACHER = 0 '.
-
 
93
                		'ORDER BY B_F_CRAISERIE, B_F_NUMERO DESC';
-
 
94
		//echo $query_fasc;
-
 
95
		$do_query_fasc = mysql_query($query_fasc) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_fasc));
-
 
96
		$aso_fasc_serie = array();
-
 
97
		while ($row_fasc = mysql_fetch_object($do_query_fasc)) {
-
 
98
			if (!isset($aso_fasc_serie[$row_fasc->B_F_CRAISERIE])) {
-
 
99
				$aso_fasc_serie[$row_fasc->B_F_CRAISERIE]['nbre_fasc'] = 1;
-
 
100
				$aso_fasc_serie[$row_fasc->B_F_CRAISERIE]['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_serie[$row_fasc->B_F_CRAISERIE]['date_fin_fasc'] = date('d/m/Y', $row_fasc->B_F_MAJFICHE);
-
 
103
			} else {
-
 
104
				$aso_fasc_serie[$row_fasc->B_F_CRAISERIE]['nbre_fasc']++;
-
 
105
			}
-
 
106
		}
-
 
107
		ksort($aso_fasc_serie, SORT_DESC);
79
        $id = $row->B_C_CRAI;
108
        $id = $row->B_C_CRAI;
80
        $idlink = $row->B_C_IDLINK;
109
        $idlink = $row->B_C_IDLINK;
81
        $nom_complet = $row->B_C_NOMCOMPLET;
110
        $nom_complet = $row->B_C_NOMCOMPLET;
82
        $abreviation = $row->B_C_ABREGE;
111
        $abreviation = $row->B_C_ABREGE;
83
        $date_debut = $row->B_C_DATECREATION;
112
        $date_debut = $row->B_C_DATECREATION;
84
        $suite_de = $row->B_C_FAISUITE;
113
        $suite_de = $row->B_C_FAISUITE;
85
        $date_fin = $row->B_C_DATEFIN;
114
        $date_fin = $row->B_C_DATEFIN;
86
        $periodicite = $row->B_C_PERIODICITE;
115
        $periodicite = $row->B_C_PERIODICITE;
87
        $contact_nom = $row->B_C_CONTACTNOM;
116
        $contact_nom = $row->B_C_CONTACTNOM;
88
        $contact_mail = $row->B_C_CONTACTMAIL;
117
        $contact_mail = $row->B_C_CONTACTMAIL;
89
        $logo = $row->B_C_IMAGE;
118
        $logo = $row->B_C_IMAGE;
90
        $commentaires = $row->B_C_COMMENT;
119
        $commentaires = $row->B_C_COMMENT;
91
        $date_maj = $row->B_C_MAJFICHE;
120
        $date_maj = $row->B_C_MAJFICHE;
-
 
121
		$retour .= '<tbody><tr>';
92
		$retour .= '<li>';
122
		$retour .= '<th>';
93
        if ($nom_complet != '') {
123
        if ($nom_complet != '') {
94
            $retour .= '<h5 class="bbre_titre">'.$nom_complet.'</h5>';
124
            $retour .= '<h5 class="bbre_titre">'.$nom_complet.'</h5>';
-
 
125
            if ($suite_de != '') {
-
 
126
				$retour .= '<p><span class="bb_intitule">Fait suite à :</span> '.$suite_de.'</p>';
-
 
127
			}
95
            if ($commentaires != '') {
128
            if ($commentaires != '') {
96
            	$retour .= '<p>'.$commentaires.'</p>';
129
            	$retour .= '<p>'.$commentaires.'</p>';
97
        	}
130
        	}
98
            if ($logo != '') {
131
            if ($logo != '') {
99
            	$retour .= '<img class="bb_image_revue" src="'.BB_CHEMIN_IMAGES_ILLUSTRATION.$logo.'" alt="Couverture de la revue '.$nom_complet.'"/>';
132
            	$retour .= '<img class="bbre_couverture" src="'.BB_CHEMIN_IMAGES_ILLUSTRATION.$logo.'" alt="Couverture de la revue '.$nom_complet.'"/>';
100
        	}
133
        	}
-
 
134
        	$retour .= '<p class="texte_inactif">Id. coll. : '.$id.' - Mise à jour : '.date('d/m/Y', $date_maj).'</p>';
-
 
135
        	
101
        }
136
        }
102
        $retour .= '<dl class="ajout_2point">'."\n";
137
        $retour .= '</th>';
103
		if ($suite_de != '') {
138
		$retour .= '<td>';
104
			$retour .= '<dt>Fait suite à </dt><dd>'.$suite_de.'</dd>';
-
 
105
		}
-
 
106
		if ($abreviation != '') {
139
		if ($abreviation != '') {
107
			$retour .= '<dt>Abreviation</dt><dd>'.$abreviation.'</dd>';
140
			$retour .= $abreviation;
108
		}
141
		}
-
 
142
		$retour .= '</td>';
-
 
143
		$retour .= '<td>';
109
		if ($date_debut != '') {
144
		if ($date_debut != '') {
110
			$retour .= '<dt>Date de début</dt><dd>'.$date_debut.'</dd>';
145
			$retour .= $date_debut;
111
		}
146
		}
-
 
147
		$retour .= '</td>';
-
 
148
		$retour .= '<td>';
112
		if ($date_fin != '') {
149
		if ($date_fin != '') {
113
			$retour .= '<dt>Date de fin</dt><dd>'.$date_fin.'</dd>';
150
			$retour .= $date_fin;
114
		}
151
		}
-
 
152
		$retour .= '</td>';
-
 
153
		$retour .= '<td>';
115
		if ($periodicite != '') {
154
		if ($periodicite != '') {
116
			$retour .= '<dt>Périodicité</dt><dd>'.$periodicite.'</dd>';
155
			$retour .= $periodicite;
117
		}
156
		}
-
 
157
		$retour .= '</td>';
-
 
158
		$retour .= '<td>';
118
		if ($contact_nom != '') {
159
		if ($contact_nom != '') {
119
			if ($contact_mail != '') {
160
			if ($contact_mail != '') {
120
				$retour .= '<dt>Contact</dt><dd><a href="mailto:'.$contact_mail.'">'.$contact_nom.'</a></dd>';
161
				$retour .= '<a href="mailto:'.$contact_mail.'">'.$contact_nom.'</a>';
121
			} else {
162
			} else {
122
				$retour .= '<dt>Contact</dt><dd>'.$contact_nom.'</dd>';
163
				$retour .= $contact_nom;
123
			}
164
			}
124
		}
165
		}
125
		$retour .= '</dl>'."\n";
166
		$retour .= '</td>';
-
 
167
		$retour .= '<td>';
-
 
168
		$aso_fasc = current($aso_fasc_serie);
-
 
169
		$retour .= $aso_fasc['nom_fin_fasc'];
-
 
170
		$retour .= '</td>';
-
 
171
		$retour .= '<td>';
-
 
172
		$retour .= $aso_fasc['nbre_fasc'];
-
 
173
		$retour .= '</td>';
-
 
174
		$retour .= '<td>';
126
		$retour .= '<span class="texte_inactif">'.'Id. coll. : '.$id.' - Mise à jour : '.date('d/m/Y', $date_maj).'.</span>';
175
		$retour .= $aso_fasc['date_fin_fasc'];
-
 
176
		$retour .= '</td>';
-
 
177
		$retour .= '</tr></tbody>'."\n";
127
        $o++;
178
        $o++;
128
    }
179
    }
129
    $retour .= '</ul>'."\n";
180
    $retour .= '</table>'."\n";
130
    mysql_free_result($do_query);
181
    mysql_free_result($do_query);
131
}
182
}
132
 
-
 
-
 
183
$retour .= '</div>';
133
$retour .= '<!-- BiblioBota - Revue : FIN -->'."\n";
184
$retour .= '<!-- BiblioBota - Revue : FIN -->'."\n";
134
$sortie .= $retour;
185
$sortie .= $retour;
135
 
186
 
136
/* +--Fin du code ----------------------------------------------------------------------------------------+
187
/* +--Fin du code ----------------------------------------------------------------------------------------+
137
*
188
*
138
* $Log$
189
* $Log$
-
 
190
* 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
* Correction du chemin d'accés à l'image.
-
 
193
*
139
* Revision 1.1  2006/05/23 16:20:50  jp_milcent
194
* Revision 1.1  2006/05/23 16:20:50  jp_milcent
140
* Ajout de l'application affichant la liste des revues disponibles dans la base de données de BiblioBota.
195
* Ajout de l'application affichant la liste des revues disponibles dans la base de données de BiblioBota.
141
*
196
*
142
*
197
*
143
* +-- Fin du code ----------------------------------------------------------------------------------------+
198
* +-- Fin du code ----------------------------------------------------------------------------------------+
144
*/
199
*/
145
?>
200
?>