uid = $uid; $this->ufield=$ufield; $this->op=$op; $this->values=$values; $this->vars=$vars; $this->inter=$inter; } function set_sub($sub) { $this->sub=$sub; } } class search { var $operators; var $op_empty; var $fixedfields; var $dynamicfields; var $specialfields; var $pp; var $error_message; var $link; var $link_expl; var $link_expl_bull; var $link_explnum; var $link_serial; var $link_analysis; var $link_bulletin; var $link_explnum_serial; var $rec_history; var $tableau_speciaux; var $operator_multi_value; var $full_path=''; var $fichier_xml; var $dynamics_not_visible; var $specials_not_visible; var $isfichier = false; function search($rec_history=false,$fichier_xml="",$full_path='') { global $launch_search; $this->parse_search_file($fichier_xml,$full_path); $this->strip_slashes(); foreach ( $this->dynamicfields as $key => $value ) { $this->pp[$key]=new parametres_perso($value["TYPE"]); } $this->rec_history=$rec_history; $this->full_path = $full_path; $this->fichier_xml=$fichier_xml; } function strip_slashes() { global $search, $explicit_search; for ($i=0; $ifixedfields[$s[1]]; switch ($ff["INPUT_TYPE"]) { case "date": $field_temp=extraitdate($field[0]); $field[0]=$field_temp; break; default: //Rien a faire break; } } } $$field_=$field; } } function get_id_from_datatype($datatype, $fieldType = "d") { reset($this->dynamicfields[$fieldType]["FIELD"]); while (list($key,$val)=each($this->dynamicfields[$fieldType]["FIELD"])) { if ($val["DATATYPE"]==$datatype) return $key; } return ""; } function get_field($i,$n,$search,$pp) { global $base_path,$charset; global $aff_list_empr_search; global $msg; global $include_path; global $thesaurus_classement_mode_pmb; $r=""; $s=explode("_",$search); //Champ $val="field_".$i."_".$search; global $$val; $v=$$val; if ($v=="") $v=array(); //Variables $fieldvar_="fieldvar_".$i."_".$search; global $$fieldvar_; $fieldvar=$$fieldvar_; if ($s[0]=="f") { //Champs fixes $ff=$this->fixedfields[$s[1]]; //Variables globales et input for ($j=0; $jrejete) $libelle = $aut->name.', '.$aut->rejete; else $libelle = $aut->name; if($aut->date) $libelle .= " ($aut->author_date)"; break; case "categorie": $libelle = categories::getlibelle($v[0],$lang); break; case "editeur": $ed = new editeur($v[0]); $libelle=$ed->name; if ($ed->ville) if ($ed->pays) $libelle.=" ($ed->ville - $ed->pays)"; else $libelle.=" ($ed->ville)"; break; case "collection" : $coll = new collection($v[0]); $libelle = $coll->name; break; case "subcollection" : $coll = new subcollection($v[0]); $libelle = $coll->name; break; case "serie" : $serie = new serie($v[0]); $libelle = $serie->name; break; case "indexint" : $indexint = new indexint($v[0]); if ($indexint->comment) $libelle = $indexint->name." - ".$indexint->comment; else $libelle = $indexint->name ; if ($thesaurus_classement_mode_pmb != 0) { $libelle="[".$indexint->name_pclass."] ".$libelle; } break; case "titre_uniforme" : $tu = new titre_uniforme($v[0]); $libelle = $tu->name; break; default : $libelle = $v[0]; break; } } $$op == "BOOLEAN"; $r=""; } if($libelle){ $r.=""; }else{ $r.=""; } break; case "authoritie": $fnamesans="field_".$n."_".$search; $fname="field_".$n."_".$search."[]"; $fname_id="field_".$n."_".$search."_id"; $fnamesanslib="field_".$n."_".$search."_lib"; $fnamelib="field_".$n."_".$search."_lib[]"; $fname_name_aut_id="fieldvar_".$n."_".$search."[authority_id][]"; $fname_aut_id="fieldvar_".$n."_".$search."_authority_id"; $ajax=$ff["INPUT_OPTIONS"]["AJAX"]; $selector=$ff["INPUT_OPTIONS"]["SELECTOR"]; $p1=$ff["INPUT_OPTIONS"]["P1"]; $p2=$ff["INPUT_OPTIONS"]["P2"]; global $thesaurus_mode_pmb; if($ajax == "categories_mul" and $thesaurus_mode_pmb == 1){ $fnamevar_id = "linkfield=\"fieldvar_".$n."_".$search."[id_thesaurus][]\""; }else{ $fnamevar_id = ""; } $op = "op_".$n."_".$search; global $$op; global $lang; $r= " "; if ($$op == "AUTHORITY"){ if($v[0]!= 0){ switch ($ff['INPUT_OPTIONS']['SELECTOR']){ case "auteur": $aut=new auteur($v[0]); if($aut->rejete) $libelle = $aut->name.', '.$aut->rejete; else $libelle = $aut->name; if($aut->date) $libelle .= " ($aut->author_date)"; break; case "categorie": $libelle = categories::getlibelle($v[0],$lang); break; case "editeur": $ed = new editeur($v[0]); $libelle=$ed->name; if ($ed->ville) if ($ed->pays) $libelle.=" ($ed->ville - $ed->pays)"; else $libelle.=" ($ed->ville)"; break; case "collection" : $coll = new collection($v[0]); $libelle = $coll->name; break; case "subcollection" : $coll = new subcollection($v[0]); $libelle = $coll->name; break; case "serie" : $serie = new serie($v[0]); $libelle = $serie->name; break; case "indexint" : $indexint = new indexint($v[0]); if ($indexint->comment) $libelle = $indexint->name." - ".$indexint->comment; else $libelle = $indexint->name ; if ($thesaurus_classement_mode_pmb != 0) { $libelle="[".$indexint->name_pclass."] ".$libelle; } break; case "titre_uniforme" : $tu = new titre_uniforme($v[0]); $libelle = $tu->name; break; default : $libelle = $v[0]; break; } }else $libelle = ""; $r.=" "; }else{ $r.=" "; } $r.= " "; break; case "text": $r=""; break; case "query_list": $requete=$ff["INPUT_OPTIONS"]["QUERY"][0]["value"]; if ($ff["INPUT_OPTIONS"]["QUERY"][0]["USE_GLOBAL"]) { $use_global = explode(",", $ff["INPUT_OPTIONS"]["QUERY"][0]["USE_GLOBAL"]); for($j=0; $j"; while ($opt=mysql_fetch_row($resultat)) { $r.="