objects_type = 'indexint';
}
protected function get_form() {
global $charset;
global $selector_indexint_form;
$form = $selector_indexint_form;
$form = str_replace("!!deb_saisie!!", htmlentities($this->user_input,ENT_QUOTES,$charset), $form);
$form = str_replace("!!base_url!!",static::get_base_url(),$form);
return $form;
}
protected function get_add_link() {
global $pclass_url;
$link = parent::get_add_link();
$link .= $pclass_url;
return $link;
}
protected function get_search_form() {
global $charset;
global $thesaurus_classement_mode_pmb, $typdoc;
global $thesaurus_classement_location, $deflt_docs_location;
global $id_pclass;
global $exact;
$sel_search_form = parent::get_search_form();
$toprint_typdocfield = '';
if ($thesaurus_classement_mode_pmb) { //classement indexation décimale autorisé en parametrage
$query = "select id_pclass,name_pclass from pclassement where typedoc like '%$typdoc%'";
if($thesaurus_classement_location && $deflt_docs_location) {
$query .= " AND (locations like '".$deflt_docs_location."' or locations like '".$deflt_docs_location.",%' or locations like '%,".$deflt_docs_location."' or locations like '%,".$deflt_docs_location.",%')";
}
$query .= " order by name_pclass";
$result = pmb_mysql_query($query);
if(pmb_mysql_num_rows($result) == 1) {
$row = pmb_mysql_fetch_object($result);
$id_pclass=$row->id_pclass;
$toprint_typdocfield .= "[".$row->name_pclass."]";
} elseif(pmb_mysql_num_rows($result) > 1) {
$toprint_typdocfield .= "";
}
}
$sel_search_form = str_replace("!!pclassement!!", $toprint_typdocfield, $sel_search_form);
if ((string)$exact=="") $exact=1;
if ($exact) {
$sel_search_form = str_replace("!!check1!!", "checked", $sel_search_form);
$sel_search_form = str_replace("!!check0!!", "", $sel_search_form);
} else {
$sel_search_form = str_replace("!!check1!!", "", $sel_search_form);
$sel_search_form = str_replace("!!check0!!", "checked", $sel_search_form);
}
return $sel_search_form;
}
protected function save() {
global $indexint_nom;
global $indexint_comment;
global $id_pclass;
$value= $indexint_nom;
$indexint = new indexint(0);
$indexint->update($value,$indexint_comment,$id_pclass);
return $indexint->indexint_id;
}
protected function get_authority_instance($authority_id=0, $object_id=0) {
return new authority($authority_id, $object_id, AUT_TABLE_INDEXINT);
}
protected function get_display_object($authority_id=0, $object_id=0) {
global $msg, $charset;
global $caller;
global $callback;
global $thesaurus_classement_mode_pmb;
$display = '';
$authority = $this->get_authority_instance($authority_id, $object_id);
$indexint = $authority->get_object_instance();
if ($indexint->comment) {
$entry = $indexint->name." - ".$indexint->comment;
} else {
$entry = $indexint->name ;
}
if ($thesaurus_classement_mode_pmb != 0) { //classement indexation décimale autorisé en parametrage
$entry="[".$indexint->name_pclass."] ".$entry;
}
$display .= pmb_bidi($authority->get_display_statut_class_html()."
get_num_object()."', '".htmlentities(addslashes(str_replace("\r"," ",str_replace("\n"," ",$entry))),ENT_QUOTES,$charset)."','$callback')\">
$entry");
$display .= "
";
return $display;
}
protected function get_searcher_instance() {
return searcher_factory::get_searcher('indexint', '', $this->user_input);
}
protected function get_entities_controller_instance($id=0) {
return new entities_indexint_controller($id);
}
public function get_sel_search_form_template() {
global $msg, $charset;
$sel_search_form ="