objects_type = 'records'; } public function proceed() { global $msg; global $action; global $pmb_allow_authorities_first_page; global $page; $entity_form = ''; switch($action){ case 'simple_search': $entity_form = $this->get_simple_search_form(); break; case 'advanced_search': $entity_form = $this->get_advanced_search_form(); break; case 'results_search': ob_start(); print $this->results_search(); $entity_form = ob_get_contents(); ob_end_clean(); break; case 'add': $entity_form = '
'; ob_start(); $this->get_advanced_form(); $entity_form.= ob_get_contents(); ob_end_clean(); $entity_form.='
'; break; case 'update': $saved_id = $this->get_advanced_save(); $entities_controller = $this->get_entities_controller_instance($saved_id); $instance = $entities_controller->get_object_instance(); $entity_form = ''; break; case 'element_display': global $id; $id += 0; if($id) { $elements_records_selectors_list_ui = new elements_records_selectors_list_ui(array($id), 1, 1); $entity_form = $elements_records_selectors_list_ui->get_elements_list(); } break; default: print $this->get_sel_header_template(); print $this->get_js_script(); print $this->get_sel_footer_template(); print $this->get_sub_tabs(); break; } if ($entity_form) { header("Content-Type: text/html; charset=UTF-8"); print encoding_normalize::utf8_normalize($entity_form); } } protected function get_advanced_form() { $entities_controller = $this->get_entities_controller_instance(); $entities_controller->set_url_base(static::get_base_url()."&action=update"); $entities_controller->proceed_form(); } protected function get_advanced_save() { $entities_controller = $this->get_entities_controller_instance(); $entities_controller->set_url_base(static::get_base_url()); return $entities_controller->proceed_update(); } protected function get_display_list() { global $nb_per_page; global $page; global $no_display; $display_list = ''; if(!$page) { $debut = 0; } else { $debut = ($page-1)*$nb_per_page; } $searcher_instance = $this->get_searcher_instance(); $this->nbr_lignes = $searcher_instance->get_nb_results(); if($this->nbr_lignes) { $sorted_objects = $searcher_instance->get_sorted_result('default', $debut, $nb_per_page); foreach ($sorted_objects as $object_id) { $display_list .= $this->get_display_object(0, $object_id); } $display_list .= $this->get_pagination(); } else { $display_list .= $this->get_message_not_found(); } return $display_list; } protected function get_display_object($id=0, $object_id=0) { global $msg, $charset; global $caller; global $callback; global $niveau_biblio, $modele_id, $serial_id; $display = ''; if($niveau_biblio){ $location="./catalog.php?categ=serials&sub=modele&act=copy&modele_id=$modele_id&serial_id=$serial_id&new_serial_id=".$object_id; $mono_display = new mono_display($object_id, 0, '', 0, '', '', '',0, 0, 0, 0,"", 0, false, true); $display .= "
".$mono_display->header_texte."
".htmlentities($mono_display->notice->code,ENT_QUOTES,$charset)."
"; } else{ $mono_display = new mono_display($object_id, 0, '', 0, '', '', '',0, 0, 0, 0,"", 0, false, true); $display .= "
header_texte)),ENT_QUOTES,$charset)." ".($mono_display->notice->code ? "(".$mono_display->notice->code.")" : ""))."','$callback')\">".$mono_display->result."
".htmlentities($mono_display->notice->code,ENT_QUOTES,$charset)."
"; } return $display; } protected function get_searcher_instance() { $searcher = searcher_factory::get_searcher('records', '', $this->user_input); $searcher->add_restrict_no_display(); return $searcher; } protected function get_entities_controller_instance($id=0) { return new entities_records_controller($id); } protected function get_typdocfield() { global $msg, $charset; global $typdoc_query; // récupération des types de documents utilisés. $query = "SELECT count(typdoc), typdoc "; $query .= "FROM notices where typdoc!='' GROUP BY typdoc"; $result = pmb_mysql_query($query); $toprint_typdocfield = " \n"; $doctype = new marc_list('doctype'); $obj = array(); $qte = array(); while ($rt = pmb_mysql_fetch_row($result)) { $obj[$rt[1]]=1; $qte[$rt[1]]=$rt[0]; } foreach ($doctype->table as $key=>$libelle){ if (isset($obj[$key]) && $obj[$key]==1){ $toprint_typdocfield .= "