本文整理汇总了PHP中search::serialize_search方法的典型用法代码示例。如果您正苦于以下问题:PHP search::serialize_search方法的具体用法?PHP search::serialize_search怎么用?PHP search::serialize_search使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类search
的用法示例。
在下文中一共展示了search::serialize_search方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_datas
public function get_datas()
{
//on commence par récupérer l'identifiant retourné par le sélecteur...
if ($this->parameters['selector'] != "") {
for ($i = 0; $i < count($this->selectors); $i++) {
if ($this->selectors[$i]['name'] == $this->parameters['selector']) {
$selector = new $this->parameters['selector']($this->selectors[$i]['id']);
break;
}
}
$values = $selector->get_value();
$searcher = new search(false);
$current_search = $searcher->serialize_search();
$searcher->destroy_global_env();
global $search;
$search = array();
$search[] = "d_" . $values['cp'];
$op = "op_0_d_" . $values['cp'];
$field = "field_0_d_" . $values['cp'];
global ${$op}, ${$field};
${$op} = "EQ";
${$field} = $values['cp_val'];
$table = $searcher->make_search();
$query = "select notice_id from " . $table;
$result = pmb_mysql_query($query);
$records = array();
if (pmb_mysql_num_rows($result)) {
while ($row = pmb_mysql_fetch_object($result)) {
$records[] = $row->notice_id;
}
}
$searcher->unserialize_search($current_search);
$records = $this->filter_datas("notices", $records);
if ($this->parameters['nb_max_elements'] > 0) {
$records = array_slice($records, 0, $this->parameters['nb_max_elements']);
}
$return = array('title' => 'Liste de Notices', 'records' => $records);
return $return;
}
return false;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:41,代码来源:cms_module_common_datasource_records_by_cp_val.class.php
示例2: stripslashes
}
require_once $class_path . "/search.class.php";
require_once $class_path . "/bannette.class.php";
require_once $base_path . "/includes/bannette_func.inc.php";
// afin de résoudre un pb d'effacement de la variable $id_empr par empr_included, bug à trouver
if (!$id_empr) {
$id_empr = $_SESSION["id_empr_session"];
}
print "<div id='aut_details'>\n";
print "<h3><span>" . $msg['dsi_bt_bannette_priv'] . "</span></h3>\n";
if ($enregistrer == 1 && !$nom_bannette) {
$enregistrer = 2;
}
if (!$enregistrer) {
search::strip_slashes();
$equation = search::serialize_search();
} else {
$equation = stripslashes($equation);
}
if ($equation) {
// on arrive de la rech multi-critères
$s = new search();
$equ_human = $s->make_serialized_human_query($equation);
if ($enregistrer == '1') {
$qui = addslashes($empr_nom . " " . $empr_prenom);
$rqt_equation = "insert into equations (id_equation, num_classement, nom_equation, comment_equation, requete, proprio_equation) ";
$rqt_equation .= "VALUES (0,0,'" . addslashes($equ_human) . "','{$qui} -> {$nom_bannette}','" . addslashes($equation) . "', {$id_empr})";
mysql_query($rqt_equation);
$id_equation = mysql_insert_id();
// paramétrage OPAC: choix du nom de la bibliothèque comme expéditeur
$requete = "select location_libelle, email, adr1, cp, town from empr, docs_location where empr_location=idlocation and id_empr='{$id_empr}' ";
示例3: sort
$affich_tris_result_liste = str_replace("!!page_en_cours1!!", $para1, $affich_tris_result_liste);
$sr_form .= $affich_tris_result_liste;
if ($_SESSION["last_sortnotices"] != "") {
$sort = new sort('notices', 'session');
$sr_form .= " " . $msg['tri_par'] . " " . $sort->descriptionTriParId($_SESSION["last_sortnotices"]) . "<span class=\"espaceResultSearch\"> </span>";
} elseif ($opac_default_sort_display) {
$sort = new sort('notices', 'session');
$sr_form .= " " . $msg['tri_par'] . " " . $sort->descriptionTriParId("default") . "<span class=\"espaceResultSearch\"> </span>";
}
} else {
$sr_form .= "<span class=\"espaceResultSearch\"> </span>";
}
//fin gestion du tri
$sr_form .= $add_cart_link;
if ($opac_visionneuse_allow && $nbexplnum_to_photo) {
$search_to_post = $es->serialize_search();
$sr_form .= "<span class=\"espaceResultSearch\"> </span>" . $link_to_visionneuse;
$sr_form .= "\n\t\t<script type='text/javascript'>\n\t\t\tfunction sendToVisionneuse(explnum_id){\n\t\t\t\tif (typeof(explnum_id)!= 'undefined') {\n\t\t\t\t\tvar explnum =document.createElement('input');\n\t\t\t\t\texplnum.setAttribute('type','hidden');\n\t\t\t\t\texplnum.setAttribute('name','explnum_id');\n\t\t\t\t\texplnum.setAttribute('value',explnum_id);\n\t\t\t\t\tdocument.form_values.appendChild(explnum);\n\t\t\t\t}\n\t\t\t\tvar mode = document.createElement('input');\n\t\t\t\tmode.setAttribute('type','hidden');\n\t\t\t\tmode.setAttribute('name','mode');\n\t\t\t\tmode.setAttribute('value','extended');\n\t\t\t\tvar input = document.createElement('input');\n\t\t\t\tinput.setAttribute('id','serialized_search');\n\t\t\t\tinput.setAttribute('name','serialized_search');\n\t\t\t\tinput.setAttribute('type','hidden');\n\t\t\t\tinput.setAttribute('value',\"" . addslashes($search_to_post) . "\");\n\t\t\t\toldAction=document.form_values.action;\n\t\t\t\tdocument.form_values.appendChild(input);\n\t\t\t\tdocument.form_values.appendChild(mode);\n\t\t\t\n\t\t\n\t\t\t\tdocument.form_values.action='visionneuse.php';\n\t\t\t\tdocument.form_values.target='visionneuse';\n\t\t\t\tdocument.form_values.submit();\n\t\t\t}\n\t\t</script>";
}
}
//affinage
//enregistrement de l'endroit actuel dans la session
if ($_SESSION["last_query"]) {
$n = $_SESSION["last_query"];
} else {
$n = $_SESSION["nb_queries"];
}
if (count($_SESSION['facette']) == 0) {
$_SESSION["notice_view" . $n]["search_mod"] = "extended";
$_SESSION["notice_view" . $n]["search_page"] = $page;
}
示例4: array
function get_link()
{
global $dbh, $onglet_persopac, $launch_search;
global $opac_view_filter_class;
//$myQuery = pmb_mysql_query("SELECT * FROM search_persopac order by search_name ", $dbh);
$myQuery = pmb_mysql_query("SELECT search_persopac.*, group_concat(id_categ_empr) as categ_restrict FROM search_persopac left join search_persopac_empr_categ on id_search_persopac = search_id group by search_id order by search_name ", $dbh);
$this->search_persopac_list = array();
$link = "";
if (pmb_mysql_num_rows($myQuery)) {
$i = 0;
//on récupère la catégorie du lecteur...
if ($_SESSION['id_empr_session']) {
$req = "select empr_categ from empr where id_empr = " . $_SESSION['id_empr_session'];
$res = pmb_mysql_query($req);
if (pmb_mysql_num_rows($res)) {
$empr_categ = pmb_mysql_result($res, 0, 0);
} else {
$empr_categ = 0;
}
} else {
$empr_categ = 0;
}
while ($r = pmb_mysql_fetch_object($myQuery)) {
if ($opac_view_filter_class) {
if (!$opac_view_filter_class->is_selected("search_perso", $r->search_id)) {
continue;
}
}
$empr_categ_restrict = $r->categ_restrict != '' ? explode(",", $r->categ_restrict) : array();
if (count($empr_categ_restrict) == 0 || in_array($empr_categ, $empr_categ_restrict)) {
$name = translation::get_text($r->search_id, "search_persopac", "search_name", $r->search_name);
$shortname = translation::get_text($r->search_id, "search_persopac", "search_shortname", $r->search_shortname);
if ($r->search_directlink) {
if ($shortname) {
$libelle = $shortname;
} else {
$libelle = $name;
}
$my_search = new search();
$backup_search = $my_search->serialize_search();
$my_search->unserialize_search($r->search_query);
$forms_search .= "\n" . $my_search->make_hidden_search_form("./index.php?search_type_asked=extended_search&onglet_persopac=" . $r->search_id . "&limitsearch=" . $r->search_limitsearch, "search_form" . $r->search_id) . "\n";
$my_search->destroy_global_env();
$my_search->unserialize_search($backup_search);
if ($onglet_persopac == $r->search_id) {
$li_id = " id='current' ";
if (!$r->search_limitsearch || !$launch_search) {
$lien = $libelle;
} else {
$lien = "<a href=\"javascript:document.forms['search_form" . $r->search_id . "'].submit();\">" . $libelle . "</a>";
}
} else {
$li_id = "";
$lien = "<a href=\"javascript:document.forms['search_form" . $r->search_id . "'].submit();\">" . $libelle . "</a>";
}
$link .= "\n\t\t\t\t\t\t<li {$li_id} >\n\t\t\t\t\t\t\t{$lien}\t\n\t\t\t\t\t\t</li>";
}
$this->search_persopac_list[$i] = new stdClass();
$this->search_persopac_list[$i]->id = $r->search_id;
$this->search_persopac_list[$i]->name = $name;
$this->search_persopac_list[$i]->shortname = $shortname;
$this->search_persopac_list[$i]->query = $r->search_query;
$this->search_persopac_list[$i]->human = $r->search_human;
$this->search_persopac_list[$i]->directlink = $r->search_directlink;
$this->search_persopac_list[$i]->limitsearch = $r->search_limitsearch;
$i++;
}
}
}
$this->directlink_user = $link;
$this->directlink_user_form = $forms_search;
return true;
}
示例5: switch
} else {
if ($tab == "affiliate") {
switch ($search_type) {
case "simple_search":
$search_file = "search_fields_unimarc";
break;
default:
$search_file = "search_simple_fields_unimarc";
break;
}
} else {
$search_file = "";
}
}
$search_stat = new search($search_file);
$log->add_log('multi_search', $search_stat->serialize_search());
$log->add_log('multi_human_query', $search_stat->make_human_query());
}
//Enregistrement vue
if ($opac_opac_view_activate) {
$log->add_log('opac_view', $_SESSION["opac_view"]);
}
$log->save();
}
//insertions des liens du bas dans le $footer si $opac_show_liensbas
if ($opac_show_liensbas == 1) {
$footer = str_replace("!!div_liens_bas!!", $liens_bas, $footer);
} else {
$footer = str_replace("!!div_liens_bas!!", "", $footer);
}
//affichage du bandeau_2 si $opac_show_bandeau_2 = 1
示例6: rec_last_history
//.........这里部分代码省略.........
} else {
$search_type = $_SESSION["search_type"];
}
$_SESSION["lq_facette_test"] = $facette_test ? 2 : 0;
switch ($search_type) {
case "simple_search":
global $user_query, $mode, $count, $typdoc, $clause, $clause_bull, $clause_bull_num_notice, $tri, $pert, $page, $l_typdoc, $join, $id_thes;
global $affiliate_page, $catalog_page;
if (!$facette_test) {
$_SESSION["lq_user_query"] = $user_query;
$_SESSION["lq_mode"] = $mode;
$_SESSION["lq_count"] = $count;
$_SESSION["lq_typdoc"] = $typdoc;
$_SESSION["lq_clause"] = $clause;
$_SESSION["lq_clause_bull"] = $clause_bull;
$_SESSION["lq_clause_bull_num_notice"] = $clause_bull_num_notice;
$_SESSION["lq_tri"] = $tri;
$_SESSION["lq_pert"] = $pert;
$_SESSION["lq_page"] = $page_;
$_SESSION["lq_affiliate_page"] = $affiliate_page;
$_SESSION["lq_catalog_page"] = $catalog_page;
$_SESSION["lq_l_typdoc"] = $l_typdoc;
$_SESSION["lq_join"] = $join;
$_SESSION["lq_id_thes"] = $id_thes;
$_SESSION["lq_level1"] = $_SESSION["level1"];
unset($_SESSION["lq_facette"]);
if ($opac_search_other_function) {
search_other_function_rec_history($_SESSION["last_query"]);
}
switch ($mode) {
case "tous":
$_SESSION["list_name"] = $msg["list_tous"];
$_SESSION["list_name_msg"] = "list_tous";
break;
case "auteur":
$_SESSION["list_name"] = $msg["list_authors"];
$_SESSION["list_name_msg"] = "list_authors";
break;
case "titre":
$_SESSION["list_name"] = $msg["list_titles"];
$_SESSION["list_name_msg"] = "list_titles";
break;
case "editeur":
$_SESSION["list_name"] = $msg["list_publishers"];
$_SESSION["list_name_msg"] = "list_publishers";
break;
case "titre_uniforme":
$_SESSION["list_name"] = $msg["list_titres_uniformes"];
$_SESSION["list_name_msg"] = "list_titres_uniformes";
break;
case "collection":
$_SESSION["list_name"] = $msg["list_collections"];
$_SESSION["list_name_msg"] = "list_collections";
break;
case "souscollection":
$_SESSION["list_name"] = $msg["list_subcollections"];
$_SESSION["list_name_msg"] = "list_subcollections";
break;
case "categorie":
$_SESSION["list_name"] = $msg["list_categories"];
$_SESSION["list_name_msg"] = "list_categories";
break;
case "indexint":
$_SESSION["list_name"] = $msg["list_indexint"];
$_SESSION["list_name_msg"] = "list_indexint";
break;
case "keyword":
$_SESSION["list_name"] = $msg["list_keywords"];
$_SESSION["list_name_msg"] = "list_keywords";
break;
case "docnum":
$_SESSION["list_name"] = $msg["docnum_list"];
$_SESSION["list_name_msg"] = "docnum_list";
break;
}
}
break;
case "extended_search":
if (!$facette_test || strpos($_SERVER['HTTP_REFERER'], $_SESSION['last_authority']['lvl']) !== false && $_SESSION['last_authority']['need_new_search']) {
$_SESSION["lq_page"] = $page_;
$_SESSION["lq_affiliate_page"] = $affiliate_page;
$_SESSION["lq_catalog_page"] = $catalog_page;
$_SESSION["lq_mode"] = "extended";
$_SESSION["list_name"] = $msg["list_titles"];
$_SESSION["list_name_msg"] = "list_titles";
}
break;
}
//Si on est en navigation par facette
if ($facette_test) {
$_SESSION["lq_facette"] = $_SESSION["facette"];
//La recherche étendue pour les facettes
$_SESSION["lq_facette_search"]["lq_page"] = $page_;
$_SESSION["lq_facette_search"]["lq_affiliate_page"] = $affiliate_page;
$_SESSION["lq_facette_search"]["lq_catalog_page"] = $catalog_page;
$_SESSION["lq_facette_search"]["lq_mode"] = "extended";
$_SESSION["lq_facette_search"]["lq_search"] = search::serialize_search();
$_SESSION["lq_facette_search"]["lq_notice_view"] = $_SESSION["notice_view" . $_SESSION["last_query"]];
}
}
示例7: generateEntitySearch
function generateEntitySearch($entity_search)
{
global $search;
$search = $ent_search = array();
foreach ($entity_search->descriptors as $desc) {
if (count($desc->search_infos) > 1) {
array_unshift($ent_search, $desc->search_infos);
} else {
array_push($ent_search, $desc->search_infos);
}
}
if (count($ent_search) > 0) {
$n = 0;
for ($i = 0; $i < count($ent_search); $i++) {
for ($j = 0; $j < count($ent_search[$i]); $j++) {
$search[$n] = "f_" . $ent_search[$i][$j]['id'];
$op = "op_" . $n . "_" . $search[$n];
global ${$op};
${$op} = $ent_search[$i][$j]['op'];
$field = "field_" . $n . "_" . $search[$n];
global ${$field};
${$field}[0] = $ent_search[$i][$j]['value'];
if (count($ent_search[$i][$j]['var']) > 0) {
$fieldvar = "fieldvar_" . $n . "_" . $search[$n];
global ${$fieldvar};
for ($k = 0; $k < count($ent_search[$i][$j]['var']); $k++) {
${$fieldvar}[$ent_search[$i][$j]['var'][$k]['name']][0] = $ent_search[$i][$j]['var'][$k]['value'];
}
}
$inter = "inter_" . $n . "_" . $search[$n];
global ${$inter};
if ($n > 0) {
${$inter} = $i > 0 ? "or" : "and";
}
$n++;
}
}
$entity_search = search::serialize_search();
search::destroy_global_env();
} else {
$entity_search = "";
}
return $entity_search;
}
示例8: search
function do_form()
{
global $msg, $tpl_search_perso_form, $charset;
// titre formulaire
if ($this->id) {
$libelle = $msg["search_perso_form_edit"];
$link_delete = "<input type='button' class='bouton' value='" . $msg[63] . "' onClick=\"confirm_delete();\" />";
} else {
$libelle = $msg["search_perso_form_add"];
$link_delete = "";
/*
foreach($_POST as $key =>$val) {
if($val) {
if(is_array($val)) {
foreach($val as $val_array) {
$memo_search.= "<input type='hidden' name='".$key."[]' value='$val_array'/>";
}
}
else $memo_search.="<input type='hidden' name='$key' value='$val'/>";
}
}
$this->query=$memo_search;
global $search;
for ($i=0; $i<count($search); $i++) {
$op="op_".$i."_".$search[$i];
global $$op;
$field_="field_".$i."_".$search[$i];
global $$field_;
} */
$my_search = new search();
$this->query = $my_search->serialize_search();
$this->human = $my_search->make_human_query();
}
// Champ éditable
$tpl_search_perso_form = str_replace('!!id!!', htmlentities($this->id, ENT_QUOTES, $charset), $tpl_search_perso_form);
$tpl_search_perso_form = str_replace('!!name!!', htmlentities($this->name, ENT_QUOTES, $charset), $tpl_search_perso_form);
$tpl_search_perso_form = str_replace('!!shortname!!', htmlentities($this->shortname, ENT_QUOTES, $charset), $tpl_search_perso_form);
if ($this->directlink) {
$checked = " checked='checked' ";
}
$tpl_search_perso_form = str_replace('!!directlink!!', $checked, $tpl_search_perso_form);
if ($this->id) {
$tpl_search_perso_form = str_replace('!!autorisations_users!!', $this->aff_form_autorisations($this->autorisations, 0), $tpl_search_perso_form);
} else {
$tpl_search_perso_form = str_replace('!!autorisations_users!!', $this->aff_form_autorisations("", 1), $tpl_search_perso_form);
}
$tpl_search_perso_form = str_replace('!!query!!', htmlentities($this->query, ENT_QUOTES, $charset), $tpl_search_perso_form);
$tpl_search_perso_form = str_replace('!!human!!', htmlentities($this->human, ENT_QUOTES, $charset), $tpl_search_perso_form);
$action = "./catalog.php?categ=serials&sub=collstate_update&serial_id=" . $this->serial_id . "&id=" . $this->id;
$tpl_search_perso_form = str_replace('!!action!!', $action, $tpl_search_perso_form);
$tpl_search_perso_form = str_replace('!!delete!!', $link_delete, $tpl_search_perso_form);
$tpl_search_perso_form = str_replace('!!libelle!!', htmlentities($libelle, ENT_QUOTES, $charset), $tpl_search_perso_form);
$link_annul = "onClick=\"unload_off();history.go(-1);\"";
$tpl_search_perso_form = str_replace('!!annul!!', $link_annul, $tpl_search_perso_form);
return $tpl_search_perso_form;
}
示例9: search
function do_form()
{
global $msg, $tpl_search_persopac_form, $charset, $base_path;
global $thesaurus_liste_trad;
global $id_search_persopac;
$this->load_xml();
// titre formulaire
$my_search = new search(false, "search_fields_opac", "{$base_path}/temp/");
if ($this->id) {
$libelle = $msg["search_persopac_form_edit"];
$link_delete = "<input type='button' class='bouton' value='" . $msg[63] . "' onClick=\"confirm_delete();\" />";
$button_modif_requete = "<input type='button' class='bouton' value=\"" . $msg["search_perso_modif_requete"] . "\" onClick=\"document.modif_requete_form_" . $this->id . ".submit();\">";
//Mémorisation de recherche prédéfinie en édition
if ($id_search_persopac) {
$this->query = $my_search->serialize_search();
$this->human = $my_search->make_human_query();
$my_search->unserialize_search($this->query);
} else {
$my_search->unserialize_search($this->query);
$this->query = $my_search->serialize_search();
$this->human = $my_search->make_human_query();
}
$form_modif_requete = $this->make_hidden_search_form();
} else {
$libelle = $msg["search_persopac_form_add"];
$link_delete = "";
$button_modif_requete = "";
$form_modif_requete = "";
$this->query = $my_search->serialize_search();
$this->human = $my_search->make_human_query();
}
// Champ éditable
$tpl_search_persopac_form = str_replace('!!id!!', htmlentities($this->id, ENT_QUOTES, $charset), $tpl_search_persopac_form);
$trans = new translation($this->id, "search_persopac", "search_name", $thesaurus_liste_trad);
$field_name = $trans->get_form($msg["search_persopac_form_name"], "form_nom", "name", $this->name, "saisie-80em");
$tpl_search_persopac_form = str_replace('!!name!!', $field_name, $tpl_search_persopac_form);
$trans = new translation($this->id, "search_persopac", "search_shortname", $thesaurus_liste_trad);
$field_name = $trans->get_form($msg["search_persopac_form_shortname"], "shortname", "shortname", $this->shortname, "saisie-80em");
$tpl_search_persopac_form = str_replace('!!shortname!!', $field_name, $tpl_search_persopac_form);
$checked = '';
if ($this->directlink) {
$checked = " checked='checked' ";
}
$tpl_search_persopac_form = str_replace('!!directlink!!', $checked, $tpl_search_persopac_form);
$checked = '';
if ($this->limitsearch) {
$checked = " checked='checked' ";
}
$tpl_search_persopac_form = str_replace('!!limitsearch!!', $checked, $tpl_search_persopac_form);
$tpl_search_persopac_form = str_replace('!!query!!', htmlentities($this->query, ENT_QUOTES, $charset), $tpl_search_persopac_form);
$tpl_search_persopac_form = str_replace('!!human!!', htmlentities($this->human, ENT_QUOTES, $charset), $tpl_search_persopac_form);
$action = "./admin.php?categ=opac&sub=search_persopac§ion=liste&action=collstate_update&serial_id=" . $this->serial_id . "&id=" . $this->id;
$tpl_search_persopac_form = str_replace('!!action!!', $action, $tpl_search_persopac_form);
$tpl_search_persopac_form = str_replace('!!delete!!', $link_delete, $tpl_search_persopac_form);
$tpl_search_persopac_form = str_replace('!!libelle!!', htmlentities($libelle, ENT_QUOTES, $charset), $tpl_search_persopac_form);
$link_annul = "onClick=\"unload_off();history.go(-1);\"";
$tpl_search_persopac_form = str_replace('!!annul!!', $link_annul, $tpl_search_persopac_form);
//restriction aux catégories de lecteur
$requete = "SELECT id_categ_empr, libelle FROM empr_categ ORDER BY libelle ";
$res = pmb_mysql_query($requete);
if (pmb_mysql_num_rows($res) > 0) {
$categ = "\n\t\t\t<label for='empr_restrict'>" . $msg['search_perso_form_user_restrict'] . "</label><br />\n\t\t\t<select id='empr_restrict' name='empr_restrict[]' multiple>";
while ($obj = pmb_mysql_fetch_object($res)) {
$categ .= "\n\t\t\t\t<option value='" . $obj->id_categ_empr . "' " . (in_array($obj->id_categ_empr, $this->empr_categ_restrict) ? "selected=selected" : "") . ">" . $obj->libelle . "</option>";
}
$categ .= "\n\t\t\t</select>";
} else {
$categ = "";
}
$tpl_search_persopac_form = str_replace('!!categorie!!', $categ, $tpl_search_persopac_form);
$tpl_search_persopac_form = str_replace('!!requete!!', htmlentities($this->query, ENT_QUOTES, $charset), $tpl_search_persopac_form);
$tpl_search_persopac_form = str_replace('!!requete_human!!', $this->human, $tpl_search_persopac_form);
$tpl_search_persopac_form = str_replace('!!bouton_modif_requete!!', $button_modif_requete, $tpl_search_persopac_form);
$tpl_search_persopac_form = str_replace('!!form_modif_requete!!', $form_modif_requete, $tpl_search_persopac_form);
return $tpl_search_persopac_form;
}
示例10: make_human_query
function make_human_query()
{
//Récupération de la valeur de saisie
$valeur_ = "field_" . $this->n_ligne . "_s_" . $this->id;
global ${$valeur_};
$valeur = ${$valeur_};
$litteral = array();
//on stocke l'environnement courant
$current_search = search::serialize_search();
//on le détruit
search::destroy_global_env();
//et on se met dans le contexte de la requete OpenURL
$this->s = new search("search_openurl");
$this->s->unserialize_search($valeur[0]);
global $search;
//on génère une human_query
$litteral[0] = $this->s->make_human_query();
//et on détruit le contexte d'OpenURL pour revenir en mode normal
search::destroy_global_env();
search::unserialize_search($current_search);
return $litteral;
}
示例11: switch
//.........这里部分代码省略.........
//opérateur inter-champ
$inter = "inter_0_" . $search[0];
global ${$inter};
${$inter} = "";
//variables auxiliaires
$fieldvar_ = "fieldvar_0_" . $search[0];
global ${$fieldvar_};
if ($t) {
${$fieldvar_} = $t;
} else {
${$fieldvar_} = "";
}
$fieldvar = ${$fieldvar_};
if ($_SESSION["typdoc" . $index_history]) {
$search[1] = "f_9";
$op_ = "EQ";
$valeur_champ = $_SESSION["typdoc" . $index_history];
//opérateur
$op = "op_1_" . $search[1];
global ${$op};
${$op} = $op_;
//contenu de la recherche
$field = "field_1_" . $search[1];
$field_ = array();
$field_[0] = $valeur_champ;
global ${$field};
${$field} = $field_;
//opérateur inter-champ
$inter = "inter_1_" . $search[1];
global ${$inter};
${$inter} = "and";
}
$es = new search($xml_file);
$serialized = $es->serialize_search();
break;
case 'extended_search':
get_history($index_history);
$es = new search("search_fields");
$serialized = $es->serialize_search();
$search_type = "search_fields";
break;
case 'term_search':
global $search;
$search[0] = "f_1";
$op_ = "EQ";
$valeur_champ = $_SESSION["notice_view" . $index_history]["search_id"];
//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");
示例12: save_manage_form
public function save_manage_form()
{
global $tagcloud;
global $tagcloud_delete;
global $type;
global $name;
global $list_facette;
global $rmc;
global $rmc_delete;
global $include_path, $pmb_opac_url;
global $lang, $msg, $base_path;
//Template du formulaire de recherches avancées
$query = "select managed_module_box from cms_managed_modules where managed_module_name='cms_module_tagcloud' ";
$result = pmb_mysql_query($query);
if (pmb_mysql_num_rows($result)) {
$box = pmb_mysql_result($result, 0, 0);
$infos = unserialize($box);
$params = $infos['datasources']['cms_module_tagcloud_datasource_tagcloud_records'];
}
if ($type == 'facette') {
if ($tagcloud_delete) {
unset($params['tagclouds'][$tagcloud_delete]);
} else {
$infos = array('name' => $name, 'type' => "facette");
$i = 0;
if (count($list_facette)) {
foreach ($list_facette as $facette) {
$criteres = explode('_', $facette);
$critere = $criteres[0];
$ss_critere = $criteres[1];
$search_type_field = "search_type_" . $critere . "_" . $ss_critere;
global ${$search_type_field};
$search_type = ${$search_type_field};
$infos['criteres'][$i]['critere'] = $critere;
$infos['criteres'][$i]['ss_critere'] = $ss_critere;
$infos['criteres'][$i]['search_type'] = $search_type;
$i++;
}
}
//ajout
if ($tagcloud == "new") {
$tagcloud = cms_module_tagcloud_datasource_tagcloud_records::get_new_id('tagcloud', $params['tagclouds']);
}
$params['tagclouds'][$tagcloud] = $infos;
}
} elseif ($type = 'rmc') {
if ($rmc_delete) {
unset($params['rmcs'][$rmc_delete]);
} else {
$infos = array('name' => $name, 'type' => "rmc");
$save_msg = $msg;
// Recherche du fichier lang de l'opac
$url = $pmb_opac_url . "includes/messages/{$lang}.xml";
$fichier_xml = $base_path . "/temp/opac_lang.xml";
cms_module_tagcloud_datasource_tagcloud_records::curl_load_file($url, $fichier_xml);
$messages = new XMLlist("{$base_path}/temp/opac_lang.xml", 0);
$messages->analyser();
$msg = $messages->table;
$url = $pmb_opac_url . "includes/search_queries/search_fields.xml";
$fichier_xml = "{$base_path}/temp/search_fields_opac.xml";
cms_module_tagcloud_datasource_tagcloud_records::curl_load_file($url, $fichier_xml);
$my_search = new search(false, "search_fields_opac", "{$base_path}/temp/");
$infos['rmc'] = $my_search->serialize_search();
$msg = $save_msg;
//ajout
if ($rmc == "new") {
$rmc = cms_module_tagcloud_datasource_tagcloud_records::get_new_id('rmc', $params['rmcs']);
}
$params['rmcs'][$rmc] = $infos;
}
}
return $params;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:73,代码来源:cms_module_tagcloud_datasource_tagcloud_records.class.php
示例13: _get_user_query
protected function _get_user_query()
{
return search::serialize_search();
}
示例14: import_noticesearch_into_multicritere_set
function import_noticesearch_into_multicritere_set()
{
global $dbh, $toset_search, $set_id;
$set_id += 0;
//Pas de set spécifié?
if (!$set_id) {
return;
}
//Vérifions que le set spécifié est bien un bon set multicritère
$the_set = new connector_out_set($set_id, true);
if ($the_set->type != 2) {
return;
}
$serialized_search = stripslashes($toset_search);
//Un petit tour dans la classe search histoire de filtrer la recherche
$sc = new search(false);
$sc->unserialize_search($serialized_search);
$serialized_search = $sc->serialize_search();
//Mettons à jour le set
$the_set_m = new connector_out_set_noticemulticritere($set_id, true);
$the_set_m->config["search"] = $serialized_search;
$the_set_m->commit_to_db();
$the_set_m->clear_cache(true);
}