034b87454c40b65ae285643642fc65713ef0ff6c
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2011 *
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 global $spip_display,$spip_lang_right ;
22 include_spip('inc/texte');
23 if ($type == "rubrique") {
24 $row = sql_fetsel("titre, descriptif", "spip_rubriques", "id_rubrique = $id");
26 $titre = typo($row["titre"]);
27 $descriptif = propre($row["descriptif"]);
29 $titre = _T('info_racine_site');
35 if ($type == "rubrique" AND $spip_display != 1 AND $spip_display!=4 AND isset($GLOBALS['meta']['image_process']))
36 if ($GLOBALS['meta']['image_process'] != "non") {
37 $chercher_logo = charger_fonction('chercher_logo', 'inc');
38 if ($res = $chercher_logo($id, 'id_rubrique', 'on')) {
39 list($fid, $dir, $nom, $format) = $res;
40 include_spip('inc/filtres_images_mini');
41 $res = image_reduire("<img src='$fid' alt='' />", 100, 48);
43 $res = "<div style='float: $spip_lang_right; margin-$spip_lang_right: -5px; margin-top: -5px;'>$res</div>";
47 $rac = htmlentities($rac);
49 # ce lien provoque la selection (directe) de la rubrique cliquee
50 # et l'affichage de son titre dans le bandeau
51 $titre = strtr(str_replace("'", "’",
52 str_replace('"', """, textebrut($titre))),
55 $js_func = $do . '_selection_titre';
56 return "<div style='display: none;'>"
57 . "<input type='text' id='".$rac."_sel' value='$id' />"
58 . "<input type='text' id='".$rac."_sel2' value=\""
59 . entites_html($titre)
62 . "<div class='informer' style='padding: 5px; border-top: 0px;'>"
64 . "<p><b>".safehtml($titre)."</b></p>"
65 . (!$descriptif ?
'' : "<div>".safehtml($descriptif)."</div>")
66 . "<div style='text-align: $spip_lang_right;'>"
67 . "<input type='submit' value='"
68 . _T('bouton_choisir')
69 . "'\nonclick=\"$js_func('$titre',$id,'selection_rubrique','id_parent'); return false;\" />"