"; $date_debut = ""; $date_fin = ""; $bulletins .= " "; if ($pmb_collstate_advanced) { $bulletins .= ""; } $bulletins .= " "; if ($pmb_collstate_advanced) { $bulletins .= ""; } $bulletins .=" "; $bulletins_to_check=array(); // ici : affichage par page des bulletinages associés // on lance la vraie requette $clause = ($serial_id ? "and bulletin_notice='$serial_id'" : "")." ".$clause; $query = "SELECT distinct uni.bulletin_id FROM ("; $query .= "SELECT distinct bulletin_id FROM bulletins "; if($location) { $query .= "JOIN exemplaires ON expl_bulletin=bulletin_id AND expl_location='$location' "; } if($clause) { $query .= " WHERE 1 ".$clause." "; } //UNION sur les documents numériques avec localisation(s) sélectionnées ou TOUTES $query .= " UNION "; $query .= "SELECT distinct bulletin_id FROM bulletins "; if($location) { $query .= "JOIN explnum ON explnum_bulletin=bulletin_id LEFT JOIN explnum_location ON explnum_location.num_explnum = explnum.explnum_id "; } if($clause) { if($location) { $query .= " WHERE (explnum_location.num_location='$location' OR explnum_location.num_location IS NULL) ".$clause." "; } else { $query .= " WHERE 1 ".$clause." "; } } $query .= ") AS uni JOIN bulletins ON bulletins.bulletin_id = uni.bulletin_id "; $query .= $filter_date." ORDER BY date_date DESC, bulletin_numero*1 DESC, bulletin_id DESC LIMIT $debut,$nb_per_page_a_search"; $myQuery = pmb_mysql_query($query); if((pmb_mysql_num_rows($myQuery))) { $parity=1; while(($bul = pmb_mysql_fetch_object($myQuery))) { $collstates = array(); if ($pmb_collstate_advanced) { $query = "SELECT collstate_bulletins_num_collstate, state_collections FROM collstate_bulletins JOIN collections_state ON collections_state.collstate_id = collstate_bulletins.collstate_bulletins_num_collstate WHERE collstate_bulletins_num_bulletin = '".$bul->bulletin_id."'"; $result = pmb_mysql_query($query); if (pmb_mysql_num_rows($result)) { while ($row = pmb_mysql_fetch_object($result)) { $collstates[$row->collstate_bulletins_num_collstate] = $row->state_collections; } } } $bulletin = new bulletinage($bul->bulletin_id,0,'',$location,false); if ($parity % 2) { $pair_impair = "even"; } else { $pair_impair = "odd"; } $parity += 1; $href_start=""; $tr_surbrillance = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='".$pair_impair."'\" "; $bulletins .= ""; if ($pmb_collstate_advanced) { $bulletins .= ""; } $bulletins .= ""; $bulletins_to_check[]=$bulletin->bulletin_id; } $bulletins .= "
".$msg[4025]." ".$msg[4026]." ".$msg['bulletin_mention_periode']." ".$msg['bulletin_mention_titre_court']." ".$msg['bul_articles']." ".$msg['bul_docnum']." ".$msg['bul_exemplaires']."".$msg['bul_collstate']."
basket ".$msg["search_bull_start"]." ".$date_debut." ".$msg["search_bull_end"]." ".$date_fin."
"; $bulletins .= ""; $drag="bulletin_id."\" dragicon='".get_url_icon('icone_drag_notice.png')."' dragtext=\"".htmlentities($bulletin->bulletin_numero,ENT_QUOTES, $charset)."\" draggable=\"yes\" dragtype=\"notice\" callback_before=\"show_carts\" callback_after=\"\" style=\"padding-left:7px\">"; $bulletins .= "$drag".$href_start; $bulletins .= $bulletin->bulletin_numero; $bulletins .= "".$href_start; $bulletins .= $bulletin->aff_date_date; $bulletins .= "".$href_start; $bulletins .= htmlentities($bulletin->mention_date, ENT_QUOTES, $charset); $bulletins .= "".$href_start; $bulletins .= htmlentities($bulletin->bulletin_titre, ENT_QUOTES, $charset); $bulletins .= "" ; if ($bulletin->nb_analysis) { $bulletins .= $bulletin->nb_analysis." basketbulletin_id."&what=DEP', 'cart')\">"; } else { $bulletins .= " "; } $bulletins .= "".$href_start; if (!empty($bulletin->nbexplnum)) { $bulletins .= $bulletin->nbexplnum; } else { $bulletins .= " "; } $bulletins .= "".$href_start; if (is_array($bulletin->expl) && !empty($bulletin->expl)) { $bulletins .= count($bulletin->expl); } else { $bulletins .= " "; } $bulletins .= ""; $collstate_list = ""; foreach($collstates as $id => $collstate) { if($collstate_list) { $collstate_list.= "
"; } $collstate_list .="".$collstate.""; } $bulletins .= $collstate_list."
"; } else { $bulletins .= "
"; if ($aff_bulletins_restrict_periode || $aff_bulletins_restrict_date || $aff_bulletins_restrict_numero) $bulletins .= $msg['perio_restrict_no_bulletin']; else $bulletins .= $msg[4024] ; } $bulletins .= ""; $bulletins = str_replace('!!bulletins_to_check!!', implode(',',$bulletins_to_check), $bulletins); // barre de navigation par page $pages_display = aff_pagination ($base_url."&location=$location&bull_date_start=$bull_date_start&bull_date_end=$bull_date_end", $nbr_lignes, $nb_per_page_a_search, $page, 10, false, true); ?>