";
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.="
";
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));
}
?>