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


PHP categories::listSynonymes方法代码示例

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


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

示例1: thesaurus

 $thes = new thesaurus($id_thes);
 $id_top = $thes->num_noeud_racine;
 //FIL D'ARIANNE DANS LE THESAURUS
 $context['authority']['breadcrumb'] = "";
 $ourCateg = new categorie($id);
 // affichage du path de la catégorie
 if ($opac_thesaurus) {
     $thes_lib_to_print = "<a href=\"./index.php?lvl=categ_see&id=" . $ourCateg->thes->num_noeud_racine . "\">" . $ourCateg->thes->libelle_thesaurus . "</a>";
 } else {
     $thes_lib_to_print = "<a href=\"./index.php?lvl=categ_see&id=" . $ourCateg->thes->num_noeud_racine . "\"><img src='./images/home.gif' border='0'></a>";
 }
 $context['authority']['breadcrumb'] = $thes_lib_to_print;
 $context['authority']['breadcrumb'] .= pmb_bidi($ourCateg->categ_path($opac_categories_categ_path_sep, $css));
 //SYNONYMES
 $context['authority']['synonyms'] = array();
 $synonymes = categories::listSynonymes($id, $lang);
 while ($row = pmb_mysql_fetch_object($synonymes)) {
     $context['authority']['synonyms'][] = $row->libelle_categorie;
 }
 //VOIR
 if ($ourCateg->voir) {
     $context['authority']['voir'] = new categories($ourCateg->voir, $lang);
 }
 //VOIR AUSSI
 $context['authority']['see_also'] = array();
 $q = "select ";
 $q .= "distinct catdef.num_noeud,catdef.note_application, catdef.comment_public,";
 $q .= "if (catlg.num_noeud is null, catdef.libelle_categorie, catlg.libelle_categorie) as libelle_categorie ";
 $q .= "from voir_aussi left join noeuds on noeuds.id_noeud=voir_aussi.num_noeud_dest ";
 $q .= "left join categories as catdef on noeuds.id_noeud=catdef.num_noeud and catdef.langue = '" . $thes->langue_defaut . "' ";
 $q .= "left join categories as catlg on catdef.num_noeud = catlg.num_noeud and catlg.langue = '" . $lang . "' ";
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:categ_see.inc.php

示例2: array

     $thes_lib_to_print = "<a href=\"./index.php?lvl=categ_see&id=" . $ourCateg->thes->num_noeud_racine . "\"><img src='./images/home.gif' border='0'></a>";
 }
 print "<div id='aut_see'>\n" . $thes_lib_to_print . "\n";
 print pmb_bidi($ourCateg->categ_path($opac_categories_categ_path_sep, $css));
 // si la catégorie à des enfants, on les affiche
 if ($ourCateg->has_child) {
     print pmb_bidi($ourCateg->child_list('./images/folder.gif', $css));
 }
 print "<h4 class='title_categ'><span>" . $ourCateg->libelle . "</span></h4>";
 if ($ourCateg->comment) {
     print "\n\t\t<div id='categ_see_comment'>\n" . nl2br($ourCateg->comment) . "\n\t\t</div>";
 }
 // Les Synonymes
 $tab_libelle = array();
 $categ = new categories($id, $lang);
 $synonymes = $categ->listSynonymes($id, $lang);
 while ($row = mysql_fetch_object($synonymes)) {
     $tab_libelle[] = $row->libelle_categorie;
 }
 if (count($tab_libelle)) {
     print "\n\t\t<div id='categ_see_synonyme' class='categ_see_title'>\n\n\t\t\t<h5><span>" . $msg["categ_see_synonyme"] . "</span></h5>" . implode("; ", $tab_libelle) . "\n\t\t</div>";
 }
 if ($ourCateg->voir) {
     $categ = new categories($ourCateg->voir, $lang);
     print "\n\t\t<div id='categ_see_renvoi_voir' class='categ_see_title'>\n\n\t\t<h5><span>" . $msg["term_show_see"] . "</span></h5>\n\t\t<a href=\"./index.php?lvl=categ_see&id=" . $ourCateg->voir . "&main=\">" . htmlentities($categ->libelle_categorie, ENT_QUOTES, $charset) . "</a>\n\t\t</div>";
 }
 $q = "select ";
 $q .= "distinct catdef.num_noeud,catdef.note_application, catdef.comment_public,";
 $q .= "if (catlg.num_noeud is null, catdef.libelle_categorie, catlg.libelle_categorie) as libelle_categorie ";
 $q .= "from voir_aussi left join noeuds on noeuds.id_noeud=voir_aussi.num_noeud_dest ";
 $q .= "left join categories as catdef on noeuds.id_noeud=catdef.num_noeud and catdef.langue = '" . $thes->langue_defaut . "' ";
开发者ID:bouchra012,项目名称:PMB,代码行数:31,代码来源:categ_see.inc.php


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