"; $base_url = "./catalog.php?categ=serials&sub=view&serial_id=$serial_id"; $serial_action_bar = str_replace('!!serial_id!!', $serial_id, $serial_action_bar); if ($serial_id) $myQuery = mysql_query("SELECT * FROM notices WHERE notice_id=$serial_id ", $dbh); if ($serial_id && mysql_num_rows($myQuery)) { //Bulletins $myPerio = mysql_fetch_object($myQuery); // function serial_display ($id, $level='1', $action_serial='', $action_analysis='', $action_bulletin='', $lien_suppr_cart="", $lien_explnum="", $bouton_explnum=1,$print=0,$show_explnum=1, $show_statut=0, $show_opac_hidden_fields=true ) { $isbd = new serial_display($myPerio, 5, "", "", "", "", "./catalog.php?categ=serials&sub=explnum_form&serial_id=!!serial_id!!&explnum_id=!!explnum_id!!"); $perio_header = $isbd->header; // isbd du périodique $perio_isbd = $isbd->isbd; $isbd->get_etat_periodique(); $perio_isbd.=$isbd->print_etat_periodique(); global $avis_quoifaire,$valid_id_avis; $perio_isbd = str_replace('', avis_notice($serial_id,$avis_quoifaire,$valid_id_avis), $perio_isbd); if (!$page) $page=1; $debut = ($page-1)*$nb_per_page_a_search; switch ($view) { case "abon": $base_url = "./catalog.php?categ=serials&sub=view&serial_id=$serial_id&view=abon"; require_once("views/view_abon.inc.php"); break; case "modele": require_once("views/view_modeles.inc.php"); break; case "collstate": $base_url = "./catalog.php?categ=serials&sub=view&serial_id=$serial_id&view=collstate"; require_once("views/view_collstate.inc.php"); break; default: // barre de restriction des bulletins affichés $clause=""; if ($aff_bulletins_restrict_numero) { $clause = " and bulletin_numero like '%".str_replace("*","%",$aff_bulletins_restrict_numero)."%' "; $base_url .= "&aff_bulletins_restrict_numero=".urlencode($aff_bulletins_restrict_numero) ; } if ($aff_bulletins_restrict_date) { $aff_bulletins_restrict_date_traite = str_replace("*","%",$aff_bulletins_restrict_date) ; $tab_bulletins_restrict_date = explode ($msg[format_date_input_separator],$aff_bulletins_restrict_date_traite) ; if(count($tab_bulletins_restrict_date)==3)$aff_bulletins_restrict_date_traite = $tab_bulletins_restrict_date[2]."-".$tab_bulletins_restrict_date[1]."-".$tab_bulletins_restrict_date[0]; if(count($tab_bulletins_restrict_date)==2)$aff_bulletins_restrict_date_traite = $tab_bulletins_restrict_date[1]."-".$tab_bulletins_restrict_date[0]; if(count($tab_bulletins_restrict_date)==1)$aff_bulletins_restrict_date_traite = $tab_bulletins_restrict_date[0]; $clause .= " and date_date like '%".$aff_bulletins_restrict_date_traite."%'" ; $base_url .= "&aff_bulletins_restrict_date=".urlencode($aff_bulletins_restrict_date) ; } if ($aff_bulletins_restrict_periode) { $aff_bulletins_restrict_periode_traite = str_replace("*","%",$aff_bulletins_restrict_periode) ; $clause .= " and mention_date like '%".$aff_bulletins_restrict_periode_traite."%'" ; $base_url .= "&aff_bulletins_restrict_periode=".urlencode($aff_bulletins_restrict_periode) ; } //On compte les expl de la localisation $rqt="SELECT COUNT(1) FROM bulletins ".($location?", exemplaires":"")." WHERE ".($location?"(expl_bulletin=bulletin_id and expl_location='$location' or expl_location is null) and ":"")." bulletin_notice='$serial_id' "; $myQuery = mysql_query($rqt, $dbh); $nb_expl_loc = mysql_result($myQuery,0,0); //On compte les bulletins de la localisation $rqt="SELECT count(distinct bulletin_id) FROM bulletins ".($location?",exemplaires ":"")." WHERE ".($location?"(expl_bulletin=bulletin_id and expl_location='$location') and ":"")." bulletin_notice='$serial_id' "; $myQuery = mysql_query($rqt, $dbh); if ($execute_query&&mysql_num_rows($myQuery)) { $nb_bull_loc = mysql_result($myQuery,0,0); } //On compte les bulletinsà afficher $rqt="SELECT count(distinct bulletin_id) FROM bulletins ".($location?", exemplaires":"")." WHERE ".($location?"(expl_bulletin=bulletin_id and expl_location='$location' or expl_location is null) and ":"")." bulletin_notice='$serial_id' $clause "; $myQuery = mysql_query($rqt, $dbh); $nbr_lignes = mysql_result($myQuery,0,0); require_once("views/view_bulletins.inc.php"); break; } // Gestion de la supression de la notice si les droits de modification des exemplaires sont localisés. $flag_no_delete_notice=0; //visibilité des exemplaires if ($pmb_droits_explr_localises) { global $explr_visible_mod; $explr_tab_modif=explode(",",$explr_visible_mod); $requete = "SELECT expl_location from exemplaires, bulletins,notices where expl_bulletin=bulletin_id and bulletin_notice=notice_id and notice_id= $serial_id"; $execute_query=mysql_query($requete); if ($execute_query&&mysql_num_rows($execute_query)) { while ($r=mysql_fetch_object($execute_query)) { if(!in_array ($r->expl_location,$explr_tab_modif )) $flag_no_delete_notice=1; } } } if(!$flag_no_delete_notice)$serial_action_bar = str_replace('!!delete_serial_button!!', "", $serial_action_bar); else $serial_action_bar=str_replace('!!delete_serial_button!!', "", $serial_action_bar); $serial_action_bar = str_replace('!!issn!!', $myPerio->code, $serial_action_bar); // action_bar : serials.tpl.php... // mise à jour des info du javascript $serial_action_bar = str_replace('!!nb_bulletins!!', $isbd->serial_nb_bulletins, $serial_action_bar); $serial_action_bar = str_replace('!!nb_expl!!', $isbd->serial_nb_exemplaires, $serial_action_bar); // titre général du périodique print pmb_bidi("
$isbd->aff_statut

".str_replace('!!item!!', $serial_id, $cart_link)." ".$perio_header."

$perio_isbd
$collections_state

$serial_action_bar
"); // bulletinage $onglets = "
":"onglets-perio'>")."".$msg["abts_onglet_bull"]." ":"onglets-perio'>")."".$msg["abts_onglet_abt"]." ":"onglets-perio'>")."".$msg["abts_onglet_modele"]." ":"onglets-perio'>")."".$msg["abts_onglet_collstate"]."
"; print $onglets; $totaux_loc=""; $temp_location=0; $list_locs=""; switch($view) { case "modele": $list_locs=""; break; case "abon": if ($location) $temp_location=$location; $locs=new docs_location(); $list_locs=$locs->gen_combo_box_empr($temp_location,1,"document.filter_form.location.value=this.options[this.selectedIndex].value; document.filter_form.submit();"); $link_bulletinage = "".$msg["link_notice_to_bulletinage"].""; break; case "collstate": if($pmb_etat_collections_localise) { if (($location)) $temp_location=$location; $locs=new docs_location(); $list_locs=$locs->gen_combo_box_empr($temp_location,1,"document.filter_form.location.value=this.options[this.selectedIndex].value; document.filter_form.submit();"); } $link_bulletinage = ""; break; default: if ($location) $temp_location=$location; $locs=new docs_location(); $list_locs=$locs->gen_combo_box_empr($temp_location,1,"document.filter_form.location.value=this.options[this.selectedIndex].value; document.filter_form.submit();"); $link_bulletinage = "".$msg["link_notice_to_bulletinage"].""; if($nb_bull_loc) { if($temp_location && $list_locs) { $totaux_loc="$nb_bull_loc ".$msg["serial_nb_bulletin"]." $nb_expl_loc ".$msg["bulletin_nb_ex"]; } } break; } print pmb_bidi("

".($view=="abon"?$msg["perio_abts_title"]:($view=="modele"?$msg["perio_modeles_title"]:($view=="collstate"?$msg["abts_onglet_collstate"]:$msg["4001"])))." $list_locs $link_bulletinage

$totaux_loc
$bulletins
 
$pages_display
"); } } // affichage de la liste utilisateurs pour sélection function list_serial($cb, $serial_list, $nav_bar) { global $serial_list_tmpl; $serial_list_tmpl = str_replace("!!cle!!", $cb, $serial_list_tmpl); $serial_list_tmpl = str_replace("!!list!!", $serial_list, $serial_list_tmpl); $serial_list_tmpl = str_replace("!!nav_bar!!", $nav_bar, $serial_list_tmpl); print pmb_bidi($serial_list_tmpl); }