array(),"auteurs" => array()); // les auteurs
public $ed1_id = ''; // id editeur 1
public $ed1 =''; // libelle editeur 1
public $coll_id = ''; // id collection
public $coll = ''; // libelle collection
public $subcoll_id = ''; // id sous collection
public $subcoll = ''; // libelle sous collection
public $year = ''; // annee de publication
public $nocoll = ''; // no. dans la collection
public $mention_edition = ''; // mention d'edition (1ere, deuxieme...)
public $ed2_id = ''; // id editeur 2
public $ed2 =''; // libelle editeur 2
public $code = ''; // ISBN, code barre commercial ou no. commercial
public $npages = ''; // importance materielle (nombre de pages, d'elements...)
public $ill = ''; // mention d'illustration
public $size = ''; // format
public $prix = ''; // prix du document
public $accomp = ''; // materiel d'accompagnement
public $n_gen = ''; // note generale
public $n_contenu = ''; // note de contenu
public $n_resume = ''; // resume/extrait
public $categories = array();// les categories
public $indexint = 0; // indexation interne
public $indexint_lib = ''; // libelle indexation interne
public $index_l = ''; // indexation libre
public $langues = array();
public $languesorg = array();
public $lien = ''; // URL de la ressource electronique associee
public $eformat = ''; // format de la ressource electronique associee
public $ok = 1;
public $type_doc = '';
public $biblio_level = 'm'; // niveau bibliographique
public $hierar_level = '0'; // niveau hierarchique
public $action = './catalog.php?categ=update&id=';
public $link_annul = './catalog.php';
public $statut = 0 ; // statut
public $commentaire_gestion = '' ; // commentaire de gestion
public $thumbnail_url = '' ;
public $notice_link=array();
public $date_parution;
public $is_new=0; // nouveauté
public $date_is_new="0000-00-00 00:00:00"; // date nouveauté
public $create_date="0000-00-00 00:00:00"; // date création
public $update_date="0000-00-00 00:00:00"; // date modification
public $num_notice_usage = 0; // droit d'usage
public $concepts_ids;
public $indexation_lang;
public $signature;
public $opac_visible_bulletinage = 0;
public $opac_serialcirc_demande = 0;
public $titres_uniformes;
public $target_link_on_error = "./catalog.php";
public $is_numeric = 0;
/**
* Affichage des éléments contenu dans les onglets
* @var elements_list_ui
*/
private $records_list_ui = null;
/**
* Onglets à afficher
* @var records_tabs
*/
private $record_tabs = null;
/**
* Nomenclatures associées
* @var nomenclature_record_formations
*/
private $nomenclature_record_formations = null;
// methodes
private static $sphinx_indexer = null;
protected static $notice = array();
public static $indexation_record;
protected static $deleted_index = false;
protected static $aut_pperso_instance;
protected static $parametres_perso=array();
protected static $vedette_composee_config_filename ='notice_authors';
protected static $controller;
protected $detail;
public static function get_notice($id, $cb = '') {
if (!$id || !isset(self::$notice[$id])) {
$notice = new notice($id, $cb);
if ($id) {
self::$notice[$id] = $notice;
return self::$notice[$id];
}
return $notice;
}
return self::$notice[$id];
}
// constructeur
public function __construct($id=0, $cb='') {
global $msg;
global $include_path, $class_path ;
global $deflt_notice_is_new;
$this->id = intval($id);
if($this->id) {
$this->fetch_data();
} else {
// initialisation des valeurs (vides)
$this->libelle_form = $msg[270]; // libelle du form : creation d'une notice
$this->code = $cb;
// initialisation avec les parametres du user :
global $value_deflt_lang, $value_deflt_relation ;
if ($value_deflt_lang) {
$lang = new marc_list('lang');
$this->langues[] = array(
'lang_code' => $value_deflt_lang,
'langue' => $lang->table[$value_deflt_lang]
) ;
}
global $deflt_notice_statut ;
if ($deflt_notice_statut) $this->statut = $deflt_notice_statut;
else $this->statut = 1;
global $xmlta_doctype ;
$this->type_doc = $xmlta_doctype ;
global $notice_parent;
//relation montante ou descendante
if ($notice_parent) {
$this->notice_link['down'][0] = new notice_relation();
$this->notice_link['down'][0]->set_linked_notice($notice_parent);
}
$this->is_new = $deflt_notice_is_new;
}
}
public function fetch_data() {
global $msg;
global $include_path, $class_path ;
$this->libelle_form = $msg[278]; // libelle du form : modification d'une notice
$requete = "SELECT *, date_format(create_date, '".$msg["format_date_heure"]."') as aff_create, date_format(update_date, '".$msg["format_date_heure"]."') as aff_update FROM notices WHERE notice_id='".$this->id."' LIMIT 1 ";
$result = @pmb_mysql_query($requete);
if($result) {
$notice = pmb_mysql_fetch_object($result);
$this->type_doc = $notice->typdoc; // type du document
$this->tit1 = $notice->tit1; // titre propre
$this->tit2 = $notice->tit2; // titre propre 2
$this->tit3 = $notice->tit3; // titre parallele
$this->tit4 = $notice->tit4; // complement du titre
$this->tparent_id = $notice->tparent_id; // id du titre parent
// libelle du titre parent
if($this->tparent_id) {
$serie = new serie($this->tparent_id);
$this->tparent = $serie->get_isbd();
} else {
$this->tparent = '';
}
$this->tnvol = $notice->tnvol; // numero de partie
$this->responsabilites = get_notice_authors($this->id) ;
$this->subcoll_id = $notice->subcoll_id; // id sous collection
$this->coll_id = $notice->coll_id; // id collection
$this->ed1_id = $notice->ed1_id ; // id editeur 1
require_once("$class_path/editor.class.php");
if($this->subcoll_id) {
require_once("$class_path/subcollection.class.php");
require_once("$class_path/collection.class.php");
$collection = new subcollection($this->subcoll_id);
$this->subcoll = $collection->get_isbd();
}
if($this->coll_id) {
require_once("$class_path/collection.class.php");
$collection = new collection($this->coll_id);
$this->coll = $collection->get_isbd();
}
if($this->ed1_id) {
$editeur = new editeur($this->ed1_id);
$this->ed1 = $editeur->get_isbd();
}
$this->year = $notice->year; // annee de publication
$this->nocoll = $notice->nocoll; // no. dans la collection
$this->mention_edition = $notice->mention_edition; // mention d'edition (1ere, deuxieme...)
$this->ed2_id = $notice->ed2_id; // id editeur 2
if($this->ed2_id) { // libelle editeur 2
$editeur = new editeur($this->ed2_id);
$this->ed2 = $editeur->get_isbd();
}
$this->code = $notice->code; // ISBN, code barre commercial ou no. commercial
$this->npages = $notice->npages; // importance materielle (nombre de pages, d'elements...)
$this->ill = $notice->ill; // mention d'illustration
$this->size = $notice->size; // format
$this->prix = $notice->prix; // Prix du document
$this->accomp = $notice->accomp; // materiel d'accompagnement
$this->n_gen = $notice->n_gen; // note generale
$this->n_contenu = $notice->n_contenu; // note de contenu
$this->n_resume = $notice->n_resume; // resume/extrait
$this->categories = get_notice_categories($this->id) ;
$this->indexint = $notice->indexint; // indexation interne
if($this->indexint) {
$indexint = new indexint($this->indexint);
$this->indexint_lib = $indexint->get_isbd();
}
$this->index_l = $notice->index_l; // indexation libre
$this->langues = get_notice_langues($this->id, 0) ; // langues de la publication
$this->languesorg = get_notice_langues($this->id, 1) ; // langues originales
$this->lien = $notice->lien; // URL de la ressource electronique associee
$this->eformat = $notice->eformat; // format de la ressource electronique associee
$this->biblio_level = $notice->niveau_biblio; // niveau bibliographique
$this->hierar_level = $notice->niveau_hierar; // niveau hierarchique
$this->statut = $notice->statut;
if ((trim($notice->date_parution)) && ($notice->date_parution!='0000-00-00')){
$this->date_parution = $notice->date_parution;
} else {
$this->date_parution = static::get_date_parution($notice->year);
}
$this->indexation_lang = $notice->indexation_lang;
$this->is_new = $notice->notice_is_new;
$this->date_is_new = $notice->notice_date_is_new;
$this->num_notice_usage = $notice->num_notice_usage;
//La notice est une notice numérique ?
$this->is_numeric = $notice->is_numeric;
//liens vers autres notices
$this->notice_link = notice_relations::get_notice_links($this->id, $this->biblio_level);
$this->commentaire_gestion = $notice->commentaire_gestion;
$this->thumbnail_url = $notice->thumbnail_url;
$this->create_date = $notice->aff_create;
$this->update_date = $notice->aff_update;
$this->signature = $notice->signature;
// Montrer ou pas le bulletinage en opac
$this->opac_visible_bulletinage = $notice->opac_visible_bulletinage;
// Autoriser la demande d'abonnement à l'OPAC
$this->opac_serialcirc_demande = $notice->opac_serialcirc_demande;
} else {
require_once("$include_path/user_error.inc.php");
error_message("", $msg[280], 1, $this->target_link_on_error);
$this->ok = 0;
}
}
// Donne l'id de la notice par son isbn
public static function get_notice_id_from_cb($code) {
if(!$code) return 0;
$isbn = traite_code_isbn($code);
if(isISBN10($isbn)) {
$isbn13 = formatISBN($isbn,13);
$isbn10 = $isbn;
} elseif (isISBN13($isbn)) {
$isbn10 = formatISBN($isbn,10);
$isbn13 = $isbn;
} else {
// ce n'est pas un code au format isbn
$isbn10=$code;
}
$requete = "SELECT notice_id FROM notices WHERE ( code='$isbn10' or code='$isbn13') and code !='' LIMIT 1 ";
if(($result = pmb_mysql_query($requete))) {
if (pmb_mysql_num_rows($result)) {
$notice = pmb_mysql_fetch_object($result);
return($notice->notice_id);
}
}
return 0;
}
//Récupération d'un titre de notice
public static function get_notice_title($notice_id) {
// $requete="select serie_name, tnvol, tit1, code from notices left join series on serie_id=tparent_id where notice_id=".$notice_id;
// $resultat=pmb_mysql_query($requete);
// if (pmb_mysql_num_rows($resultat)) {
// $r=pmb_mysql_fetch_object($resultat);
// return ($r->serie_name?$r->serie_name." ":"").($r->tnvol?$r->tnvol." ":"").$r->tit1.($r->code?" (".$r->code.")":"");
// }
// return '';
$mono_display = new mono_display($notice_id, 0, '', 0, '', '', '',0, 0, 0, 0,"", 0, false, true);
return strip_tags($mono_display->header_texte);
}
public static function init_globals_patterns_links() {
global $link, $link_expl, $link_explnum;
global $link_serial, $link_analysis, $link_bulletin;
global $link_explnum_serial, $link_explnum_analysis, $link_explnum_bulletin;
$link = './catalog.php?categ=isbd&id=!!id!!';
$link_expl = './catalog.php?categ=edit_expl&id=!!notice_id!!&cb=!!expl_cb!!&expl_id=!!expl_id!!';
$link_explnum = './catalog.php?categ=edit_explnum&id=!!notice_id!!&explnum_id=!!explnum_id!!';
$link_serial = './catalog.php?categ=serials&sub=view&serial_id=!!id!!';
$link_analysis = './catalog.php?categ=serials&sub=bulletinage&action=view&bul_id=!!bul_id!!&art_to_show=!!id!!';
$link_bulletin = './catalog.php?categ=serials&sub=bulletinage&action=view&bul_id=!!id!!';
$link_explnum_serial = "./catalog.php?categ=serials&sub=explnum_form&serial_id=!!serial_id!!&explnum_id=!!explnum_id!!";
$link_explnum_analysis = "./catalog.php?categ=serials&sub=analysis&action=explnum_form&bul_id=!!bul_id!!&analysis_id=!!analysis_id!!&explnum_id=!!explnum_id!!";
$link_explnum_bulletin = "./catalog.php?categ=serials&sub=bulletinage&action=explnum_form&bul_id=!!bul_id!!&explnum_id=!!explnum_id!!";
}
public static function get_pattern_link() {
global $base_path;
return $base_path.'/catalog.php?categ=isbd&id=!!id!!';
}
public static function get_permalink($notice_id, $parent_id=0) {
global $base_path;
return $base_path.'/catalog.php?categ=isbd&id='.$notice_id;
}
public static function get_notice_view_link($notice_id) {
$requete="select niveau_biblio, serie_name, tnvol, tit1, code from notices left join series on serie_id=tparent_id where notice_id=".$notice_id;
$fetch = pmb_mysql_query($requete);
if (pmb_mysql_num_rows($fetch)) {
$header_perio='';
$r = pmb_mysql_fetch_object($fetch);
if($r->niveau_biblio == 's'){
// périodique
$link = './catalog.php?categ=serials&sub=view&serial_id='.$notice_id;
}elseif($r->niveau_biblio == 'b') {
// notice de bulletin
$query = 'select bulletin_id, bulletin_notice from bulletins where num_notice = '.$notice_id;
$result = pmb_mysql_query($query);
if($result && pmb_mysql_num_rows($result)){
$row = pmb_mysql_fetch_object($result);
$link = './catalog.php?categ=serials&sub=view&sub=bulletinage&action=view&bul_id='.$row->bulletin_id;
$requete_perio="select tit1, code from notices where notice_id=".$row->bulletin_notice;
$fetch_perio = pmb_mysql_query($requete_perio);
if (pmb_mysql_num_rows($fetch_perio)) {
$r_perio = pmb_mysql_fetch_object($fetch_perio);
$header_perio= $r_perio->tit1.($r_perio->code?" (".$r_perio->code.") ":" ");
}
}
}else{
// notice de monographie
$link = self::get_permalink($notice_id);
}
$header= ($r->serie_name?$r->serie_name." ":"").($r->tnvol?$r->tnvol." ":"").$r->tit1.($r->code?" (".$r->code.")":"");
return "".$header_perio.$header."";
}
return '';
}
//Récupérer une date au format AAAA-MM-JJ
public static function get_date_parution($annee) {
return detectFormatDate($annee);
}
public static function get_niveau_biblio($notice_id) {
$query = "SELECT niveau_biblio FROM notices WHERE notice_id = ".$notice_id;
$result = pmb_mysql_query($query);
return pmb_mysql_result($result, 0, 'niveau_biblio');
}
public static function get_typdoc($notice_id) {
$query = "SELECT typdoc FROM notices WHERE notice_id = ".$notice_id;
$result = pmb_mysql_query($query);
return pmb_mysql_result($result, 0, 'typdoc');
}
protected function get_tab_responsabilities_form() {
global $charset;
global $value_deflt_fonction;
global $pmb_authors_qualification;
global $notice_tab_responsabilities_form_tpl;
global $notice_responsabilities_others_form_tpl;
global $notice_responsabilities_secondary_form_tpl;
$tab_responsabilities_form = $notice_tab_responsabilities_form_tpl;
$fonction = new marc_list('function');
$as = array_search ("0", $this->responsabilites["responsabilites"]);
if ($as !== false && $as !== null) {
$auteur_0 = $this->responsabilites["auteurs"][$as];
} else {
$auteur_0 = array(
'id' => 0,
'fonction' => (!empty($value_deflt_fonction) ? $value_deflt_fonction : ''),
'responsability' => '',
'id_responsability' => 0
);
}
$authority_isbd = "";
if ($auteur_0["id"] != 0) {
$authority_instance = authorities_collection::get_authority(AUT_TABLE_AUTHORITY, 0, [ 'num_object' => $auteur_0["id"], 'type_object' => AUT_TABLE_AUTHORS]);
$authority_isbd = $authority_instance->get_isbd();
}
if (!empty($pmb_authors_qualification)) {
$vedette_ui = new vedette_ui(new vedette_composee(vedette_composee::get_vedette_id_from_object($auteur_0["id_responsability"], TYPE_NOTICE_RESPONSABILITY_PRINCIPAL), static::$vedette_composee_config_filename));
$tab_responsabilities_form = str_replace('!!vedette_author!!', $vedette_ui->get_form('role', 0, 'notice'), $tab_responsabilities_form);
} else {
$tab_responsabilities_form = str_replace('!!vedette_author!!', "", $tab_responsabilities_form);
}
$tab_responsabilities_form = str_replace('!!iaut!!', 0, $tab_responsabilities_form);
$tab_responsabilities_form = str_replace('!!aut0_id!!', $auteur_0["id"], $tab_responsabilities_form);
$tab_responsabilities_form = str_replace('!!aut0!!', htmlentities($authority_isbd, ENT_QUOTES, $charset), $tab_responsabilities_form);
$tab_responsabilities_form = str_replace('!!f0_code!!', $auteur_0["fonction"], $tab_responsabilities_form);
$tab_responsabilities_form = str_replace('!!f0!!', ($auteur_0["fonction"] ? $fonction->table[$auteur_0["fonction"]] : ''), $tab_responsabilities_form);
$autres_auteurs = '';
$as = array_keys($this->responsabilites["responsabilites"], "1");
$max_aut1 = count($as);
if (empty($max_aut1)) {
$max_aut1 = 1;
}
for ($i = 0; $i < $max_aut1; $i++) {
if (isset($as[$i]) && $as[$i]!== false && $as[$i]!== null) {
$indice = $as[$i];
$auteur_1 = $this->responsabilites["auteurs"][$indice];
} else {
$auteur_1 = array(
'id' => 0,
'fonction' => (!empty($value_deflt_fonction) ? $value_deflt_fonction : ''),
'responsability' => '',
'id_responsability' => 0
);
}
$authority_isbd = "";
if ($auteur_1["id"] != 0) {
$authority_instance = authorities_collection::get_authority(AUT_TABLE_AUTHORITY, 0, [ 'num_object' => $auteur_1["id"], 'type_object' => AUT_TABLE_AUTHORS]);
$authority_isbd = trim($authority_instance->get_isbd());
}
$ptab_aut_autres = $notice_responsabilities_others_form_tpl;
if ($i == 0) {
$ptab_aut_autres = str_replace('!!bouton_add_display!!', '', $ptab_aut_autres);
} else {
$ptab_aut_autres = str_replace('!!bouton_add_display!!', 'display:none', $ptab_aut_autres);
}
$button_add = '';
if ($i == ($max_aut1 -1)) {
$button_add = "";
}
$ptab_aut_autres = str_replace('!!button_add_aut1!!', $button_add, $ptab_aut_autres);
if (!empty($pmb_authors_qualification)) {
$vedette_ui = new vedette_ui(new vedette_composee(vedette_composee::get_vedette_id_from_object($auteur_1["id_responsability"], TYPE_NOTICE_RESPONSABILITY_AUTRE), static::$vedette_composee_config_filename));
$ptab_aut_autres = str_replace('!!vedette_author!!', $vedette_ui->get_form('role_autre', $i, 'notice', '', 0), $ptab_aut_autres);
} else {
$ptab_aut_autres = str_replace('!!vedette_author!!', "", $ptab_aut_autres);
}
$ptab_aut_autres = str_replace('!!iaut!!', $i, $ptab_aut_autres);
$ptab_aut_autres = str_replace('!!aut1_id!!', $auteur_1["id"], $ptab_aut_autres);
$ptab_aut_autres = str_replace('!!aut1!!', htmlentities($authority_isbd, ENT_QUOTES, $charset), $ptab_aut_autres);
$ptab_aut_autres = str_replace('!!f1_code!!', $auteur_1["fonction"], $ptab_aut_autres);
$ptab_aut_autres = str_replace('!!f1!!', ($auteur_1["fonction"] ? $fonction->table[$auteur_1["fonction"]] : ''), $ptab_aut_autres);
$autres_auteurs .= $ptab_aut_autres;
}
$tab_responsabilities_form = str_replace('!!max_aut1!!', $max_aut1, $tab_responsabilities_form);
$auteurs_secondaires = '';
$as = array_keys($this->responsabilites["responsabilites"], "2");
$max_aut2 = count($as);
if (empty($max_aut2)) {
$max_aut2 = 1;
}
for ($i = 0; $i < $max_aut2; $i++) {
if (isset($as[$i]) && $as[$i] !== false && $as[$i] !== null) {
$indice = $as[$i];
$auteur_2 = $this->responsabilites["auteurs"][$indice];
} else {
$auteur_2 = array(
'id' => 0,
'fonction' => (!empty($value_deflt_fonction) ? $value_deflt_fonction : ''),
'responsability' => '',
'id_responsability' => 0
);
}
$authority_isbd = "";
if ($auteur_2["id"] != 0) {
$authority_instance = authorities_collection::get_authority(AUT_TABLE_AUTHORITY, 0, [ 'num_object' => $auteur_2["id"], 'type_object' => AUT_TABLE_AUTHORS]);
$authority_isbd = $authority_instance->get_isbd();
}
$ptab_aut_autres = $notice_responsabilities_secondary_form_tpl;
if ($i == 0) {
$ptab_aut_autres = str_replace('!!bouton_add_display!!', '', $ptab_aut_autres);
} else {
$ptab_aut_autres = str_replace('!!bouton_add_display!!', 'display:none', $ptab_aut_autres);
}
$button_add = '';
if ($i == ($max_aut2 - 1)) {
$button_add = "";
}
$ptab_aut_autres = str_replace('!!button_add_aut2!!', $button_add, $ptab_aut_autres);
if (!empty($pmb_authors_qualification)) {
$vedette_ui = new vedette_ui(new vedette_composee(vedette_composee::get_vedette_id_from_object($auteur_2["id_responsability"], TYPE_NOTICE_RESPONSABILITY_SECONDAIRE), static::$vedette_composee_config_filename));
$ptab_aut_autres = str_replace('!!vedette_author!!', $vedette_ui->get_form('role_secondaire', $i, 'notice', '', 0), $ptab_aut_autres);
} else {
$ptab_aut_autres = str_replace('!!vedette_author!!', "", $ptab_aut_autres);
}
$ptab_aut_autres = str_replace('!!iaut!!', $i, $ptab_aut_autres);
$ptab_aut_autres = str_replace('!!aut2_id!!', $auteur_2["id"], $ptab_aut_autres);
$ptab_aut_autres = str_replace('!!aut2!!', htmlentities($authority_isbd, ENT_QUOTES, $charset), $ptab_aut_autres);
$ptab_aut_autres = str_replace('!!f2_code!!', $auteur_2["fonction"], $ptab_aut_autres);
$ptab_aut_autres = str_replace('!!f2!!', ($auteur_2["fonction"] ? $fonction->table[$auteur_2["fonction"]] : ''), $ptab_aut_autres);
$auteurs_secondaires .= $ptab_aut_autres;
}
$tab_responsabilities_form = str_replace('!!max_aut2!!', $max_aut2, $tab_responsabilities_form);
$tab_responsabilities_form = str_replace('!!autres_auteurs!!', $autres_auteurs, $tab_responsabilities_form);
$tab_responsabilities_form = str_replace('!!auteurs_secondaires!!', $auteurs_secondaires, $tab_responsabilities_form);
return $tab_responsabilities_form;
}
protected function get_tab_uniform_title_form() {
global $charset;
global $notice_tab_uniform_title_form_tpl;
$tab_uniform_title_form = $notice_tab_uniform_title_form_tpl;
if($this->duplicate_from_id) $tu=new tu_notice($this->duplicate_from_id);
else $tu=new tu_notice($this->id);
$tab_uniform_title_form = str_replace("!!titres_uniformes!!", $tu->get_form("notice"), $tab_uniform_title_form);
return $tab_uniform_title_form;
}
protected function get_tab_isbn_form() {
global $notice_tab_isbn_form_tpl;
$tab_isbn_form_tpl = str_replace('!!cb!!', $this->code, $notice_tab_isbn_form_tpl);
$tab_isbn_form_tpl = str_replace('!!notice_id!!', $this->id, $tab_isbn_form_tpl);
return $tab_isbn_form_tpl;
}
protected function get_tab_notes_form() {
global $charset;
global $notice_tab_notes_form_tpl;
$tab_notes_form = $notice_tab_notes_form_tpl;
$tab_notes_form = str_replace('!!n_gen!!', htmlentities($this->n_gen ,ENT_QUOTES, $charset) , $tab_notes_form);
$tab_notes_form = str_replace('!!n_contenu!!', htmlentities($this->n_contenu ,ENT_QUOTES, $charset) , $tab_notes_form);
$tab_notes_form = str_replace('!!n_resume!!', htmlentities($this->n_resume ,ENT_QUOTES, $charset) , $tab_notes_form);
return $tab_notes_form;
}
protected function get_tab_lang_form() {
global $charset;
global $notice_tab_lang_form_tpl;
global $notice_lang_first_form_tpl;
global $notice_lang_next_form_tpl;
global $notice_langorg_first_form_tpl;
global $notice_langorg_next_form_tpl;
$tab_lang_form = $notice_tab_lang_form_tpl;
// langues repetables
$lang_repetables = '';
if (empty($this->langues)) {
$max_lang = 1;
} else {
$max_lang = count($this->langues);
}
for ($i = 0; $i < $max_lang; $i++) {
if ($i == 0) {
$ptab_lang = str_replace('!!ilang!!', $i, $notice_lang_first_form_tpl);
} else {
$ptab_lang = str_replace('!!ilang!!', $i, $notice_lang_next_form_tpl);
}
if ($i == $max_lang - 1) {
$ptab_lang = str_replace('!!button_add_lang!!', "", $ptab_lang);
} else {
$ptab_lang = str_replace('!!button_add_lang!!', '', $ptab_lang);
}
if (empty($this->langues)) {
$ptab_lang = str_replace('!!lang_code!!', '', $ptab_lang);
$ptab_lang = str_replace('!!lang!!', '', $ptab_lang);
} else {
$ptab_lang = str_replace('!!lang_code!!', $this->langues[$i]["lang_code"], $ptab_lang);
$ptab_lang = str_replace('!!lang!!', htmlentities($this->langues[$i]["langue"], ENT_QUOTES, $charset), $ptab_lang);
}
$lang_repetables .= $ptab_lang;
}
$tab_lang_form = str_replace('!!max_lang!!', $max_lang, $tab_lang_form);
$tab_lang_form = str_replace('!!langues_repetables!!', $lang_repetables, $tab_lang_form);
// langues originales repetables
$langorg_repetables = '';
if (empty($this->languesorg)) {
$max_langorg = 1;
} else {
$max_langorg = count($this->languesorg);
}
for ($i = 0; $i < $max_langorg; $i++) {
if ($i == 0) {
$ptab_lang = str_replace('!!ilangorg!!', $i, $notice_langorg_first_form_tpl);
} else {
$ptab_lang = str_replace('!!ilangorg!!', $i, $notice_langorg_next_form_tpl);
}
if (empty($this->languesorg)) {
$ptab_lang = str_replace('!!langorg_code!!', '', $ptab_lang);
$ptab_lang = str_replace('!!langorg!!', '', $ptab_lang);
} else {
$ptab_lang = str_replace('!!langorg_code!!', $this->languesorg[$i]["lang_code"], $ptab_lang);
$ptab_lang = str_replace('!!langorg!!', htmlentities($this->languesorg[$i]["langue"], ENT_QUOTES, $charset), $ptab_lang);
}
$langorg_repetables .= $ptab_lang ;
}
$tab_lang_form = str_replace('!!max_langorg!!', $max_langorg, $tab_lang_form);
$tab_lang_form = str_replace('!!languesorg_repetables!!', $langorg_repetables, $tab_lang_form);
return $tab_lang_form;
}
protected function get_tab_indexation_form() {
global $charset, $msg;
global $notice_tab_indexation_form_tpl, $notice_indexation_first_form_tpl, $notice_indexation_next_form_tpl;
global $thesaurus_concepts_active;
global $thesaurus_categories_affichage_ordre;
global $thesaurus_mode_pmb, $thesaurus_classement_mode_pmb, $pmb_keyword_sep;
$tab_indexation_form = $notice_tab_indexation_form_tpl;
// categories
$categ_repetables = '';
//tri ?
if ($thesaurus_categories_affichage_ordre == 0 && !empty($this->categories)) {
$tmp = array();
foreach ($this->categories as $key => $value) {
$tmp[$key] = strip_tags($value['categ_libelle']);
}
$tmp = array_map("convert_diacrit", $tmp);//On enlève les accents
$tmp = array_map("strtoupper", $tmp);//On met en majuscule
asort($tmp);//Tri sur les valeurs en majuscule sans accent
foreach ($tmp as $key => $value) {
$tmp[$key] = $this->categories[$key];//On reprend les bons couples
}
$this->categories = array_values($tmp);
}
if (empty($this->categories)) {
$max_categ = 1;
} else {
$max_categ = count($this->categories);
}
$tab_categ_order = "";
for ($i = 0; $i < $max_categ; $i++) {
if (!empty($this->categories[$i]["categ_id"])) {
$categ_id = $this->categories[$i]["categ_id"];
} else {
$categ_id = 0;
}
$categ = new category($categ_id);
if ($i == 0) {
$ptab_categ = str_replace('!!icateg!!', $i, $notice_indexation_first_form_tpl);
} else {
$ptab_categ = str_replace('!!icateg!!', $i, $notice_indexation_next_form_tpl);
}
if ($i == $max_categ - 1) {
$ptab_categ = str_replace("!!add_categ_btn!!", "", $ptab_categ);
} else {
$ptab_categ = str_replace('!!add_categ_btn!!', '', $ptab_categ);
}
$ptab_categ = str_replace('!!categ_id!!', $categ_id, $ptab_categ);
if (empty($this->categories)) {
$ptab_categ = str_replace('!!categ_libelle!!', '', $ptab_categ);
} else {
$nom_thesaurus = '';
if (!empty($thesaurus_mode_pmb)) {
$nom_thesaurus = '['.$categ->thes->getLibelle().'] ';
}
$ptab_categ = str_replace('!!categ_libelle!!', htmlentities($nom_thesaurus.$categ->catalog_form, ENT_QUOTES, $charset), $ptab_categ);
if ($tab_categ_order != "") {
$tab_categ_order .= ",";
}
$tab_categ_order .= $i;
}
$categ_repetables .= $ptab_categ ;
}
$tab_indexation_form = str_replace('!!max_categ!!', $max_categ, $tab_indexation_form);
$tab_indexation_form = str_replace('!!categories_repetables!!', $categ_repetables, $tab_indexation_form);
$tab_indexation_form = str_replace('!!tab_categ_order!!', $tab_categ_order, $tab_indexation_form);
// indexation interne
$tab_indexation_form = str_replace('!!indexint_id!!', $this->indexint, $tab_indexation_form);
if (!empty($this->indexint)) {
$indexint = new indexint($this->indexint);
$tab_indexation_form = str_replace('!!indexint!!', htmlentities($indexint->get_isbd(), ENT_QUOTES, $charset), $tab_indexation_form);
$tab_indexation_form = str_replace('!!num_pclass!!', $indexint->id_pclass, $tab_indexation_form);
} else {
$tab_indexation_form = str_replace('!!indexint!!', '', $tab_indexation_form);
$tab_indexation_form = str_replace('!!num_pclass!!', '', $tab_indexation_form);
}
// indexation libre
$tab_indexation_form = str_replace('!!f_indexation!!', htmlentities($this->index_l, ENT_QUOTES, $charset), $tab_indexation_form);
$sep = "'$pmb_keyword_sep'";
if (empty($pmb_keyword_sep)) {
$sep = "' '";
}
if (ord($pmb_keyword_sep) == 0xa || ord($pmb_keyword_sep) == 0xd) {
$sep = $msg['catalogue_saut_de_ligne'];
}
$tab_indexation_form = str_replace("!!sep!!",htmlentities($sep, ENT_QUOTES, $charset), $tab_indexation_form);
// Indexation concept
if ($thesaurus_concepts_active == 1) {
if (!empty($this->duplicate_from_id)) {
$index_concept = new index_concept($this->duplicate_from_id, TYPE_NOTICE);
} else {
$index_concept = new index_concept($this->id, TYPE_NOTICE);
}
$tab_indexation_form = str_replace('!!index_concept_form!!', $index_concept->get_form("notice"), $tab_indexation_form);
} else {
$tab_indexation_form = str_replace('!!index_concept_form!!', "", $tab_indexation_form);
}
return $tab_indexation_form;
}
protected function get_tab_links_form() {
global $charset;
global $notice_tab_links_form_tpl;
global $pmb_curl_timeout;
$tab_links_form = $notice_tab_links_form_tpl;
$tab_links_form = str_replace('!!lien!!', htmlentities($this->lien ,ENT_QUOTES, $charset) , $tab_links_form);
$tab_links_form = str_replace('!!eformat!!', htmlentities($this->eformat ,ENT_QUOTES, $charset) , $tab_links_form);
$tab_links_form = str_replace('!!pmb_curl_timeout!!', $pmb_curl_timeout , $tab_links_form);
return thumbnail::get_js_function_chklnk_tpl().$tab_links_form;
}
protected function get_tab_customs_perso_form() {
global $charset;
global $notice_tab_customs_perso_form_tpl;
$tab_customs_perso_form = $notice_tab_customs_perso_form_tpl;
$p_perso=new parametres_perso("notices");
if (!$p_perso->no_special_fields) {
// si on duplique, construire le formulaire avec les donnees de la notice d'origine
if ($this->duplicate_from_id) $perso_=$p_perso->show_editable_fields($this->duplicate_from_id);
else $perso_=$p_perso->show_editable_fields($this->id);
$perso="";
for ($i=0; $i
".$p["COMMENT_DISPLAY"]."
".$p["AFF"]."
";
}
}
}
}
}
}
//-------------------FIN LLIUREX-----------------------
}
$perso.=$perso_["CHECK_SCRIPTS"];
$tab_customs_perso_form = str_replace("!!champs_perso!!",$perso,$tab_customs_perso_form);
} else {
$tab_customs_perso_form = "\n\n";
}
return $tab_customs_perso_form;
}
//--------------------- INICIO LLIUREX-----------------------
protected function get_tab_customs_perso_form_convo() {
global $msg;
global $charset;
global $notice_tab_custom_convo_fields_form_tpl;
$tab_customs_perso_form = $notice_tab_custom_convo_fields_form_tpl;
$p_perso=new parametres_perso("notices");
if (!$p_perso->no_special_fields) {
// si on duplique, construire le formulaire avec les donnees de la notice d'origine
if ($this->duplicate_from_id) $perso_=$p_perso->show_editable_fields($this->duplicate_from_id);
else $perso_=$p_perso->show_editable_fields($this->id);
$perso="";
for ($i=0; $i
".$p["COMMENT_DISPLAY"]."
".$p["AFF"]."
";
}else{
if (strncmp($p["NAME"], $c2,6)== 0) {
$perso.="
".$p["COMMENT_DISPLAY"]."
".$p["AFF"]."
";
}else {
if (strncmp($p["NAME"], $c3,6)== 0) {
$perso.="
".$p["COMMENT_DISPLAY"]."
".$p["AFF"]."
";
}else{
if (strncmp($p["NAME"], $c4,6)== 0) {
$perso.="
".$p["COMMENT_DISPLAY"]."
".$p["AFF"]."
";
}else{
if (strncmp($p["NAME"], $c5,6)== 0) {
$perso.="
".$p["COMMENT_DISPLAY"]."
".$p["AFF"]."
";
}else{
if (strncmp($p["NAME"], $c6,6)== 0) {
$perso.="
".$p["COMMENT_DISPLAY"]."
".$p["AFF"]."
";
}
}
}
}
}
}
}
$perso.=$perso_["CHECK_SCRIPTS"];
$tab_customs_perso_form = str_replace("!!champs_perso!!",$perso,$tab_customs_perso_form);
} else {
$tab_customs_perso_form = "\n\n";
}
return $tab_customs_perso_form;
}
//----------------- FIN LLIUREX ---------------------------
protected function get_selector_location() {
global $PMBuserid, $pmb_form_editables;
global $msg;
$select_loc="";
if ($PMBuserid==1 && $pmb_form_editables==1) {
$req_loc="select idlocation,location_libelle from docs_location";
$res_loc=pmb_mysql_query($req_loc);
if (pmb_mysql_num_rows($res_loc)>1) {
$select_loc .= "\n";
}
}
return $select_loc;
}
protected function get_selector_indexation_lang() {
global $xmlta_indexation_lang;
global $include_path;
global $charset;
if(!$this->get_id() && !$this->indexation_lang)$this->indexation_lang=$xmlta_indexation_lang;
// if(!$this->indexation_lang) $this->indexation_lang="fr_FR";
$langues = new XMLlist("$include_path/messages/languages.xml");
$langues->analyser();
$clang = $langues->table;
$combo = "";
return $combo;
}
protected function get_tab_gestion_fields() {
global $msg, $charset;
global $pmb_notices_show_dates;
global $notice_tab_gestion_fields_form_tpl;
$tab_gestion_fields_form = $notice_tab_gestion_fields_form_tpl;
$select_statut = gen_liste_multiple ("select id_notice_statut, gestion_libelle from notice_statut order by 2", "id_notice_statut", "gestion_libelle", "id_notice_statut", "form_notice_statut", "", $this->statut, "", "","","",0) ;
$tab_gestion_fields_form = str_replace('!!notice_statut!!', $select_statut, $tab_gestion_fields_form);
if($this->is_new){
$tab_gestion_fields_form = str_replace('!!checked_yes!!', "checked", $tab_gestion_fields_form);
$tab_gestion_fields_form = str_replace('!!checked_no!!', "", $tab_gestion_fields_form);
}else{
$tab_gestion_fields_form = str_replace('!!checked_no!!', "checked", $tab_gestion_fields_form);
$tab_gestion_fields_form = str_replace('!!checked_yes!!', "", $tab_gestion_fields_form);
}
if($this->is_numeric){
$tab_gestion_fields_form = str_replace('!!is_numeric_yes!!', "checked", $tab_gestion_fields_form);
$tab_gestion_fields_form = str_replace('!!is_numeric_no!!', "", $tab_gestion_fields_form);
}else{
$tab_gestion_fields_form = str_replace('!!is_numeric_no!!', "checked", $tab_gestion_fields_form);
$tab_gestion_fields_form = str_replace('!!is_numeric_yes!!', "", $tab_gestion_fields_form);
}
$tab_gestion_fields_form = str_replace('!!commentaire_gestion!!',htmlentities($this->commentaire_gestion,ENT_QUOTES, $charset), $tab_gestion_fields_form);
$tab_gestion_fields_form = str_replace('!!thumbnail_url!!',htmlentities($this->thumbnail_url,ENT_QUOTES, $charset), $tab_gestion_fields_form);
$tab_gestion_fields_form = str_replace('!!message_folder!!',thumbnail::get_message_folder(), $tab_gestion_fields_form);
$select_num_notice_usage = gen_liste_multiple ("select id_usage, usage_libelle from notice_usage order by 2", "id_usage", "usage_libelle", "id_usage", "form_num_notice_usage", "", $this->num_notice_usage, "", "", 0, $msg['notice_usage_none'],0) ;
$tab_gestion_fields_form = str_replace('!!num_notice_usage!!', $select_num_notice_usage, $tab_gestion_fields_form);
if ($this->id && $pmb_notices_show_dates) {
$dates_notices = "
".$this->create_date."
".$this->update_date;
$tab_gestion_fields_form = str_replace('!!dates_notice!!',$dates_notices, $tab_gestion_fields_form);
} else {
$tab_gestion_fields_form = str_replace('!!dates_notice!!',"", $tab_gestion_fields_form);
}
//affichage des formulaires des droits d'acces
$tab_gestion_fields_form = str_replace('', $this->get_rights_form(), $tab_gestion_fields_form);
// langue de la notice
$tab_gestion_fields_form = str_replace('!!indexation_lang!!',$this->get_selector_indexation_lang(), $tab_gestion_fields_form);
return thumbnail::get_js_function_chklnk_tpl().$tab_gestion_fields_form;
}
protected function get_tab_map_form() {
global $notice_tab_map_form_tpl;
if($this->duplicate_from_id) $map_edition=new map_edition_controler(TYPE_RECORD,$this->duplicate_from_id);
else $map_edition=new map_edition_controler(TYPE_RECORD,$this->id);
$map_form=$map_edition->get_form();
if($this->duplicate_from_id) $map_info=new map_info($this->duplicate_from_id);
else $map_info=new map_info($this->id);
$map_form_info=$map_info->get_form();
$map_notice_form = $notice_tab_map_form_tpl;
$map_notice_form = str_replace('!!notice_map!!', $map_form.$map_form_info, $map_notice_form);
return $map_notice_form;
}
// affichage du form associe
public function show_form() {
global $msg;
global $charset;
global $lang;
global $include_path, $class_path;
global $current_module ;
global $pmb_type_audit,$z3950_accessible ;
global $xmlta_indexation_lang;
global $pmb_map_activate;
include($include_path."/templates/catal_form.tpl.php");
$fonction = new marc_list('function');
// mise a jour de l'action en fonction de l'id
if(strpos($this->action, 'acquisition.php') !== false || strpos($this->action, 'demandes.php')) {
$this->action .= $this->id;
} else {
$this->action = static::format_url("&categ=update&id=".$this->id);
}
// mise a jour de l'en-tete du formulaire
if (isset($this->notice_mere[0]) && $this->notice_mere[0]) $this->libelle_form.=" ".$msg["catalog_notice_fille_lib"]." ".substr($this->notice_mere[0],0,100).(count($this->notice_mere)>1?", ...":"");
$form_notice = str_replace('!!libelle_form!!', $this->libelle_form, $form_notice);
// mise a jour des flags de niveau hierarchique
$form_notice = str_replace('!!b_level!!', $this->biblio_level, $form_notice);
$form_notice = str_replace('!!h_level!!', $this->hierar_level, $form_notice);
// Titre de la page
$form_notice = str_replace('!!document_title!!', addslashes(($this->tit1 ? $this->tit1.' - ' : '').$this->libelle_form), $form_notice);
// mise a jour de l'onglet 0
$ptab[0] = str_replace('!!tit1!!', htmlentities($this->tit1,ENT_QUOTES, $charset) , $ptab[0]);
$ptab[0] = str_replace('!!tit2!!', htmlentities($this->tit2,ENT_QUOTES, $charset) , $ptab[0]);
$ptab[0] = str_replace('!!tit3!!', htmlentities($this->tit3,ENT_QUOTES, $charset) , $ptab[0]);
$ptab[0] = str_replace('!!tit4!!', htmlentities($this->tit4,ENT_QUOTES, $charset) , $ptab[0]);
$ptab[0] = str_replace('!!tparent_id!!', $this->tparent_id , $ptab[0]);
$ptab[0] = str_replace('!!tparent!!', htmlentities($this->tparent,ENT_QUOTES, $charset) , $ptab[0]);
$ptab[0] = str_replace('!!tnvol!!', htmlentities($this->tnvol,ENT_QUOTES, $charset) , $ptab[0]);
$form_notice = str_replace('!!tab0!!', $ptab[0], $form_notice);
// mise a jour de l'onglet 1
// constitution de la mention de responsabilite
$form_notice = str_replace('!!tab1!!', $this->get_tab_responsabilities_form(), $form_notice);
// mise a jour de l'onglet 2
$ptab[2] = str_replace('!!ed1_id!!', $this->ed1_id , $ptab[2]);
$ptab[2] = str_replace('!!ed1!!', htmlentities($this->ed1,ENT_QUOTES, $charset) , $ptab[2]);
$ptab[2] = str_replace('!!coll_id!!', $this->coll_id , $ptab[2]);
$ptab[2] = str_replace('!!coll!!', htmlentities($this->coll,ENT_QUOTES, $charset) , $ptab[2]);
$ptab[2] = str_replace('!!subcoll_id!!', $this->subcoll_id , $ptab[2]);
$ptab[2] = str_replace('!!subcoll!!', htmlentities($this->subcoll,ENT_QUOTES, $charset) , $ptab[2]);
$ptab[2] = str_replace('!!year!!', $this->year , $ptab[2]);
$ptab[2] = str_replace('!!nocoll!!', htmlentities($this->nocoll,ENT_QUOTES, $charset) , $ptab[2]);
$ptab[2] = str_replace('!!mention_edition!!', htmlentities($this->mention_edition,ENT_QUOTES, $charset) , $ptab[2]);
$ptab[2] = str_replace('!!ed2_id!!', $this->ed2_id , $ptab[2]);
$ptab[2] = str_replace('!!ed2!!', htmlentities($this->ed2,ENT_QUOTES, $charset) , $ptab[2]);
$form_notice = str_replace('!!tab2!!', $ptab[2], $form_notice);
// mise a jour de l'onglet 3
$form_notice = str_replace('!!tab3!!', $this->get_tab_isbn_form(), $form_notice);
// Gestion des titres uniformes
global $pmb_use_uniform_title;
if ($pmb_use_uniform_title) {
$form_notice = str_replace('!!tab230!!', $this->get_tab_uniform_title_form(), $form_notice);
}
// mise a jour de l'onglet 4
$ptab[4] = str_replace('!!npages!!', htmlentities($this->npages ,ENT_QUOTES, $charset) , $ptab[4]);
$ptab[4] = str_replace('!!ill!!', htmlentities($this->ill ,ENT_QUOTES, $charset) , $ptab[4]);
$ptab[4] = str_replace('!!size!!', htmlentities($this->size ,ENT_QUOTES, $charset) , $ptab[4]);
$ptab[4] = str_replace('!!prix!!', htmlentities($this->prix ,ENT_QUOTES, $charset) , $ptab[4]);
$ptab[4] = str_replace('!!accomp!!', htmlentities($this->accomp ,ENT_QUOTES, $charset) , $ptab[4]);
$form_notice = str_replace('!!tab4!!', $ptab[4], $form_notice);
// mise a jour de l'onglet 5
$form_notice = str_replace('!!tab5!!', $this->get_tab_notes_form(), $form_notice);
// mise a jour de l'onglet 6
$form_notice = str_replace('!!tab6!!', $this->get_tab_indexation_form(), $form_notice);
// mise a jour de l'onglet 7 : langues
$form_notice = str_replace('!!tab7!!', $this->get_tab_lang_form(), $form_notice);
// mise a jour de l'onglet 8
$form_notice = str_replace('!!tab8!!', $this->get_tab_links_form(), $form_notice);
//Mise a jour de l'onglet 9
$form_notice = str_replace('!!tab9!!', $this->get_tab_customs_perso_form(), $form_notice);
//----------------- LLIUREX ---------------------------------
$form_notice = str_replace('!!tab999!!', $this->get_tab_customs_perso_form_convo(), $form_notice);
//----------------- FIN LLIUREX -----------------------------
// Nomenclature
if($pmb_nomenclature_activate){
$nomenclature_duplicate = false;
if($this->duplicate_from_id) {
$nomenclature= new nomenclature_record_ui($this->duplicate_from_id);
$nomenclature_duplicate = true;
// On va chercher les relations vers les sous-manifs pour les supprimer
$sub_manifs = array();
$query = "SELECT child_record_num_record FROM nomenclature_notices_nomenclatures JOIN nomenclature_children_records ON id_notice_nomenclature = child_record_num_nomenclature WHERE notice_nomenclature_num_notice = ".$this->duplicate_from_id;
$result = pmb_mysql_query($query);
if (pmb_mysql_num_rows($result)) {
while ($row = pmb_mysql_fetch_assoc($result)) {
$sub_manifs[] = $row['child_record_num_record'];
}
}
if (count($sub_manifs)) {
foreach ($this->notice_link['down'] as $i => $notice_link_down) {
if (in_array($notice_link_down->get_linked_notice(), $sub_manifs)) {
unset($this->notice_link['down'][$i]);
}
}
}
} else {
$nomenclature= new nomenclature_record_ui($this->id);
}
$nomenclature_notice_form=$ptab[15];
$nomenclature_notice_form = str_replace('!!nomenclature_form!!', $nomenclature->get_form($nomenclature_duplicate), $nomenclature_notice_form);
$form_notice = str_replace('!!tab15!!', $nomenclature_notice_form, $form_notice);
}else{
$form_notice = str_replace('!!tab15!!', "", $form_notice);
}
//Liens vers d'autres notices
if($this->duplicate_from_id) {
$notice_relations = notice_relations_collection::get_object_instance($this->duplicate_from_id);
} else {
$notice_relations = notice_relations_collection::get_object_instance($this->id);
}
$form_notice = str_replace('!!tab11!!', $notice_relations->get_form($this->notice_link, 'm', ($this->duplicate_from_id ? true : false)),$form_notice);
// champs de gestion
$form_notice = str_replace('!!tab10!!', $this->get_tab_gestion_fields(), $form_notice);
$form_notice = str_replace('!!indexation_lang_sel!!', ($this->indexation_lang ? $this->indexation_lang : $xmlta_indexation_lang), $form_notice);
// autorité personnalisées
if($this->duplicate_from_id) {
$authperso = new authperso_notice($this->duplicate_from_id);
} else {
$authperso = new authperso_notice($this->id);
}
$authperso_tpl=$authperso->get_form();
$form_notice = str_replace('!!authperso!!', $authperso_tpl, $form_notice);
// map
if($pmb_map_activate){
$form_notice = str_replace('!!tab14!!', $this->get_tab_map_form(), $form_notice);
}else{
$form_notice = str_replace('!!tab14!!', "", $form_notice);
}
// definition de la page cible du form
$form_notice = str_replace('!!action!!', $this->action, $form_notice);
// ajout des selecteurs
$select_doc = new marc_select('doctype', 'typdoc', $this->type_doc, "get_pos(); expandAll(); ajax_parse_dom(); if (inedit) move_parse_dom(relative); else initIt();", '', '', array(array("name"=> "data-form-name", "value"=>"doctype")));
$form_notice = str_replace('!!doc_type!!', $select_doc->display, $form_notice);
// Ajout des localisations pour edition
$form_notice=str_replace("!!location!!",$this->get_selector_location(),$form_notice);
// affichage du lien pour suppression et du lien d'annulation
if ($this->id) {
$link_supp = "
";
$link_annul = "";
$link_remplace = "";
$link_duplicate = "";
if ($z3950_accessible) $link_z3950 = "";
else $link_z3950="";
if ($pmb_type_audit) $link_audit = audit::get_dialog_button($this->id, 1);
else $link_audit = "" ;
} else {
$link_supp = "";
$link_remplace = "";
$link_duplicate = "" ;
$link_z3950 = "" ;
$link_audit = "" ;
// if ($this->notice_mere_id || $this->duplicate_from_id) $link_annul = "";
if ((isset($this->notice_link['up']) && $this->notice_link['up'][0]->get_linked_notice()) || $this->duplicate_from_id) $link_annul = "";
else $link_annul = "link_annul."';\" />";
}
$form_notice = str_replace('!!link_supp!!', $link_supp, $form_notice);
$form_notice = str_replace('!!link_annul!!', $link_annul, $form_notice);
$form_notice = str_replace('!!link_remplace!!', $link_remplace, $form_notice);
$form_notice = str_replace('!!link_duplicate!!', $link_duplicate, $form_notice);
$form_notice = str_replace('!!link_z3950!!', $link_z3950, $form_notice);
$form_notice = str_replace('!!link_audit!!', $link_audit, $form_notice);
$event = new event_record('record', 'after_show_form');
$event->set_record_id($this->id);
$event_handler = events_handler::get_instance();
$event_handler->send($event);
$plugins_form = '';
if ($event->get_result()) {
$plugins_form = $event->get_result();
}
$form_notice = str_replace('!!plugins_form!!', $plugins_form, $form_notice);
return $form_notice;
}
//creation formulaire droits d'acces pour notices
public function get_rights_form() {
global $msg,$charset;
global $gestion_acces_active,$gestion_acces_user_notice, $gestion_acces_empr_notice;
global $gestion_acces_user_notice_def, $gestion_acces_empr_notice_def;
global $PMBuserid;
if ($gestion_acces_active!=1) return '';
$ac = new acces();
$form = '';
$c_form = "