edd52870be840e4b0bb1b74f4e2f7f3da7173377
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2017 *
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')) {
17 # Les information d'une rubrique selectionnee dans le mini navigateur
19 // http://code.spip.net/@inc_informer_dist
20 function inc_informer_dist($id, $col, $exclus, $rac, $type, $do = 'aff') {
21 include_spip('inc/texte');
22 $titre = $descriptif = '';
23 if ($type == "rubrique") {
24 $row = sql_fetsel("titre, descriptif", "spip_rubriques", "id_rubrique = " . intval($id));
26 $titre = typo($row["titre"]);
27 $descriptif = propre($row["descriptif"]);
29 $titre = _T('info_racine_site');
34 if ($type == "rubrique" and $GLOBALS['spip_display'] != 1 and isset($GLOBALS['meta']['image_process'])) {
35 if ($GLOBALS['meta']['image_process'] != "non") {
36 $chercher_logo = charger_fonction('chercher_logo', 'inc');
37 if ($res = $chercher_logo($id, 'id_rubrique', 'on')) {
38 list($fid, $dir, $nom, $format) = $res;
39 include_spip('inc/filtres_images_mini');
40 $res = image_reduire("<img src='$fid' alt='' />", 100, 48);
42 $res = "<div style='float: " . $GLOBALS['spip_lang_right'] . "; margin-" . $GLOBALS['spip_lang_right'] . ": -5px; margin-top: -5px;'>$res</div>";
48 $rac = spip_htmlentities($rac, ENT_QUOTES
);
49 $do = spip_htmlentities($do, ENT_QUOTES
);
52 # ce lien provoque la selection (directe) de la rubrique cliquee
53 # et l'affichage de son titre dans le bandeau
54 $titre = strtr(str_replace("'", "’",
55 str_replace('"', """, textebrut($titre))),
58 $js_func = $do . '_selection_titre';
60 return "<div style='display: none;'>"
61 . "<input type='text' id='" . $rac . "_sel' value='$id' />"
62 . "<input type='text' id='" . $rac . "_sel2' value=\""
63 . entites_html($titre)
66 . "<div class='informer' style='padding: 5px; border-top: 0px;'>"
68 . "<p><b>" . safehtml($titre) . "</b></p>"
69 . (!$descriptif ?
'' : "<div>" . safehtml($descriptif) . "</div>")
70 . "<div style='text-align: " . $GLOBALS['spip_lang_right'] . ";'>"
71 . "<input type='submit' class='fondo' value='"
72 . _T('bouton_choisir')
73 . "'\nonclick=\"$js_func('$titre',$id,'selection_rubrique','id_parent'); return false;\" />"