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


PHP parametres_perso::get_pond方法代码示例

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


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

示例1: majNoticesMotsGlobalIndex


//.........这里部分代码省略.........
             }
         }
         //Les champs perso
         if (count($tab_pp)) {
             foreach ($tab_pp as $code_champ => $table) {
                 $p_perso = new parametres_perso($table);
                 //on doit retrouver l'id des eléments...
                 switch ($table) {
                     case "expl":
                         $rqt = "select expl_id from notices join exemplaires on expl_notice = notice_id and expl_notice!=0 where notice_id = {$notice} union select expl_id from notices join bulletins on num_notice = notice_id join exemplaires on expl_bulletin = bulletin_id and expl_bulletin != 0 where notice_id = {$notice}";
                         $res = pmb_mysql_query($rqt);
                         if (pmb_mysql_num_rows($res)) {
                             $ids = array();
                             while ($row = pmb_mysql_fetch_object($res)) {
                                 $ids[] = $row->expl_id;
                             }
                         }
                         break;
                     case "collstate":
                         break;
                     default:
                         $ids = array($notice);
                 }
                 if (count($ids)) {
                     for ($i = 0; $i < count($ids); $i++) {
                         $data = $p_perso->get_fields_recherche_mot_array($ids[$i]);
                         $j = 0;
                         $order_fields = 1;
                         foreach ($data as $code_ss_champ => $value) {
                             $tab_mots = array();
                             foreach ($value as $val) {
                                 $tab_tmp = explode(' ', strip_empty_words($val));
                                 //la table pour les recherche exacte
                                 $tab_field_insert[] = "(" . $notice . "," . $code_champ . "," . $code_ss_champ . "," . $j . ",'" . addslashes(trim($val)) . "',''," . $p_perso->get_pond($code_ss_champ) . ",0)";
                                 $j++;
                                 foreach ($tab_tmp as $mot) {
                                     if (trim($mot)) {
                                         $tab_mots[$mot] = "";
                                     }
                                 }
                             }
                             $pos = 1;
                             foreach ($tab_mots as $mot => $langage) {
                                 $num_word = 0;
                                 //on cherche le mot dans la table de mot...
                                 $query = "select id_word from words where word = '" . $mot . "' and lang = '" . $langage . "'";
                                 $result = pmb_mysql_query($query);
                                 if (pmb_mysql_num_rows($result)) {
                                     $num_word = pmb_mysql_result($result, 0, 0);
                                 } else {
                                     $dmeta = new DoubleMetaPhone($mot);
                                     $stemming = new stemming($mot);
                                     $element_to_update = "";
                                     if ($dmeta->primary || $dmeta->secondary) {
                                         $element_to_update .= "\n\t\t\t\t\t\t\t\t\t\t\t\tdouble_metaphone = '" . $dmeta->primary . " " . $dmeta->secondary . "'";
                                     }
                                     if ($element_to_update) {
                                         $element_to_update .= ",";
                                     }
                                     $element_to_update .= "stem = '" . $stemming->stem . "'";
                                     $query = "insert into words set word = '" . $mot . "', lang = '" . $langage . "'" . ($element_to_update ? ", " . $element_to_update : "");
                                     pmb_mysql_query($query);
                                     $num_word = pmb_mysql_insert_id();
                                 }
                                 if ($num_word != 0) {
                                     $tab_insert[] = "(" . $notice . "," . $code_champ . "," . $code_ss_champ . "," . $num_word . "," . $p_perso->get_pond($code_ss_champ) . ",{$order_fields},{$pos})";
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:67,代码来源:notice.class.php


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