categ_name) { $sources[$srce->categ_name][] = $srce; } else { $sources_no_category[] = $srce; } } if(count($sources_no_category)) { $sources[$msg["source_no_category"]] =$sources_no_category; } return $sources; } function do_sources() { global $charset,$source,$msg,$first,$base_path; $r=" "; $r.="
"; if ($source) $_SESSION["checked_sources"]=$source; if (isset($_SESSION["checked_sources"])&&(!$source)) $source=$_SESSION["checked_sources"]; if (!is_array($source)) $source=array(); $r .= "
"; $count=0; $debloque_form_outputed = array(); //Recherche des sources $sources = get_sources(); foreach ($sources as $category_name=>$category) { $count++; $open="open_".$count; global ${$open}; if(!isset($_SESSION["sources_open_".$count])) $_SESSION["sources_open_".$count] = 0; if ((!$first)&&($_SESSION["sources_open_".$count])) ${$open}=1; else if ($first) $_SESSION["sources_open_".$count]=${$open}; $img_plus=${$open}?get_url_icon('minus.gif'):get_url_icon('plus.gif'); $r .= '

  '.$category_name.'

'; foreach ($category as $srce) { $debloque_source = "debloque_source_".$srce->source_id; global ${$debloque_source}; $r.="
source_id,$source)!==false)&&($srce->cancel!=2 || ${$debloque_source})) { $r.=" checked"; } else if (!count($source) && $srce->gestion_selected) { $r.=" checked"; } $r.="/>"; if ($srce->cancel==2 && !${$debloque_source}) { if (!isset($debloque_form_outputed[$srce->source_id])) { $r.=" "; $debloque_form_outputed[$srce->source_id] = true; } $r.=" (".$msg["connecteurs_debloque"].")"; } $r.="
"; } } $r.="
"; if ($count) { $r.=" "; } return $r; } //Instanciation de la classe de recherche //Si c'est une multi if ($_SESSION["ext_type"]=="multi") { $sc=new search(true,"search_fields_unimarc"); $sc->remove_forbidden_fields(); } else { $sc=new search(true,"search_simple_fields_unimarc"); } //Si c'est une simple if ($_SESSION["ext_type"]=="simple") { //Si ça vient d'une autre recherche, on transforme ! if ((string)$from_mode!="") { //Récupération des variables switch ($from_mode) { case "0": if ($code) { $op_="STARTWITH"; $search[0]="f_31"; //opérateur $op="op_0_".$search[0]; global ${$op}; ${$op}=$op_; //contenu de la recherche $field = "field_0_".$search[0]; $field_array_ = array(); $field_array_[0] = $code; global ${$field}; ${$field} = $field_array_; //opérateur inter-champ $inter="inter_0_".$search[0]; global ${$inter}; ${$inter}=""; //variables auxiliaires $fieldvar_="fieldvar_0_".$search[0]; global ${$fieldvar_}; ${$fieldvar_}=""; $fieldvar=${$fieldvar_}; } else searcher_title::convert_simple_multi_unimarc($_SESSION["CURRENT"]); break; case "1": searcher_subject::convert_simple_multi_unimarc($_SESSION["CURRENT"]); break; case "3": searcher_publisher::convert_simple_multi_unimarc($_SESSION["CURRENT"]); break; case "7": // recherche externe $serialized_search = $_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["serialized_search"]; break; } } else { if ($external_env) { $external_env=unserialize(stripslashes($external_env)); foreach ($external_env as $varname=>$varvalue) { global ${$varname}; ${$varname}=$varvalue; } } } } else { if ($from_mode==6) { //Récupération de l'environnement $search=$_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["POST"]["search"]; //Pour chaque champ for ($i=0; $iunserialize_search(stripslashes($serialized_search)); } ?>