コード例 #1
0
ファイル: categ_form.inc.php プロジェクト: bouchra012/PMB
             $categ_child_content .= $zoom_comment . '</td>';
             if ($notice_count && $notice_count != 0) {
                 $categ_child_content .= "<td style='cursor: pointer; width:20%; text-align:center;' onmousedown=\"document.location='./catalog.php?categ=search&mode=1&etat=aut_search&aut_type=categ&aut_id={$tcateg->id}'\">" . $notice_count . "</td>";
             } else {
                 $categ_child_content .= "<td>&nbsp;</td>";
             }
             $categ_child_content .= '</tr>';
         }
         $categ_child_content .= "</table>\n\t\t\t\t</div>";
     }
 }
 $categ_renvoivoir_content = "";
 if (noeuds::isTarget($id)) {
     $has_link = true;
     $odd_even = 1;
     if ($res = noeuds::listTargets($id)) {
         $categ_renvoivoir_content .= "\n\t\t\t\t<div class='row'>\n\t        \t\t<label for='' class='etiquette'>{$msg['categ_renvoivoir']}</label>\n\t        \t</div>\n\t        \t<div class='row'>\n\t        \t\t<table>";
         while ($row = mysql_fetch_object($res)) {
             $tcateg = new category($row->id_noeud);
             $categ_renvoivoir_content .= "\t<tr class='even'>";
             if ($odd_even == 0) {
                 $categ_renvoivoir_content .= "\t<tr class='odd'>";
                 $odd_even = 1;
             } else {
                 if ($odd_even == 1) {
                     $categ_renvoivoir_content .= "\t<tr class='even'>";
                     $odd_even = 0;
                 }
             }
             $notice_count = $tcateg->notice_count(false);
             $categ_renvoivoir_content .= "<td class='colonne80'>";
コード例 #2
0
ファイル: synchro_rdf.class.php プロジェクト: bouchra012/PMB
 function getRdfConcept($idNoeud)
 {
     global $lang;
     $arrayTriples = array();
     $noeud = new noeuds($idNoeud);
     $thes = new thesaurus($noeud->num_thesaurus);
     $uriConcept = $this->baseUriConcept . $idNoeud;
     $uriThes = $this->baseUriThesaurus . $noeud->num_thesaurus;
     //Si le noeud possède un renvoi-voir, la catégorie n'est pas dans le graphe, il n'y a que son libellé en altLabel sur le renvoi
     if ($noeud->num_renvoi_voir) {
         return $arrayTriples;
     }
     //Type
     $triple = array();
     $triple[0] = '<' . $uriConcept . '>';
     $triple[1] = "rdf:type";
     $triple[2] = "skos:Concept";
     $arrayTriples[] = $triple;
     //Appartenance au schéma
     $triple = array();
     $triple[0] = '<' . $uriConcept . '>';
     $triple[1] = "skos:inScheme";
     $triple[2] = '<' . $uriThes . '>';
     $arrayTriples[] = $triple;
     //Catégorie
     $categ = new categories($idNoeud, $thes->langue_defaut);
     //Label
     $triple = array();
     $triple[0] = '<' . $uriConcept . '>';
     $triple[1] = "skos:prefLabel";
     $triple[2] = '"' . addslashes($categ->libelle_categorie) . '"';
     $arrayTriples[] = $triple;
     //Note application
     if ($tmp = trim($categ->note_application)) {
         $triple = array();
         $triple[0] = '<' . $uriConcept . '>';
         $triple[1] = "skos:scopeNote";
         $triple[2] = '"' . $tmp . '"';
         $arrayTriples[] = $triple;
     }
     //Commentaire public
     if ($tmp = trim($categ->comment_public)) {
         $triple = array();
         $triple[0] = '<' . $uriConcept . '>';
         $triple[1] = "skos:note";
         $triple[2] = '"' . $tmp . '"';
         $arrayTriples[] = $triple;
     }
     //Noeud
     if ($noeud->num_parent) {
         if ($thes->num_noeud_racine == $noeud->num_parent) {
             $triple = array();
             $triple[0] = '<' . $uriConcept . '>';
             $triple[1] = "skos:topConceptOf";
             $triple[2] = '<' . $uriThes . '>';
             $arrayTriples[] = $triple;
         } else {
             $triple = array();
             $triple[0] = '<' . $uriConcept . '>';
             $triple[1] = "skos:broader";
             $triple[2] = '<' . $this->baseUriConcept . $noeud->num_parent . '>';
             $arrayTriples[] = $triple;
         }
     }
     //Les renvois
     $res = $noeud->listTargets();
     if (mysql_num_rows($res)) {
         while ($row = mysql_fetch_array($res)) {
             $renvoi = new categories($row[0], $thes->langue_defaut);
             $triple = array();
             $triple[0] = '<' . $uriConcept . '>';
             $triple[1] = "skos:altLabel";
             $triple[2] = '"' . addslashes($renvoi->libelle_categorie) . '"';
             $arrayTriples[] = $triple;
         }
     }
     //Gestion des enfants : on veut les enfants, même avec renvois (poly-hiérarchie)
     $res = noeuds::listChilds($idNoeud, 1);
     if (mysql_num_rows($res)) {
         while ($row = mysql_fetch_array($res)) {
             $enfant = new noeuds($row[0]);
             if ($enfant->num_renvoi_voir) {
                 $triple = array();
                 $triple[0] = '<' . $uriConcept . '>';
                 $triple[1] = "skos:narrower";
                 $triple[2] = '<' . $this->baseUriConcept . $enfant->num_renvoi_voir . '>';
                 $arrayTriples[] = $triple;
             } else {
                 $triple = array();
                 $triple[0] = '<' . $uriConcept . '>';
                 $triple[1] = "skos:narrower";
                 $triple[2] = '<' . $this->baseUriConcept . $row[0] . '>';
                 $arrayTriples[] = $triple;
             }
         }
     }
     //Les voir aussi
     $res = $noeud->listUsedInSeeAlso();
     if (mysql_num_rows($res)) {
         while ($row = mysql_fetch_array($res)) {
             $triple = array();
             $triple[0] = '<' . $uriConcept . '>';
             $triple[1] = "skos:related";
             $triple[2] = '<' . $this->baseUriConcept . $row[0] . '>';
             $arrayTriples[] = $triple;
         }
     }
     return $arrayTriples;
 }