id = $id+0; } public function proceed($entity_type,$context=array()){ global $charset; $frbr_build = new frbr_build($this->id, $entity_type); $display_graph = false; if($frbr_build->has_page() && $frbr_build->has_cadres()) { //récupération des données des jeux de données $datanodes_data = $frbr_build->get_datanodes_data(); $this->dom = new DOMDocument(); $this->dom->encoding = $charset; $old_errors_value = false; if(libxml_use_internal_errors(true)){ $old_errors_value = true; } $html = $this->get_details_display(); if($charset == "utf-8"){ $this->dom->loadHTML("".$html); }else{ $this->dom->loadHTML($html); } if (!$this->dom->getElementById('noticeNot')) { $this->dom = $this->setAllId($this->dom); } foreach ($frbr_build->get_cadres() as $cadre) { if ($cadre['place_visibility']) { if($cadre['cadre_type']) { switch ($cadre['cadre_type']) { case 'isbd': $this->dom->getElementById("noticeNot")->parentNode->appendChild($this->dom->importNode($this->dom->getElementById("blocNotice_descr"),true)); $this->dom->getElementById("noticeNot")->parentNode->appendChild($this->dom->importNode($this->dom->getElementById("docnum"),true)); break; case 'frbr_graph' : $graph_node = $this->dom->createElement("div"); $graph_node->setAttribute('id', 'frbr_entity_graph'); $this->dom->getElementById("noticeNot")->parentNode->appendChild($graph_node); break; } } else { $view_instance = new $cadre['cadre_object']($cadre['id']); $html = $view_instance->show_cadre($datanodes_data); $tmp_dom = new domDocument(); if($charset == "utf-8"){ @$tmp_dom->loadHTML("".$html); }else{ @$tmp_dom->loadHTML($html); } if (!$tmp_dom->getElementById($view_instance->get_dom_id())) { $tmp_dom = $this->setAllId($tmp_dom); } $this->dom->getElementById("noticeNot")->parentNode->appendChild($this->dom->importNode($tmp_dom->getElementById($view_instance->get_dom_id()),true)); } } if ($cadre['cadre_visible_in_graph']) { $display_graph = true; } } if(!$frbr_build->get_page()->get_parameter_value('isbd')) { $this->dom->getElementById("noticeNot")->parentNode->removeChild($this->dom->getElementById('noticeNot')); } //frbr_graph if ($this->dom->getElementById("frbr_entity_graph")) { if ($display_graph) { $this->build_graph(); } else { $this->dom->getElementById("frbr_entity_graph")->parentNode->removeChild($this->dom->getElementById("frbr_entity_graph")); } } print $this->dom->saveHTML(); libxml_use_internal_errors($old_errors_value); } else { print $this->get_details_display(); } } protected function calculate_restrict_access_rights() { global $gestion_acces_active, $gestion_acces_empr_notice; $this->acces_v=TRUE; if ($gestion_acces_active==1 && $gestion_acces_empr_notice==1) { $ac= new acces(); $dom_2= $ac->setDomain(2); $this->acces_v = $dom_2->getRights($_SESSION['id_empr_session'],$this->id,4); } else { $query = "SELECT notice_visible_opac, expl_visible_opac, notice_visible_opac_abon, expl_visible_opac_abon, explnum_visible_opac, explnum_visible_opac_abon FROM notices, notice_statut WHERE notice_id ='".$this->id."' and id_notice_statut=statut "; $result = pmb_mysql_query($query); if(pmb_mysql_num_rows($result)) { $statut_temp = pmb_mysql_fetch_object($result); if(!$statut_temp->notice_visible_opac) $this->acces_v=FALSE; if($statut_temp->notice_visible_opac_abon && !$_SESSION['id_empr_session']) $this->acces_v=FALSE; } else $this->acces_v=FALSE; } } protected function get_details_explnum_display() { global $msg, $charset; global $mode_phototeque, $opac_photo_mean_size_x, $opac_photo_show_form; global $opac_visionneuse_allow, $sendToVisionneuseNoticeDisplay; $display = ''; if (isset($mode_phototeque) && $mode_phototeque) { // Traitement exemplaire numerique $query = "SELECT explnum_id, explnum_notice, explnum_bulletin, explnum_nom, explnum_mimetype, explnum_url, explnum_data, explnum_vignette, explnum_nomfichier, explnum_extfichier FROM explnum WHERE "; $query .= "explnum_notice='".$this->id."' "; $query .= " order by explnum_id LIMIT 1"; $result = pmb_mysql_query($query); if (pmb_mysql_num_rows($result)) { $explnumobj=pmb_mysql_fetch_object($result); if ($explnumobj->explnum_url) { $display .= "