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':
// print encoding_normalize::utf8_normalize($this->get_simple_search_form());
$entity_form = $this->get_search_form();
break;
case 'advanced_search':
// print encoding_normalize::utf8_normalize($this->get_advanced_search_form());
break;
case 'results_search':
// print $this->results_search();
show_results($this->user_input, $this->nbr_lignes, $page);
break;
default:
print $this->get_sel_header_template();
print $this->get_js_script();
if($pmb_allow_authorities_first_page || $this->user_input!= ""){
if(!$this->user_input) {
$this->user_input = '*';
}
// print $this->get_display_list();
}
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_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 .= "
".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 .= "
".htmlentities($mono_display->notice->code,ENT_QUOTES,$charset)."
";
}
return $display;
}
protected function get_searcher_instance() {
return searcher_factory::get_searcher('records', '', $this->user_input);
}
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 .= "