" . $msg['print_concepts_title'] . "
" . $msg['print_concepts_options'] . "
" . $msg['print_thes_list_type'] . "
 
 
 
 
 
" . $msg["print_output_title"] . "
 
 
 
"; } if ($action == "print") { if (isset($scheme_id) && $scheme_id!=0) { if (isset($parent_id) && $parent_id!=0 && $parent_id != $scheme_id) { $query = 'select distinct ?concept where { ?concept rdf:type skos:Concept . ?concept skos:prefLabel ?label . ?concept skos:inScheme <'.onto_common_uri::get_uri($scheme_id).'> . ?concept skos:broader <'.onto_common_uri::get_uri($parent_id).'> } order by ?label'; } else { $query = 'select distinct ?concept where { ?concept rdf:type skos:Concept . ?concept skos:prefLabel ?label . ?concept skos:inScheme <'.onto_common_uri::get_uri($scheme_id).'> . ?concept pmb:showInTop <'.onto_common_uri::get_uri($scheme_id).'> . } order by ?label'; } } else { $query = 'select distinct ?scheme ?label where { ?scheme rdf:type skos:ConceptScheme . ?scheme skos:prefLabel ?label . } order by ?label'; } $store = skos_datastore::get_store(); $results = $store->get_result($store->query($query)); if ($output == "tt") { header("Content-Type: application/word"); header("Content-Disposition: attachement; filename=concepts.doc"); } print ""; print "

" . encoding_normalize::utf8_normalize($msg["print_concepts_titre_" . $typeimpression]) . "

"; $niveau = 0; switch ($typeimpression) { case "arbo": echo ""; $count = count($results); for ($i = 0; $i < $count; $i++) { enfants($results[$i]->concept, $niveau, true); } echo "
"; break; case "alph": $count = count($results); for ($i = 0; $i < $count; $i++) { enfants($results[$i]->concept, $niveau, false); } asort($data_noeud_to_sort); echo ""; foreach ($data_noeud_to_sort as $uri => $value) { echo encoding_normalize::utf8_normalize($data_noeud[$uri]['display']); } echo "
"; break; } print ""; } pmb_mysql_close($dbh); function enfants($uri, $niveau, $print_arbo = true) { global $list_uri, $data_noeud, $data_noeud_to_sort; if (in_array($uri, $list_uri)) return; $list_uri[] = $uri; $authority = authorities_collection::get_authority(AUT_TABLE_AUTHORITY, 0, ['num_object' => onto_common_uri::get_id($uri), 'type_object' => AUT_TABLE_CONCEPT]); if ($print_arbo) { echo encoding_normalize::utf8_normalize(infos_noeud($uri, $authority, $niveau)); flush(); } else { $data_noeud[$uri] = get_data_noeud($uri, $authority, $niveau); $data_noeud_to_sort[$uri] = strtoupper($data_noeud[$uri]['name']); } // chercher les enfants $narrowers = $authority->get_object_instance->get_narrowers()->get_concepts(); if (count($narrowers)) { if ($print_arbo) $niveau++; foreach ($narrowers as $narrower) { enfants($narrower->get_uri(), $niveau, $print_arbo); } } } function get_data_noeud($uri, $authority, $niveau) { global $color; global $print_concepts_option_libelle, $print_concepts_option_uri, $print_concepts_option_isbd, $print_concepts_option_detail, $print_concepts_option_alter_hidden; $data = [ 'id' => onto_common_uri::get_id($uri), 'uri' => $uri, 'name' => $authority->get_object_instance->get_display_label(), 'isbd' => $authority->get_isbd(), 'alter_hidden' => $authority->get_object_instance->get_alter_hidden_list(), 'detail' => $authority->get_object_instance->get_details_list(), ]; $data['display'] = "
" . ($print_concepts_option_libelle ? $data['name'] . '
' : '') . ($print_concepts_option_isbd ? $data['isbd'] . '
' : '') . ($print_concepts_option_uri ? $data['uri'] . '
' : '') . ($print_concepts_option_alter_hidden ? $data['alter_hidden'] . '
' : '') . ($print_concepts_option_detail ? $data['detail'] . '
' : '') . "
"; return $data; } function infos_noeud($uri, $authority, $niveau) { global $color; global $print_concepts_option_libelle, $print_concepts_option_uri, $print_concepts_option_isbd, $print_concepts_option_detail, $print_concepts_option_alter_hidden; $data = [ 'id' => onto_common_uri::get_id($uri), 'uri' => $uri, 'name' => $authority->get_object_instance->get_display_label(), 'isbd' => $authority->get_isbd(), 'alter_hidden' => $authority->get_object_instance->get_alter_hidden_list(), 'detail' => $authority->get_object_instance->get_details_list(), ]; return "
" . ($print_concepts_option_libelle ? $data['name'] . '
' : '') . ($print_concepts_option_isbd ? $data['isbd'] . '
' : '') . ($print_concepts_option_uri ? $data['uri'] . '
' : '') . ($print_concepts_option_alter_hidden ? $data['alter_hidden'] . '
' : '') . ($print_concepts_option_detail ? $data['detail'] . '
' : '') . "
"; }