"; if ($current!==false) { $print_action = " \"".$msg["histo_print"]."\""; } $visualise_click_notice=" "; $base_url = serial::get_permalink($serial_id); $serial_action_bar = str_replace('!!serial_id!!', $serial_id, $serial_action_bar); if ($serial_id) $myQuery = pmb_mysql_query("SELECT * FROM notices WHERE notice_id=$serial_id ", $dbh); if ($serial_id && pmb_mysql_num_rows($myQuery)) { //Bulletins $myPerio = pmb_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); $perio_isbd = str_replace('', caddie_controller::get_display_list_from_item('display', 'NOTI', $serial_id), $perio_isbd); if (!$page) $page=1; $debut = ($page-1)*$nb_per_page_a_search; $nb_bull_loc = 0; switch ($view) { case "abon": $base_url = serial::get_permalink($serial_id)."&view=abon".$url_suffix; require_once("views/view_abon.inc.php"); break; case "modele": require_once("views/view_modeles.inc.php"); break; case "collstate": $base_url = serial::get_permalink($serial_id)."&view=collstate".$url_suffix; 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) ; } $base_url .= $url_suffix; $filter_date=compare_date($bull_date_start,$bull_date_end); //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' $filter_date "; $myQuery = pmb_mysql_query($rqt, $dbh); $nb_expl_loc = pmb_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' $filter_date "; $myQuery = pmb_mysql_query($rqt, $dbh); if ($myQuery && pmb_mysql_num_rows($myQuery)) { $nb_bull_loc = pmb_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 $filter_date "; $myQuery = pmb_mysql_query($rqt, $dbh); $nbr_lignes = pmb_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=pmb_mysql_query($requete); if ($execute_query&&pmb_mysql_num_rows($execute_query)) { while ($r=pmb_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_articles!!', $isbd->serial_nb_articles, $serial_action_bar); $serial_action_bar = str_replace('!!nb_expl!!', $isbd->serial_nb_exemplaires, $serial_action_bar); $serial_action_bar = str_replace('!!nb_etat_coll!!', $isbd->serial_nb_etats_collection, $serial_action_bar); $serial_action_bar = str_replace('!!nb_abo!!', $isbd->serial_nb_abo_actif, $serial_action_bar); // Titre de la page print ''; // titre général du périodique print pmb_bidi("

".$isbd->aff_statut.str_replace('!!item!!', $serial_id, $cart_link).$print_action.$visualise_click_notice." ".$perio_header."

".$perio_isbd."

".$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=""; $link_bulletinage = ""; break; case "abon": if ($location) $temp_location=$location; $list_locs=docs_location::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; $list_locs=docs_location::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; $list_locs=docs_location::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
$pages_display
$bulletins
$pages_display
"); $template_path_serial_tabs = "./includes/templates/records/records_elements_tabs.html"; if(file_exists("./includes/templates/records/records_elements_tabs_subst.html")){ $template_path_serial_tabs = "./includes/templates/records/records_elements_tabs_subst.html"; } if(file_exists($template_path_serial_tabs)){ $h2o_serial_tabs = H2o_collection::get_instance($template_path_serial_tabs); $records_tabs = new records_tabs(new notice($isbd->notice_id)); $records_list_ui = $records_tabs->get_record()->get_records_list_ui(); if ($records_list_ui) $records_list_ui->set_current_url($pmb_url_base.'catalog.php?categ='.$categ.'&sub='.$sub.'&serial_id='.$isbd->notice_id.'&quoi='.$quoi.($view ? '&view='.$view : '')); print $h2o_serial_tabs->render(array('records_tabs' => $records_tabs)); } } } function compare_date($date_debut="", $date_fin="") { $restrict = ''; if($date_debut && $date_fin) { if($date_fin<$date_debut) { $restrict = " and date_date between '".$date_fin."' and '".$date_debut."' "; } else if($date_fin == $date_debut) { $restrict = " and date_date='".$date_debut."' "; } else { $restrict = " and date_date between '".$date_debut."' and '".$date_fin."' "; } } else if($date_debut) { $restrict = " and date_date >='".$date_debut."' "; } else if($date_fin) { $restrict = " and date_date <='".$date_fin."' "; } return $restrict; } // 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); }