3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2016 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
13 if (!defined('_ECRIRE_INC_VERSION')) return;
15 # Les information d'une rubrique selectionnee dans le mini navigateur
17 // http://doc.spip.org/@inc_informer_dist
18 function inc_informer_dist($id, $col, $exclus, $rac, $type, $do='aff')
20 include_spip('inc/texte');
21 if ($type == "rubrique") {
22 $row = sql_fetsel("titre, descriptif", "spip_rubriques", "id_rubrique = $id");
24 $titre = typo($row["titre"]);
25 $descriptif = propre($row["descriptif"]);
27 $titre = _T('info_racine_site');
33 if ($type == "rubrique" AND $GLOBALS['spip_display'] != 1 AND isset($GLOBALS['meta']['image_process']))
34 if ($GLOBALS['meta']['image_process'] != "non") {
35 $chercher_logo = charger_fonction('chercher_logo', 'inc');
36 if ($res = $chercher_logo($id, 'id_rubrique', 'on')) {
37 list($fid, $dir, $nom, $format) = $res;
38 include_spip('inc/filtres_images_mini');
39 $res = image_reduire("<img src='$fid' alt='' />", 100, 48);
41 $res = "<div style='float: ".$GLOBALS['spip_lang_right']."; margin-".$GLOBALS['spip_lang_right'].": -5px; margin-top: -5px;'>$res</div>";
45 $rac = spip_htmlentities($rac);
47 # ce lien provoque la selection (directe) de la rubrique cliquee
48 # et l'affichage de son titre dans le bandeau
49 $titre = strtr(str_replace("'", "’",
50 str_replace('"', """, textebrut($titre))),
53 $js_func = $do . '_selection_titre';
54 return "<div style='display: none;'>"
55 . "<input type='text' id='".$rac."_sel' value='$id' />"
56 . "<input type='text' id='".$rac."_sel2' value=\""
57 . entites_html($titre)
60 . "<div class='informer' style='padding: 5px; border-top: 0px;'>"
62 . "<p><b>".safehtml($titre)."</b></p>"
63 . (!$descriptif ?
'' : "<div>".safehtml($descriptif)."</div>")
64 . "<div style='text-align: ".$GLOBALS['spip_lang_right'].";'>"
65 . "<input type='submit' class='fondo' value='"
66 . _T('bouton_choisir')
67 . "'\nonclick=\"$js_func('$titre',$id,'selection_rubrique','id_parent'); return false;\" />"