65,6 → 65,7 |
if ($nb_total == 0) { |
$retour .= '<p>'.'Pas encore de revues indexées...'.'</p>'."\n"; |
} else { |
$aso_revues = array(); |
$query = 'SELECT '.$GLOBALS['tbl']['collection'].'.* '. |
'FROM '.$GLOBALS['tbl']['collection'].' '. |
'WHERE B_C_CACHER = 0 '. |
71,29 → 72,30 |
'ORDER BY B_C_NOMCOMPLET '; |
$do_query = mysql_query($query) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query)); |
$nb_results = mysql_num_rows($do_query); |
|
$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</th>'. |
'<th>Date fin</th>'. |
'<th title="Nombre de fascicules pour la collection, toutes séries confondues">Nombre fascicules</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>'. |
'</tr></thead>'."\n"; |
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['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_fasc_serie = array(); |
$aso_fasc = array(); |
$query_fasc = 'SELECT '.$GLOBALS['tbl']['fascicule'].'.* '. |
'FROM '.$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'; |
//echo $query_fasc; |
$do_query_fasc = mysql_query($query_fasc) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_fasc)); |
$aso_fasc_serie = array(); |
$aso_fasc = array(); |
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; |
105,78 → 107,149 |
$aso_fasc['nbre_fasc']++; |
} |
} |
mysql_free_result($do_query_fasc); |
ksort($aso_fasc_serie, SORT_DESC); |
$id = $row->B_C_CRAI; |
$idlink = $row->B_C_IDLINK; |
$nom_complet = $row->B_C_NOMCOMPLET; |
$abreviation = $row->B_C_ABREGE; |
$date_debut = $row->B_C_DATECREATION; |
$suite_de = $row->B_C_FAISUITE; |
$date_fin = $row->B_C_DATEFIN; |
$periodicite = $row->B_C_PERIODICITE; |
$contact_nom = $row->B_C_CONTACTNOM; |
$contact_mail = $row->B_C_CONTACTMAIL; |
$logo = $row->B_C_IMAGE; |
$commentaires = $row->B_C_COMMENT; |
$date_maj = $row->B_C_MAJFICHE; |
$retour .= '<tbody><tr>'; |
$retour .= '<th>'; |
if ($nom_complet != '') { |
$retour .= '<h5 class="bbre_titre">'.$nom_complet.'</h5>'; |
if ($suite_de != '') { |
$retour .= '<p><span class="bb_intitule">Fait suite à : </span>'.$suite_de.'</p>'; |
$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'].' '. |
'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']; |
$aso_revues[] = $aso_revue; |
} |
mysql_free_result($do_query); |
if ($GLOBALS['_GEN_commun']['info_application']->affichage_type == 'tableau') { |
$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</th>'. |
'<th>Date fin</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>'. |
'</tr></thead>'."\n"; |
$retour .= '<tbody>'; |
foreach ($aso_revues as $revue) { |
$retour .= '<tr>'; |
$retour .= '<th>'; |
if ($revue['nom_complet'] != '') { |
$retour .= '<h5 class="bbre_titre">'.$revue['nom_complet'].'</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>'; |
} |
if ($abreviation != '') { |
$retour .= '<p><span class="bb_intitule">Abréviation : </span>'.$abreviation.'</p>'; |
$retour .= '</th>'; |
$retour .= '<td>'; |
if ($revue['date_debut'] != '') { |
$retour .= $revue['date_debut']; |
} |
if ($commentaires != '') { |
$retour .= '<p>'.$commentaires.'</p>'; |
} |
if ($logo != '') { |
$retour .= '<img class="bbre_couverture" src="'.BB_CHEMIN_IMAGES_ILLUSTRATION.$logo.'" alt="Couverture de la revue '.$nom_complet.'"/>'; |
} |
$retour .= '<p class="texte_inactif">Id. coll. : '.$id.' - Mise à jour : '.date('d/m/Y', $date_maj).'</p>'; |
|
} |
$retour .= '</th>'; |
$retour .= '<td>'; |
if ($date_debut != '') { |
$retour .= $date_debut; |
$retour .= '</td>'; |
$retour .= '<td>'; |
if ($revue['date_fin'] != '') { |
$retour .= $revue['date_fin']; |
} |
$retour .= '</td>'; |
$retour .= '<td>'; |
if ($revue['aso_fasc']['nbre_fasc'] != '') { |
$retour .= $revue['aso_fasc']['nbre_fasc']; |
} 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']; |
} |
$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']; |
} |
} |
$retour .= '</td>'; |
$retour .= '<td>'; |
$retour .= $revue['aso_fasc']['nom_fin_fasc']; |
$retour .= '</td>'; |
$retour .= '<td>'; |
$retour .= $revue['aso_fasc']['date_fin_fasc']; |
$retour .= '</td>'; |
$retour .= '</tr>'."\n"; |
$o++; |
} |
$retour .= '</td>'; |
$retour .= '<td>'; |
if ($date_fin != '') { |
$retour .= $date_fin; |
} |
$retour .= '</td>'; |
$retour .= '<td>'; |
$retour .= $aso_fasc['nbre_fasc']; |
$retour .= '</td>'; |
$retour .= '<td>'; |
if ($periodicite != '') { |
$retour .= $periodicite; |
} |
$retour .= '</td>'; |
$retour .= '<td>'; |
if ($contact_nom != '') { |
if ($contact_mail != '') { |
$retour .= '<a href="mailto:'.$contact_mail.'">'.$contact_nom.'</a>'; |
$retour .= '</tbody>'."\n"; |
$retour .= '</table>'."\n"; |
} else { |
$o = 1; |
$retour .= '<ul id="liste_biblio_revue">'."\n"; |
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'].'.'; |
} else { |
$retour .= $contact_nom; |
$retour .= ' Périodicité inconnue'; |
} |
$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 .= '</td>'; |
$retour .= '<td>'; |
$retour .= $aso_fasc['nom_fin_fasc']; |
$retour .= '</td>'; |
$retour .= '<td>'; |
$retour .= $aso_fasc['date_fin_fasc']; |
$retour .= '</td>'; |
$retour .= '</tr></tbody>'."\n"; |
$o++; |
} |
$retour .= '</table>'."\n"; |
mysql_free_result($do_query); |
$retour .= '</ul>'."\n"; |
} |
} |
$retour .= '</div>'; |
$retour .= '<!-- BiblioBota - Revue : FIN -->'."\n"; |
185,6 → 258,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log$ |
* 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. |
* |