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


PHP categories::listAncestors方法代码示例

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


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

示例1: mysql_query

     if (categories::exists($mesCategories_trouvees->num_renvoi_voir, $lang)) {
         $lg = $lang;
     } else {
         $thes = thesaurus::getByEltId($mesCategories_trouvees->num_noeud);
         $lg = $thes->langue_defaut;
     }
     $q = "select * from noeuds, categories where num_noeud='" . $mesCategories_trouvees->num_renvoi_voir . "' and langue = '" . $lg . "' and noeuds.id_noeud = categories.num_noeud limit 1";
     $found_see = mysql_query($q, $dbh);
     $mesCategories = @mysql_fetch_object($found_see);
     print pmb_bidi("<b>" . $mesCategories_trouvees->libelle_categorie . "</b> " . $msg['term_show_see'] . " ");
 } else {
     $mesCategories = $mesCategories_trouvees;
 }
 // Affichage de l'arborescence des renvois voir
 if ($mesCategories->num_parent) {
     $bar = categories::listAncestors($mesCategories->num_noeud, $lang);
     $bar = array_reverse($bar);
     if ($bar[3]) {
         print pmb_bidi("<a href=./index.php?lvl=categ_see&id=" . $bar[3]['num_noeud'] . "><img src='./images/folder.gif' border='0' align='middle'>...</a> > ");
     }
     if ($bar[2]) {
         print pmb_bidi("<a href=./index.php?lvl=categ_see&id=" . $bar[2]['num_noeud'] . "><img src='./images/folder.gif' border='0' align='middle'>" . $bar[2]['libelle_categorie'] . '</a> > ');
     }
     if ($bar[1]) {
         print pmb_bidi("<a href=./index.php?lvl=categ_see&id=" . $bar[1]['num_noeud'] . "><img src='./images/folder.gif' border='0' align='middle'>" . $bar[1]['libelle_categorie'] . '</a> > ');
     }
 }
 print "<a href=./index.php?lvl=categ_see&id=" . $mesCategories->num_noeud . ">";
 // Si il y a présence d'un commentaire affichage du layer
 $result_com = categorie::zoom_categ($mesCategories_trouvees->num_noeud, $mesCategories_trouvees->note_application);
 if (category::has_notices($mesCategories_trouvees->num_noeud)) {
开发者ID:bouchra012,项目名称:PMB,代码行数:31,代码来源:category.inc.php

示例2: _export_


//.........这里部分代码省略.........
    //Notes (NO)
    if ($tyd == "REVUE") {
        $no = $rn->npages;
    } else {
        $no = $rn->n_contenu;
    }
    if ($no) {
        $notice .= "<NO>" . htmlspecialchars($no, ENT_QUOTES, $charset) . "</NO>\n";
    }
    $requete = "SELECT num_noeud FROM notices_categories WHERE notcateg_notice={$id} ORDER BY ordre_categorie";
    $resultat = mysql_query($requete);
    $go = array();
    $hi = array();
    $denp = array();
    $de = array();
    $cd = array();
    if ($m_thess > 1) {
        while (list($categ_id) = mysql_fetch_row($resultat)) {
            $categ = new category($categ_id);
            if (trouve_thesaurus("GO") == $categ->thes->id_thesaurus) {
                $go[] = $categ->libelle;
            } elseif (trouve_thesaurus("HI") == $categ->thes->id_thesaurus) {
                $hi[] = $categ->libelle;
            } elseif (trouve_thesaurus("DENP") == $categ->thes->id_thesaurus) {
                $denp[] = $categ->libelle;
            } elseif (trouve_thesaurus("DE") == $categ->thes->id_thesaurus) {
                $de[] = $categ->libelle;
            } elseif (trouve_thesaurus("CD") == $categ->thes->id_thesaurus) {
                $cd[] = $categ->libelle;
            }
        }
    } else {
        while (list($categ_id) = mysql_fetch_row($resultat)) {
            $categ = new categories($categ_id, 'fr_FR');
            $list_categ = categories::listAncestors($categ_id, 'fr_FR');
            reset($list_categ);
            list($id, $libelle) = each($list_categ);
            switch ($libelle["autorite"]) {
                case "GO":
                    $go[] = $categ->libelle_categorie;
                    break;
                case "HI":
                    $hi[] = $categ->libelle_categorie;
                    break;
                case "DENP":
                    $denp[] = $categ->libelle_categorie;
                    break;
                case "DE":
                    $de[] = $categ->libelle_categorie;
                    break;
                case "CD":
                    $cd[] = $categ->libelle_categorie;
                    break;
            }
        }
    }
    //Zone (GO)
    if (count($go)) {
        //sort($go);
        $notice .= "<GO>" . htmlspecialchars(strtoupper(implode(", ", $go)), ENT_QUOTES, $charset) . "</GO>\n";
    }
    //Période historique (HI)
    if (count($hi)) {
        //sort($hi);
        $notice .= "<HI>" . htmlspecialchars(strtoupper(implode(", ", $hi)), ENT_QUOTES, $charset) . "</HI>\n";
    }
    //Descripteurs noms propres (DENP)
    if (count($denp)) {
        //sort($denp);
        $notice .= "<DENP>" . htmlspecialchars(strtoupper(implode(", ", $denp)), ENT_QUOTES, $charset) . "</DENP>\n";
    }
    //Descripteurs (DE)
    if (count($de)) {
        //sort($de);
        $notice .= "<DE>" . htmlspecialchars(strtoupper(implode(", ", $de)), ENT_QUOTES, $charset) . "</DE>\n";
    }
    //Candidats descripteurs (CD)
    if (count($cd)) {
        //sort($cd);
        $notice .= "<CD>" . htmlspecialchars(strtoupper(implode(", ", $cd)), ENT_QUOTES, $charset) . "</CD>\n";
    }
    //Resumé (RESU)
    if ($rn->n_resume) {
        $notice .= "<RESU>" . htmlspecialchars($rn->n_resume, ENT_QUOTES, $charset) . "</RESU>\n";
    }
    //date de tri (DATRI)
    if ($rb->date_date) {
        $notice .= "<DATRI>" . htmlspecialchars($rb->date_date, ENT_QUOTES, $charset) . "</DATRI>\n";
    }
    //url (URL)
    if ($rn->lien) {
        $notice .= "<URL>" . htmlspecialchars($rn->lien, ENT_QUOTES, $charset) . "</URL>\n";
    }
    //isbn (ISBN)
    if ($rn->code) {
        $notice .= "<ISBN>" . htmlspecialchars(str_replace("-", "", $rn->code), ENT_QUOTES, $charset) . "</ISBN>\n";
    }
    $notice .= "</notice>";
    return $notice;
}
开发者ID:bouchra012,项目名称:PMB,代码行数:101,代码来源:export.inc.php

示例3: categ_path

 function categ_path($sep = ' &gt; ', $css)
 {
     global $dbh;
     global $css;
     global $main;
     global $lang;
     if (!$this->id) {
         return;
     }
     $desc_categ = self::zoom_categ($this->id, $this->comment);
     $current = "{$sep}<a href='./index.php?lvl=categ_see&id=" . $this->id . "&main={$main}'" . $desc_categ['java_com'] . ">" . $this->libelle . '</a>' . " " . $desc_categ['zoom'];
     // si pas de parent, le path se résume à la catégorie
     if (!$this->parent) {
         return $current;
     }
     // les parents sont mis en tableau
     $parent_id = $this->parent;
     $path_array = array();
     $path_array = categories::listAncestors($parent_id, $lang);
     while (list($cle, $valeur) = each($path_array)) {
         $ret .= $sep . "<a href='./index.php?lvl=categ_see&id={$valeur['num_noeud']}&main={$main}'>";
         $ret .= $valeur['libelle_categorie'] . '</a>';
     }
     return $ret . $current;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:25,代码来源:categorie.class.php


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