${$field} = $field_; //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; } } else { if ($external_env) { $external_env = unserialize(stripslashes($external_env)); foreach ($external_env as $varname => $varvalue) { global ${$varname}; ${$varname} = $varvalue; } } } } else {
function make_unimarc_query() { global $search; //Récupération de la valeur de saisie $valeur_ = "field_" . $this->n_ligne . "_s_" . $this->id; global ${$valeur_}; $valeur = ${$valeur_}; if (!$this->is_empty($valeur)) { //enregistrement de l'environnement courant $this->search->push(); //Récupération et mise en variables globales des valeurs de l'historique if ($_SESSION["session_history"][$valeur[0]]["QUERY"]["POST"]["search"][0]) { $search = $_SESSION["session_history"][$valeur[0]]["QUERY"]["POST"]["search"]; //Pour chaque champ for ($i = 0; $i < count($search); $i++) { //Récupération de l'opérateur $op = "op_" . $i . "_" . $search[$i]; global ${$op}; ${$op} = $_SESSION["session_history"][$valeur[0]]["QUERY"]["POST"][$op]; //Récupération du contenu de la recherche $field_ = "field_" . $i . "_" . $search[$i]; global ${$field_}; ${$field_} = $_SESSION["session_history"][$valeur[0]]["QUERY"]["POST"][$field_]; $field = ${$field_}; //Récupération de l'opérateur inter-champ $inter = "inter_" . $i . "_" . $search[$i]; global ${$inter}; ${$inter} = $_SESSION["session_history"][$valeur[0]]["QUERY"]["POST"][$inter]; //Récupération des variables auxiliaires $fieldvar_ = "fieldvar_" . $i . "_" . $search[$i]; global ${$fieldvar_}; ${$fieldvar_} = $_SESSION["session_history"][$valeur[0]]["QUERY"]["POST"][$fieldvar_]; $fieldvar = ${$fieldvar_}; } } else { if (!$_SESSION["session_history"][$valeur[0]]["NOTI"]["GET"]["idcaddie"]) { switch ($_SESSION["session_history"][$valeur[0]]["NOTI"]["GET"]["mode"]) { case 0: searcher_title::convert_simple_multi($valeur[0]); break; case 1: searcher_subject::convert_simple_multi($valeur[0]); break; case 2: searcher_publisher::convert_simple_multi($valeur[0]); break; } } else { $op_ = "EQ"; $valeur_champ = $_SESSION["session_history"][$valeur[0]]["NOTI"]["GET"]["idcaddie"]; $search[0] = "f_11"; //opérateur $op = "op_0_" . $search[0]; global ${$op}; ${$op} = $op_; //contenu de la recherche $field = "field_0_" . $search[0]; $field_ = array(); $field_[0] = $valeur_champ; global ${$field}; ${$field} = $field_; //opérateur inter-champ $inter = "inter_0_" . $search[0]; global ${$inter}; ${$inter} = ""; //variables auxiliaires $fieldvar_ = "fieldvar_0_" . $search[0]; global ${$fieldvar_}; ${$fieldvar_} = ""; $fieldvar = ${$fieldvar_}; } } //on instancie la classe search avec le nom de la nouvelle table temporaire if ($_SESSION["session_history"][$valeur[0]]["QUERY"]["POST"]["search"][0]) { $sc = new search(false); } else { $sc = new search(false, "search_simple_fields"); } $mt = $sc->make_unimarc_query(); //restauration de l'environnement courant $this->search->pull(); return $mt; } }