| 75,7 → 75,7 |
| while ($row = mysql_fetch_object($do_query)) { |
| $aso_revue = array(); |
| $aso_revue['id'] = $row->B_C_CRAI; |
| $aso_revue['idlink'] = $row->B_C_IDLINK; |
| $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; |
| 87,9 → 87,21 |
| $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(); |
| $aso_fasc = array(); |
| $query_fasc = 'SELECT '.$GLOBALS['tbl']['fascicule'].'.* '. |
| 'FROM '.$GLOBALS['tbl']['fascicule'].' '. |
| 'WHERE B_F_CRAICOLL = "'.$row->B_C_CRAI.'" '. |
| 98,19 → 110,63 |
| $do_query_fasc = mysql_query($query_fasc) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_fasc)); |
| while ($row_fasc = mysql_fetch_object($do_query_fasc)) { |
| if (!isset($aso_fasc_serie[$row_fasc->B_F_CRAISERIE])) { |
| $aso_fasc_serie[$row_fasc->B_F_CRAISERIE] = $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['date_fin_fasc'] = date('d/m/Y', $row_fasc->B_F_MAJFICHE); |
| $aso_fasc_serie[$row_fasc->B_F_CRAISERIE] = $aso_fasc; |
| } else { |
| $aso_fasc['nbre_fasc']++; |
| $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 = '01'; |
| if (isset($match[2]) && $match[2] != '') { |
| $mois = $match[2]; |
| } |
| $date = $annee.'-'.$mois; |
| |
| // Initialisation avec une date. |
| if ($aso_fasc_serie[$row_fasc->B_F_CRAISERIE]['nbre_fasc'] == 1) { |
| $aso_revue['fasc_date_premier'] = $date; |
| $aso_revue['fasc_date_dernier'] = $date; |
| $aso_fasc['date_debut'] = $date; |
| $aso_fasc['date_fin'] = $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; |
| $aso_revue['aso_fasc'] = $aso_fasc; |
| |
| $query_art = 'SELECT COUNT('.$GLOBALS['tbl']['article'].'.B_A_IDART) AS nbre_article '. |
| 'FROM '.$GLOBALS['tbl']['article'].' '. |
| 129,14 → 185,14 |
| $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</th>'. |
| '<th>Date fin</th>'. |
| '<th>Date début (collection)</th>'. |
| '<th>Date fin (collection)</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 dans la dernière série">Dernier fascicule</th>'. |
| '<th title="Date de mise à jour du dernier fascicule dans la dernière série">Date dernier fascicule</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) { |
| 143,7 → 199,11 |
| $retour .= '<tr>'; |
| $retour .= '<th>'; |
| if ($revue['nom_complet'] != '') { |
| $retour .= '<h5 class="bbre_titre">'.$revue['nom_complet'].'</h5>'; |
| $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>'; |
| } |
| 157,21 → 217,27 |
| $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['date_fin'] != '') { |
| $retour .= $revue['date_fin']; |
| } else { |
| $retour .= '?'; |
| } |
| $retour .= '</td>'; |
| $retour .= '<td>'; |
| if ($revue['aso_fasc']['nbre_fasc'] != '') { |
| $retour .= $revue['aso_fasc']['nbre_fasc']; |
| if ($revue['fasc_nbre'] != '') { |
| $retour .= $revue['fasc_nbre']; |
| } else { |
| $retour .= 0; |
| } |
| 186,6 → 252,8 |
| $retour .= '<td>'; |
| if ($revue['periodicite'] != '') { |
| $retour .= $revue['periodicite']; |
| } else { |
| $retour .= '?'; |
| } |
| $retour .= '</td>'; |
| $retour .= '<td>'; |
| 195,13 → 263,25 |
| } else { |
| $retour .= $revue['contact_nom']; |
| } |
| } else { |
| $retour .= '?'; |
| } |
| $retour .= '</td>'; |
| $retour .= '<td>'; |
| $retour .= $revue['aso_fasc']['nom_fin_fasc']; |
| if ($revue['fasc_nom_dernier'] != '') { |
| $retour .= $revue['fasc_nom_dernier']; |
| } else { |
| $retour .= '?'; |
| } |
| $retour .= '</td>'; |
| $retour .= '<td>'; |
| $retour .= $revue['aso_fasc']['date_fin_fasc']; |
| 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++; |
| 211,43 → 291,55 |
| } else { |
| $o = 1; |
| $retour .= '<ul id="liste_biblio_revue">'."\n"; |
| $nbre_revue_sans_article = 0; |
| foreach ($aso_revues as $revue) { |
| $retour .= '<li>'; |
| if ($revue['nom_complet'] != '') { |
| $retour .= '<h5 class="bbre_titre">'.$revue['nom_complet'].'.</h5>'; |
| } |
| if ($revue['periodicite'] != '') { |
| $retour .= ' '.$revue['periodicite'].'.'; |
| 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 .= ' 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 indexés.'; |
| $o++; |
| $retour .= '</li>'."\n"; |
| } else { |
| $retour .= ' Périodicité inconnue'; |
| $nbre_revue_sans_article++; |
| } |
| $retour .= ' De '; |
| if ($revue['date_debut'] != '') { |
| $retour .= $revue['date_debut']; |
| } else { |
| $retour .= '?'; |
| } |
| $retour .= ' à '; |
| if ($revue['date_fin'] != '') { |
| $retour .= $revue['date_fin'].'. '; |
| } else { |
| $retour .= '?. '; |
| } |
| if ($revue['aso_fasc']['nbre_fasc'] != '') { |
| $retour .= $revue['aso_fasc']['nbre_fasc']; |
| } else { |
| $retour .= 0; |
| } |
| $retour .= ' fascicules et '; |
| if ($revue['nbre_article'] != '') { |
| $retour .= $revue['nbre_article']; |
| } else { |
| $retour .= 0; |
| } |
| $retour .= ' articles indexés.'; |
| $o++; |
| $retour .= '</li>'."\n"; |
| } |
| $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"; |
| } |
| } |
| 255,9 → 347,16 |
| $retour .= '<!-- BiblioBota - Revue : FIN -->'."\n"; |
| $sortie .= $retour; |
| |
| |
| function fomaterDate($date) { |
| |
| } |
| /* +--Fin du code ----------------------------------------------------------------------------------------+ |
| * |
| * $Log$ |
| * 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. |
| * |