本文整理汇总了PHP中search::make_unimarc_query方法的典型用法代码示例。如果您正苦于以下问题:PHP search::make_unimarc_query方法的具体用法?PHP search::make_unimarc_query怎么用?PHP search::make_unimarc_query使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类search
的用法示例。
在下文中一共展示了search::make_unimarc_query方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: switch
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;
}
}
示例2: switch
function make_unimarc_query()
{
//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();
//on instancie la classe search avec le nom de la nouvelle table temporaire
switch ($_SESSION["search_type" . $valeur[0]]) {
case 'simple_search':
global $search;
switch ($_SESSION["notice_view" . $valeur[0]]["search_mod"]) {
case 'title':
$search[0] = "f_6";
$op_ = "BOOLEAN";
$valeur_champ = $_SESSION["user_query" . $valeur[0]];
break;
case 'all':
$search[0] = "f_7";
$op_ = "BOOLEAN";
$valeur_champ = $_SESSION["user_query" . $valeur[0]];
break;
case 'abstract':
$search[0] = "f_13";
$op_ = "BOOLEAN";
$valeur_champ = $_SESSION["user_query" . $valeur[0]];
break;
case 'keyword':
$search[0] = "f_12";
$op_ = "BOOLEAN";
$valeur_champ = $_SESSION["user_query" . $valeur[0]];
break;
case 'author_see':
$search[0] = "f_8";
$op_ = "EQ";
$valeur_champ = $_SESSION["notice_view" . $valeur[0]]["search_id"];
break;
case 'categ_see':
$search[0] = "f_1";
$op_ = "EQ";
$valeur_champ = $_SESSION["notice_view" . $valeur[0]]["search_id"];
break;
case 'indexint_see':
$search[0] = "f_2";
$op_ = "EQ";
$valeur_champ = $_SESSION["notice_view" . $valeur[0]]["search_id"];
break;
case 'coll_see':
$search[0] = "f_4";
$op_ = "EQ";
$valeur_champ = $_SESSION["notice_view" . $valeur[0]]["search_id"];
break;
case 'publisher_see':
$search[0] = "f_3";
$op_ = "EQ";
$valeur_champ = $_SESSION["notice_view" . $valeur[0]]["search_id"];
break;
case 'subcoll_see':
$search[0] = "f_5";
$op_ = "EQ";
$valeur_champ = $_SESSION["notice_view" . $valeur[0]]["search_id"];
break;
case 'titre_uniforme_see':
$search[0] = "f_6";
$op_ = "EQ";
$valeur_champ = $_SESSION["notice_view" . $valeur[0]]["search_id"];
break;
}
//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_};
$es = new search("search_simple_fields");
break;
case 'extended_search':
get_history($valeur[0]);
$es = new search();
break;
case 'term_search':
global $search;
$search[0] = "f_1";
$op_ = "EQ";
$valeur_champ = $_SESSION["notice_view" . $valeur[0]]["search_id"];
//.........这里部分代码省略.........