当前位置: 首页>>代码示例>>PHP>>正文


PHP search::make_search方法代码示例

本文整理汇总了PHP中search::make_search方法的典型用法代码示例。如果您正苦于以下问题:PHP search::make_search方法的具体用法?PHP search::make_search怎么用?PHP search::make_search使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在search的用法示例。


在下文中一共展示了search::make_search方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: generate_rss

 public function generate_rss($context, $hash)
 {
     global $opac_url_base, $dbh;
     $this->notices_list = array();
     $mc = unserialize($context);
     $search = new search($mc["search_type"]);
     $search->unserialize_search(serialize($mc["serialized_search"]));
     $table = $search->make_search();
     $q = "select distinct notice_id from {$table} ";
     $res = pmb_mysql_query($q, $dbh);
     if (pmb_mysql_num_rows($res)) {
         while ($row = pmb_mysql_fetch_object($res)) {
             $this->notices_list[] = $row->notice_id;
         }
     }
     $flux = new newrecords_flux(0);
     $flux->setRecords($this->notices_list);
     $flux->setLink($opac_url_base . "s.php?h={$hash}");
     $flux->setDescription(strip_tags($mc["human_query"]));
     $flux->xmlfile();
     if (!$flux->envoi) {
         return;
     }
     @header('Content-type: text/xml');
     echo $flux->envoi;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:26,代码来源:shorturl_type_search.class.php

示例2: get_value

 public function get_value()
 {
     global $dbh;
     if (!count($this->value)) {
         if ($this->parameters['equation']) {
             $equ = new equation($this->parameters['equation']);
             $search = new search();
             $search->unserialize_search($equ->requete);
             $table = $search->make_search();
             $result = pmb_mysql_query("select * from " . $table, $dbh);
             if (pmb_mysql_num_rows($result)) {
                 while ($row = pmb_mysql_fetch_object($result)) {
                     $this->value[] = $row->notice_id;
                 }
             }
         }
     }
     return $this->value;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:19,代码来源:docwatch_selector_notices_equation.class.php

示例3: 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

示例4: unserialize

 function make_search()
 {
     global $opac_search_other_function;
     //TODO Vérifier avec $opac_search_other_function
     //     	if ($opac_search_other_function) search_other_function_get_history($valeur[0]);
     //Récupération de la valeur de saisie
     $valeur_ = "field_" . $this->n_ligne . "_s_" . $this->id;
     global ${$valeur_};
     $valeur = ${$valeur_};
     //enregistrement de l'environnement courant
     $this->search->push();
     $mc = unserialize($valeur[0]);
     //et on se met dans le contexte de la recherche simple
     $es = new search(false, $mc["search_type"]);
     $es->unserialize_search($mc["serialized_search"]);
     //on cherche...
     $table_tempo = $es->make_search("tempo_" . $this->n_ligne);
     //restauration de l'environnement courant
     $this->search->pull();
     return $table_tempo;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:21,代码来源:search.class.php

示例5: array

 $field = "field_1_" . $search[1];
 $field_ = array();
 $field_[0] = stripslashes($user_query);
 global ${$field};
 ${$field} = $field_;
 //opérateur inter-champ
 $inter = "inter_1_" . $search[1];
 global ${$inter};
 ${$inter} = "and";
 //variables auxiliaires
 $fieldvar_ = "fieldvar_1_" . $search[1];
 global ${$fieldvar_};
 ${$fieldvar_} = "";
 $fieldvar = ${$fieldvar_};
 $es = new search("search_simple_fields_unimarc");
 $table = $es->make_search("f_" . $look_id[$k]);
 $requete = "select count(1) from {$table}";
 $resultat = pmb_mysql_query($requete);
 $nb_result_partial = @pmb_mysql_result($resultat, 0, 0);
 if ($nb_result_partial) {
     $nb_result_external += $nb_result_partial;
     print "<form name='form_" . $look_id[$k] . "' action='./index.php?lvl=more_results&mode=external' method='post'>\n";
     print "<input type='hidden' name='external_env' value='" . htmlentities($external_env, ENT_QUOTES, $charset) . "'/>\n\t\t\t\t\t<input type='hidden' name='search[0]' value='" . htmlentities("s_2", ENT_QUOTES, $charset) . "'/>\n\t\t\t\t\t<input type='hidden' name='op_0_s_2' value='" . htmlentities("EQ", ENT_QUOTES, $charset) . "'/>\n";
     for ($j = 0; $j < count($source); $j++) {
         print "<input type='hidden' name='field_0_s_2[" . $j . "]' value='" . htmlentities($source[$j], ENT_QUOTES, $charset) . "'/>\n";
     }
     print "\n\t\t\t\t\t<input type='hidden' name='search[1]' value='" . htmlentities($search[1], ENT_QUOTES, $charset) . "'/>\n\t\t\t\t\t<input type='hidden' name='" . $op . "' value='" . htmlentities($op_, ENT_QUOTES, $charset) . "'/>\n\t\t\t\t\t<input type='hidden' name='" . $field . "[0]' value='" . htmlentities($field_[0], ENT_QUOTES, $charset) . "'/>\n\t\t\t\t\t<input type='hidden' name='" . $inter . "' value='" . htmlentities("and", ENT_QUOTES, $charset) . "'/>\n\t\t\t\t\t<input type='hidden' name='count' value='" . $nb_result_external . "'>";
     print pmb_bidi("<strong>" . $msg[$look_msg[$k]] . "</strong> " . $nb_result_partial . " {$msg['results']} ");
     print "<a href=\"javascript:document.form_" . $look_id[$k] . ".submit()\">{$msg['suite']}&nbsp;<img src='./images/search.gif' border='0' align='absmiddle'/></a><br />";
     print "</form>\n";
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:external.inc.php

示例6: remplir

 function remplir()
 {
     global $dbh;
     global $msg;
     if (!$this->id_bannette) {
         return $msg['dsi_ban_no_access'];
     }
     // impossible d'accéder à cette bannette
     // récupérer les équations associées à la bannette
     $equations = $this->get_equations();
     $res_affichage = "<ul>";
     if ($this->update_type == "C") {
         $colonne_update_create = "create_date";
     } else {
         $colonne_update_create = "update_date";
     }
     for ($i = 0; $i < sizeof($equations); $i++) {
         // pour chaque équation ajouter les notices trouvées au contenu de la bannette
         $equ = new equation($equations[$i]);
         $search = new search();
         $search->unserialize_search($equ->requete);
         $table = $search->make_search();
         if ($this->statut_not_account) {
             $temp_requete = "insert ignore into bannette_contenu (num_bannette, num_notice) (select " . $this->id_bannette . " , notices.notice_id from {$table} , notices where notices.{$colonne_update_create}>='" . $this->date_last_envoi . "' and {$table}.notice_id=notices.notice_id )";
         } else {
             $temp_requete = "insert ignore into bannette_contenu (num_bannette, num_notice) (select " . $this->id_bannette . " , notices.notice_id from {$table} , notices, notice_statut where notices.{$colonne_update_create}>='" . $this->date_last_envoi . "' and {$table}.notice_id=notices.notice_id and statut=id_notice_statut and ((notice_visible_opac=1 and notice_visible_opac_abon=0) or (notice_visible_opac_abon=1 and notice_visible_opac=1))) ";
         }
         @pmb_mysql_query($temp_requete, $dbh);
         $res_affichage .= "<li>" . $equ->human_query . "</li>";
         $temp_requete = "drop table {$table} ";
         @pmb_mysql_query($temp_requete, $dbh);
     }
     // remplissage du panier avec le contenu de la bannette
     if ($this->num_panier) {
         $temp_requete = "delete from caddie_content where caddie_id='" . $this->num_panier . "'";
         pmb_mysql_query($temp_requete, $dbh);
         $temp_requete = "insert into caddie_content (caddie_id, object_id) (select " . $this->num_panier . ", num_notice from bannette_contenu where num_bannette=" . $this->id_bannette . ")";
         pmb_mysql_query($temp_requete, $dbh) or die(pmb_mysql_error() . $temp_requete);
     }
     $res_affichage .= "</ul>";
     $this->compte_elements();
     $temp_requete = "update bannettes set date_last_remplissage=sysdate() where id_bannette='" . $this->id_bannette . "' ";
     pmb_mysql_query($temp_requete, $dbh);
     $this->purger();
     return $res_affichage;
 }
开发者ID:hogsim,项目名称:PMB,代码行数:46,代码来源:bannette.class.php

示例7: stripos

                     $p = stripos($requete, "limit");
                     if ($p) {
                         $requete = substr($requete, 0, $p);
                     }
                 }
             } else {
                 $requete .= ",notices where notices.notice_id=caddie_content.object_id and caddie_id=" . $idcaddie;
                 $orderby = " order by index_sew";
                 if ($environement["pager"]) {
                     $requete .= $orderby . " limit " . $nb_per_page_search * ($page - 1) . ",{$nb_per_page_search}";
                 }
             }
             break;
         case "expl":
             $sh = new search(true, "search_fields_expl");
             $table = $sh->make_search();
             if ($environement["pager"]) {
                 $limit = "limit " . $nb_per_page_search * $page . ",{$nb_per_page_search}";
             }
             $requete = "select expl_id as notice_id from {$table} " . $limit;
             $object_type = "EXPL";
             break;
     }
 }
 if ($environement["caddie"]) {
     foreach ($environement["caddie"] as $environement_caddie) {
         $c = new caddie($environement_caddie);
         $nb_items_before = $c->nb_item;
         $resultat = @mysql_query($requete);
         print mysql_error();
         while ($r = mysql_fetch_object($resultat)) {
开发者ID:bouchra012,项目名称:PMB,代码行数:31,代码来源:print_cart.php

示例8: switch

 function make_search()
 {
     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, "search_fields_expl");
         } else {
             $sc = new search(false, "search_simple_fields");
         }
         $table_tempo = $sc->make_search("tempo_" . $valeur[0]);
         //restauration de l'environnement courant
         $this->search->pull();
         return $table_tempo;
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:84,代码来源:search.class.php

示例9: foreach

 function havest_notice($isbn = "", $notice_id = 0)
 {
     global $charset, $class_path, $include_path, $base_path;
     global $dbh, $msg;
     global $search;
     $search[] = "s_2";
     global $op_0_s_2;
     $op_0_s_2 = "EQ";
     global $field_0_s_2;
     foreach ($this->info['source_fields'] as $source_id => $harvest_fields) {
         $field_0_s_2[] = $source_id;
     }
     $search[] = "f_22";
     global $inter_1_f_22;
     $inter_1_f_22 = "or";
     global $op_1_f_22;
     $op_1_f_22 = "STARTWITH";
     global $field_1_f_22;
     $field_1_f_22[] = $isbn;
     /*
         	foreach( $this->info['source_fields'] as $source_id => $harvest_fields){			
     		if($notice_id){				
     			$code=$this->get_code($source_id,$notice_id);
     			$field_1_f_22[]=$code;
     			 print 	$code.", ";
     		}else	$field_1_f_22[]=$isbn;		
     	}	
     */
     global $explicit_search;
     $explicit_search = "1";
     $s = new search('', "search_fields_unimarc");
     $res = $s->make_search();
     $req = "select * from " . $res;
     $resultat = mysql_query($req);
     while ($r = mysql_fetch_object($resultat)) {
         // printr( $r);
         $recid = $r->notice_id;
         $requete = "SELECT source_id FROM external_count WHERE rid=" . $r->notice_id . ";";
         $myQuery = mysql_query($requete, $dbh);
         $source_id = mysql_result($myQuery, 0, 0);
         $req = "select * from entrepot_source_" . $source_id . " where recid='" . $recid . "' order by ufield,field_order,usubfield,subfield_order,value";
         $res_entrepot = mysql_query($req);
         while ($r_ent = mysql_fetch_object($res_entrepot)) {
             $this->info['notice'][$source_id][$r_ent->ufield][] = $r_ent;
         }
         // on fait le ménage ou pas vu les requetes
         /*$req="DELETE FROM entrepot_source_".$source_id."  where where recid='".$recid."'  ";
             	mysql_query($req);			    		
         		$req="DELETE FROM FROM external_count WHERE rid=".$r->notice_id."";
             	mysql_query($req);*/
     }
     // printr(	$this->info['notice']);
     $notice_composite = array();
     $cpt = 0;
     // $this->info['fields'][$r->harvest_field_xml_id]['xml']
     foreach ($this->info['fields'] as $xml_id => $src_list) {
         //printr( $src_list);
         $first_flag = $src_list['first_flag'];
         foreach ($src_list['src'] as $src) {
             $prec_flag = $src['prec_flag'];
             $unimacsubfield = $src['unimacsubfield'];
             // source sub_field
             $pmb_unimacfield = $src['pmb_unimacfield'];
             // destination $this->fields_id[$this->fields[$key]["ID"]]
             $this->info['fields'][$r->harvest_field_xml_id]['src'][$cpt]['pmb_unimacfield'] = $r_src->harvest_src_pmb_unimacfield;
             $this->info['fields'][$r->harvest_field_xml_id]['src'][$cpt]['pmb_unimacsubfield'] = $r_src->harvest_src_pmb_unimacsubfield;
             $found = 0;
             if ($this->info['notice'][$src['num_source']][$src['unimacfield']]) {
                 foreach ($this->info['notice'][$src['num_source']][$src['unimacfield']] as $notice_field) {
                     $no_memo_subfield_flag = 0;
                     if ($unimacsubfield && $notice_field->usubfield != $unimacsubfield) {
                         $no_memo_subfield_flag = 1;
                     }
                     //printr( $notice_ufield);
                     if ($notice_field->value && !$no_memo_subfield_flag) {
                         $notice_composite[$cpt]['xml_id'] = $xml_id;
                         $notice_composite[$cpt]['num_source'] = $src['num_source'];
                         $notice_composite[$cpt]['ufield'] = $pmb_unimacfield;
                         $notice_composite[$cpt]['field_ind'] = $notice_field->field_ind;
                         $notice_composite[$cpt]['usubfield'] = $notice_field->usubfield;
                         $notice_composite[$cpt]['field_order'] = $notice_field->field_order;
                         $notice_composite[$cpt]['subfield_order'] = $notice_field->subfield_order;
                         $notice_composite[$cpt]['value'] = $notice_field->value;
                         $notice_composite[$cpt]['pmb_unimacfield'] = $this->fields_id[$xml_id]['UNIMARCFIELD'];
                         $notice_composite[$cpt]['pmb_unimacsubfield'] = $this->fields_id[$xml_id]['UNIMARCSUBFIELD'];
                         $cpt++;
                         $found = 1;
                     }
                 }
             }
             // une valeur est trouvée , on ne s'occupe pas des sources suivantes si demandé
             if ($first_flag && $found) {
                 break;
             }
         }
     }
     // printr(	$this->info['notice']);
     return $notice_composite;
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:99,代码来源:harvest.class.php

示例10: switch

 function make_search()
 {
     global $opac_indexation_docnum_allfields;
     global $opac_search_other_function;
     //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)) {
         $table_tempo = "";
         //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;
                 if ($opac_search_other_function) {
                     search_other_function_get_history($valeur[0]);
                 }
                 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]];
                         $t["is_num"][0] = $opac_indexation_docnum_allfields;
                         $t["ck_affiche"][0] = $opac_indexation_docnum_allfields;
                         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;
                     case 'docnum':
                         $search[0] = "f_16";
                         $op_ = "BOOLEAN";
                         $valeur_champ = $_SESSION["user_query" . $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_};
//.........这里部分代码省略.........
开发者ID:bouchra012,项目名称:PMB,代码行数:101,代码来源:search.class.php

示例11: remplir

 function remplir()
 {
     global $dbh;
     global $msg;
     global $gestion_acces_active, $gestion_acces_empr_notice;
     if (!$this->id_bannette) {
         return $msg[dsi_ban_no_access];
     }
     // impossible d'accéder à cette bannette
     // récupérer les équations associées à la bannette
     $equations = $this->get_equations();
     $res_affichage = "<ul>";
     if ($this->update_type == "C") {
         $colonne_update_create = "create_date";
     } else {
         $colonne_update_create = "update_date";
     }
     for ($i = 0; $i < sizeof($equations); $i++) {
         // pour chaque équation ajouter les notices trouvées au contenu de la bannette
         $equ = new equation($equations[$i]);
         $search = new search();
         $search->unserialize_search($equ->requete);
         $table = $search->make_search();
         $temp_requete = "insert into bannette_contenu (num_bannette, num_notice) (select " . $this->id_bannette . " , notices.notice_id from {$table} , notices, notice_statut where notices.{$colonne_update_create}>='" . $this->date_last_envoi . "' and {$table}.notice_id=notices.notice_id and statut=id_notice_statut and ((notice_visible_opac=1 and notice_visible_opac_abon=0) or (notice_visible_opac_abon=1 and notice_visible_opac=1)) limit 300) ";
         $res = @pmb_mysql_query($temp_requete, $dbh);
         $res_affichage .= "<li>" . $equ->human_query . "</li>";
         $temp_requete = "drop table {$table} ";
         $res = @pmb_mysql_query($temp_requete, $dbh);
     }
     $res_affichage .= "</ul>";
     $this->compte_elements();
     $temp_requete = "update bannettes set date_last_remplissage=sysdate() where id_bannette='" . $this->id_bannette . "' ";
     $res = @pmb_mysql_query($temp_requete, $dbh);
     //purge pour les bannettes privees des notices ne devant pas etre diffusees
     if ($this->proprio_bannette && $gestion_acces_active == 1 && $gestion_acces_empr_notice == 1) {
         $ac = new acces();
         $dom_2 = $ac->setDomain(2);
         $acces_j = $dom_2->getJoin($this->proprio_bannette, '4=0', 'num_notice');
         $q = "delete from bannette_contenu using bannette_contenu {$acces_j} WHERE num_bannette='{$this->id_bannette}' ";
         pmb_mysql_query($q, $dbh);
     }
     return $res_affichage;
 }
开发者ID:hogsim,项目名称:PMB,代码行数:43,代码来源:bannette.class.php

示例12: implode

     } else {
         $cart_sort = "default";
     }
     $notices = $searcher->get_sorted_cart_result($cart_sort, 0, $opac_max_cart_items);
     if (count($notices)) {
         $notices = implode(",", $notices);
     }
     add_notices_to_cart($notices);
     break;
 case "external":
     if ($_SESSION["external_type"] == "multi") {
         $es = new search("search_fields_unimarc");
     } else {
         $es = new search("search_simple_fields_unimarc");
     }
     $table = $es->make_search();
     $requete = "select concat('es', notice_id) as notice_id from {$table} where 1;";
     $message = add_query($requete);
     break;
 case 'docnum':
     $notices = '';
     //droits d'acces emprunteur/notice
     $acces_j = '';
     if ($gestion_acces_active == 1 && $gestion_acces_empr_notice == 1) {
         require_once "{$class_path}/acces.class.php";
         $ac = new acces();
         $dom_2 = $ac->setDomain(2);
         $acces_j = $dom_2->getJoin($_SESSION['id_empr_session'], 4, 'notice_id');
     }
     if ($acces_j) {
         $statut_j = '';
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:cart_info.php

示例13: get_objects


//.........这里部分代码省略.........
                 break;
             case 6:
                 //Récupération et mise en variables globales des valeurs de l'historique
                 if ($_SESSION["session_history"][$current_search]["QUERY"]["POST"]["search"][0]) {
                     $search = $_SESSION["session_history"][$current_search]["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"][$current_search]["QUERY"]["POST"][$op];
                         //Récupération du contenu de la recherche
                         $field_ = "field_" . $i . "_" . $search[$i];
                         global ${$field_};
                         ${$field_} = $_SESSION["session_history"][$current_search]["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"][$current_search]["QUERY"]["POST"][$inter];
                         //Récupération des variables auxiliaires
                         $fieldvar_ = "fieldvar_" . $i . "_" . $search[$i];
                         global ${$fieldvar_};
                         ${$fieldvar_} = $_SESSION["session_history"][$current_search]["QUERY"]["POST"][$fieldvar_];
                         $fieldvar = ${$fieldvar_};
                     }
                 }
                 //on instancie la classe search avec le nom de la nouvelle table temporaire
                 if ($_SESSION["session_history"][$current_search]["QUERY"]["POST"]["search"][0]) {
                     $sc = new search(false);
                 } else {
                     $sc = new search(false, "search_simple_fields");
                 }
                 $table_tempo = $sc->make_search("tempo_" . $current_search);
                 $requete = "select * from " . $table_tempo;
                 $result = pmb_mysql_query($requete, $dbh);
                 $notices_ids = array();
                 while ($row = pmb_mysql_fetch_object($result)) {
                     $notices_ids[] = $row->notice_id;
                 }
                 $objects[] = array('layer' => "record", 'ids' => $notices_ids);
                 if (count($notices_ids)) {
                     $requete = "select distinct map_emprise_obj_num from map_emprises join notices_categories on map_emprises.map_emprise_obj_num = notices_categories.num_noeud where map_emprises.map_emprise_type=2 and notices_categories.notcateg_notice in (" . implode(",", $notices_ids) . ")";
                     $result = pmb_mysql_query($requete, $dbh);
                     if (pmb_mysql_num_rows($result)) {
                         $categ_ids = array();
                         while ($row = pmb_mysql_fetch_object($result)) {
                             $categ_ids[] = $row->map_emprise_obj_num;
                         }
                         $objects[] = array('layer' => "authority", 'type' => 2, 'ids' => $categ_ids);
                     }
                 }
                 break;
             default:
                 // authpersos
                 if ($mode_search > 1000) {
                     if ($_SESSION["session_history"][$current_search]["NOTI"]["POST"]) {
                         $requete = substr($_SESSION["session_history"][$current_search]["NOTI"]["TEXT_QUERY"], 0, strpos($_SESSION["session_history"][$current_search]["NOTI"]["TEXT_QUERY"], "limit"));
                         $result = pmb_mysql_query($requete, $dbh);
                         $notices_ids = array();
                         while ($row = pmb_mysql_fetch_object($result)) {
                             $notices_ids[] = $row->notice_id;
                         }
                         $objects[] = array('layer' => "record", 'ids' => $notices_ids);
                         if (count($notices_ids)) {
                             $requete = "select distinct map_emprise_obj_num from map_emprises join notices_categories on map_emprises.map_emprise_obj_num = notices_categories.num_noeud where map_emprises.map_emprise_type=2 and notices_categories.notcateg_notice in (" . implode(",", $notices_ids) . ")";
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:67,代码来源:map_search_controler.class.php

示例14: _get_search_query

 protected function _get_search_query()
 {
     global $es, $msg;
     if (!is_object($es)) {
         $es = new search();
     }
     if ($this->serialized_query) {
         $es->unserialize_search($this->serialized_query);
     } else {
         global $search;
         //Vérification des champs vides
         for ($i = 0; $i < count($search); $i++) {
             if ($i == 0) {
                 //On supprime le premier opérateur inter (il est renseigné pour les recherches prédéfinies avec plusieurs champs et une recherche avec le premier champ vide
                 $inter = "inter_" . $i . "_" . $search[$i];
                 global ${$inter};
                 ${$inter} = "";
             }
             $op = "op_" . $i . "_" . $search[$i];
             global ${$op};
             $field_ = "field_" . $i . "_" . $search[$i];
             global ${$field_};
             $field = ${$field_};
             $s = explode("_", $search[$i]);
             if ($s[0] == "f") {
                 $champ = $es->fixedfields[$s[1]]["TITLE"];
             } elseif ($s[0] == "s") {
                 $champ = $es->specialfields[$s[1]]["TITLE"];
             } else {
                 $champ = $es->pp->t_fields[$s[1]]["TITRE"];
             }
             if ((string) $field[0] == "" && !$es->op_empty[${$op}]) {
                 $search_error_message = sprintf($msg["extended_empty_field"], $champ);
                 $flag = true;
                 break;
             }
         }
     }
     //$es->remove_forbidden_fields();
     $this->table = $es->make_search();
     return "select notice_id as id_notice from " . $this->table;
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:42,代码来源:searcher.class.php


注:本文中的search::make_search方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。